remove impermanence

This commit is contained in:
2025-08-11 14:04:27 -05:00
parent 814bd4c389
commit 027b8554f6
3 changed files with 1 additions and 87 deletions

View File

@@ -5,7 +5,6 @@
./services ./services
./packages ./packages
./dotfiles ./dotfiles
./impermanence
]; ];
options.homeconfig = { options.homeconfig = {

View File

@@ -1,33 +0,0 @@
{ config, lib, inputs, ... }: {
imports = [
inputs.impermanence.nixosModules.home-manager.impermanence
];
options.homeconfig.impermanence.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.homeconfig.impermanence.enable {
home.persistence."/persist/home/nathan" = {
directories = [
"Documents"
"Music"
"Pictures/Photos"
"Projects"
"Videos"
".ssh"
".local/share/zoxide"
".config/sops"
];
files = [
".zsh_history"
];
allowOther = true;
};
};
}

View File

@@ -9,8 +9,6 @@
(import ./disko.nix { device1 = "/dev/nvme0n1"; device2 = "/dev/nvme1n1"; device3 = "/dev/sda"; }) (import ./disko.nix { device1 = "/dev/nvme0n1"; device2 = "/dev/nvme1n1"; device3 = "/dev/sda"; })
inputs.impermanence.nixosModules.impermanence
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
@@ -136,57 +134,8 @@
docker-compose docker-compose
]; ];
boot.initrd.postDeviceCommands = lib.mkAfter ''
mkdir /btrfs_tmp
mount /dev/root_vg/root /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
fi
delete_subvolume_recursively() {
IFS=$'\n'
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
delete_subvolume_recursively "/btrfs_tmp/$i"
done
btrfs subvolume delete "$1"
}
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
delete_subvolume_recursively "$i"
done
btrfs subvolume create /btrfs_tmp/root
umount /btrfs_tmp
'';
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist/system" = {
hideMounts = true;
directories = [
"/etc/nixos"
"/var/log"
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/nixos-containers"
"/var/lib/systemd/coredump"
"/var/lib/docker"
"/var/lib/mcservers"
"/etc/NetworkManager/system-connections"
];
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
];
};
sops = { sops = {
age.keyFile = "/persist/home/nathan/.config/sops/age/keys.txt"; age.keyFile = "/home/nathan/.config/sops/age/keys.txt";
defaultSopsFile = ./secrets.yaml; defaultSopsFile = ./secrets.yaml;
defaultSopsFormat = "yaml"; defaultSopsFormat = "yaml";
@@ -215,7 +164,6 @@
host = "homebox"; host = "homebox";
minimal = false; minimal = false;
wayvnc.enable = true; wayvnc.enable = true;
impermanence.enable = true;
hyprland.enable = true; hyprland.enable = true;
swaylock.enable = true; swaylock.enable = true;
wal.enable = true; wal.enable = true;