refactor: clean up 'flake.nix' and 'deploy/colmena.nix'

This commit is contained in:
2026-02-01 23:40:32 +01:00
parent 1d5c1a7c2a
commit eb54ade226
7 changed files with 36 additions and 43 deletions

View File

@@ -13,33 +13,34 @@ inputs.colmena.lib.makeHive {
nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs or { }) self.nixosConfigurations; nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs or { }) self.nixosConfigurations;
}; };
astyanax.deployment.tags = [ "local" ]; astyanax = {
imports = [ ../hosts/astyanax ];
deployment.tags = [ "local" ];
};
andromache.deployment.tags = [ "local" ]; andromache = {
imports = [ ../hosts/andromache ];
deployment.tags = [ "local" ];
};
vm.deployment.tags = [ "local" ]; vm = {
imports = [ ../hosts/vm ];
deployment.tags = [ "local" ];
};
hecuba = hecuba = {
{ ... }: imports = [ ../hosts/hecuba ];
{ deployment = {
imports = [ ../hosts/hecuba ]; targetUser = "username";
deployment = { tags = [ "cloud" ];
targetHost = "hecuba";
targetUser = "username";
targetPort = 22;
tags = [ "cloud" ];
};
}; };
};
eetion = eetion = {
{ ... }: imports = [ ../hosts/eetion ];
{ deployment = {
imports = [ ../hosts/eetion ]; targetUser = "h";
deployment = { tags = [ "arm" ];
targetHost = "eetion";
targetUser = "h";
targetPort = 22;
tags = [ "arm" ];
};
}; };
};
} }

View File

@@ -49,16 +49,10 @@
{ {
self, self,
nixpkgs, nixpkgs,
nixos-hardware,
disko,
sops-nix,
nix-secrets,
home-manager, home-manager,
nix-on-droid, nix-on-droid,
nixgl, nixgl,
firefox-addons, ...
nvim,
colmena,
}@inputs: }@inputs:
let let
inherit (self) outputs; inherit (self) outputs;
@@ -66,10 +60,6 @@
utils = import ./utils { inherit lib; }; utils = import ./utils { inherit lib; };
hostDirNames = utils.dirNames ./hosts; hostDirNames = utils.dirNames ./hosts;
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [ nixgl.overlay ];
};
dotsPath = ./dots; dotsPath = ./dots;
in in
{ {
@@ -77,9 +67,10 @@
"nixpkgs=${inputs.nixpkgs}" "nixpkgs=${inputs.nixpkgs}"
]; # <https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md> ]; # <https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md>
nixosConfigurations = nixosConfigurations =
(lib.genAttrs (lib.filter (h: h != "eetion") hostDirNames) ( (lib.genAttrs hostDirNames (
host: host:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
system = import ./hosts/${host}/system.nix;
modules = [ ./hosts/${host} ]; modules = [ ./hosts/${host} ];
specialArgs = { specialArgs = {
inherit inputs outputs dotsPath; inherit inputs outputs dotsPath;
@@ -87,13 +78,6 @@
} }
)) ))
// { // {
eetion = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [ ./hosts/eetion ];
specialArgs = {
inherit inputs outputs dotsPath;
};
};
sd-image-aarch64 = nixpkgs.lib.nixosSystem { sd-image-aarch64 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
@@ -112,7 +96,10 @@
}; };
homeConfigurations = { homeConfigurations = {
work = home-manager.lib.homeManagerConfiguration { work = home-manager.lib.homeManagerConfiguration {
inherit pkgs; pkgs = import nixpkgs {
inherit system;
overlays = [ nixgl.overlay ];
};
modules = [ ./home/hosts/work ]; modules = [ ./home/hosts/work ];
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs outputs dotsPath; inherit inputs outputs dotsPath;

View File

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

View File

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

1
hosts/eetion/system.nix Normal file
View File

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

1
hosts/hecuba/system.nix Normal file
View File

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

1
hosts/vm/system.nix Normal file
View File

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