Imports all modules with colmena. Cleaner node declaration

This commit is contained in:
pazpi 2024-08-27 09:47:20 +02:00
parent eb9f742b1e
commit f8eb1bb696

View file

@ -20,30 +20,39 @@
}; };
}; };
outputs = { self, nixpkgs, agenix, home-manager, ... }@flakeInputs: outputs =
{
self,
nixpkgs,
nixpkgs-unstable,
agenix,
home-manager,
...
}@inputs:
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { pkgs = import nixpkgs { inherit system; };
inherit system;
};
in in
{ {
# used with: `nix fmt`
formatter.${system} = pkgs.nixfmt-rfc-style;
colmena = { colmena = {
meta = { meta = {
nixpkgs = import nixpkgs { nixpkgs = pkgs;
inherit system; specialArgs = {
overlays = [ ]; inherit inputs;
# modules = [
# ./modules
# ];
}; };
}; };
defaults = {
imports = [
"${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
./modules
];
};
# childnixos = { # childnixos = {
# deployment = { # deployment = {
# targetHost = "10.233.244.63"; # targetHost = "10.233.244.63";
@ -61,11 +70,7 @@
targetUser = "root"; targetUser = "root";
}; };
imports = [ imports = [ ./hosts/arr ];
<nixpkgs/nixos/modules/virtualisation/proxmox-lxc.nix>
./modules
./hosts/arr
];
}; };
# deadbeef = { # deadbeef = {
@ -83,14 +88,15 @@
}; };
formatter.${system} = pkgs.nixpkgs-fmt;
nixosConfigurations = nixosConfigurations =
let let
mkNixosConfiguration = name: extraModules: nixpkgs.lib.nixosSystem { mkNixosConfiguration =
name: extraModules:
nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = { inherit flakeInputs; }; specialArgs = {
inherit inputs;
};
modules = [ modules = [
{ {
networking.hostName = name; networking.hostName = name;
@ -110,8 +116,6 @@
}; };
}; };
# formatter.${system} = pkgs.nixpkgs-fmt; # formatter.${system} = pkgs.nixpkgs-fmt;
# nixosConfigurations = { # nixosConfigurations = {
@ -129,7 +133,6 @@
# ./hosts/deadbeef # ./hosts/deadbeef
# ]; # ];
# }; # };
# }; # };