Skip to content

Commit 1cb902e

Browse files
Merge master into staging-next
2 parents 5e051b3 + effac2a commit 1cb902e

File tree

82 files changed

+1071
-571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1071
-571
lines changed

nixos/modules/services/display-managers/cosmic-greeter.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
let
1414
cfg = config.services.displayManager.cosmic-greeter;
15+
cfgAutoLogin = config.services.displayManager.autoLogin;
1516
in
1617

1718
{
@@ -35,6 +36,10 @@ in
3536
user = "cosmic-greeter";
3637
command = ''${lib.getExe' pkgs.coreutils "env"} XCURSOR_THEME="''${XCURSOR_THEME:-Pop}" systemd-cat -t cosmic-greeter ${lib.getExe pkgs.cosmic-comp} ${lib.getExe cfg.package}'';
3738
};
39+
initial_session = lib.mkIf (cfgAutoLogin.enable && (cfgAutoLogin.user != null)) {
40+
user = cfgAutoLogin.user;
41+
command = ''${lib.getExe' pkgs.coreutils "env"} XCURSOR_THEME="''${XCURSOR_THEME:-Pop}" systemd-cat -t cosmic-session ${lib.getExe pkgs.cosmic-session}'';
42+
};
3843
};
3944
};
4045

nixos/modules/virtualisation/incus.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ let
129129

130130
environment = lib.mkMerge [
131131
{
132+
INCUS_DOCUMENTATION = "${cfg.package.doc}/html";
132133
INCUS_EDK2_PATH = ovmf;
133134
INCUS_LXC_HOOK = "${cfg.lxcPackage}/share/lxc/hooks";
134135
INCUS_LXC_TEMPLATE_CONFIG = "${pkgs.lxcfs}/share/lxc/config";

nixos/tests/all-tests.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ in
243243
imports = [ ./binary-cache.nix ];
244244
_module.args.compression = "xz";
245245
};
246-
bind = handleTest ./bind.nix { };
246+
bind = runTest ./bind.nix;
247247
bird = handleTest ./bird.nix { };
248248
birdwatcher = handleTest ./birdwatcher.nix { };
249249
bitbox-bridge = runTest ./bitbox-bridge.nix;
@@ -294,7 +294,7 @@ in
294294
] ./ceph-single-node-bluestore-dmcrypt.nix { };
295295
certmgr = handleTest ./certmgr.nix { };
296296
cfssl = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./cfssl.nix { };
297-
cgit = handleTest ./cgit.nix { };
297+
cgit = runTest ./cgit.nix;
298298
charliecloud = handleTest ./charliecloud.nix { };
299299
chromadb = runTest ./chromadb.nix;
300300
chromium = (handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./chromium.nix { }).stable or { };
@@ -584,7 +584,7 @@ in
584584
herbstluftwm = handleTest ./herbstluftwm.nix { };
585585
homebox = handleTest ./homebox.nix { };
586586
homer = handleTest ./homer { };
587-
homepage-dashboard = handleTest ./homepage-dashboard.nix { };
587+
homepage-dashboard = runTest ./homepage-dashboard.nix;
588588
honk = runTest ./honk.nix;
589589
installed-tests = pkgs.recurseIntoAttrs (handleTest ./installed-tests { });
590590
invidious = handleTest ./invidious.nix { };
@@ -795,7 +795,7 @@ in
795795
defaults.services.mongodb.package = config.node.pkgs.mongodb-ce;
796796
}
797797
);
798-
moodle = handleTest ./moodle.nix { };
798+
moodle = runTest ./moodle.nix;
799799
moonraker = handleTest ./moonraker.nix { };
800800
mopidy = handleTest ./mopidy.nix { };
801801
morph-browser = runTest ./morph-browser.nix;

