Create samba shares
This commit is contained in:
parent
29e0251a95
commit
958f1e7042
7 changed files with 94 additions and 0 deletions
21
nixos/common/users/sajenim/samba/default.nix
Normal file
21
nixos/common/users/sajenim/samba/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
age.secrets.smb-secrets = {
|
||||
rekeyFile = ./smb-secrets.age;
|
||||
};
|
||||
|
||||
fileSystems."/home/sajenim/.backup" = {
|
||||
device = "//192.168.1.102/sajenim";
|
||||
fsType = "cifs";
|
||||
options = let
|
||||
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users";
|
||||
|
||||
in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"nixos/smb-secrets".source = config.age.secrets.smb-secrets.path;
|
||||
};
|
||||
}
|
||||
|
7
nixos/common/users/sajenim/samba/smb-secrets.age
Normal file
7
nixos/common/users/sajenim/samba/smb-secrets.age
Normal file
|
@ -0,0 +1,7 @@
|
|||
age-encryption.org/v1
|
||||
-> piv-p256 hdSnGw AuXEhgAyxDSAP0HbRE1g0HOaEp9x76AD+681RMOReayb
|
||||
0fpWaqClsG3wrak0hnU+nB6Dpmdv11CgCl81P5CuwcQ
|
||||
-> q]sfNw0}-grease {sq
|
||||
V6m76C8Jvng8SPHoPvyocYo
|
||||
--- SaJq9U29eLJm6aM9OfiMlINa9rhZ1wy0ZtYU/U1D6BM
|
||||
y
Yºœ_;2&C5>ëjFÄjl^iàè¶p–â=Âh@(.<2E>0¼A†]®Zd¸,ë!Im¯6âå™à“˾=ãÈa
f
|
Loading…
Add table
Add a link
Reference in a new issue