snowfall lib migration wip

This commit is contained in:
Aleksandr Lebedev 2025-08-07 18:07:27 +02:00
parent b9dadac2af
commit ed08a98651
31 changed files with 1067 additions and 172 deletions

View file

@ -18,4 +18,8 @@
path = ./home;
description = "Snowfall home";
};
user = {
path = ./user;
description = "Snowfall user";
};
}

View file

@ -1,3 +1,3 @@
_: (final: prev: {
channels: (final: prev: {
package = prev.package.override {};
})

View file

@ -0,0 +1,37 @@
{
lib,
pkgs,
inputs,
namespace,
system,
target,
format,
virtual,
systems,
config,
...
}:
with lib;
with lib.${namespace}; let
username = "";
admin = false;
extraGroups = ["networkmanager"];
trustedSshKeys = [];
cfg = config.${namespace}.users.${username};
in {
options.${namespace}.users.${username} = with types; {
enable = mkBoolOpt false "Enable ${username} user";
config = mkHomeManagerConfigOpt config;
};
config = mkUser {
inherit config;
inherit (cfg) enable;
homeConfig = cfg.config;
inherit username;
inherit admin;
inherit extraGroups;
inherit trustedSshKeys;
};
}