nixos/tests/bind.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import ./make-test-python.nix {
1+
{ ... }:
2+
{
23
name = "bind";
34

45
nodes.machine =

nixos/tests/cgit.nix

Lines changed: 95 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,111 @@
1-
import ./make-test-python.nix (
2-
{ pkgs, ... }:
3-
let
4-
robotsTxt = pkgs.writeText "cgit-robots.txt" ''
5-
User-agent: *
6-
Disallow: /
7-
'';
8-
in
9-
{
10-
name = "cgit";
11-
meta = with pkgs.lib.maintainers; {
12-
maintainers = [ schnusch ];
13-
};
1+
{ pkgs, ... }:
2+
let
3+
robotsTxt = pkgs.writeText "cgit-robots.txt" ''
4+
User-agent: *
5+
Disallow: /
6+
'';
7+
in
8+
{
9+
name = "cgit";
10+
meta = with pkgs.lib.maintainers; {
11+
maintainers = [ schnusch ];
12+
};
1413

15-
nodes = {
16-
server =
17-
{ ... }:
18-
{
19-
services.cgit."localhost" = {
20-
enable = true;
21-
package = pkgs.cgit.overrideAttrs (
22-
{ postInstall, ... }:
23-
{
24-
postInstall = ''
25-
${postInstall}
26-
cp ${robotsTxt} "$out/cgit/robots.txt"
27-
'';
28-
}
29-
);
30-
nginx.location = "/(c)git/";
31-
repos = {
32-
some-repo = {
33-
path = "/tmp/git/some-repo";
34-
desc = "some-repo description";
35-
};
36-
};
37-
settings = {
38-
readme = [
39-
":README.md"
40-
":date.txt"
41-
];
14+
nodes = {
15+
server =
16+
{ ... }:
17+
{
18+
services.cgit."localhost" = {
19+
enable = true;
20+
package = pkgs.cgit.overrideAttrs (
21+
{ postInstall, ... }:
22+
{
23+
postInstall = ''
24+
${postInstall}
25+
cp ${robotsTxt} "$out/cgit/robots.txt"
26+
'';
27+
}
28+
);
29+
nginx.location = "/(c)git/";
30+
repos = {
31+
some-repo = {
32+
path = "/tmp/git/some-repo";
33+
desc = "some-repo description";
4234
};
4335
};
44-
45-
environment.systemPackages = [ pkgs.git ];
36+
settings = {
37+
readme = [
38+
":README.md"
39+
":date.txt"
40+
];
41+
};
4642
};
47-
};
4843

49-
testScript =
50-
{ nodes, ... }:
51-
''
52-
start_all()
44+
environment.systemPackages = [ pkgs.git ];
45+
};
46+
};
47+
48+
testScript =
49+
{ nodes, ... }:
50+
''
51+
start_all()
5352
54-
server.wait_for_unit("nginx.service")
55-
server.wait_for_unit("network.target")
56-
server.wait_for_open_port(80)
53+
server.wait_for_unit("nginx.service")
54+
server.wait_for_unit("network.target")
55+
server.wait_for_open_port(80)
5756
58-
server.succeed("curl -fsS http://localhost/%28c%29git/cgit.css")
57+
server.succeed("curl -fsS http://localhost/%28c%29git/cgit.css")
5958
60-
server.succeed("curl -fsS http://localhost/%28c%29git/robots.txt | diff -u - ${robotsTxt}")
59+
server.succeed("curl -fsS http://localhost/%28c%29git/robots.txt | diff -u - ${robotsTxt}")
6160
62-
server.succeed(
63-
"curl -fsS http://localhost/%28c%29git/ | grep -F 'some-repo description'"
64-
)
61+
server.succeed(
62+
"curl -fsS http://localhost/%28c%29git/ | grep -F 'some-repo description'"
63+
)
6564
66-
server.fail("curl -fsS http://localhost/robots.txt")
65+
server.fail("curl -fsS http://localhost/robots.txt")
6766
68-
server.succeed("sudo -u cgit ${pkgs.writeShellScript "setup-cgit-test-repo" ''
69-
set -e
70-
git init --bare -b master /tmp/git/some-repo
71-
git init -b master reference
72-
cd reference
73-
git remote add origin /tmp/git/some-repo
74-
{ echo -n "cgit NixOS Test at "; date; } > date.txt
75-
git add date.txt
76-
git -c user.name=test -c user.email=test@localhost commit -m 'add date'
77-
git push -u origin master
78-
''}")
67+
server.succeed("sudo -u cgit ${pkgs.writeShellScript "setup-cgit-test-repo" ''
68+
set -e
69+
git init --bare -b master /tmp/git/some-repo
70+
git init -b master reference
71+
cd reference
72+
git remote add origin /tmp/git/some-repo
73+
{ echo -n "cgit NixOS Test at "; date; } > date.txt
74+
git add date.txt
75+
git -c user.name=test -c user.email=test@localhost commit -m 'add date'
76+
git push -u origin master
77+
''}")
7978
80-
# test web download
81-
server.succeed(
82-
"curl -fsS 'http://localhost/%28c%29git/some-repo/plain/date.txt?id=master' | diff -u reference/date.txt -"
83-
)
79+
# test web download
80+
server.succeed(
81+
"curl -fsS 'http://localhost/%28c%29git/some-repo/plain/date.txt?id=master' | diff -u reference/date.txt -"
82+
)
8483
85-
# test http clone
86-
server.succeed(
87-
"git clone http://localhost/%28c%29git/some-repo && diff -u reference/date.txt some-repo/date.txt"
88-
)
84+
# test http clone
85+
server.succeed(
86+
"git clone http://localhost/%28c%29git/some-repo && diff -u reference/date.txt some-repo/date.txt"
87+
)
8988
90-
# test list settings by greping for the fallback readme
91-
server.succeed(
92-
"curl -fsS 'http://localhost/%28c%29git/some-repo/about/' | grep -F 'cgit NixOS Test at'"
93-
)
89+
# test list settings by greping for the fallback readme
90+
server.succeed(
91+
"curl -fsS 'http://localhost/%28c%29git/some-repo/about/' | grep -F 'cgit NixOS Test at'"
92+
)
9493
95-
# add real readme
96-
server.succeed("sudo -u cgit ${pkgs.writeShellScript "cgit-commit-readme" ''
97-
set -e
98-
echo '# cgit NixOS test README' > reference/README.md
99-
git -C reference add README.md
100-
git -C reference -c user.name=test -c user.email=test@localhost commit -m 'add readme'
101-
git -C reference push
102-
''}")
94+
# add real readme
95+
server.succeed("sudo -u cgit ${pkgs.writeShellScript "cgit-commit-readme" ''
96+
set -e
97+
echo '# cgit NixOS test README' > reference/README.md
98+
git -C reference add README.md
99+
git -C reference -c user.name=test -c user.email=test@localhost commit -m 'add readme'
100+
git -C reference push
101+
''}")
103102
104-
# test list settings by greping for the real readme
105-
server.succeed(
106-
"curl -fsS 'http://localhost/%28c%29git/some-repo/about/' | grep -F '# cgit NixOS test README'"
107-
)
108-
server.fail(
109-
"curl -fsS 'http://localhost/%28c%29git/some-repo/about/' | grep -F 'cgit NixOS Test at'"
110-
)
111-
'';
112-
}
113-
)
103+
# test list settings by greping for the real readme
104+
server.succeed(
105+
"curl -fsS 'http://localhost/%28c%29git/some-repo/about/' | grep -F '# cgit NixOS test README'"
106+
)
107+
server.fail(
108+
"curl -fsS 'http://localhost/%28c%29git/some-repo/about/' | grep -F 'cgit NixOS Test at'"
109+
)
110+
'';
111+
}

nixos/tests/homepage-dashboard.nix

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1-
import ./make-test-python.nix (
2-
{ lib, ... }:
3-
{
4-
name = "homepage-dashboard";
5-
meta.maintainers = with lib.maintainers; [ jnsgruk ];
1+
{ lib, ... }:
2+
{
3+
name = "homepage-dashboard";
4+
meta.maintainers = with lib.maintainers; [ jnsgruk ];
65

7-
nodes.machine = _: {
8-
services.homepage-dashboard = {
9-
enable = true;
10-
settings.title = "test title rodUsEagid"; # something random/unique
11-
};
6+
nodes.machine = _: {
7+
services.homepage-dashboard = {
8+
enable = true;
9+
settings.title = "test title rodUsEagid"; # something random/unique
1210
};
11+
};
1312

14-
testScript = ''
15-
# Ensure the services are started on managed machine
16-
machine.wait_for_unit("homepage-dashboard.service")
17-
machine.wait_for_open_port(8082)
18-
machine.succeed("curl --fail http://localhost:8082/")
13+
testScript = ''
14+
# Ensure the services are started on managed machine
15+
machine.wait_for_unit("homepage-dashboard.service")
16+
machine.wait_for_open_port(8082)
17+
machine.succeed("curl --fail http://localhost:8082/")
1918
20-
# Ensure /etc/homepage-dashboard is created.
21-
machine.succeed("test -d /etc/homepage-dashboard")
19+
# Ensure /etc/homepage-dashboard is created.
20+
machine.succeed("test -d /etc/homepage-dashboard")
2221
23-
# Ensure that we see the custom title *only in the managed config*
24-
page = machine.succeed("curl --fail http://localhost:8082/")
25-
assert "test title rodUsEagid" in page, "Custom title not found"
26-
'';
27-
}
28-
)
22+
# Ensure that we see the custom title *only in the managed config*
23+
page = machine.succeed("curl --fail http://localhost:8082/")
24+
assert "test title rodUsEagid" in page, "Custom title not found"
25+
'';
26+
}

nixos/tests/incus/ui.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,17 @@ import ../make-test-python.nix (
6666

6767
testScript = ''
6868
machine.wait_for_unit("incus.service")
69+
machine.wait_for_unit("incus-preseed.service")
6970
7071
# Check that the INCUS_UI environment variable is populated in the systemd unit
7172
machine.succeed("systemctl cat incus.service | grep 'INCUS_UI'")
7273
7374
# Ensure the endpoint returns an HTML page with 'Incus UI' in the title
7475
machine.succeed("curl -kLs https://localhost:8443/ui | grep '<title>Incus UI</title>'")
7576
77+
# Ensure the documentation is rendering correctly
78+
machine.succeed("curl -kLs https://localhost:8443/documentation/ | grep '<title>Incus documentation</title>'")
79+
7680
# Ensure the application is actually rendered by the Javascript
7781
machine.succeed("PYTHONUNBUFFERED=1 selenium-script")
7882
'';

nixos/tests/installer.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ let
638638
clevisTest ? false,
639639
clevisFallbackTest ? false,
640640
disableFileSystems ? false,
641+
selectNixPackage ? pkgs: pkgs.nixStable,
641642
}:
642643
let
643644
isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi);
@@ -701,6 +702,7 @@ let
701702
virtualisation.rootDevice = "/dev/vdb";
702703

703704
hardware.enableAllFirmware = mkForce false;
705+
nix.package = selectNixPackage pkgs;
704706

705707
# The test cannot access the network, so any packages we
706708
# need must be included in the VM.
@@ -1101,6 +1103,9 @@ in
11011103
# The (almost) simplest partitioning scheme: a swap partition and
11021104
# one big filesystem partition.
11031105
simple = makeInstallerTest "simple" simple-test-config;
1106+
lix-simple = makeInstallerTest "simple" simple-test-config // {
1107+
selectNixPackage = pkgs: pkgs.lix;
1108+
};
11041109

11051110
switchToFlake = makeInstallerTest "switch-to-flake" simple-test-config-flake;
11061111

0 commit comments

Comments
 (0)