Add automatic HM cleanup
This commit is contained in:
parent
cd51f5b55b
commit
e4d2625adf
5 changed files with 85 additions and 53 deletions
|
@ -960,15 +960,16 @@
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713946567,
|
"lastModified": 1714022840,
|
||||||
"narHash": "sha256-gbffQxWoGmq9rmSwM2y4a+VGaTTuXSN+yyRoCkMuRjs=",
|
"narHash": "sha256-i6xZsf7Kvp1n/Sn3nqPY1MJQx0gf80OGQw32PA/aZd8=",
|
||||||
"owner": "Jovian-Experiments",
|
"owner": "Jovian-Experiments",
|
||||||
"repo": "Jovian-NixOS",
|
"repo": "Jovian-NixOS",
|
||||||
"rev": "c3255d642c945847c61a867be15de63b8f81d5dc",
|
"rev": "94def3af1d45fe4b142beda3aa59a6a98e62ce9e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Jovian-Experiments",
|
"owner": "Jovian-Experiments",
|
||||||
|
"ref": "development",
|
||||||
"repo": "Jovian-NixOS",
|
"repo": "Jovian-NixOS",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,11 @@
|
||||||
stateVersion = hmStateVersion;
|
stateVersion = hmStateVersion;
|
||||||
homeDirectory = "/home/${username}";
|
homeDirectory = "/home/${username}";
|
||||||
sessionPath = [ "$HOME/.local/bin" ];
|
sessionPath = [ "$HOME/.local/bin" ];
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
frequency = "daily";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ inputs, config, lib, username, pkgs, ... }: {
|
{ inputs, config, lib, pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
# inputs.jovian.nixosModules
|
inputs.jovian.nixosModules
|
||||||
./disks.nix
|
./disks.nix
|
||||||
../../common/modules/boot.nix
|
../../common/modules/boot.nix
|
||||||
../../common/services/tailscale-autoconnect.nix
|
../../common/services/tailscale-autoconnect.nix
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
services.btrfs.autoScrub.enable = true;
|
services.btrfs.autoScrub.enable = true;
|
||||||
services.btrfs.autoScrub.interval = "weekly";
|
services.btrfs.autoScrub.interval = "weekly";
|
||||||
|
|
||||||
disko.devices.disk.nvme0 = {
|
disko.devices = {
|
||||||
|
nvme0 = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = "/dev/nvme0n1";
|
device = "/dev/nvme0n1";
|
||||||
content = {
|
content = {
|
||||||
|
@ -47,4 +48,29 @@
|
||||||
}; # partitions
|
}; # partitions
|
||||||
}; # content
|
}; # content
|
||||||
}; # disko.devices.disk.nvme0
|
}; # disko.devices.disk.nvme0
|
||||||
|
|
||||||
|
mmcblk0 = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/mmcblk0";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
SD_CARD = {
|
||||||
|
start = "0%";
|
||||||
|
end = "100%";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ];
|
||||||
|
subvolumes = {
|
||||||
|
"/sd_card" = {
|
||||||
|
mountpoint = "/sd_card";
|
||||||
|
mountOptions = [ "compress=none" "noatime" ];
|
||||||
|
}; # sd_card
|
||||||
|
}; # subvolumes
|
||||||
|
}; # content
|
||||||
|
}; # partition 2 (SD_CARD BTRFS)
|
||||||
|
}; # partitions
|
||||||
|
}; # content
|
||||||
|
}; # disko.devices.disk.mmcblk0
|
||||||
|
}; # disko.devices
|
||||||
} # root
|
} # root
|
||||||
|
|
Loading…
Reference in a new issue