fix: use disko for iso

This commit is contained in:
FUFSoB committed 2026-09-27 18:04:01 +05:00
1 parent a24d2a976b
commit 6b9f8e44c9
12 files changed
+199 -72

No files matched your search

+2
View File
@@ -3,6 +3,7 @@
nixpkgs,
proxySuiteModule,
proxySuiteModules,
serverModule,
generatedOptionsDoc,
generatedReadmeDoc,
zapret,
@@ -27,6 +28,7 @@ let
system
nixpkgs
proxySuiteModule
serverModule
zapret
;
};
+2
View File
@@ -3,6 +3,7 @@
system,
nixpkgs,
proxySuiteModule,
serverModule,
zapret,
}:
@@ -278,5 +279,6 @@ in
system
nixpkgs
proxySuiteModule
serverModule
;
}
+1 -1
View File
@@ -284,7 +284,7 @@ let
serverModuleChecks = import ./server-module.nix {
inherit checkLib pkgs mkInboundsSpec;
inherit (checkLib) system nixpkgs proxySuiteModule;
inherit (checkLib) system nixpkgs serverModule;
};
xrayBackendChecks = import ./xray-backends.nix {
+19 -4
View File
@@ -5,7 +5,7 @@
pkgs,
system,
nixpkgs,
proxySuiteModule,
serverModule,
mkInboundsSpec,
}:
@@ -13,8 +13,6 @@ let
inherit (checkLib) ok;
inherit (pkgs) lib;
serverModule = import ../../deploy/server-module.nix { inherit proxySuiteModule; };
mkServer =
extra:
import "${nixpkgs}/nixos/lib/eval-config.nix" {
@@ -23,7 +21,7 @@ let
serverModule
{
system.stateVersion = "26.05";
fileSystems."/" = {
fileSystems."/" = lib.mkDefault {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
@@ -54,6 +52,12 @@ let
domain = "vpn.example.com";
network.dhcp = true;
};
# As the installer writes it now: filesystems from disko, not the fixture's ext4 root.
diskoServer = mkServer {
bootDisk = "/dev/disk/by-id/virtio-disk0";
disko.enable = true;
};
diskoFs = diskoServer.config.fileSystems;
failedAssertions =
fixture: map (a: a.message) (builtins.filter (a: !a.assertion) fixture.config.assertions);
@@ -70,6 +74,17 @@ in
assertions = [
(ok (failedAssertions ipServer == [ ]))
(ok (failedAssertions domainServer == [ ]))
(ok (failedAssertions diskoServer == [ ]))
# disko: btrfs subvolumes, compressed, the swap file, and GRUB on the disk once.
(ok (diskoFs."/".fsType == "btrfs" && builtins.elem "subvol=@" diskoFs."/".options))
(ok (builtins.elem "compress=zstd:3" diskoFs."/nix".options))
(ok (builtins.elem "subvol=@varlog" diskoFs."/var/log".options))
(ok (builtins.elem "subvol=@home" diskoFs."/home".options))
(ok (diskoFs."/boot".fsType == "vfat"))
(ok (map (s: s.device) diskoServer.config.swapDevices == [ "/swap/swapfile" ]))
(ok (diskoServer.config.boot.loader.grub.devices == [ "/dev/disk/by-id/virtio-disk0" ]))
(ok (ipServer.config.boot.loader.grub.devices == [ "/dev/vda" ]))
(
assert