hjem: init
Finally, a sane home management system. Signed-off-by: Bloxx12 <charlie@charlieroot.dev> Change-Id: I6a6a696430c3a408520811d1b0b3038a66b0f73a
This commit is contained in:
parent
3a9e31cc88
commit
2d3d2ef1d7
2 changed files with 49 additions and 0 deletions
36
modules/home/hjem.mod.nix
Normal file
36
modules/home/hjem.mod.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
sources,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (builtins) filter;
|
||||
inherit (config.meta.mainUser) username;
|
||||
inherit (lib.modules) mkForce;
|
||||
inherit (lib.filesystem) listFilesRecursive;
|
||||
inherit (lib.strings) hasSuffix;
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
imports = [ (sources.hjem + "/modules/nixos") ];
|
||||
|
||||
config = {
|
||||
hjem = {
|
||||
clobberByDefault = true;
|
||||
linker = pkgs.smfh;
|
||||
users.${username} = {
|
||||
enable = true;
|
||||
user = username;
|
||||
directory = config.users.users.${username}.home;
|
||||
clobberFiles = mkForce true;
|
||||
};
|
||||
extraModules = ((listFilesRecursive ./.) |> filter (hasSuffix ".hjem.nix"));
|
||||
specialArgs = {
|
||||
inherit sources;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue