hjem: init

Finally, a sane home management system.

Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a696430c3a408520811d1b0b3038a66b0f73a
This commit is contained in:
Bloxx12 2025-07-21 00:00:45 +02:00
commit 2d3d2ef1d7
Signed by: faukah
SSH key fingerprint: SHA256:jpYIt4Vkz1NBTQcks/N9OPTfTFxE6KF2W/rV7hrfrIw
2 changed files with 49 additions and 0 deletions

36
modules/home/hjem.mod.nix Normal file
View 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;
};
};
};
}

View file

@ -43,6 +43,19 @@
"url": "https://git.lix.systems/lix-project/flake-compat/archive/549f2762aebeff29a2e5ece7a7dc0f955281a1d1.tar.gz", "url": "https://git.lix.systems/lix-project/flake-compat/archive/549f2762aebeff29a2e5ece7a7dc0f955281a1d1.tar.gz",
"hash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=" "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": { "impermanence": {
"type": "Git", "type": "Git",
"repository": { "repository": {