refactor: clean up 'flake.nix' and 'deploy/colmena.nix'
This commit is contained in:
@@ -13,32 +13,33 @@ inputs.colmena.lib.makeHive {
|
||||
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 = {
|
||||
targetHost = "hecuba";
|
||||
targetUser = "username";
|
||||
targetPort = 22;
|
||||
tags = [ "cloud" ];
|
||||
};
|
||||
};
|
||||
|
||||
eetion =
|
||||
{ ... }:
|
||||
{
|
||||
eetion = {
|
||||
imports = [ ../hosts/eetion ];
|
||||
deployment = {
|
||||
targetHost = "eetion";
|
||||
targetUser = "h";
|
||||
targetPort = 22;
|
||||
tags = [ "arm" ];
|
||||
};
|
||||
};
|
||||
|
||||
27
flake.nix
27
flake.nix
@@ -49,16 +49,10 @@
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixos-hardware,
|
||||
disko,
|
||||
sops-nix,
|
||||
nix-secrets,
|
||||
home-manager,
|
||||
nix-on-droid,
|
||||
nixgl,
|
||||
firefox-addons,
|
||||
nvim,
|
||||
colmena,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
@@ -66,10 +60,6 @@
|
||||
utils = import ./utils { inherit lib; };
|
||||
hostDirNames = utils.dirNames ./hosts;
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ nixgl.overlay ];
|
||||
};
|
||||
dotsPath = ./dots;
|
||||
in
|
||||
{
|
||||
@@ -77,9 +67,10 @@
|
||||
"nixpkgs=${inputs.nixpkgs}"
|
||||
]; # <https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md>
|
||||
nixosConfigurations =
|
||||
(lib.genAttrs (lib.filter (h: h != "eetion") hostDirNames) (
|
||||
(lib.genAttrs hostDirNames (
|
||||
host:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = import ./hosts/${host}/system.nix;
|
||||
modules = [ ./hosts/${host} ];
|
||||
specialArgs = {
|
||||
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 {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
@@ -112,7 +96,10 @@
|
||||
};
|
||||
homeConfigurations = {
|
||||
work = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ nixgl.overlay ];
|
||||
};
|
||||
modules = [ ./home/hosts/work ];
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs dotsPath;
|
||||
|
||||
1
hosts/andromache/system.nix
Normal file
1
hosts/andromache/system.nix
Normal file
@@ -0,0 +1 @@
|
||||
"x86_64-linux"
|
||||
1
hosts/astyanax/system.nix
Normal file
1
hosts/astyanax/system.nix
Normal file
@@ -0,0 +1 @@
|
||||
"x86_64-linux"
|
||||
1
hosts/eetion/system.nix
Normal file
1
hosts/eetion/system.nix
Normal file
@@ -0,0 +1 @@
|
||||
"aarch64-linux"
|
||||
1
hosts/hecuba/system.nix
Normal file
1
hosts/hecuba/system.nix
Normal file
@@ -0,0 +1 @@
|
||||
"x86_64-linux"
|
||||
1
hosts/vm/system.nix
Normal file
1
hosts/vm/system.nix
Normal file
@@ -0,0 +1 @@
|
||||
"x86_64-linux"
|
||||
Reference in New Issue
Block a user