mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 05:27:13 -06:00
test: forgejo microVM
This commit is contained in:
parent
aedf6e4be4
commit
6d83b2b2f5
11 changed files with 270 additions and 294 deletions
|
|
@ -6,9 +6,31 @@
|
|||
}:
|
||||
let
|
||||
inherit (flake.config.people) user0;
|
||||
inherit (flake.config.machines.devices) eris;
|
||||
erisSecrets = config.sops.secrets."network/server".path;
|
||||
|
||||
rootDevice = "/dev/disk/by-label/root";
|
||||
bootDevice = "/dev/disk/by-label/BOOT";
|
||||
|
||||
sambaDrives = [
|
||||
"samba0"
|
||||
];
|
||||
|
||||
sambaFolders = [
|
||||
"raid0"
|
||||
];
|
||||
|
||||
sambaMounts = sambaDrive: folder: {
|
||||
name = "${eris.${sambaDrive}.mount}/${folder}";
|
||||
value = {
|
||||
device = "${eris.${sambaDrive}.device}/${folder}";
|
||||
fsType = "cifs";
|
||||
options = eris.${sambaDrive}.options ++ [
|
||||
"credentials=${erisSecrets}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
fileSystems = {
|
||||
|
|
@ -54,7 +76,11 @@ in
|
|||
"/etc/ssh" = {
|
||||
neededForBoot = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
// (builtins.listToAttrs (
|
||||
builtins.concatMap (drive: map (folder: sambaMounts drive folder) sambaFolders) sambaDrives
|
||||
));
|
||||
|
||||
boot.initrd.postResumeCommands = lib.mkAfter ''
|
||||
mkdir /btrfs_tmp
|
||||
mount -o subvolid=5 ${rootDevice} /btrfs_tmp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue