···58 # Link some extra directories in /run/current-system/software/share
59 environment.pathsToLink = [ "/share" ];
60061 services.gvfs.enable = true;
62- services.gvfs.package = pkgs.gvfs;
6364 services.upower.enable = config.powerManagement.enable;
65 };
···58 # Link some extra directories in /run/current-system/software/share
59 environment.pathsToLink = [ "/share" ];
6061+ # virtual file systems support for PCManFM-QT
62 services.gvfs.enable = true;
06364 services.upower.enable = config.powerManagement.enable;
65 };
+30-7
nixos/tests/atop.nix
···14 '';
15 unit = name: state: ''
16 with subtest("Unit ${name} should be ${state}"):
17- machine.require_unit_state("${name}", "${state}")
00018 '';
19 version = ''
20 import re
···44 if present then
45 unit "atop.service" "active"
46 + ''
47- with subtest("atop.service should have written some data to /var/log/atop"):
48- files = int(machine.succeed("ls -1 /var/log/atop | wc -l"))
49- assert files > 0, "Expected at least 1 data file"
000000000050 '' else unit "atop.service" "inactive";
51 atopRotateTimer = present:
52 unit "atop-rotate.timer" (if present then "active" else "inactive");
···55 unit "atopacct.service" "active"
56 + ''
57 with subtest("atopacct.service should enable process accounting"):
58- machine.succeed("test -f /run/pacct_source")
5960 with subtest("atopacct.service should write data to /run/pacct_shadow.d"):
61- files = int(machine.succeed("ls -1 /run/pacct_shadow.d | wc -l"))
62- assert files >= 1, "Expected at least 1 pacct_shadow.d file"
000000000063 '' else unit "atopacct.service" "inactive";
64 netatop = present:
65 if present then
···14 '';
15 unit = name: state: ''
16 with subtest("Unit ${name} should be ${state}"):
17+ if "${state}" == "active":
18+ machine.wait_for_unit("${name}")
19+ else:
20+ machine.require_unit_state("${name}", "${state}")
21 '';
22 version = ''
23 import re
···47 if present then
48 unit "atop.service" "active"
49 + ''
50+ with subtest("atop.service should write some data to /var/log/atop"):
51+52+ def has_data_files(last: bool) -> bool:
53+ files = int(machine.succeed("ls -1 /var/log/atop | wc -l"))
54+ if files == 0:
55+ machine.log("Did not find at least one 1 data file")
56+ if not last:
57+ machine.log("Will retry...")
58+ return False
59+ return True
60+61+ with machine.nested("Waiting for data files"):
62+ retry(has_data_files)
63 '' else unit "atop.service" "inactive";
64 atopRotateTimer = present:
65 unit "atop-rotate.timer" (if present then "active" else "inactive");
···68 unit "atopacct.service" "active"
69 + ''
70 with subtest("atopacct.service should enable process accounting"):
71+ machine.wait_until_succeeds("test -f /run/pacct_source")
7273 with subtest("atopacct.service should write data to /run/pacct_shadow.d"):
74+75+ def has_data_files(last: bool) -> bool:
76+ files = int(machine.succeed("ls -1 /run/pacct_shadow.d | wc -l"))
77+ if files == 0:
78+ machine.log("Did not find at least one 1 data file")
79+ if not last:
80+ machine.log("Will retry...")
81+ return False
82+ return True
83+84+ with machine.nested("Waiting for data files"):
85+ retry(has_data_files)
86 '' else unit "atopacct.service" "inactive";
87 netatop = present:
88 if present then