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";
outputs = { self, nixpkgs, nixpkgs-unstable, agenix }@inputs: {
nixosConfigurations."gendry.jakehillion-terminals.ts.hillion.co.uk" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
modules = [
./hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/default.nix
agenix.nixosModule
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
];
};
nixosConfigurations."vm.strangervm.ts.hillion.co.uk" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
modules = [
./hosts/vm.strangervm.ts.hillion.co.uk/default.nix
agenix.nixosModule
{
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;
}
];
};
nixosConfigurations =
let
fqdns = builtins.attrNames (builtins.readDir ./hosts);
mkHost = fqdn:
let system = builtins.readFile ./hosts/${fqdn}/system; in
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = inputs;
modules = [
./hosts/${fqdn}/default.nix
agenix.nixosModule
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
];
};
in
nixpkgs.lib.genAttrs fqdns mkHost;
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".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