diff --git a/flake.nix b/flake.nix index e6a0fe24..ac57b4bf 100644 --- a/flake.nix +++ b/flake.nix @@ -13,11 +13,10 @@ inputs = { # Core dependencies. - # Two inputs so I can track them separately at different rates. - nixpkgs.url = "nixpkgs/master"; + # Two inputs so I can track them independently + nixpkgs.url = "nixpkgs/master"; nixpkgs-unstable.url = "nixpkgs/master"; - - home-manager.url = "github:rycee/home-manager/master"; + home-manager.url = "github:rycee/home-manager/master"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; # Extras @@ -27,7 +26,6 @@ outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, ... }: let - inherit (lib) attrValues; inherit (lib.my) mapModules mapModulesRec mapHosts; system = "x86_64-linux"; @@ -35,10 +33,10 @@ mkPkgs = pkgs: extraOverlays: import pkgs { inherit system; config.allowUnfree = true; # forgive me Stallman senpai - overlays = extraOverlays ++ (attrValues self.overlays); + overlays = extraOverlays ++ (lib.attrValues self.overlays); }; pkgs = mkPkgs nixpkgs [ self.overlay ]; - uPkgs = mkPkgs nixpkgs-unstable []; + pkgs' = mkPkgs nixpkgs-unstable []; lib = nixpkgs.lib.extend (self: super: { my = import ./lib { inherit pkgs inputs; lib = self; }; }); @@ -47,7 +45,7 @@ overlay = final: prev: { - unstable = uPkgs; + unstable = pkgs'; my = self.packages."${system}"; }; @@ -55,17 +53,21 @@ mapModules ./overlays import; packages."${system}" = - mapModules ./packages - (p: pkgs.callPackage p {}); + mapModules ./packages (p: pkgs.callPackage p {}); nixosModules = - { dotfiles = import ./.; } - // mapModulesRec ./modules import; + { dotfiles = import ./.; } // mapModulesRec ./modules import; nixosConfigurations = mapHosts ./hosts { inherit system; }; devShell."${system}" = import ./shell.nix { inherit pkgs; }; + + templates.hey = { + path = ./.; + description = "A grossly incandescent nixos framework"; + }; + defaultTemplate = self.templates.hey; }; }