This commit is contained in:
2026-07-01 21:19:17 +01:00
parent e3a2de3bde
commit 1ad416c69e
5 changed files with 59 additions and 39 deletions
Generated
+8 -8
View File
@@ -185,16 +185,16 @@
]
},
"locked": {
"lastModified": 1779506708,
"narHash": "sha256-QOD/CNm196nCJRheux/URi4/HE66fthdOMqCJoPP1Y0=",
"lastModified": 1782704057,
"narHash": "sha256-G1I1gd32F7mp9LAe1DaZ4ZL7NX5gyiKwdCMwro1Vrck=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3ee51fbdac8c8bdfe1e7e1fcaba6520a563f394f",
"rev": "868d0a692de703c2de98fab61968e4e310b7c28e",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"ref": "release-26.05",
"repo": "home-manager",
"type": "github"
}
@@ -372,16 +372,16 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1782847189,
"narHash": "sha256-twXPFqFsrrY5r28Zh7Homgcp2gUMBgQ6WDS98Q/3xFI=",
"lastModified": 1782847225,
"narHash": "sha256-JC9PjqKYG9ve5U8aDOLQipp3+KLANBHUvGdLZlxzdKI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b6018f87da91d19d0ab4cf979885689b469cdd41",
"rev": "95ca1e203c0750115fd4a6f17d5a245dfe6b1edd",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
+34 -24
View File
@@ -6,35 +6,45 @@ bootDisk = "/dev/disk/by-partlabel/disk-${hostname}-ESP";
in
{
boot.initrd.postDeviceCommands = lib.mkAfter ''
mkdir /btrfs_tmp
mount ${rootDisk} /btrfs_tmp
boot.initrd.supportedFilesystems = [ "btrfs" ];
# Ensure the old_roots directory exists
mkdir -p /btrfs_tmp/old_roots
boot.initrd.systemd.services.rollback-root = {
description = "Rollback btrfs root subvolume";
wantedBy = [ "initrd.target" ];
after = [ "systemd-cryptsetup@.service" ];
before = [ "sysroot.mount" ];
unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot";
script = ''
mkdir -p /btrfs_tmp
mount ${rootDisk} /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then
timestamp=$(date +%Y-%m-%d_%H-%M-%S)
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
fi
# Ensure the old_roots directory exists
mkdir -p /btrfs_tmp/old_roots
delete_subvolume_recursively() {
IFS=$'\n'
for i in $(btrfs subvolume list -o "$1" | cut -f 9 -d ' '); do
delete_subvolume_recursively "/btrfs_tmp/$i"
if [[ -e /btrfs_tmp/root ]]; then
timestamp=$(date +%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 +7); do
# Don't delete the old_roots directory itself
if [[ "$i" == "/btrfs_tmp/old_roots/" ]]; then continue; fi
delete_subvolume_recursively "$i"
done
btrfs subvolume delete "$1"
}
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +7); do
# Don't delete the old_roots directory itself
if [[ "$i" == "/btrfs_tmp/old_roots/" ]]; then continue; fi
delete_subvolume_recursively "$i"
done
btrfs subvolume create /btrfs_tmp/root
umount /btrfs_tmp
'';
btrfs subvolume create /btrfs_tmp/root
umount /btrfs_tmp
'';
};
# fileSystems."/" = {
# device = rootDisk;
+1 -1
View File
@@ -107,6 +107,7 @@
name = "default";
isDefault = true;
search = {
force = true;
default = "holocron";
order = [ "holocron" "google" ];
engines= {
@@ -132,5 +133,4 @@
};
xdg.configFile."voxtype/config.toml".enable = false;
home.file.".icons/default".source = "${pkgs.vimix-cursors}/share/icons/Vimix-white-cursors";
home.file.".mozilla/firefox/default/search.json.mozlz4".force = lib.mkForce true;
}
+15 -5
View File
@@ -4,11 +4,21 @@
networking = {
hostName = hostname;
networkmanager.enable = true;
wireless = {
iwd.enable = true;
networks = {
ssid = "Outskirt Stable";
psk = "SidonPhlegm";
networkmanager.wifi.backend = "iwd";
networkmanager.ensureProfiles.profiles = {
"Outskirt Stable" = {
connection = {
id = "Outskirt Stable";
type = "wifi";
};
wifi = {
ssid = "Outskirt Stable";
mode = "infrastructure";
};
wifi-security = {
key-mgmt = "wpa-psk";
psk = "SidonPhlegm";
};
};
};
firewall = {
+1 -1
View File
@@ -36,7 +36,7 @@
mako # Notification daemon
pkgs-unstable.neovim # Editor
nix-gaming.mo2installer
nodePackages.pnpm # JavaScript package manager (used by Neovim plugins)
pnpm # JavaScript package manager (used by Neovim plugins)
tree-sitter # Incremental parsing tool for editors
nodejs_24 # JavaScript runtime
openssl # SSL/TLS toolkit