summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hm/shell/fish.nix9
-rw-r--r--hosts/desktop/configuration.nix2
-rw-r--r--hosts/laptop/configuration.nix1
-rw-r--r--sys/core/storage.nix14
4 files changed, 15 insertions, 11 deletions
diff --git a/hm/shell/fish.nix b/hm/shell/fish.nix
index b2e349a..9fb6a29 100644
--- a/hm/shell/fish.nix
+++ b/hm/shell/fish.nix
@@ -14,16 +14,19 @@ in
'';
shellAliases = {
- nos = "nh os switch";
- nob = "nh os boot";
+ update = "git add . && git commit -m \"$1\" && nh os switch .";
+
+ nos = "nh os switch .";
+ nob = "nh os boot .";
nfu = "nix flake update";
+
ll = "ls -lah";
la = "ls -A";
md = "mkdir -p";
rmf = "rm -rf";
- gl = "git log --oneline --graph --decorate";
untar = "tar -xzvf";
tarc = "tar -czvf";
+
ff = "fastfetch";
cat = "bat";
ls = "eza";
diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix
index a395b54..b74efe5 100644
--- a/hosts/desktop/configuration.nix
+++ b/hosts/desktop/configuration.nix
@@ -37,7 +37,7 @@
security.enable = true;
storage = {
enable = true;
- keepDays = 14;
+ keepDays = 30;
};
users.enable = true;
};
diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix
index b067b26..c3f2d24 100644
--- a/hosts/laptop/configuration.nix
+++ b/hosts/laptop/configuration.nix
@@ -4,6 +4,7 @@
imports = [
./hardware-configuration.nix
+ ./disko.nix
../../sys/default.nix
];
diff --git a/sys/core/storage.nix b/sys/core/storage.nix
index 22abcd7..d026eeb 100644
--- a/sys/core/storage.nix
+++ b/sys/core/storage.nix
@@ -9,18 +9,18 @@ in
keepDays = lib.mkOption {
type = lib.types.int;
default = 14;
- description = "Number of days to keep old Nix generations before GC.";
+ description = "Number of days to keep old Nix generations before GC";
};
};
config = lib.mkIf cfg.enable {
nix.settings.auto-optimise-store = true;
-
- nix.gc = {
- automatic = true;
- dates = "weekly";
- options = "--delete-older-than ${toString cfg.keepDays}d";
- };
+ programs.nh = {
+ enable = true;
+ clean.enable = true;
+ clean.extraArgs = "--keep-days ${toString cfg.keepDays} --keep 5";
+ };
+
services.fstrim.enable = true;
services.btrfs.autoScrub = {