flake.nix: define pkgs
in flake
Set the global package set via `hosts/default.nix` passed in from its definition in `flake.nix`.
This commit is contained in:
parent
331fa795b1
commit
d5ba9f6173
3 changed files with 11 additions and 10 deletions
11
flake.nix
11
flake.nix
|
@ -6,18 +6,21 @@
|
||||||
inputs.nixpkgs.url = "github:nrdxp/nixpkgs/fork";
|
inputs.nixpkgs.url = "github:nrdxp/nixpkgs/fork";
|
||||||
inputs.home.url = "github:nrdxp/home-manager/flakes";
|
inputs.home.url = "github:nrdxp/home-manager/flakes";
|
||||||
|
|
||||||
outputs = args@{ self, home, nixpkgs }:
|
outputs = inputs@{ self, home, nixpkgs }:
|
||||||
let
|
let
|
||||||
inherit (builtins) listToAttrs baseNameOf attrNames readDir;
|
inherit (builtins) listToAttrs baseNameOf attrNames readDir;
|
||||||
inherit (nixpkgs.lib) removeSuffix;
|
inherit (nixpkgs.lib) removeSuffix;
|
||||||
|
system = "x86_64-linux";
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
system = "x86_64-linux";
|
inherit system;
|
||||||
overlays = self.overlays;
|
overlays = self.overlays;
|
||||||
|
config = { allowUnfree = true; };
|
||||||
};
|
};
|
||||||
in {
|
|
||||||
nixosConfigurations = let configs = import ./hosts args;
|
|
||||||
|
|
||||||
|
in {
|
||||||
|
nixosConfigurations =
|
||||||
|
let configs = import ./hosts (inputs // { inherit system pkgs; });
|
||||||
in configs;
|
in configs;
|
||||||
|
|
||||||
overlay = import ./pkgs;
|
overlay = import ./pkgs;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
args@{ home, nixpkgs, self, ... }:
|
inputs@{ home, nixpkgs, self, pkgs, system, ... }:
|
||||||
let
|
let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ let
|
||||||
|
|
||||||
config = hostName:
|
config = hostName:
|
||||||
lib.nixosSystem rec {
|
lib.nixosSystem rec {
|
||||||
system = "x86_64-linux";
|
inherit system;
|
||||||
|
|
||||||
specialArgs.usr = { inherit utils; };
|
specialArgs.usr = { inherit utils; };
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ let
|
||||||
|
|
||||||
system.configurationRevision = self.rev;
|
system.configurationRevision = self.rev;
|
||||||
|
|
||||||
nixpkgs.overlays = self.overlays;
|
nixpkgs = { inherit pkgs; };
|
||||||
};
|
};
|
||||||
|
|
||||||
local = import "${toString ./.}/${hostName}.nix";
|
local = import "${toString ./.}/${hostName}.nix";
|
||||||
|
|
|
@ -119,8 +119,6 @@ in {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
|
|
||||||
hideProcessInformation = true;
|
hideProcessInformation = true;
|
||||||
|
|
Loading…
Reference in a new issue