add nixpkgs input to nixpath

this is required because with Flakes we don't want to use channels.
This commit is contained in:
Andreas Zweili 2022-02-15 20:54:21 +01:00
parent df911c3170
commit a89b80adea
2 changed files with 12 additions and 2 deletions

View File

@ -30,6 +30,7 @@
config.allowUnfree = true;
};
};
pkgs = import nixpkgs {
inherit system;
config = {
@ -41,7 +42,7 @@
};
mkComputer = configurationNix: homeManagerRole: extraModules: nixpkgs.lib.nixosSystem {
inherit system pkgs;
specialArgs = { inherit self system inputs username; };
specialArgs = { inherit self nixpkgs system inputs username; };
modules = (
[
# System configuration for this host

View File

@ -1,4 +1,4 @@
{ self, pkgs, username, ... }:
{ self, nixpkgs, pkgs, username, ... }:
{
imports = [
"${self}/modules/cli"
@ -67,6 +67,15 @@
nixpkgs.config.allowUnfree = true;
nix = {
nixPath = [ "nixpkgs=${nixpkgs}" ];
registry.nixpkgs = {
from = {
id = "nixpkgs";
type = "indirect";
};
flake = nixpkgs;
};
autoOptimiseStore = true;
package = pkgs.nixFlakes;
extraOptions = ''