Register as flake template

First step to generalizing this repo. Makes it easier to deploy. Later I
may move my host configs to another repo.
This commit is contained in:
Henrik Lissner 2021-01-02 00:22:57 -05:00
parent 177a7eec6f
commit 2a678d2b75
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -13,10 +13,9 @@
inputs =
{
# Core dependencies.
# Two inputs so I can track them separately at different rates.
# 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.inputs.nixpkgs.follows = "nixpkgs";
@ -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;
};
}