update samba settings
This commit is contained in:
parent
5d9119fd22
commit
abf8178c13
@ -20,7 +20,7 @@ with deviceSpecific;
|
||||
"dmode=0755"
|
||||
"fmode=0644"
|
||||
"uid=${toString config.users.users.alukard.uid}"
|
||||
"gid=${toString config.users.groups.smbgrp.gid}"
|
||||
"gid=${toString config.users.groups.smbuser.gid}"
|
||||
];
|
||||
};
|
||||
"/media/data" = if (device == "AMD-Workstation") then {
|
||||
@ -31,7 +31,7 @@ with deviceSpecific;
|
||||
# "noatime"
|
||||
"nofail"
|
||||
"uid=${toString config.users.users.alukard.uid}"
|
||||
"gid=${toString config.users.groups.smbgrp.gid}"
|
||||
"gid=${toString config.users.groups.smbuser.gid}"
|
||||
];
|
||||
} else {
|
||||
# Linux samba
|
||||
@ -57,7 +57,7 @@ with deviceSpecific;
|
||||
# "noatime"
|
||||
"nofail"
|
||||
"uid=${toString config.users.users.alukard.uid}"
|
||||
"gid=${toString config.users.groups.smbgrp.gid}"
|
||||
"gid=${toString config.users.groups.smbuser.gid}"
|
||||
];
|
||||
} else {
|
||||
# Linux samba
|
||||
|
@ -1,15 +1,16 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with config.deviceSpecific; {
|
||||
users.groups.smbgrp.gid = 2001;
|
||||
users.groups.smbuser.gid = 2001;
|
||||
# TODO: add nologin shell to this user
|
||||
users.users.smbuser =
|
||||
lib.mkIf isHost {
|
||||
# isNormalUser = false;
|
||||
isSystemUser = true;
|
||||
extraGroups = [
|
||||
"smbgrp"
|
||||
];
|
||||
group = "smbuser";
|
||||
# extraGroups = [
|
||||
# "smbuser"
|
||||
# ];
|
||||
description = "User for samba sharing";
|
||||
};
|
||||
services.samba =
|
||||
@ -34,7 +35,7 @@ with config.deviceSpecific; {
|
||||
read only = no
|
||||
force create mode = 0660
|
||||
force directory mode = 2770
|
||||
valid users = @smbgrp
|
||||
valid users = @smbuser
|
||||
|
||||
[files]
|
||||
path = /media/files
|
||||
@ -42,7 +43,7 @@ with config.deviceSpecific; {
|
||||
read only = no
|
||||
force create mode = 0660
|
||||
force directory mode = 2770
|
||||
valid users = @smbgrp
|
||||
valid users = @smbuser
|
||||
'';
|
||||
};
|
||||
environment.systemPackages = [
|
||||
|
@ -25,7 +25,7 @@
|
||||
# users.users.mopidy = {
|
||||
# isNormalUser = false;
|
||||
# extraGroups = [
|
||||
# "smbgrp"
|
||||
# "smbuser"
|
||||
# ];
|
||||
# };
|
||||
# services.mopidy = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user