Split up more nix functions

This commit is contained in:
Bun 2025-03-24 04:28:36 -04:00
parent 0b8d1f4eaf
commit b7a5fc7197
6 changed files with 48 additions and 50 deletions

View file

@ -1,29 +1,24 @@
{ config, lib, pkgs, unstable, ... }:
{
imports = [ ./gc ];
imports = [
./gc
./unfree
];
options.nixpkgs.allowUnfreePackages = lib.mkOption {
type = with lib.types; listOf str;
nix = {
package = pkgs.lix;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
auto-optimise-store = true;
trusted-users = [ "@wheel" ];
};
};
config = {
nix = {
package = pkgs.lix;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
auto-optimise-store = true;
trusted-users = [ "@wheel" ];
};
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowUnfreePackages;
_module.args.pkgsUnstable = import unstable {
inherit (pkgs.stdenv.hostPlatform) system;
inherit (config.nixpkgs) config;
};
_module.args.pkgsUnstable = import unstable {
inherit (pkgs.stdenv.hostPlatform) system;
inherit (config.nixpkgs) config;
};
}

View file

@ -0,0 +1,8 @@
{ config, lib, ... }:
{
options.nixpkgs.allowUnfreePackages = lib.mkOption {
type = with lib.types; listOf str;
};
config.nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowUnfreePackages;
}