weilite: fix virtiofs mount

This commit is contained in:
xinyangli 2024-12-22 14:10:58 +08:00
parent d31c7ad8a7
commit 404badefec
Signed by: xin
SSH key fingerprint: SHA256:UU5pRTl7NiLFJbWJZa+snLylZSXIz5rgHmwjzv8v4oE
3 changed files with 29 additions and 13 deletions
machines/weilite
modules/nixos/monitor

View file

@ -34,7 +34,10 @@
"usb_storage"
"sd_mod"
];
kernelModules = [ "kvm-intel" ];
kernelModules = [
"kvm-intel"
];
kernelPackages = pkgs.linuxPackages_6_12;
};
nixpkgs.config.allowUnfree = true;
@ -42,6 +45,7 @@
environment.systemPackages = [
pkgs.virtiofsd
pkgs.intel-gpu-tools
pkgs.pciutils
];
sops = {
@ -92,18 +96,10 @@
wantedBy = [ "immich-server.service" ];
}
{
what = "restic";
where = "/var/lib/restic";
what = "nixos";
where = "/mnt/nixos";
type = "virtiofs";
options = "rw,nodev,nosuid";
wantedBy = [ "restic-rest-server.service" ];
}
{
what = "ocis";
where = "/var/lib/ocis";
type = "virtiofs";
options = "rw,nodev,nosuid";
wantedBy = [ "ocis.service" ];
}
{
what = "media";
@ -111,6 +107,27 @@
type = "virtiofs";
options = "rw,nodev,nosuid";
}
{
what = "/mnt/nixos/ocis";
where = "/var/lib/ocis";
options = "bind";
after = [ "mnt-nixos.mount" ];
wantedBy = [ "ocis.service" ];
}
{
what = "/mnt/nixos/restic";
where = "/var/lib/restic";
options = "bind";
after = [ "mnt-nixos.mount" ];
wantedBy = [ "restic-rest-server.service" ];
}
{
what = "/mnt/nixos/immich";
where = "/var/lib/immich";
options = "bind";
after = [ "mnt-nixos.mount" ];
wantedBy = [ "immich-server.service" ];
}
];
hardware.graphics = {

View file

@ -46,7 +46,6 @@ in
services.immich = {
enable = true;
mediaLocation = "/mnt/XinPhotos/immich";
host = "127.0.0.1";
port = 3001;
openFirewall = true;

View file

@ -11,7 +11,7 @@ let
in
{
config = {
systemd.services.tailscaled.after =
systemd.services.tailscaled.before =
(lib.optional cfg.node.enable "prometheus-node-exporters.service")
++ (lib.optional cfg.blackbox.enable "prometheus-blackbox-exporters.service")
++ (lib.optional config.services.caddy.enable "caddy.service");