Personal-use NixOS configuration
0
fork

Configure Feed

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

Polish the temporary guest account

encode42 0b81b7f3 d362a7f9

+15 -7
+15 -7
hosts/prospect/users/guest.nix
··· 1 1 { 2 + config, 2 3 lib, 3 4 flakeRoot, 4 5 pkgs, 5 6 ... 6 7 }: 7 8 9 + let 10 + persistentDirectories = [ 11 + ".nix-profile" 12 + ]; 13 + 14 + findExclusions = builtins.concatStringsSep " \\\n" (map (path: 15 + let 16 + baseExclusion = "-not -path '${config.users.users.guest.home}/${path}'"; 17 + in 18 + "${baseExclusion} ${baseExclusion}/*" 19 + ) persistentDirectories); 20 + in 8 21 { 9 22 imports = [ 10 23 ../config/games.nix ··· 39 52 Type = "oneshot"; 40 53 41 54 ExecStart = pkgs.writeShellScript "clean-guest-home" '' 42 - find ${home-manager.users.guest.homeDirectory} \ 55 + find ${config.users.users.guest.home} \ 43 56 -mindepth 1 \ 44 - -not -path "$HOME/.nix-profile" \ 45 - -not -path "$HOME/.nix-profile/*" \ 46 - -not -path "$HOME/.config" \ 47 - -not -path "$HOME/.config/*" \ 48 - -not -path "$HOME/.local" \ 49 - -not -path "$HOME/.local/*" \ 57 + ${findExclusions} \ 50 58 -exec echo {} + 51 59 ''; 52 60 };