mount disks for GLaDOS

This commit is contained in:
Lillian Violet 2026-03-01 23:36:25 +01:00
parent 53612f7c62
commit f6fb412e6b
5 changed files with 45 additions and 5 deletions

View file

@ -70,6 +70,7 @@
fsType = "tmpfs";
mountOptions = [
"size=4G"
"uid=1000"
];
};
};

View file

@ -25,6 +25,7 @@
lutris
vscodium
unrar
intiface-central
];
home.file = {
nextcloud = {

20
mount.sh Executable file
View file

@ -0,0 +1,20 @@
declare -a folders=( "/var/lib/sbctl" "/var/lib/bluetooth" "/var/lib/fprint" "/var/lib/fwupd" "/var/lib/libvirt" "/var/lib/tpm2-tss" "/var/lib/tpm2-udev-trigger" "/var/lib/power-profiles-daemon" "/var/lib/systemd/coredump" "/var/lib/systemd/rfkill" "/var/lib/systemd/timers" "/var/log" "/var/lib/decky-loader" "/var/lib/flatpak" "/var/lib/nixos" "/var/secrets" )
declare -a files=( "/etc/machine-id" "/var/lib/systemd/random-seed" "/var/secrets/keys.txt" "/var/lib/systemd/tpm2-srk-public-key.pem" "/var/lib/systemd/tpm2-srk-public-key.tpm2b_public" )
declare -a lillianfolders=( ".ssh" ".local/state/wireplumber" ".local/share/direnv" ".local/state/nix" ".local/state/comma" ".local/state/home-manager" ".local/share/PrismLauncher" ".local/share/qBittorrent" ".local/share/kwalletd" ".local/share/kwin" ".local/share/lutris" ".local/share/Nextcloud" ".local/share/Steam" ".local/share/zoxide" ".local/share/flatpak" ".local/share/applications" ".local/share/firefoxpwa/" ".local/share/com.nonpolynomial.intiface_central" ".mozilla" ".steam" ".zsh" ".pki" ".tldrc" ".thunderbird" "Code" "Writing" ".config/kdeconnect" ".config/Nextcloud" ".config/noisetorch" ".config/qBittorrent" ".config/r2modman" ".config/r2modmanPlus-local" ".config/Ryujinx" ".config/Signal" ".config/sops" ".config/vesktop" ".config/kde.org" )
for folder in "${folders[@]}"
do
mount --bind -o X-mount.mkdir "/mnt/persistent$folder" "/mnt$folder"
done
for lfolder in "${lillianfolders[@]}"
do
mount --bind -o X-mount.mkdir "/mnt/persistent/home/lillian/$lfolder" "/mnt/home/lillian/$lfolder"
done
for file in "${files[@]}"
do
mkdir -p "`dirname $file`"
ln -sf "/mnt/persistent$file" "/mnt$file"
done

View file

@ -127,23 +127,25 @@
echo "creating new root and home subvolumes..."
btrfs subvolume create /btrfs_tmp/root
btrfs subvolume create /btrfs_tmp/home
mkdir /btrfs_tmp/home/lillian
chown 1000:100 /btrfs_tmp/home/lillian
echo "unmounting btrfs temporary mount..."
umount /btrfs_tmp
echo "disk clear complete!"
'';
};
loader.systemd-boot.enable = true;
loader.systemd-boot.enable = false;
initrd.systemd.enable = true;
kernelPackages = pkgs.linuxPackages_latest;
supportedFilesystems = ["btrfs" "bcachefs"];
binfmt.emulatedSystems = ["aarch64-linux"];
# lanzaboote = {
# enable = true;
# pkiBundle = "/var/lib/sbctl";
# };
lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
extraModprobeConfig = ''
'';
};

View file

@ -17,6 +17,22 @@
boot.extraModulePackages = [];
fileSystems."/persistent".neededForBoot = true;
fileSystems."/run/media/lillian/big-SSD" = {
device = "b12ee352-ca6d-47d5-8b5f-6e3002af12e7";
fsType = "ext4";
options = ["users" "nofail" "uid=1000" "gid=100"];
};
fileSystems."/run/media/lillian/small-SSD" = {
device = "237cc760-2b3b-41ec-aab4-deff9cc7c5a1";
fsType = "ext4";
options = ["users" "nofail" "uid=1000" "gid=100"];
};
fileSystems."/run/media/lillian/Backup" = {
device = "cb175f0e-a008-476d-b0eb-ba8d7873af66";
fsType = "ext4";
options = ["users" "nofail" "uid=1000" "gid=100"];
};
# fileSystems."/" =
# { device = "UUID=166dc8d8-b77f-43fe-8bee-a0fc5b26aeb5";
# fsType = "bcachefs";