chore: fix server
This commit is contained in:
@@ -48,31 +48,6 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
boot.initrd.postDeviceCommands = lib.mkAfter ''
|
||||
mkdir /btrfs_tmp
|
||||
mount ${btrfs} /btrfs_tmp
|
||||
mkdir -p /btrfs_tmp/old_roots
|
||||
if [[ -e /btrfs_tmp/root ]]; then
|
||||
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 +14); do
|
||||
delete_subvolume_recursively "$i"
|
||||
done
|
||||
|
||||
btrfs subvolume create /btrfs_tmp/root
|
||||
umount /btrfs_tmp
|
||||
'';
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/32AA-2998";
|
||||
fsType = "vfat";
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
coding.langs.lua.enable = true;
|
||||
coding.langs.rust.enable = true;
|
||||
coding.langs.js.enable = true;
|
||||
coding.agents.enable = true;
|
||||
fonts.enable = lib.mkForce false;
|
||||
persist = {
|
||||
enable = true;
|
||||
|
||||
@@ -16,7 +16,7 @@ in
|
||||
my.hm = {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium-wayland;
|
||||
package = pkgs.vscodium-wayland or pkgs.vscodium;
|
||||
};
|
||||
};
|
||||
my.persist.homeDirs = [
|
||||
|
||||
Reference in New Issue
Block a user