mirror of
https://github.com/kaesaecracker/nixos-configuration.git
synced 2025-01-18 18:40:14 +01:00
52 lines
1.4 KiB
Nix
52 lines
1.4 KiB
Nix
{ config, lib, ... }:
|
|
{
|
|
options.allowedUnfreePackages = lib.mkOption {
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [ ];
|
|
example = [ "steam" ];
|
|
};
|
|
config = {
|
|
nixpkgs.config = {
|
|
# https://github.com/NixOS/nixpkgs/issues/197325#issuecomment-1579420085
|
|
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.allowedUnfreePackages;
|
|
};
|
|
|
|
nix = {
|
|
settings = {
|
|
substituters = [
|
|
"https://nix-community.cachix.org"
|
|
"https://cache.nixos.org/"
|
|
];
|
|
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
|
|
experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
};
|
|
gc = {
|
|
automatic = true;
|
|
dates = "daily";
|
|
options = "--delete-older-than 7d";
|
|
};
|
|
optimise.automatic = true;
|
|
};
|
|
|
|
system = {
|
|
stateVersion = "22.11";
|
|
# enable auto updates
|
|
autoUpgrade = {
|
|
enable = true;
|
|
dates = "weekly";
|
|
};
|
|
};
|
|
|
|
documentation = {
|
|
enable = true; # documentation of packages
|
|
nixos.enable = false; # nixos documentation
|
|
man.enable = true; # manual pages and the man command
|
|
info.enable = false; # info pages and the info command
|
|
doc.enable = false; # documentation distributed in packages' /share/doc
|
|
};
|
|
};
|
|
}
|