diff --git a/flake.nix b/flake.nix index 48bd3db..b706829 100644 --- a/flake.nix +++ b/flake.nix @@ -20,30 +20,39 @@ }; }; - outputs = { self, nixpkgs, agenix, home-manager, ... }@flakeInputs: + outputs = + { + self, + nixpkgs, + nixpkgs-unstable, + agenix, + home-manager, + ... + }@inputs: let system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - }; + pkgs = import nixpkgs { inherit system; }; in { + # used with: `nix fmt` + formatter.${system} = pkgs.nixfmt-rfc-style; + colmena = { meta = { - nixpkgs = import nixpkgs { - inherit system; - overlays = [ ]; - - # modules = [ - # ./modules - - # ]; - - + nixpkgs = pkgs; + specialArgs = { + inherit inputs; }; }; + defaults = { + imports = [ + "${nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix" + ./modules + ]; + }; + # childnixos = { # deployment = { # targetHost = "10.233.244.63"; @@ -61,11 +70,7 @@ targetUser = "root"; }; - imports = [ - - ./modules - ./hosts/arr - ]; + imports = [ ./hosts/arr ]; }; # deadbeef = { @@ -83,26 +88,27 @@ }; - - formatter.${system} = pkgs.nixpkgs-fmt; - nixosConfigurations = let - mkNixosConfiguration = name: extraModules: nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { inherit flakeInputs; }; - modules = [ - { - networking.hostName = name; - nixpkgs.overlays = [ (_: _: { nixfiles = self.packages.${system}; }) ]; - # sops.defaultSopsFile = ./hosts + "/${name}" + /secrets.yaml; - } - ./modules - (./hosts + "/${name}") - # (./hosts + "/${name}" + /hardware.nix) - # sops-nix.nixosModules.sops - ] ++ extraModules; - }; + mkNixosConfiguration = + name: extraModules: + nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs; + }; + modules = [ + { + networking.hostName = name; + nixpkgs.overlays = [ (_: _: { nixfiles = self.packages.${system}; }) ]; + # sops.defaultSopsFile = ./hosts + "/${name}" + /secrets.yaml; + } + ./modules + (./hosts + "/${name}") + # (./hosts + "/${name}" + /hardware.nix) + # sops-nix.nixosModules.sops + ] ++ extraModules; + }; in { deadbeef = mkNixosConfiguration "deadbeef" [ ]; @@ -110,8 +116,6 @@ }; }; - - # formatter.${system} = pkgs.nixpkgs-fmt; # nixosConfigurations = { @@ -129,7 +133,6 @@ # ./hosts/deadbeef # ]; - # }; # };