nixos-config/flake.nix

101 lines
3.1 KiB
Nix
Raw Normal View History

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
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 20:44:07 +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
timezone = "America/Chicago"; # select timezone
locale = "en_US.UTF-8"; # select locale
2023-06-21 20:44:07 +05:30
# ----- USER SETTINGS ----- #
username = "emmet"; # username
name = "Emmet"; # name/identifier
2023-06-21 04:01:49 +05:30
email = "librephoenix3@pm.me"; # email (used for certain configurations)
dotfilesDir = "~/.dotfiles"; # absolute path of the repo locally
2023-06-21 04:01:49 +05:30
theme = "ayu-dark"; # selcted theme from my themes directory
wm = "xmonad"; # Selected window manager or desktop environment
font = "Inconsolata"; # Selected font
fontPkg = pkgs.inconsolata; # Font package
2023-05-08 04:17:40 +05:30
2023-06-21 21:01:09 +05:30
# set pkgs to correct type
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 {
homeConfigurations = {
emmet = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ (./. + "/profiles"+("/"+profile)+"/home.nix") ]; # load home.nix from profile
extraSpecialArgs = {
inherit username;
inherit name;
inherit hostname;
inherit email;
inherit dotfilesDir;
inherit theme;
inherit font;
inherit fontPkg;
inherit wm;
inherit (inputs) nix-doom-emacs;
inherit (inputs) stylix;
2023-05-20 06:55:57 +05:30
inherit (inputs) eaf;
inherit (inputs) eaf-browser;
inherit (inputs) org-nursery;
};
};
};
2023-05-08 04:17:40 +05:30
nixosConfigurations = {
snowfire = lib.nixosSystem {
inherit system;
modules = [ (./. + "/profiles"+("/"+profile)+"/configuration.nix") ]; # load configuration.nix from profile
specialArgs = {
inherit username;
inherit name;
inherit hostname;
inherit timezone;
inherit locale;
inherit theme;
inherit font;
inherit fontPkg;
inherit wm;
inherit (inputs) stylix;
2023-06-18 09:18:58 +05:30
inherit (inputs) blocklist-hosts;
};
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";
nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
stylix.url = "github:danth/stylix";
rust-overlay.url = "github:oxalica/rust-overlay";
eaf = {
url = "github:emacs-eaf/emacs-application-framework";
flake = false;
};
eaf-browser = {
url = "github:emacs-eaf/eaf-browser";
flake = false;
};
org-nursery = {
url = "github:chrisbarrett/nursery";
flake = false;
};
blocklist-hosts = {
url = "github:StevenBlack/hosts";
flake = false;
};
};
2023-05-08 04:17:40 +05:30
}