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