Add mount samba directory. Check flake comment for info
This commit is contained in:
parent
3259b103c1
commit
a5577bdffb
4 changed files with 29 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
# - https://github.com/NixOS/infra/blob/master/build/flake.nix (agenix)
|
# - https://github.com/NixOS/infra/blob/master/build/flake.nix (agenix)
|
||||||
# - https://johns.codes/blog/organizing-system-configs-with-nixos (caddy)
|
# - https://johns.codes/blog/organizing-system-configs-with-nixos (caddy)
|
||||||
# - https://nixos-and-flakes.thiscute.world/nixos-with-flakes/start-using-home-manager
|
# - https://nixos-and-flakes.thiscute.world/nixos-with-flakes/start-using-home-manager
|
||||||
|
# - https://forum.proxmox.com/threads/tutorial-unprivileged-lxcs-mount-cifs-shares.101795/ (Samba share)
|
||||||
|
|
||||||
description = "Pazpi's systems";
|
description = "Pazpi's systems";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@
|
||||||
proxy.domain = "tegola.pro";
|
proxy.domain = "tegola.pro";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.nas-samba-share.enable = true;
|
||||||
|
|
||||||
virtualisation.proxmox.enable = true;
|
virtualisation.proxmox.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./avahi.nix
|
./avahi.nix
|
||||||
./caddy.nix
|
./caddy.nix
|
||||||
|
./nas-samba-share.nix
|
||||||
./tailscale.nix
|
./tailscale.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
25
modules/networking/nas-samba-share.nix
Normal file
25
modules/networking/nas-samba-share.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.my.networking.nas-samba-share;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.networking.nas-samba-share = {
|
||||||
|
enable = mkEnableOption "Enable Samba connection with NAS";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
users.groups."lxc_shares" = {
|
||||||
|
gid = 10000;
|
||||||
|
members = [ config.users.users.pazpi.name ];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue