Add automatic HM cleanup

This commit is contained in:
albert 2024-04-25 21:51:20 +09:00
parent cd51f5b55b
commit e4d2625adf
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
5 changed files with 85 additions and 53 deletions

View file

@ -960,15 +960,16 @@
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1713946567,
"narHash": "sha256-gbffQxWoGmq9rmSwM2y4a+VGaTTuXSN+yyRoCkMuRjs=",
"lastModified": 1714022840,
"narHash": "sha256-i6xZsf7Kvp1n/Sn3nqPY1MJQx0gf80OGQw32PA/aZd8=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "c3255d642c945847c61a867be15de63b8f81d5dc",
"rev": "94def3af1d45fe4b142beda3aa59a6a98e62ce9e",
"type": "github"
},
"original": {
"owner": "Jovian-Experiments",
"ref": "development",
"repo": "Jovian-NixOS",
"type": "github"
}

View file

@ -26,6 +26,11 @@
stateVersion = hmStateVersion;
homeDirectory = "/home/${username}";
sessionPath = [ "$HOME/.local/bin" ];
nix.gc = {
automatic = true;
frequency = "daily";
options = "--delete-older-than 7d";
};
};
nixpkgs = {

View file

@ -1,6 +1,6 @@
{ inputs, config, lib, username, pkgs, ... }: {
{ inputs, config, lib, pkgs, ... }: {
imports = [
# inputs.jovian.nixosModules
inputs.jovian.nixosModules
./disks.nix
../../common/modules/boot.nix
../../common/services/tailscale-autoconnect.nix

View file

@ -2,7 +2,8 @@
services.btrfs.autoScrub.enable = true;
services.btrfs.autoScrub.interval = "weekly";
disko.devices.disk.nvme0 = {
disko.devices = {
nvme0 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
@ -47,4 +48,29 @@
}; # partitions
}; # content
}; # 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