Restructure flake.nix for a simpler config for building different images off the same NixOS config.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -17,33 +16,29 @@
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.hydra.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
services.hydra = {
|
||||
enable = true;
|
||||
hydraURL = "http://localhost:3000"; # Externally visible URL
|
||||
notificationSender = "hydra@localhost"; # "From" address for hydra emails.
|
||||
# a standalone Hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
|
||||
buildMachinesFiles = [ ];
|
||||
useSubstitutes = true;
|
||||
};
|
||||
config = lib.mkIf config.me.hydra.enable {
|
||||
services.hydra = {
|
||||
enable = true;
|
||||
hydraURL = "http://localhost:3000"; # Externally visible URL
|
||||
notificationSender = "hydra@localhost"; # "From" address for hydra emails.
|
||||
# a standalone Hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
|
||||
buildMachinesFiles = [ ];
|
||||
useSubstitutes = true;
|
||||
};
|
||||
|
||||
# nix.buildMachines = [
|
||||
# {
|
||||
# hostName = "localhost";
|
||||
# protocol = null;
|
||||
# system = "x86_64-linux";
|
||||
# supportedFeatures = [
|
||||
# "kvm"
|
||||
# "nixos-test"
|
||||
# "big-parallel"
|
||||
# "benchmark"
|
||||
# ];
|
||||
# maxJobs = 8;
|
||||
# }
|
||||
# ];
|
||||
}
|
||||
]
|
||||
);
|
||||
# nix.buildMachines = [
|
||||
# {
|
||||
# hostName = "localhost";
|
||||
# protocol = null;
|
||||
# system = "x86_64-linux";
|
||||
# supportedFeatures = [
|
||||
# "kvm"
|
||||
# "nixos-test"
|
||||
# "big-parallel"
|
||||
# "benchmark"
|
||||
# ];
|
||||
# maxJobs = 8;
|
||||
# }
|
||||
# ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user