refactor
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
username = "";
|
||||
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||
in {
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ifTheyExist [
|
||||
"audio"
|
||||
"deluge"
|
||||
"docker"
|
||||
"git"
|
||||
"i2c"
|
||||
"libvirtd"
|
||||
"minecraft"
|
||||
"mysql"
|
||||
"wpa_supplicant"
|
||||
"plugdev"
|
||||
"podman"
|
||||
"tss"
|
||||
"video"
|
||||
"wheel"
|
||||
"wireshark"
|
||||
];
|
||||
|
||||
# TODO: use as needed
|
||||
#openssh.authorizedKeys.keys = lib.splitString "\n" (builtins.readFile ../../../../home/gabriel/ssh.pub);
|
||||
#hashedPasswordFile = config.sops.secrets.gabriel-password.path;
|
||||
#packages = [pkgs.home-manager];
|
||||
};
|
||||
|
||||
# unused for now, may add sops later on
|
||||
#sops.secrets = {
|
||||
# gabriel-password = {
|
||||
# sopsFile = ../../secrets.yaml;
|
||||
# neededForUsers = true;
|
||||
# };
|
||||
#};
|
||||
|
||||
# TODO: ensure correct paths
|
||||
home-manager.users.${username} = import ../../../../home/${username}/${config.networking.hostName}.nix;
|
||||
|
||||
security.pam.services = {
|
||||
swaylock = {};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user