mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Switch garbage collection to nh
This commit is contained in:
parent
ee6393aa18
commit
55fc9b9f36
5 changed files with 22 additions and 23 deletions
|
|
@ -21,7 +21,6 @@
|
|||
bluetooth.enable = true;
|
||||
|
||||
sound.enable = true;
|
||||
auto-gc.enable = true;
|
||||
vm.qemu.enable = true;
|
||||
flatpak.enable = true;
|
||||
vpn.lgs.enable = true;
|
||||
|
|
@ -29,7 +28,10 @@
|
|||
sops.enable = true;
|
||||
printing.enable = true;
|
||||
syncthing.enable = true;
|
||||
nix-helper.enable = true;
|
||||
nix-helper = {
|
||||
enable = true;
|
||||
auto-gc.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
|
|
|||
|
|
@ -18,14 +18,16 @@
|
|||
de.hyprland.enable = true;
|
||||
|
||||
sound.enable = true;
|
||||
auto-gc.enable = true;
|
||||
vm.qemu.enable = true;
|
||||
vpn.lgs.enable = true;
|
||||
comma.enable = true;
|
||||
sops.enable = true;
|
||||
printing.enable = true;
|
||||
syncthing.enable = true;
|
||||
nix-helper.enable = true;
|
||||
nix-helper = {
|
||||
enable = true;
|
||||
auto-gc.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.auto-gc.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.auto-gc.enable {
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@
|
|||
./wlan.nix
|
||||
./vpn.nix
|
||||
./comma.nix
|
||||
./auto-gc.nix
|
||||
./sops.nix
|
||||
./bluetooth.nix
|
||||
./de.nix
|
||||
|
|
|
|||
|
|
@ -2,10 +2,15 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.nix-helper.enable = lib.mkEnableOption "";
|
||||
}: let
|
||||
cfg = config.myConfig.nix-helper;
|
||||
in {
|
||||
options.myConfig.nix-helper = {
|
||||
enable = lib.mkEnableOption "";
|
||||
auto-gc.enable = lib.mkEnableOption "";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.myConfig.nix-helper.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.nh.enable = true;
|
||||
|
||||
environment.shellAliases = let
|
||||
|
|
@ -16,5 +21,11 @@
|
|||
nrb = "${rebuild} boot";
|
||||
nrrb = "nrb && reboot";
|
||||
};
|
||||
|
||||
programs.nh.clean = lib.mkIf cfg.auto-gc.enable {
|
||||
enable = true;
|
||||
dates = "daily";
|
||||
extraArgs = "--keep 10 --keep-since 7d";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue