flake: cleanup host selection logic
This commit is contained in:
parent
09d031a4cf
commit
40d91223a0
65
flake.nix
65
flake.nix
@ -10,53 +10,24 @@
|
|||||||
description = "Hillion Nix flake";
|
description = "Hillion Nix flake";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, agenix }@inputs: {
|
outputs = { self, nixpkgs, nixpkgs-unstable, agenix }@inputs: {
|
||||||
nixosConfigurations."gendry.jakehillion-terminals.ts.hillion.co.uk" = nixpkgs.lib.nixosSystem {
|
nixosConfigurations =
|
||||||
system = "x86_64-linux";
|
let
|
||||||
specialArgs = inputs;
|
fqdns = builtins.attrNames (builtins.readDir ./hosts);
|
||||||
modules = [
|
mkHost = fqdn:
|
||||||
./hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/default.nix
|
let system = builtins.readFile ./hosts/${fqdn}/system; in
|
||||||
agenix.nixosModule
|
nixpkgs.lib.nixosSystem {
|
||||||
{
|
inherit system;
|
||||||
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
specialArgs = inputs;
|
||||||
}
|
modules = [
|
||||||
];
|
./hosts/${fqdn}/default.nix
|
||||||
};
|
agenix.nixosModule
|
||||||
|
{
|
||||||
nixosConfigurations."vm.strangervm.ts.hillion.co.uk" = nixpkgs.lib.nixosSystem {
|
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
||||||
system = "x86_64-linux";
|
}
|
||||||
specialArgs = inputs;
|
];
|
||||||
modules = [
|
};
|
||||||
./hosts/vm.strangervm.ts.hillion.co.uk/default.nix
|
in
|
||||||
agenix.nixosModule
|
nixpkgs.lib.genAttrs fqdns mkHost;
|
||||||
{
|
|
||||||
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixosConfigurations."microserver.parents.ts.hillion.co.uk" = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "aarch64-linux";
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [
|
|
||||||
./hosts/microserver.parents.ts.hillion.co.uk/default.nix
|
|
||||||
agenix.nixosModule
|
|
||||||
{
|
|
||||||
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixosConfigurations."microserver.home.ts.hillion.co.uk" = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "aarch64-linux";
|
|
||||||
specialArgs = inputs;
|
|
||||||
modules = [
|
|
||||||
./hosts/microserver.home.ts.hillion.co.uk/default.nix
|
|
||||||
agenix.nixosModule
|
|
||||||
{
|
|
||||||
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".nixpkgs-fmt;
|
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".nixpkgs-fmt;
|
||||||
formatter."aarch64-darwin" = nixpkgs.legacyPackages."aarch64-darwin".nixpkgs-fmt;
|
formatter."aarch64-darwin" = nixpkgs.legacyPackages."aarch64-darwin".nixpkgs-fmt;
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
x86_64-linux
|
1
hosts/microserver.home.ts.hillion.co.uk/system
Normal file
1
hosts/microserver.home.ts.hillion.co.uk/system
Normal file
@ -0,0 +1 @@
|
|||||||
|
aarch64-linux
|
1
hosts/microserver.parents.ts.hillion.co.uk/system
Normal file
1
hosts/microserver.parents.ts.hillion.co.uk/system
Normal file
@ -0,0 +1 @@
|
|||||||
|
aarch64-linux
|
1
hosts/vm.strangervm.ts.hillion.co.uk/system
Normal file
1
hosts/vm.strangervm.ts.hillion.co.uk/system
Normal file
@ -0,0 +1 @@
|
|||||||
|
x86_64-linux
|
Loading…
Reference in New Issue
Block a user