feat(paperless): setup samba upload point
This commit is contained in:
parent
4eb036bec8
commit
7e2d4c7555
2 changed files with 34 additions and 0 deletions
|
|
@ -8,6 +8,8 @@ in
|
|||
./firewall.nix
|
||||
./borgbackup.nix
|
||||
|
||||
./samba.nix
|
||||
|
||||
(import ./acme.nix { inherit base-domain; })
|
||||
(import ./nginx.nix { inherit base-domain; })
|
||||
./postgresql.nix
|
||||
|
|
@ -39,5 +41,10 @@ in
|
|||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKQNIDqvhcfLKIDJybVI0o32CSDZpBXxjRxXj6OVQ93E khais@nixos''
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK9C7ssXUVVMKOxfJOumkP3dUWVtC3cBPlCIl6ZZc8ug khais@void''
|
||||
];
|
||||
users.groups.paperless-upload = {};
|
||||
users.users.paperless-upload = {
|
||||
isNormalUser = true;
|
||||
group = "paperless-upload";
|
||||
};
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
|
|
|
|||
27
samba.nix
Normal file
27
samba.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
services.samba = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
securityType = "user";
|
||||
extraConfig = ''
|
||||
workgroup = WORKGROUP
|
||||
server string = 005540.xyz
|
||||
netbios name = 005540.xyz
|
||||
security = user
|
||||
hosts allow = 0.0.0.0/0
|
||||
guest account = nobody
|
||||
map to guest = bad user
|
||||
log level = 2
|
||||
'';
|
||||
shares."paperless-upload" = {
|
||||
path = "/var/lib/paperless/consume";
|
||||
browsable = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "no";
|
||||
"write list" = "@paperless-upload";
|
||||
"read list" = "@paperless-upload";
|
||||
"force user" = "paperless-upload";
|
||||
"force group" = "paperless";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue