summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2025-08-29 12:42:47 +0530
committersinanmohd <sinan@sinanmohd.com>2025-08-29 12:42:47 +0530
commit055af0cc4421732f3d5a695082ec34f178f7e5dc (patch)
tree1cb34ebe948fa0c460d19724354199b47a634f8b
parentc3bbce05e715c28e0acc21437a6aa6b82590736f (diff)
chore(os/common/nix): enable automatic gc
-rw-r--r--os/common/modules/nix.nix40
1 files changed, 24 insertions, 16 deletions
diff --git a/os/common/modules/nix.nix b/os/common/modules/nix.nix
index cf3843e..711ead4 100644
--- a/os/common/modules/nix.nix
+++ b/os/common/modules/nix.nix
@@ -3,23 +3,31 @@ let
user = config.global.userdata.name;
in
{
- nix.settings = {
- auto-optimise-store = true;
- use-xdg-base-directories = true;
- trusted-users = [ user ];
+ nix = {
+ gc = {
+ automatic = true;
+ dates = "weekly";
+ options = "--delete-older-than 30d";
+ };
- experimental-features = [
- "flakes"
- "nix-command"
- ];
+ settings = {
+ auto-optimise-store = true;
+ use-xdg-base-directories = true;
+ trusted-users = [ user ];
- substituters = [
- "https://nixbin.sinanmohd.com"
- "https://nix-community.cachix.org"
- ];
- trusted-public-keys = [
- "nixbin.sinanmohd.com:dXV3KDPVrm+cGJ2M1ZmTeQJqFGaEapqiVoWHgYDh03k="
- "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
- ];
+ experimental-features = [
+ "flakes"
+ "nix-command"
+ ];
+
+ substituters = [
+ "https://nixbin.sinanmohd.com"
+ "https://nix-community.cachix.org"
+ ];
+ trusted-public-keys = [
+ "nixbin.sinanmohd.com:dXV3KDPVrm+cGJ2M1ZmTeQJqFGaEapqiVoWHgYDh03k="
+ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
+ ];
+ };
};
}