···496 in
497 filter types.shellPackage.check shells;
4980499in {
500 imports = [
501 (mkAliasOptionModuleMD [ "users" "extraUsers" ] [ "users" "users" ])
···695 '';
696 } else ""; # keep around for backwards compatibility
697698- system.activationScripts.update-lingering = let
699- lingerDir = "/var/lib/systemd/linger";
700- lingeringUsers = map (u: u.name) (attrValues (flip filterAttrs cfg.users (n: u: u.linger)));
701- lingeringUsersFile = builtins.toFile "lingering-users"
702- (concatStrings (map (s: "${s}\n")
703- (sort (a: b: a < b) lingeringUsers))); # this sorting is important for `comm` to work correctly
704- in stringAfter [ "users" ] ''
705- if [ -e ${lingerDir} ] ; then
0000706 cd ${lingerDir}
707- for user in ${lingerDir}/*; do
708- if ! id "$user" >/dev/null 2>&1; then
0709 rm --force -- "$user"
710 fi
711 done
712- ls ${lingerDir} | sort | comm -3 -1 ${lingeringUsersFile} - | xargs -r ${pkgs.systemd}/bin/loginctl disable-linger
713- ls ${lingerDir} | sort | comm -3 -2 ${lingeringUsersFile} - | xargs -r ${pkgs.systemd}/bin/loginctl enable-linger
714- fi
715- '';
00716717 # Warn about user accounts with deprecated password hashing schemes
718 # This does not work when the users and groups are created by
···496 in
497 filter types.shellPackage.check shells;
498499+ lingeringUsers = map (u: u.name) (attrValues (flip filterAttrs cfg.users (n: u: u.linger)));
500in {
501 imports = [
502 (mkAliasOptionModuleMD [ "users" "extraUsers" ] [ "users" "users" ])
···696 '';
697 } else ""; # keep around for backwards compatibility
698699+ systemd.services.linger-users = lib.mkIf ((builtins.length lingeringUsers) > 0) {
700+ wantedBy = ["multi-user.target"];
701+ after = ["systemd-logind.service"];
702+ requires = ["systemd-logind.service"];
703+704+ script = let
705+ lingerDir = "/var/lib/systemd/linger";
706+ lingeringUsersFile = builtins.toFile "lingering-users"
707+ (concatStrings (map (s: "${s}\n")
708+ (sort (a: b: a < b) lingeringUsers))); # this sorting is important for `comm` to work correctly
709+ in ''
710+ mkdir -vp ${lingerDir}
711 cd ${lingerDir}
712+ for user in $(ls); do
713+ if ! id "$user" >/dev/null; then
714+ echo "Removing linger for missing user $user"
715 rm --force -- "$user"
716 fi
717 done
718+ ls | sort | comm -3 -1 ${lingeringUsersFile} - | xargs -r ${pkgs.systemd}/bin/loginctl disable-linger
719+ ls | sort | comm -3 -2 ${lingeringUsersFile} - | xargs -r ${pkgs.systemd}/bin/loginctl enable-linger
720+ '';
721+722+ serviceConfig.Type = "oneshot";
723+ };
724725 # Warn about user accounts with deprecated password hashing schemes
726 # This does not work when the users and groups are created by
+2-2
nixos/modules/programs/steam.nix
···45 apply = steam: steam.override (prev: {
46 extraEnv = (lib.optionalAttrs (cfg.extraCompatPackages != [ ]) {
47 STEAM_EXTRA_COMPAT_TOOLS_PATHS = makeSearchPathOutput "steamcompattool" "" cfg.extraCompatPackages;
0048 }) // (prev.extraEnv or {});
49 extraLibraries = pkgs: let
50 prevLibs = if prev ? extraLibraries then prev.extraLibraries pkgs else [ ];
···59 # use the setuid wrapped bubblewrap
60 bubblewrap = "${config.security.wrapperDir}/..";
61 };
62- } // optionalAttrs cfg.extest.enable {
63- extraEnv.LD_PRELOAD = "${pkgs.pkgsi686Linux.extest}/lib/libextest.so";
64 });
65 description = lib.mdDoc ''
66 The Steam package to use. Additional libraries are added from the system
···45 apply = steam: steam.override (prev: {
46 extraEnv = (lib.optionalAttrs (cfg.extraCompatPackages != [ ]) {
47 STEAM_EXTRA_COMPAT_TOOLS_PATHS = makeSearchPathOutput "steamcompattool" "" cfg.extraCompatPackages;
48+ }) // (optionalAttrs cfg.extest.enable {
49+ LD_PRELOAD = "${pkgs.pkgsi686Linux.extest}/lib/libextest.so";
50 }) // (prev.extraEnv or {});
51 extraLibraries = pkgs: let
52 prevLibs = if prev ? extraLibraries then prev.extraLibraries pkgs else [ ];
···61 # use the setuid wrapped bubblewrap
62 bubblewrap = "${config.security.wrapperDir}/..";
63 };
0064 });
65 description = lib.mdDoc ''
66 The Steam package to use. Additional libraries are added from the system
···28 };
29 group.root.exists = true;
30 kernel-param."kernel.ostype".value = "Linux";
31- service.goss = {
32- enabled = true;
33- running = true;
34- };
35 user.root.exists = true;
36 };
37 };
···46 with subtest("returns health status"):
47 result = json.loads(machine.succeed("curl -sS http://localhost:8080/healthz"))
4849- assert len(result["results"]) == 10, f".results should be an array of 10 items, was {result['results']!r}"
50 assert result["summary"]["failed-count"] == 0, f".summary.failed-count should be zero, was {result['summary']['failed-count']}"
51- assert result["summary"]["test-count"] == 10, f".summary.test-count should be 10, was {result['summary']['test-count']}"
52 '';
53})
···28 };
29 group.root.exists = true;
30 kernel-param."kernel.ostype".value = "Linux";
000031 user.root.exists = true;
32 };
33 };
···42 with subtest("returns health status"):
43 result = json.loads(machine.succeed("curl -sS http://localhost:8080/healthz"))
4445+ assert len(result["results"]) == 8, f".results should be an array of 10 items, was {result['results']!r}"
46 assert result["summary"]["failed-count"] == 0, f".summary.failed-count should be zero, was {result['summary']['failed-count']}"
47+ assert result["summary"]["test-count"] == 8, f".summary.test-count should be 10, was {result['summary']['test-count']}"
48 '';
49})
···23buildGoModule rec {
4 pname = "orchard";
5- version = "0.15.1";
67 src = fetchFromGitHub {
8 owner = "cirruslabs";
9 repo = pname;
10 rev = version;
11- hash = "sha256-bDXb8yKaDSYw9fZ/VBvacUebRMdlI+lzIe9KFa7uVyk=";
12 # populate values that require us to use git. By doing this in postFetch we
13 # can delete .git afterwards and maintain better reproducibility of the src.
14 leaveDotGit = true;
···23buildGoModule rec {
4 pname = "orchard";
5+ version = "0.15.2";
67 src = fetchFromGitHub {
8 owner = "cirruslabs";
9 repo = pname;
10 rev = version;
11+ hash = "sha256-ccmG94OrsfQDmyBKJiPPI97uMFlnL26epsVMdAqO/1o=";
12 # populate values that require us to use git. By doing this in postFetch we
13 # can delete .git afterwards and maintain better reproducibility of the src.
14 leaveDotGit = true;