|
| 1 | +{ |
| 2 | + config, |
| 3 | + config', |
| 4 | + inputs, |
| 5 | + lib, |
| 6 | + lib', |
| 7 | + sources, |
| 8 | + ... |
| 9 | +}: |
| 10 | +{ |
| 11 | + age.secrets.selfhostedPassword.file = ../../Config/selfhostedPassword.age; |
| 12 | + age.secrets.rootPassword.file = ../../Config/rootPassword.age; |
| 13 | + age.secrets.guestPassword.file = ../../Config/guestPassword.age; |
| 14 | + |
| 15 | + users.mutableUsers = false; |
| 16 | + users.users.root.hashedPasswordFile = config.age.secrets.rootPassword.path; |
| 17 | + users.users.selfhosted = { |
| 18 | + isNormalUser = true; |
| 19 | + home = "/home/selfhosted"; |
| 20 | + # Description of all users should container their folder name. |
| 21 | + description = "selfhosted"; |
| 22 | + # Fixes https://github.com/GPUOpen-Drivers/AMDVLK/issues/310 |
| 23 | + extraGroups = [ |
| 24 | + "wheel" |
| 25 | + "networkmanager" |
| 26 | + "input" |
| 27 | + "video" |
| 28 | + "render" |
| 29 | + |
| 30 | + # Needed for virtualisation, Misc/virtualisation.nix |
| 31 | + "kvm" |
| 32 | + "libvirtd" |
| 33 | + ]; |
| 34 | + # shell = pkgs.zsh; |
| 35 | + hashedPasswordFile = config.age.secrets.selfhostedPassword.path; |
| 36 | + linger = true; |
| 37 | + }; |
| 38 | + |
| 39 | + users.users.guest = { |
| 40 | + isNormalUser = true; |
| 41 | + home = "/home/guest"; |
| 42 | + description = "Guest"; |
| 43 | + extraGroups = [ |
| 44 | + "input" |
| 45 | + "video" |
| 46 | + "render" |
| 47 | + "networkmanager" |
| 48 | + ]; |
| 49 | + hashedPasswordFile = config.age.secrets.guestPassword.path; |
| 50 | + }; |
| 51 | + |
| 52 | + home-manager = { |
| 53 | + useGlobalPkgs = true; |
| 54 | + useUserPackages = lib.mkForce false; |
| 55 | + startAsUserService = true; |
| 56 | + backupFileExtension = "backup.backup.backup"; |
| 57 | + verbose = true; |
| 58 | + sharedModules = [ ../../Modules/Home-Manager ]; |
| 59 | + users = { |
| 60 | + selfhosted = { |
| 61 | + imports = [ |
| 62 | + # ../../Users/Selfhosted/home.nix |
| 63 | + { |
| 64 | + home.stateVersion = "26.05"; |
| 65 | + _module.args.config' = config'.users.selfhosted; |
| 66 | + } |
| 67 | + ]; |
| 68 | + }; |
| 69 | + |
| 70 | + guest = { |
| 71 | + imports = [ |
| 72 | + ../../Users/Guest/home.nix |
| 73 | + { |
| 74 | + home.stateVersion = "26.05"; |
| 75 | + _module.args.config' = config'.users.guest; |
| 76 | + } |
| 77 | + ]; |
| 78 | + }; |
| 79 | + }; |
| 80 | + |
| 81 | + extraSpecialArgs = { |
| 82 | + inherit inputs lib' sources; |
| 83 | + }; |
| 84 | + }; |
| 85 | + |
| 86 | + imports = [ |
| 87 | + inputs.home-manager.nixosModules.home-manager |
| 88 | + ]; |
| 89 | +} |
0 commit comments