make mount optional
Some checks failed
Activate Homelab Configuration / rebuild (push) Failing after 24s
Some checks failed
Activate Homelab Configuration / rebuild (push) Failing after 24s
This commit is contained in:
parent
78731e97ba
commit
7716d6e599
2 changed files with 15 additions and 6 deletions
|
|
@ -1,6 +1,9 @@
|
||||||
let
|
let
|
||||||
d = dest: { inherit dest; auth = false; };
|
d = dest: { inherit dest; auth = false; };
|
||||||
da = dest: { inherit dest; auth = true; };
|
da = dest: { inherit dest; auth = true; };
|
||||||
|
|
||||||
|
o = path: { inherit path; required = false; };
|
||||||
|
r = path: { inherit path; required = true; };
|
||||||
in {
|
in {
|
||||||
flake-path = "~/Projects/nix-flake"; # set this to the cloned repo path
|
flake-path = "~/Projects/nix-flake"; # set this to the cloned repo path
|
||||||
|
|
||||||
|
|
@ -24,10 +27,10 @@ in {
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJtdH1YqRH9xhuHMivezLvj/hpH77yfH3HUCaRboB/hb forgejo-deploy-runner"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJtdH1YqRH9xhuHMivezLvj/hpH77yfH3HUCaRboB/hb forgejo-deploy-runner"
|
||||||
];
|
];
|
||||||
disks = {
|
disks = {
|
||||||
gallery = "/dev/disk/by-uuid/834f51c1-90ee-4601-ba76-ef0419198d67"; # disk for photo gallery
|
share = o "/dev/disk/by-uuid/f1ee1d17-e852-4e02-ae86-eaf6116a2aeb"; # disk for file share and storage
|
||||||
share = "/dev/disk/by-uuid/f1ee1d17-e852-4e02-ae86-eaf6116a2aeb"; # disk for media collection (named host for backwards compatibility)
|
gallery = r "/dev/disk/by-uuid/834f51c1-90ee-4601-ba76-ef0419198d67"; # disk for photo gallery
|
||||||
data = "/dev/disk/by-uuid/a5752dd6-092d-484c-969c-2fdc7cb4a5f0"; # disk for app data
|
data = r "/dev/disk/by-uuid/a5752dd6-092d-484c-969c-2fdc7cb4a5f0"; # disk for app data
|
||||||
host = "/dev/disk/by-uuid/968f14a4-631e-4325-8cd1-f9aec0da9e4d"; # disk for media collection (named host for backwards compatibility)
|
host = r "/dev/disk/by-uuid/968f14a4-631e-4325-8cd1-f9aec0da9e4d"; # disk for media collection (named host for backwards compatibility)
|
||||||
};
|
};
|
||||||
dash = [
|
dash = [
|
||||||
[ "PocketID" "authentik" "https://auth.${domain}" "http://localhost:1411/" ]
|
[ "PocketID" "authentik" "https://auth.${domain}" "http://localhost:1411/" ]
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,13 @@
|
||||||
in {
|
in {
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/".autoResize = true;
|
"/".autoResize = true;
|
||||||
} // lib.mapAttrs' (name: device:
|
} // lib.mapAttrs' (name: dev:
|
||||||
lib.nameValuePair "/mnt/${name}" (globalOpts // { inherit device; })
|
lib.nameValuePair "/mnt/${name}" (globalOpts // {
|
||||||
|
device = dev.path;
|
||||||
|
options = if dev.required == false then [
|
||||||
|
"nofail"
|
||||||
|
"x-systemd.automount"
|
||||||
|
] else [];
|
||||||
|
})
|
||||||
) homelab.disks;
|
) homelab.disks;
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue