Don't allow just any unfree software
This commit is contained in:
parent
8d10382c46
commit
8aa29e173c
2 changed files with 10 additions and 12 deletions
|
@ -7,9 +7,6 @@ let
|
||||||
enableNixDirenvIntegration = true;
|
enableNixDirenvIntegration = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
baseUnfree = {
|
|
||||||
xdg.configFile."nixpkgs/config.nix".source = ./nix/unfree.nix;
|
|
||||||
};
|
|
||||||
baseNixIndex = {
|
baseNixIndex = {
|
||||||
home.packages = with pkgs; [ nix-index ];
|
home.packages = with pkgs; [ nix-index ];
|
||||||
programs.zsh.initExtra = ''
|
programs.zsh.initExtra = ''
|
||||||
|
@ -87,7 +84,14 @@ in
|
||||||
'');
|
'');
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config = lib.mkIf config.chvp.nix.enableUnfree (import ./nix/unfree.nix);
|
nixpkgs.config = lib.mkIf config.chvp.nix.enableUnfree {
|
||||||
|
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||||
|
"citrix-workspace"
|
||||||
|
"dropbox"
|
||||||
|
"teams"
|
||||||
|
"google-chrome"
|
||||||
|
];
|
||||||
|
};
|
||||||
nixpkgs.overlays = lib.mkIf config.chvp.nix.enableFlakes [
|
nixpkgs.overlays = lib.mkIf config.chvp.nix.enableFlakes [
|
||||||
(self: super: {
|
(self: super: {
|
||||||
nix = super.nixUnstable;
|
nix = super.nixUnstable;
|
||||||
|
@ -97,12 +101,7 @@ in
|
||||||
home-manager.users.charlotte = { ... }:
|
home-manager.users.charlotte = { ... }:
|
||||||
lib.recursiveUpdate
|
lib.recursiveUpdate
|
||||||
(lib.optionalAttrs config.chvp.nix.enableDirenv baseDirenv)
|
(lib.optionalAttrs config.chvp.nix.enableDirenv baseDirenv)
|
||||||
(lib.recursiveUpdate
|
(lib.optionalAttrs config.chvp.nix.enableNixIndex baseNixIndex);
|
||||||
(lib.optionalAttrs config.chvp.nix.enableUnfree baseUnfree)
|
home-manager.users.root = { ... }: lib.optionalAttrs config.chvp.nix.enableDirenv baseDirenv;
|
||||||
(lib.optionalAttrs config.chvp.nix.enableNixIndex baseNixIndex));
|
|
||||||
home-manager.users.root = { ... }:
|
|
||||||
lib.recursiveUpdate
|
|
||||||
(lib.optionalAttrs config.chvp.nix.enableDirenv baseDirenv)
|
|
||||||
(lib.optionalAttrs config.chvp.nix.enableUnfree baseUnfree);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{ allowUnfree = true; }
|
|
Loading…
Add table
Add a link
Reference in a new issue