move to mkModuleTree for host configuration
This commit is contained in:
parent
b454514085
commit
3c4bf8040c
13 changed files with 42 additions and 31 deletions
21
README.org
21
README.org
|
@ -1,18 +1,27 @@
|
|||
# nichts
|
||||
* nichts
|
||||
This is my personal collection of NixOS configuration files, made to be simple to understand and *sane*.
|
||||
** Goals of this configuraton
|
||||
This projects pursues some main goals:
|
||||
1.
|
||||
** Layout of this configuraton
|
||||
This configuraton is split up into *three* important parts:
|
||||
- hosts
|
||||
The configuraton for my different host systems.
|
||||
- modules
|
||||
|
||||
My personal collection of NixOS configuration files
|
||||
- parts
|
||||
|
||||
# License
|
||||
* License
|
||||
|
||||
GNU GPL3
|
||||
|
||||
# credits
|
||||
* credits
|
||||
|
||||
This configuration was made possible through the help of some amazing people!
|
||||
This configuration was only made possible through the help of some amazing people!
|
||||
Below are all the repositories I took inspiration from, check them out!
|
||||
|
||||
```
|
||||
*heavily* inspired by https://git.jacekpoz.pl/jacekpoz/niksos.git !
|
||||
Jacekpoz: https://git.jacekpoz.pl/jacekpoz/niksos.git !
|
||||
Dragyx: https://github.com/dragyx/nichts
|
||||
Sioodmy: https://github.com/sioodmy/dotfiles
|
||||
Heinrik Lissner: https://github.com/hlissner/dotfiles/
|
||||
|
|
|
@ -5,24 +5,34 @@
|
|||
}: let
|
||||
inherit (inputs.self) lib;
|
||||
inherit (lib.extendedLib.builders) mkSystem;
|
||||
inherit (lib.extendedLib.modules) mkModuleTree';
|
||||
inherit (lib.lists) concatLists flatten singleton;
|
||||
|
||||
mkModulesFor = hostname:
|
||||
flatten (
|
||||
concatLists [
|
||||
# Derive host specific module path from the first argument of the
|
||||
# function. Should be a string, obviously.
|
||||
(singleton ./vali/${hostname}/default.nix)
|
||||
|
||||
|
||||
# Recursively import all module trees (i.e. directories with a `module.nix`)
|
||||
# for given moduleTree directories, and in addition, roles.
|
||||
(mkModuleTree' {path = ../modules;})
|
||||
]
|
||||
);
|
||||
in {
|
||||
flake.nixosConfigurations = {
|
||||
temperance = mkSystem {
|
||||
inherit withSystem;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./vali/temperance
|
||||
../modules
|
||||
];
|
||||
modules = mkModulesFor "temperance";
|
||||
};
|
||||
|
||||
hermit = mkSystem {
|
||||
inherit withSystem;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./vali/hermit
|
||||
../modules
|
||||
];
|
||||
modules = mkModulesFor "hermit";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -91,7 +91,10 @@
|
|||
in {
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
home.packages = [custom-emacs];
|
||||
home.packages = with pkgs; [
|
||||
custom-emacs
|
||||
clang-tools
|
||||
];
|
||||
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
inherit (config.modules.other.system) username;
|
||||
in {
|
||||
home-manager.users.${username} = {
|
||||
imports = [./default.nix];
|
||||
home.pointerCursor = {
|
||||
# inherit the default values set in the options,
|
||||
# since these are the once I need on all my systems.
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
_: {imports = [./bluetooth.nix ./graphics.nix];}
|
|
@ -0,0 +1 @@
|
|||
_: {imports = [./bluetooth.nix ./graphics.nix];}
|
|
@ -5,8 +5,8 @@
|
|||
}: let
|
||||
inherit (inputs) self;
|
||||
inherit (lib) mkDefault nixosSystem recursiveUpdate;
|
||||
inherit (lib.lists) singleton concatLists flatten;
|
||||
inherit (lib.extendedLib.modules) mkModuleTree';
|
||||
inherit (lib.lists) singleton concatLists;
|
||||
|
||||
mkSystem = {
|
||||
withSystem,
|
||||
system,
|
||||
|
@ -41,18 +41,6 @@
|
|||
];
|
||||
}
|
||||
);
|
||||
mkModulesForSystem = {
|
||||
hostname,
|
||||
modulePath ? ./modules,
|
||||
...
|
||||
} @ args:
|
||||
flatten (
|
||||
concatLists [
|
||||
(self.outPath + ./.)
|
||||
(mkModuleTree' {path = self.outPath + modulePath;})
|
||||
# singleton
|
||||
]
|
||||
);
|
||||
in {
|
||||
inherit mkSystem mkModulesForSystem;
|
||||
inherit mkSystem;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue