diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2022-01-24 06:58:25 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2022-01-24 06:58:58 -0500 |
commit | bdb901212130163f102f637d06d1d5b6d8c58387 (patch) | |
tree | 3422a25a8aca388b9671423ecb041c66e714e250 | |
parent | 33aeb1091b221e5e9df998af5f70edf2c0b9c5e5 (diff) |
Add system nixpkgs to flake registry
-rw-r--r-- | flake.nix | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -11,7 +11,8 @@ # inputs.nix.url = "github:orbekk/nix/master"; # inputs.nix.inputs.nixpkgs.follows = "nixpkgs"; - outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, pms7003, emacs-overlay }: + outputs = + { self, nixpkgs, nixpkgs-unstable, nixos-hardware, pms7003, emacs-overlay }: let pkgs-module = { config, ... }: let @@ -30,10 +31,16 @@ in { nixpkgs.pkgs = import nixpkgs { inherit (cfg) config localSystem crossSystem; - overlays = cfg.overlays ++ [ unstable-overlay extra-packages emacs-overlay.overlay ]; + overlays = cfg.overlays + ++ [ unstable-overlay extra-packages emacs-overlay.overlay ]; }; }; + registry-module = { ... }: { + nix.registry.nixpkgs.flake = nixpkgs; + nix.registry.nixpkgs-unstable.flake = nixpkgs-unstable; + }; + lib = nixpkgs.lib; orbekk-modules = let @@ -50,7 +57,7 @@ in lib.listToAttrs (map mkModule moduleNames); in { - nixosModules = orbekk-modules // { inherit pkgs-module; }; + nixosModules = orbekk-modules // { inherit pkgs-module registry-module; }; packages."x86_64-linux" = let pkgs = import nixpkgs { system = "x86_64-linux"; }; |