snowfall lib migration wip
This commit is contained in:
parent
b9dadac2af
commit
ed08a98651
31 changed files with 1067 additions and 172 deletions
|
|
@ -18,4 +18,8 @@
|
|||
path = ./home;
|
||||
description = "Snowfall home";
|
||||
};
|
||||
user = {
|
||||
path = ./user;
|
||||
description = "Snowfall user";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
_: (final: prev: {
|
||||
channels: (final: prev: {
|
||||
package = prev.package.override {};
|
||||
})
|
||||
|
|
|
|||
37
templates/user/default.nix
Normal file
37
templates/user/default.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue