mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
test: trying to get microVMs to work
This commit is contained in:
parent
bc73d3bc98
commit
a1db19bcd7
5 changed files with 43 additions and 10 deletions
|
|
@ -49,8 +49,8 @@ in
|
||||||
caddy
|
caddy
|
||||||
# comfyui
|
# comfyui
|
||||||
# filesorter
|
# filesorter
|
||||||
firefly-iii
|
# firefly-iii
|
||||||
forgejo
|
# forgejo
|
||||||
# glance
|
# glance
|
||||||
jellyfin
|
jellyfin
|
||||||
# logrotate
|
# logrotate
|
||||||
|
|
|
||||||
|
|
@ -70,11 +70,12 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# tmpfiles.rules = [
|
tmpfiles.rules = [
|
||||||
# "Z ${serviceCfg.varPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
"Z ${serviceCfg.varPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||||
# "Z ${serviceCfg.varPaths.path1} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
"Z ${serviceCfg.varPaths.path2} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||||
# "Z ${serviceCfg.varPaths.path2} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
"d ${serviceCfg.varPaths.path1} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||||
# ];
|
"Z ${serviceCfg.varPaths.path2} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.systemd-networkd.wantedBy = [ "multi-user.target" ];
|
systemd.services.systemd-networkd.wantedBy = [ "multi-user.target" ];
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ in
|
||||||
|
|
||||||
tmpfiles.rules = [
|
tmpfiles.rules = [
|
||||||
"Z ${serviceCfg.varPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
"Z ${serviceCfg.varPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||||
"Z ${serviceCfg.secretPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
# "Z ${serviceCfg.secretPaths.path0} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,11 @@ in
|
||||||
"/etc/ssh" = {
|
"/etc/ssh" = {
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"/opt/secrets" = {
|
||||||
|
neededForBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
// (builtins.listToAttrs (
|
// (builtins.listToAttrs (
|
||||||
builtins.concatMap (drive: map (folder: sambaMounts drive folder) sambaFolders) sambaDrives
|
builtins.concatMap (drive: map (folder: sambaMounts drive folder) sambaFolders) sambaDrives
|
||||||
|
|
@ -111,12 +116,17 @@ in
|
||||||
directories = [
|
directories = [
|
||||||
"/var/cache"
|
"/var/cache"
|
||||||
"/var/lib"
|
"/var/lib"
|
||||||
"/opt/secrets"
|
|
||||||
{
|
{
|
||||||
directory = "/etc/ssh";
|
directory = "/etc/ssh";
|
||||||
mode = "u=rwx,g=rx,o=rx";
|
mode = "u=rwx,g=rx,o=rx";
|
||||||
user = "root";
|
user = "root";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
directory = "/opt/secrets";
|
||||||
|
mode = "u=rwx,g=rx,o=rx";
|
||||||
|
user = "root";
|
||||||
|
}
|
||||||
|
|
||||||
];
|
];
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
users.${user0} = {
|
users.${user0} = {
|
||||||
|
|
@ -142,3 +152,25 @@ in
|
||||||
|
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# sudo mount /dev/disk/by-label/root /mnt
|
||||||
|
# sudo btrfs subvolume create /mnt/persistent
|
||||||
|
# sudo btrfs subvolume create /mnt/nix
|
||||||
|
# sudo umount /mnt
|
||||||
|
|
||||||
|
# sudo mount -o subvol=@ /dev/disk/by-label/root /mnt
|
||||||
|
|
||||||
|
# sudo mount -o subvol=@nix /dev/disk/by-label/root /mnt/nix
|
||||||
|
# sudo mount -o subvol=@persistent /dev/disk/by-label/root /mnt/persistent
|
||||||
|
|
||||||
|
# sudo mount /dev/disk/by-label/BOOT /mnt/boot
|
||||||
|
|
||||||
|
# sudo mount /dev/disk/by-label/storage /mnt/mnt/storage
|
||||||
|
|
||||||
|
# sudo nixos-install --root /mnt
|
||||||
|
|
||||||
|
# sudo nixos-enter --root /mnt
|
||||||
|
# nixos-rebuild boot
|
||||||
|
# exit
|
||||||
|
|
||||||
|
# sudo reboot
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
sops = {
|
sops = {
|
||||||
secrets = {
|
secrets = {
|
||||||
"network/server" = {
|
"network/server" = {
|
||||||
path = "/var/lib/secrets/server";
|
path = "/opt/secrets/server";
|
||||||
owner = "root";
|
owner = "root";
|
||||||
mode = "600";
|
mode = "600";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue