From be64cd21ebd57b2d78585e6761e3098023c77b4d Mon Sep 17 00:00:00 2001 From: lelgenio Date: Thu, 17 Nov 2022 15:12:27 -0300 Subject: [PATCH] use system nixpkgs as registry --- flake.nix | 9 +++++---- system/configuration.nix | 4 +++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 3cf9302..26c5b8e 100644 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,7 @@ config = { allowUnfree = true; }; }; lib = nixpkgs.lib; + specialArgs = { inherit inputs; }; common_modules = [ ./system/configuration.nix # nur.nixosModules.nur @@ -68,20 +69,20 @@ in { nixosConfigurations = { i15 = lib.nixosSystem { - inherit system; + inherit system specialArgs; modules = [ ./hosts/i15.nix ] ++ common_modules; }; monolith = lib.nixosSystem { - inherit system; + inherit system specialArgs; modules = [ ./hosts/monolith.nix ./system/gitlab-runner.nix ] ++ common_modules; }; rainbow = lib.nixosSystem { - inherit system; + inherit system specialArgs; modules = [ ./hosts/rainbow.nix ] ++ common_modules; }; pixie = lib.nixosSystem { - inherit system; + inherit system specialArgs; modules = [ ./hosts/pixie.nix ] ++ common_modules ++ [{ packages.media-packages.enable = lib.mkOverride 0 false; programs.steam.enable = lib.mkOverride 0 false; diff --git a/system/configuration.nix b/system/configuration.nix index bc8a54a..7ea7634 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -1,7 +1,7 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: { +{ config, pkgs, inputs, ... }: { imports = [ ./media-packages.nix ]; packages.media-packages.enable = true; @@ -134,6 +134,8 @@ # Or disable the firewall altogether. networking.firewall.enable = false; security.sudo.wheelNeedsPassword = false; + + nix.registry.nixpkgs.flake = inputs.nixpkgs; nix = { settings = { auto-optimise-store = true;