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"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
|
|
|
@ -89,11 +89,11 @@
|
|||
osaka-linode-01 = libx.deploy { hostname = "osaka-linode-01"; };
|
||||
milan-linode-01 = libx.deploy { hostname = "milan-linode-01"; };
|
||||
framework-server = libx.deploy { hostname = "framework-server"; };
|
||||
# nuc-server = libx.deploy { hostname = "nuc-server"; };
|
||||
# nuc-server = libx.deploy { hostname = "nuc-server"; };
|
||||
backups-rpi4 = libx.deploy { hostname = "backups-rpi4"; system = "aarch64-linux"; };
|
||||
piaware-rpi4 = libx.deploy { hostname = "piaware-rpi4"; system = "aarch64-linux"; };
|
||||
# quitman-rpi4 = libx.deploy { hostname = "quitman-rpi4"; system = "aarch64-linux"; };
|
||||
# bakersfield-rpi4 = libx.deploy { hostname = "bakersfield-rpi4"; system = "aarch64-linux"; };
|
||||
# quitman-rpi4 = libx.deploy { hostname = "quitman-rpi4"; system = "aarch64-linux"; };
|
||||
# bakersfield-rpi4 = libx.deploy { hostname = "bakersfield-rpi4"; system = "aarch64-linux"; };
|
||||
};
|
||||
imageConfigurations = {
|
||||
nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; };
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2,49 +2,75 @@
|
|||
services.btrfs.autoScrub.enable = true;
|
||||
services.btrfs.autoScrub.interval = "weekly";
|
||||
|
||||
disko.devices.disk.nvme0 = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
BOOT = {
|
||||
priority = 1;
|
||||
name = "BOOT";
|
||||
start = "0%";
|
||||
end = "550MiB";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
# https://github.com/nix-community/disko/issues/527
|
||||
mountOptions = [ "umask=0077" ];
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
}; # partition 1 (ESP)
|
||||
ROOT = {
|
||||
start = "550MiB";
|
||||
end = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
}; # root
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
}; # home
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
}; # nix
|
||||
}; # subvolumes
|
||||
}; # content
|
||||
}; # partition 2 (/ BTRFS)
|
||||
}; # partitions
|
||||
}; # content
|
||||
}; # disko.devices.disk.nvme0
|
||||
disko.devices = {
|
||||
nvme0 = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
BOOT = {
|
||||
priority = 1;
|
||||
name = "BOOT";
|
||||
start = "0%";
|
||||
end = "550MiB";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
# https://github.com/nix-community/disko/issues/527
|
||||
mountOptions = [ "umask=0077" ];
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
}; # partition 1 (ESP)
|
||||
ROOT = {
|
||||
start = "550MiB";
|
||||
end = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
}; # root
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
}; # home
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
}; # nix
|
||||
}; # subvolumes
|
||||
}; # content
|
||||
}; # partition 2 (/ BTRFS)
|
||||
}; # 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
|
||||
|
|
Loading…
Reference in a new issue