update flake lock, update btrfs wipe GLaDOS, replace SDDM with plasma launch on EDI and GLaDOS

This commit is contained in:
Lillian Violet 2026-02-22 20:57:53 +01:00
parent c6d25885c1
commit 68a7950b5e
3 changed files with 61 additions and 32 deletions

18
flake.lock generated
View file

@ -389,11 +389,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1771519029, "lastModified": 1771531206,
"narHash": "sha256-H59Qf82wv5kBXVoyXsmUKW+9J3o8FqgY4uKaLdsLdLg=", "narHash": "sha256-1R3Wx6KUkMb4x4E5UOhW9p6rqiexzSGGWxZqSHqW5n0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "167e0b6837115e672ec5f58e2b0ea39093abe807", "rev": "91be7cce763fa4022c7cf025a71b0c366d1b6e77",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -555,11 +555,11 @@
}, },
"nixpkgs-edge": { "nixpkgs-edge": {
"locked": { "locked": {
"lastModified": 1771529647, "lastModified": 1771539422,
"narHash": "sha256-jg/CvWdnL3ZZhx58j8g1WDXJHALqiutiwnSyP4zPLj8=", "narHash": "sha256-TerWaqclKBZY7mWBEgA+7uwjSmpuWQ4QaOH7MTUkFkI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "64a253ac18f1496577a30251a06c3871bdcaaa99", "rev": "c4c6a8dea4a441e4cb2bdb5bc4266a6a9cce3859",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -906,11 +906,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1771428844, "lastModified": 1771536203,
"narHash": "sha256-rTzo6bZEsdT7yHUZ0B4BYe32XQZzm8SiWKvWLJnxerE=", "narHash": "sha256-ffSQmf7RZqCShzUkK4VlROGsBZy9tgKBYRQ5XQD0PiM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "stylix", "repo": "stylix",
"rev": "801843d10e9e22d7a00f660d069e2de70aa2980a", "rev": "ec4d1ce9da22da964cef8a77795dc32011ebbb55",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -42,9 +42,8 @@
virtualisation.spiceUSBRedirection.enable = true; virtualisation.spiceUSBRedirection.enable = true;
services.displayManager.sddm = { services.displayManager.plasma-login-manager = {
enable = true; enable = true;
wayland.enable = true;
}; };
services.displayManager.defaultSession = "plasma"; services.displayManager.defaultSession = "plasma";

View file

@ -33,9 +33,8 @@
gparted gparted
]; ];
services.displayManager.sddm = { services.displayManager.plasma-login-manager = {
enable = true; enable = true;
wayland.enable = true;
}; };
services.displayManager.defaultSession = "plasma"; services.displayManager.defaultSession = "plasma";
@ -76,32 +75,63 @@
# }; # };
}; };
boot = { boot = {
# Nuke root AND home subvolumes on every boot initrd.systemd.services.rollback = {
initrd.systemd.services.wipe-my-fs = { description = "Rollback BTRFS root subvolume to a pristine state";
requires = ["dev-mapper-nvme_crypted.device"]; unitConfig.DefaultDependencies = "no";
after = ["dev-mapper-nvme_crypted.device"]; serviceConfig.Type = "oneshot";
wantedBy = ["initrd.target"]; wantedBy = ["initrd.target"];
after = ["systemd-cryptsetup@nvme_crypted.service"];
before = ["sysroot.mount"];
script = '' script = ''
echo "mounting btrfs volume to tmp..."
mkdir -p /btrfs_tmp mkdir -p /btrfs_tmp
mount /dev/mapper/cryptroot /btrfs_tmp mount /dev/mapper/nvme_crypted /btrfs_tmp
echo "mount successful!"
delete_subvolume_recursively() { if [[ -e /btrfs_tmp/root ]]; then
IFS=$'\n' echo "copying root to backup..."
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do mkdir -p /btrfs_tmp/old_roots
delete_subvolume_recursively "/btrfs_tmp/$i" timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
done mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
btrfs subvolume delete "$1" echo "copy complete!"
} fi
# Nuke and recreate root if [[ -e /btrfs_tmp/home ]]; then
delete_subvolume_recursively /btrfs_tmp/root echo "copying home to backup..."
btrfs subvolume create /btrfs_tmp/root mkdir -p /btrfs_tmp/old_homes
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/home)" "+%Y-%m-%-d_%H:%M:%S")
mv /btrfs_tmp/home "/btrfs_tmp/old_homes/$timestamp"
"copy complete!"
fi
# Nuke and recreate home (wipes /home — but we restore via impermanence)
delete_subvolume_recursively /btrfs_tmp/home
btrfs subvolume create /btrfs_tmp/home
umount /btrfs_tmp 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"
}
echo "recursively deleting root subvolumes older than five days..."
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +5); do
delete_subvolume_recursively "$i"
done
echo "subvolumes deleted!"
echo "recursively deleting home subvolumes older than five days..."
for i in $(find /btrfs_tmp/old_homes/ -maxdepth 1 -mtime +5); do
delete_subvolume_recursively "$i"
done
echo "subvolumes deleted!"
echo "creating new root and home subvolumes..."
btrfs subvolume create /btrfs_tmp/root
btrfs subvolume create /btrfs_tmp/home
echo "unmounting btrfs temporary mount..."
umount /btrfs_tmp
echo "disk clear complete!"
''; '';
}; };