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;
|
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 ];
|
imports = [ ../hosts/hecuba ];
|
||||||
deployment = {
|
deployment = {
|
||||||
targetHost = "hecuba";
|
|
||||||
targetUser = "username";
|
targetUser = "username";
|
||||||
targetPort = 22;
|
|
||||||
tags = [ "cloud" ];
|
tags = [ "cloud" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
eetion =
|
eetion = {
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [ ../hosts/eetion ];
|
imports = [ ../hosts/eetion ];
|
||||||
deployment = {
|
deployment = {
|
||||||
targetHost = "eetion";
|
|
||||||
targetUser = "h";
|
targetUser = "h";
|
||||||
targetPort = 22;
|
|
||||||
tags = [ "arm" ];
|
tags = [ "arm" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
27
flake.nix
27
flake.nix
@@ -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;
|
||||||
|
|||||||
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