build(flake): add home-manager and example config
This commit is contained in:
parent
1fc8230bfc
commit
f670889e29
5 changed files with 53 additions and 2 deletions
|
@ -8,7 +8,13 @@
|
|||
'';
|
||||
parts."Structure" = # markdown
|
||||
''
|
||||
The system configurations are defined in [`flake.manifest`](nix/manifest.nix).
|
||||
The system configurations are defined in [`flake.manifest`](nix/manifest.nix).
|
||||
The attribute `flake.modules.nixos.common` provides options that will be applied to every system.
|
||||
You can use it as seen [here](nix/modules/flake/home-manager.nix):
|
||||
|
||||
```nix
|
||||
flake.modules.nixos.common.imports = [ inputs.home-manager.nixosModules.default ];
|
||||
```
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
13
nix/modules/flake/home-manager.nix
Normal file
13
nix/modules/flake/home-manager.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ inputs, ... }:
|
||||
let
|
||||
hm = inputs.home-manager;
|
||||
globalCfg = {
|
||||
imports = [ hm.nixosModules.home-manager ];
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ hm.flakeModules.home-manager ];
|
||||
flake.modules.nixos.common = globalCfg;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue