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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -43,6 +43,19 @@
|
|||
"url": "https://git.lix.systems/lix-project/flake-compat/archive/549f2762aebeff29a2e5ece7a7dc0f955281a1d1.tar.gz",
|
||||
"hash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw="
|
||||
},
|
||||
"hjem": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "feel-co",
|
||||
"repo": "hjem"
|
||||
},
|
||||
"branch": "main",
|
||||
"submodules": false,
|
||||
"revision": "3093a74542b30f8155954d585d0ae2401e3adbe5",
|
||||
"url": "https://github.com/feel-co/hjem/archive/3093a74542b30f8155954d585d0ae2401e3adbe5.tar.gz",
|
||||
"hash": "sha256-LzojKFWAAreWyH56aupj/MLwuPPnnyzplw/xdbavC9c="
|
||||
},
|
||||
"impermanence": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue