refactor: add home 'allowedUnfree' option
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
_:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
nixpkgs.allowedUnfree = [
|
||||||
|
"spotify"
|
||||||
|
"spotify-unwrapped"
|
||||||
|
];
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services = {
|
services = {
|
||||||
pulseaudio.enable = false;
|
pulseaudio.enable = false;
|
||||||
|
|||||||
@@ -1,58 +1,66 @@
|
|||||||
let
|
|
||||||
flakePath = "/home/h/nix";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
outputs,
|
outputs,
|
||||||
dotsPath,
|
dotsPath,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (inputs.nixpkgs) lib;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "25.05";
|
options.nixpkgs.allowedUnfree = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
nix.settings.experimental-features = [
|
default = [ ];
|
||||||
"nix-command"
|
|
||||||
"flakes"
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs outputs dotsPath;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
config = {
|
||||||
optimise = {
|
system.stateVersion = "25.05";
|
||||||
automatic = true;
|
|
||||||
dates = [ "05:00" ];
|
|
||||||
};
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 30d";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
system.autoUpgrade = {
|
nix.settings.experimental-features = [
|
||||||
enable = true;
|
"nix-command"
|
||||||
flake = flakePath;
|
"flakes"
|
||||||
flags = [
|
|
||||||
"--recreate-lock-file"
|
|
||||||
"--commit-lock-file"
|
|
||||||
"--print-build-logs"
|
|
||||||
"--refresh"
|
|
||||||
];
|
];
|
||||||
dates = "05:00";
|
|
||||||
randomizedDelaySec = "45min";
|
nixpkgs.config.allowUnfreePredicate =
|
||||||
allowReboot = false;
|
pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowedUnfree;
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs outputs dotsPath;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
optimise = {
|
||||||
|
automatic = true;
|
||||||
|
dates = [ "05:00" ];
|
||||||
|
};
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 30d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
system.autoUpgrade = {
|
||||||
|
enable = true;
|
||||||
|
flags = [
|
||||||
|
"--recreate-lock-file"
|
||||||
|
"--commit-lock-file"
|
||||||
|
"--print-build-logs"
|
||||||
|
"--refresh"
|
||||||
|
];
|
||||||
|
dates = "05:00";
|
||||||
|
randomizedDelaySec = "45min";
|
||||||
|
allowReboot = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user