user
This commit is contained in:
parent
2aa265b82a
commit
20a6964894
4 changed files with 37 additions and 3 deletions
4
home/default.nix
Normal file
4
home/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{...}: {
|
||||||
|
user = [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -8,8 +8,9 @@
|
||||||
./bluetooth.nix
|
./bluetooth.nix
|
||||||
./btrfs.nix
|
./btrfs.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
# ./nix.nix
|
./nix.nix
|
||||||
# ./steam.nix
|
./users.nix
|
||||||
|
./steam.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
directories = [
|
directories = [
|
||||||
"/etc/NetworkManager/system-connections"
|
"/etc/NetworkManager/system-connections"
|
||||||
"/var/lib/bluetooth"
|
|
||||||
"/var/lib/systemd/coredump"
|
"/var/lib/systemd/coredump"
|
||||||
"/var/lib/bluetooth"
|
"/var/lib/bluetooth"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
30
system/users.nix
Normal file
30
system/users.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
conf,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
users.mutableUsers = false;
|
||||||
|
users.users = {
|
||||||
|
${conf.user} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
uid = conf.uid;
|
||||||
|
extraGroups = ["wheel" "networkmanager"];
|
||||||
|
hashedPasswordFile = config.sops.secrets."user/hashedPassword".path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users = let
|
||||||
|
hm = import ../home;
|
||||||
|
in {
|
||||||
|
${conf.user} = {
|
||||||
|
imports = hm.user;
|
||||||
|
home.username = conf.user;
|
||||||
|
home.homeDirectory = conf.home;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sops.secrets."user/password" = {
|
||||||
|
sopsFile = ../hosts/${conf.hostname}/secrets/default.yml;
|
||||||
|
neededForUsers = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue