ROCKPro64-Server/system/nix/default.nix

31 lines
711 B
Nix
Raw Normal View History

2025-03-08 04:22:31 -05:00
{ config, lib, pkgs, unstable, ... }:
2025-02-28 12:21:09 -05:00
{
2025-03-08 04:22:31 -05:00
options.nixpkgs.allowUnfreePackages = lib.mkOption {
type = with lib.types; listOf str;
2025-02-28 12:21:09 -05:00
};
2025-02-28 14:21:00 -05:00
2025-03-08 04:22:31 -05:00
config = {
nix = {
settings = {
experimental-features = [
"nix-command"
"flakes"
];
auto-optimise-store = true;
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
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;
};
2025-02-28 14:21:00 -05:00
};
2025-02-28 12:21:09 -05:00
}