2023-05-08 04:17:40 +05:30
|
|
|
{
|
2023-06-11 20:56:47 +05:30
|
|
|
description = "Flake of LibrePhoenix";
|
2023-05-08 04:17:40 +05:30
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
|
|
home-manager.url = "github:nix-community/home-manager/master";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2023-05-11 08:02:06 +05:30
|
|
|
nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
|
2023-05-13 17:56:54 +05:30
|
|
|
stylix.url = "github:danth/stylix";
|
2023-05-21 06:28:54 +05:30
|
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
2023-05-20 06:55:57 +05:30
|
|
|
eaf = {
|
|
|
|
url = "github:emacs-eaf/emacs-application-framework";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
eaf-browser = {
|
|
|
|
url = "github:emacs-eaf/eaf-browser";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-06-04 09:42:31 +05:30
|
|
|
org-nursery = {
|
|
|
|
url = "github:chrisbarrett/nursery";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-06-18 09:18:58 +05:30
|
|
|
blocklist-hosts = {
|
|
|
|
url = "github:StevenBlack/hosts";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-05-08 04:17:40 +05:30
|
|
|
};
|
|
|
|
|
2023-06-18 09:18:58 +05:30
|
|
|
outputs = { self, nixpkgs, home-manager, nix-doom-emacs, stylix, eaf, eaf-browser, org-nursery, blocklist-hosts, rust-overlay, ... }@inputs:
|
2023-05-08 04:17:40 +05:30
|
|
|
let
|
2023-06-21 08:33:14 +05:30
|
|
|
# --- SYSTEM SETTINGS --- #
|
2023-06-21 04:01:49 +05:30
|
|
|
system = "x86_64-linux"; # system arch
|
|
|
|
hostname = "snowfire"; # hostname
|
|
|
|
profile = "personal"; # select a profile defined from my profiles directory
|
2023-06-21 08:33:14 +05:30
|
|
|
timezone = "America/Chicago"; # select timezone
|
|
|
|
locale = "en_US.UTF-8"; # select locale
|
|
|
|
|
|
|
|
# ---- USER SETTINGS ---- #
|
2023-06-21 04:01:49 +05:30
|
|
|
name = "emmet"; # username
|
|
|
|
email = "librephoenix3@pm.me"; # email (used for certain configurations)
|
|
|
|
dotfilesDir = "~/.dotfiles"; # absolute path of the repo
|
|
|
|
theme = "ayu-dark"; # selcted theme from my themes directory
|
2023-06-03 21:54:49 +05:30
|
|
|
|
2023-06-21 08:33:14 +05:30
|
|
|
# ---- CALCULATIONS ----- #
|
|
|
|
profileWithSlash = "/" + profile; # I honestly don't know why this is necessary
|
|
|
|
homeNixPath = ./. + "/profiles" + profileWithSlash + "/home.nix";
|
|
|
|
configurationNixPath = ./. + "/profiles" + profileWithSlash + "/configuration.nix";
|
|
|
|
|
2023-06-03 21:54:49 +05:30
|
|
|
themePolarityPath = "/themes/"+theme+"/polarity.txt";
|
2023-06-04 21:22:24 +05:30
|
|
|
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + themePolarityPath));
|
2023-05-29 08:39:48 +05:30
|
|
|
backgroundUrlPath = "/themes/"+theme+"/backgroundurl.txt";
|
|
|
|
backgroundUrl = builtins.readFile (./. + backgroundUrlPath);
|
|
|
|
backgroundSha256Path = "/themes/"+theme+"/backgroundsha256.txt";
|
|
|
|
backgroundSha256 = builtins.readFile (./. + backgroundSha256Path);
|
2023-05-08 04:17:40 +05:30
|
|
|
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
config = { allowUnfree = true; };
|
2023-05-21 06:28:54 +05:30
|
|
|
overlays = [ rust-overlay.overlays.default ];
|
2023-05-08 04:17:40 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
lib = nixpkgs.lib;
|
|
|
|
|
|
|
|
in {
|
2023-05-09 07:36:37 +05:30
|
|
|
homeConfigurations = {
|
|
|
|
emmet = home-manager.lib.homeManagerConfiguration {
|
|
|
|
inherit pkgs;
|
|
|
|
modules = [
|
2023-06-21 08:33:14 +05:30
|
|
|
homeNixPath
|
2023-05-09 07:36:37 +05:30
|
|
|
];
|
2023-05-14 01:49:11 +05:30
|
|
|
extraSpecialArgs = {
|
|
|
|
myName = name;
|
2023-06-21 08:33:14 +05:30
|
|
|
myHostname = hostname;
|
2023-05-15 07:02:49 +05:30
|
|
|
myHomeDir = "/home/"+name;
|
2023-05-14 01:49:11 +05:30
|
|
|
myEmail = email;
|
|
|
|
myDotfilesDir = dotfilesDir;
|
2023-05-14 07:13:35 +05:30
|
|
|
myTheme = theme;
|
2023-05-28 06:37:33 +05:30
|
|
|
myThemePolarity = themePolarity;
|
2023-05-23 07:09:15 +05:30
|
|
|
myBackgroundUrl = backgroundUrl;
|
|
|
|
myBackgroundSha256 = backgroundSha256;
|
2023-06-21 08:33:14 +05:30
|
|
|
inherit (inputs) nix-doom-emacs;
|
|
|
|
inherit (inputs) stylix;
|
2023-05-20 06:55:57 +05:30
|
|
|
inherit (inputs) eaf;
|
|
|
|
inherit (inputs) eaf-browser;
|
2023-06-04 09:42:31 +05:30
|
|
|
inherit (inputs) org-nursery;
|
2023-05-14 01:49:11 +05:30
|
|
|
};
|
2023-05-09 07:36:37 +05:30
|
|
|
};
|
|
|
|
};
|
2023-05-08 04:17:40 +05:30
|
|
|
nixosConfigurations = {
|
|
|
|
snowfire = lib.nixosSystem {
|
|
|
|
inherit system;
|
2023-06-21 08:33:14 +05:30
|
|
|
modules = [ configurationNixPath ];
|
2023-05-23 07:09:15 +05:30
|
|
|
specialArgs = {
|
2023-06-21 08:33:14 +05:30
|
|
|
myName = name;
|
2023-05-23 07:09:15 +05:30
|
|
|
myTheme = theme;
|
2023-06-21 04:01:49 +05:30
|
|
|
myHostname = hostname;
|
2023-06-21 08:38:25 +05:30
|
|
|
myTimezone = timezone;
|
|
|
|
myLocale = locale;
|
2023-06-16 06:14:14 +05:30
|
|
|
myThemePolarity = themePolarity;
|
2023-05-23 07:09:15 +05:30
|
|
|
myBackgroundUrl = backgroundUrl;
|
|
|
|
myBackgroundSha256 = backgroundSha256;
|
2023-06-21 08:33:14 +05:30
|
|
|
inherit (inputs) stylix;
|
2023-06-18 09:18:58 +05:30
|
|
|
inherit (inputs) blocklist-hosts;
|
2023-05-23 07:09:15 +05:30
|
|
|
};
|
2023-05-08 04:17:40 +05:30
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|