mirror of
https://github.com/divnix/digga.git
synced 2024-12-24 00:21:47 +03:00
ci: move into build attribute
This commit is contained in:
parent
33f29d62f4
commit
bd9878f82a
11
hosts/ci.nix
11
hosts/ci.nix
@ -1,11 +0,0 @@
|
||||
{ suites, ... }:
|
||||
{
|
||||
imports = with suites; allProfiles ++ allUsers;
|
||||
|
||||
security.mitigations.acceptRisk = true;
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||
}
|
@ -63,7 +63,11 @@ let
|
||||
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
|
||||
};
|
||||
|
||||
local = import "${toString ./.}/${hostName}.nix";
|
||||
local = {
|
||||
require = [
|
||||
(import "${toString ./.}/${hostName}.nix")
|
||||
];
|
||||
};
|
||||
|
||||
# Everything in `./modules/list.nix`.
|
||||
flakeModules =
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ nixos, ... }:
|
||||
let
|
||||
inherit (builtins) attrNames attrValues isAttrs readDir listToAttrs mapAttrs
|
||||
pathExists;
|
||||
pathExists filter;
|
||||
|
||||
inherit (nixos.lib) fold filterAttrs hasSuffix mapAttrs' nameValuePair removeSuffix
|
||||
recursiveUpdate genAttrs nixosSystem mkForce;
|
||||
@ -76,6 +76,27 @@ in
|
||||
let
|
||||
modpath = "nixos/modules";
|
||||
cd = "installer/cd-dvd/installation-cd-minimal-new-kernel.nix";
|
||||
ciConfig =
|
||||
(nixosSystem (args // {
|
||||
modules =
|
||||
let
|
||||
# remove host module
|
||||
modules' = filter (x: ! x ? require) modules;
|
||||
in
|
||||
modules' ++ [
|
||||
({ suites, ... }: {
|
||||
imports = with suites;
|
||||
allProfiles ++ allUsers;
|
||||
security.mitigations.acceptRisk = true;
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||
})
|
||||
];
|
||||
})).config;
|
||||
|
||||
isoConfig = (nixosSystem
|
||||
(args // {
|
||||
modules = modules ++ [
|
||||
@ -94,6 +115,7 @@ in
|
||||
modules ++ [{
|
||||
system.build = {
|
||||
iso = isoConfig.system.build.isoImage;
|
||||
ci = ciConfig.system.build.toplevel;
|
||||
};
|
||||
}];
|
||||
});
|
||||
|
@ -11,7 +11,7 @@ let
|
||||
};
|
||||
|
||||
ci = recurseIntoAttrs {
|
||||
nixos = default.nixosConfigurations.ci.config.system.build.toplevel;
|
||||
nixos = default.nixosConfigurations.NixOS.config.system.build.ci;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user