35 lines
684 B
Nix
35 lines
684 B
Nix
{ lib, pkgs, config, ... }:
|
|
with lib;
|
|
let cfg = config.eboskma.nix-common;
|
|
in
|
|
{
|
|
options.eboskma.nix-common = {
|
|
enable = mkEnableOption "activate nix-common";
|
|
disable-cache = mkEnableOption "no not use binary cache";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
nixpkgs = {
|
|
config.allowUnfree = true;
|
|
};
|
|
|
|
nix = {
|
|
package = pkgs.nixFlakes;
|
|
extraOptions = ''
|
|
experimental-features = nix-command flakes
|
|
'';
|
|
|
|
settings = {
|
|
auto-optimise-store = true;
|
|
allowed-users = [ "root" ];
|
|
};
|
|
|
|
gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than=30d";
|
|
};
|
|
|
|
};
|
|
};
|
|
}
|