Personal-use NixOS configuration
0
fork

Configure Feed

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

Working guest script

encode42 e20f48d0 b0dc5bd2

+16 -6
+16 -6
hosts/prospect/users/guest.nix
··· 13 13 ".nix-profile" 14 14 15 15 ".local/share/Steam/package" 16 + 17 + ".local/share/Steam/steamapps/libraryfolders.vdf" 18 + ".local/share/Steam/steamapps/*.acf" 16 19 ".local/share/Steam/steamapps/common" 17 - ".local/share/Steam/steamapps/libraryfolders.vdf" 20 + 21 + ".local/share/PrismLauncher/prismlauncher.cfg" 22 + ".local/share/PrismLauncher/instances" 18 23 ]; 19 24 20 25 rsyncExcludes = builtins.concatStringsSep " \\\n" (map (path: "--exclude='${path}'") persistentPaths); ··· 55 60 56 61 systemd.services.clean-guest-home = { 57 62 description = "Perform guest account cleanup"; 58 - wantedBy = [ "halt.target" "reboot.target" ]; 59 - before = [ "halt.target" "reboot.target" ]; 63 + wantedBy = [ "multi-user.target" ]; # TODO: Only start when the guest account is logged in 64 + before = [ "shutdown.target" ]; 60 65 61 66 serviceConfig = { 62 67 Type = "oneshot"; 63 68 64 - ExecStart = pkgs.writeShellScript "clean-guest-home" '' 65 - rsync -a --delete \ 69 + ExecStart = "${lib.getExe pkgs.bash} -c 'echo Guest account will be reset upon shutdown!'"; 70 + 71 + ExecStop = pkgs.writeShellScript "clean-guest-home" '' 72 + ${lib.getExe pkgs.rsync} -a --delete \ 66 73 ${rsyncExcludes} \ 67 - /var/empty ${config.users.users.guest.home} 74 + /var/empty/ ${config.users.users.guest.home}/ 68 75 ''; 76 + 77 + RemainAfterExit = true; 78 + DefaultDependencies = "no"; 69 79 }; 70 80 }; 71 81 }