2022-04-27 00:21:19 +02:00
|
|
|
{ lib
|
|
|
|
, pkgs
|
|
|
|
, config
|
|
|
|
, ...
|
2022-03-01 22:19:03 +01:00
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
cfg = config.eboskma.nix-common;
|
2022-04-27 00:21:19 +02:00
|
|
|
in
|
|
|
|
{
|
2021-11-16 00:22:18 +01:00
|
|
|
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 = ''
|
2022-03-01 22:19:03 +01:00
|
|
|
experimental-features = nix-command flakes
|
2021-11-16 00:22:18 +01:00
|
|
|
'';
|
|
|
|
|
2022-02-02 21:26:39 +01:00
|
|
|
settings = {
|
|
|
|
auto-optimise-store = true;
|
2022-04-27 00:21:19 +02:00
|
|
|
allowed-users = [ "root" ];
|
2022-02-15 16:03:36 +01:00
|
|
|
substituters = [
|
|
|
|
"https://nix-community.cachix.org"
|
2022-06-10 20:19:24 +02:00
|
|
|
"https://marcus7070.cachix.org"
|
2022-02-15 16:03:36 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
trusted-public-keys = [
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
2022-06-10 20:19:24 +02:00
|
|
|
"marcus7070.cachix.org-1:JawxHSgnYsgNYJmNqZwvLjI4NcOwrcEZDToWlT3WwXw="
|
2022-02-15 16:03:36 +01:00
|
|
|
];
|
2022-02-02 21:26:39 +01:00
|
|
|
};
|
2021-11-16 00:22:18 +01:00
|
|
|
|
|
|
|
gc = {
|
|
|
|
automatic = true;
|
2022-03-28 14:26:07 +02:00
|
|
|
dates = "daily";
|
2021-11-16 00:22:18 +01:00
|
|
|
options = "--delete-older-than=30d";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|