refactor: explicitly allow unfree packages
All checks were successful
/ check (push) Successful in 1m53s
All checks were successful
/ check (push) Successful in 1m53s
This commit is contained in:
parent
4d470acfad
commit
99484c6194
12 changed files with 74 additions and 19 deletions
|
@ -64,21 +64,13 @@
|
|||
users."${username}" = import ./home.nix;
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
nixpkgs.overlays = [
|
||||
inputs.nur.overlays.default
|
||||
|
||||
permittedInsecurePackages = [ "electron-27.3.11" ];
|
||||
};
|
||||
|
||||
overlays = [
|
||||
inputs.nur.overlays.default
|
||||
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.stable-packages
|
||||
];
|
||||
};
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.stable-packages
|
||||
];
|
||||
|
||||
nix.extraOptions = ''
|
||||
trusted-users = root ${username}
|
||||
|
|
|
@ -9,8 +9,6 @@ let
|
|||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
|
||||
config.allowUnfree = true;
|
||||
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.stable-packages
|
||||
|
|
|
@ -89,7 +89,6 @@
|
|||
peek
|
||||
pmutils
|
||||
shotwell
|
||||
slack
|
||||
stable.gscan2pdf
|
||||
sxiv
|
||||
tailscale
|
||||
|
@ -97,6 +96,5 @@
|
|||
xcape
|
||||
xsel
|
||||
yt-dlp
|
||||
zoom-us
|
||||
];
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
awesome-rss
|
||||
bitwarden
|
||||
darkreader
|
||||
onetab
|
||||
tree-style-tab
|
||||
ublock-origin
|
||||
videospeed
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
{
|
||||
nixpkgs.allowedUnfreePackages = [
|
||||
"steam"
|
||||
"steam-unwrapped"
|
||||
];
|
||||
|
||||
flake.modules.nixos.pc.programs.steam.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{
|
||||
nixpkgs.allowedUnfreePackages = [ "open-webui" ];
|
||||
|
||||
flake.modules.nixos.pc.services.open-webui.enable = true;
|
||||
}
|
||||
|
|
11
modules2/hosts/t480/slack.nix
Normal file
11
modules2/hosts/t480/slack.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.allowedUnfreePackages = [ "slack" ];
|
||||
|
||||
flake.modules.nixos."nixosConfigurations/t480" =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
users.users."${config.flake.meta.owner.username}".packages = [ pkgs.slack ];
|
||||
};
|
||||
}
|
11
modules2/hosts/t480/zoom.nix
Normal file
11
modules2/hosts/t480/zoom.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.allowedUnfreePackages = [ "zoom" ];
|
||||
|
||||
flake.modules.nixos."nixosConfigurations/t480" =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
users.users."${config.flake.meta.owner.username}".packages = [ pkgs.zoom-us ];
|
||||
};
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.allowedUnfreePackages = [ "makemkv" ];
|
||||
|
||||
flake.modules.nixos.pc =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
|
7
modules2/meta-output.nix
Normal file
7
modules2/meta-output.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
options.flake.meta = lib.mkOption {
|
||||
type = lib.types.anything;
|
||||
};
|
||||
}
|
26
modules2/unfree-packages.nix
Normal file
26
modules2/unfree-packages.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.nixpkgs.allowedUnfreePackages = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
config.flake = {
|
||||
modules =
|
||||
let
|
||||
predicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowedUnfreePackages;
|
||||
in
|
||||
{
|
||||
nixos.workstation.nixpkgs.config.allowUnfreePredicate = predicate;
|
||||
|
||||
homeManager.base = args: {
|
||||
nixpkgs.config = lib.mkIf (!(args.hasGlobalPkgs or false)) {
|
||||
allowUnfreePredicate = predicate;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta.nixpkgs.allowedUnfreePackages = config.nixpkgs.allowedUnfreePackages;
|
||||
};
|
||||
}
|
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
nixpkgs.allowedUnfreePackages = [
|
||||
"zsh-abbr"
|
||||
];
|
||||
|
||||
flake.modules.homeManager.base.programs.zsh.zsh-abbr.abbreviations = {
|
||||
cl = "clear";
|
||||
cs = "create-script";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue