flake: fix patching
This commit is contained in:
parent
b4af22f778
commit
41ab62fb4b
2 changed files with 10 additions and 6 deletions
13
flake.nix
13
flake.nix
|
@ -122,16 +122,21 @@
|
||||||
./modules
|
./modules
|
||||||
];
|
];
|
||||||
nixosSystem = system: name:
|
nixosSystem = system: name:
|
||||||
let nixpkgs = nixpkgsForSystem system; in
|
let
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
nixpkgs = nixpkgsForSystem system;
|
||||||
lib = (import nixpkgs { inherit overlays system; }).lib;
|
lib = (import nixpkgs { inherit overlays system; }).lib;
|
||||||
|
in
|
||||||
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
inherit lib system;
|
||||||
specialArgs = { modulesPath = toString (nixpkgs + "/nixos/modules"); };
|
specialArgs = { modulesPath = toString (nixpkgs + "/nixos/modules"); };
|
||||||
system = "x86_64-linux";
|
|
||||||
baseModules = import (nixpkgs + "/nixos/modules/module-list.nix");
|
baseModules = import (nixpkgs + "/nixos/modules/module-list.nix");
|
||||||
modules = commonModules ++ [
|
modules = commonModules ++ [
|
||||||
({ config, ... }:
|
({ config, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = overlays;
|
nixpkgs.pkgs = import nixpkgs {
|
||||||
|
inherit overlays system;
|
||||||
|
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.chvp.base.nix.unfreePackages;
|
||||||
|
};
|
||||||
networking.hostName = name;
|
networking.hostName = name;
|
||||||
nix = {
|
nix = {
|
||||||
extraOptions = "extra-experimental-features = nix-command flakes";
|
extraOptions = "extra-experimental-features = nix-command flakes";
|
||||||
|
|
|
@ -25,6 +25,7 @@ in
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
example = true;
|
||||||
};
|
};
|
||||||
|
# Used in /flake.nix, since we have to use it at nixpkgs import time
|
||||||
unfreePackages = lib.mkOption {
|
unfreePackages = lib.mkOption {
|
||||||
default = [ ];
|
default = [ ];
|
||||||
example = [ "teams" ];
|
example = [ "teams" ];
|
||||||
|
@ -85,8 +86,6 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.chvp.base.nix.unfreePackages;
|
|
||||||
|
|
||||||
home-manager.users.charlotte = { ... }:
|
home-manager.users.charlotte = { ... }:
|
||||||
lib.recursiveUpdate
|
lib.recursiveUpdate
|
||||||
(lib.optionalAttrs config.chvp.base.nix.enableDirenv baseDirenv)
|
(lib.optionalAttrs config.chvp.base.nix.enableDirenv baseDirenv)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue