modules/system/settei: add unfree module
This commit is contained in:
parent
6d2e9fc162
commit
35bcbc4898
4 changed files with 22 additions and 3 deletions
|
@ -6,8 +6,7 @@
|
|||
|
||||
settei.user.config.common.desktop.enable = true;
|
||||
|
||||
# TODO: Make it a settei module so it's easy to concatenate which pkgs are allowed
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "teams" ];
|
||||
settei.unfree.allowedPackages = [ "teams" ];
|
||||
environment.systemPackages = with pkgs; [ teams ];
|
||||
|
||||
settei.tailscale = {
|
||||
|
|
|
@ -38,7 +38,7 @@ let
|
|||
# so I need to override the fish package.
|
||||
nixpkgs.overlays = [ (_: _: { inherit (inputs'.settei.packages) fish; }) ];
|
||||
# TODO: Move to home/common/desktop
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "signal-desktop" ];
|
||||
settei.unfree.allowedPackages = [ "signal-desktop" ];
|
||||
|
||||
nix.settings.allow-import-from-derivation = false;
|
||||
};
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
(import ./programs { inherit isLinux; })
|
||||
(import ./tailscale.nix { inherit isLinux; })
|
||||
(import ./containers.nix { inherit isLinux; })
|
||||
./unfree.nix
|
||||
];
|
||||
|
||||
options.settei = with lib; {
|
||||
|
|
19
modules/system/settei/unfree.nix
Normal file
19
modules/system/settei/unfree.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
_file = ./unfree.nix;
|
||||
|
||||
options = {
|
||||
# TODO(maybe?): Allow other types and more customizability
|
||||
settei.unfree.allowedPackages =
|
||||
with lib;
|
||||
mkOption {
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
nixpkgs.config.allowUnfreePredicate = lib.mkForce (
|
||||
pkg: builtins.elem (lib.getName pkg) config.settei.unfree.allowedPackages
|
||||
);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue