Compare commits
2 commits
ecc2bc402a
...
79e3c276db
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79e3c276db | ||
|
|
a428409a31 |
3 changed files with 70 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,2 +1,2 @@
|
|||
./secrets
|
||||
./secrets/*
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
# Add further modules here later, e.g.:
|
||||
./programs.nix
|
||||
./services/forgejo.nix
|
||||
./mount.nix
|
||||
# ./modules/nextcloud.nix
|
||||
# ./modules/wireguard.nix
|
||||
# ./modules/docker.nix
|
||||
|
|
|
|||
68
mount.nix
Normal file
68
mount.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
# /etc/nixos/mount.nix
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# ============================================================
|
||||
# Storage mounts
|
||||
# All mounts point to subaccounts of the Hetzner Storage Box.
|
||||
# Each subaccount is dedicated to a specific project.
|
||||
# Credentials files are located in /etc/nixos/secrets/ (.gitignored)
|
||||
#
|
||||
# Credentials file format:
|
||||
# username=u547668-subX
|
||||
# password=YOUR_PASSWORD
|
||||
# ============================================================
|
||||
|
||||
fileSystems = {
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Nextcloud – CIFS/SMB only (subaccount: u547668-sub7)
|
||||
# Samba must be enabled in the Hetzner Robot Panel!
|
||||
# Credentials: /etc/nixos/secrets/storagebox-nextcloud-credentials
|
||||
# ------------------------------------------------------------
|
||||
"/mnt/storagebox-nextcloud" = {
|
||||
device = "//u547668-sub7.your-storagebox.de/u547668-sub7";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"credentials=/etc/nixos/secrets/storagebox-nextcloud-credentials"
|
||||
"uid=nextcloud"
|
||||
"gid=nextcloud"
|
||||
"file_mode=0770"
|
||||
"dir_mode=0770"
|
||||
"vers=3.0"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.requires=network-online.target"
|
||||
"_netdev"
|
||||
"nofail"
|
||||
];
|
||||
};
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Add further subaccount mounts here, e.g.:
|
||||
#
|
||||
# "/mnt/storagebox-PROJECTNAME" = {
|
||||
# device = "//u547668-subX.your-storagebox.de/u547668-subX";
|
||||
# fsType = "cifs"; # or "fuse.sshfs" if SSH access is enabled
|
||||
# options = [
|
||||
# "credentials=/etc/nixos/secrets/storagebox-PROJECTNAME-credentials"
|
||||
# "uid=USER"
|
||||
# "gid=GROUP"
|
||||
# "file_mode=0770"
|
||||
# "dir_mode=0770"
|
||||
# "vers=3.0"
|
||||
# "x-systemd.automount"
|
||||
# "x-systemd.requires=network-online.target"
|
||||
# "_netdev"
|
||||
# "nofail"
|
||||
# ];
|
||||
# };
|
||||
# ------------------------------------------------------------
|
||||
|
||||
};
|
||||
|
||||
# Required for CIFS/SMB mounts
|
||||
environment.systemPackages = with pkgs; [
|
||||
cifs-utils
|
||||
sshfs
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue