flake: cleanup host selection logic
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Jake Hillion 2023-01-11 20:34:07 +00:00
parent 09d031a4cf
commit 40d91223a0
5 changed files with 22 additions and 47 deletions

View File

@ -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;

View File

@ -0,0 +1 @@
x86_64-linux

View File

@ -0,0 +1 @@
aarch64-linux

View File

@ -0,0 +1 @@
aarch64-linux

View File

@ -0,0 +1 @@
x86_64-linux