my over complex system configurations dotfiles.isabelroses.com/
nixos nix flake dotfiles linux
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 62 lines 1.2 kB view raw
1{ 2 lib, 3 self, 4 _class, 5 config, 6 ... 7}: 8let 9 inherit (lib.attrsets) mergeAttrsList optionalAttrs genAttrs; 10 inherit (lib.modules) mkDefault; 11 inherit (self.lib) ifTheyExist; 12in 13{ 14 users.users = genAttrs config.garden.system.users ( 15 name: 16 let 17 inherit (config.home-manager.users.${name}.garden.programs.defaults) shell; 18 in 19 mergeAttrsList [ 20 { 21 shell = "/run/current-system/sw/bin/${shell}"; 22 } 23 24 (optionalAttrs (_class == "darwin") { 25 home = "/Users/${name}"; 26 }) 27 28 (optionalAttrs (_class == "nixos") { 29 home = "/home/${name}"; 30 31 uid = mkDefault 1000; 32 isNormalUser = true; 33 34 # only add groups that exist 35 extraGroups = [ 36 "wheel" 37 "nix" 38 ] 39 ++ ifTheyExist config [ 40 "network" 41 "networkmanager" 42 "systemd-journal" 43 "audio" 44 "pipewire" # this give us access to the rt limits 45 "video" 46 "input" 47 "plugdev" 48 "lp" 49 "tss" 50 "power" 51 "wireshark" 52 "mysql" 53 "docker" 54 "podman" 55 "git" 56 "libvirtd" 57 "cloudflared" 58 ]; 59 }) 60 ] 61 ); 62}