1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00

samba service on nocturne

This commit is contained in:
Stefan Ellmauthaler 2021-12-01 12:25:50 +01:00
parent 29f65513a7
commit 724b4a1c65
4 changed files with 60 additions and 14 deletions

View File

@ -67,20 +67,6 @@
lorri.enable = true;
};
users = {
mutableUsers = false;
users = {
ellmau = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "audio"];
description = "Stefan Ellmauthaler";
shell = pkgs.zsh;
home = "/home/ellmau";
hashedPassword = "$6$JZPnaZYG$KL2c3e1it3j2avioovE1WveN/mpmq/tPsSAvHY1XRhtqKaE7TaSQkqRy69farkIR0Xs0.yTjltvKvv28kZtLO1";
};
};
};
environment = {
shells = [ pkgs.zsh ];
pathsToLink = [ "/share/zsh/" ];

View File

@ -13,6 +13,11 @@ in
enable = isgraphical;
greeters.gtk.cursorTheme.size = cursorsize;
};
displayManager.sessionCommands = ''
${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF
Xcursor.size: 14
EOF
'';
windowManager.i3 = {
enable = isgraphical;
extraPackages = with pkgs; [

View File

@ -5,4 +5,45 @@
graphical = true;
};
#networking.hostName = "nucturne"; # define the hostname
users = {
users.hpprinter = {
description = "HP printer access to share";
shell = pkgs.shadow;
createHome = false;
hashedPassword = "$6$qiIL8hOSK1FE7I6H$nAMW86l8O7/oJroOoaqG4WexGRQOOWBV8ooXy3/P7KE8ihQn9x0ScV2/BmvIxeMknGNPQhjD/mjmYn9VcNjAl1";
isSystemUser = true;
group = "hpprinter";
};
groups.hpprinter = {};
};
services.samba = {
enable = true;
securityType = "user";
extraConfig = ''
workgroup = WORKGROUP
server string = nucturne
netbios name = nucturne
security = user
#use sendfile = yes
#max protocol = smb2
hosts allow = 192.168.178.222 localhost
hosts deny = 0.0.0.0/0
guest account = nobody
map to guest = bad user
'';
shares = {
scans = {
path = "/home/ellmau/scratch/scans";
browseable = "yes";
"read only" = "no";
"guest ok" = "no";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = "ellmau";
"force group" = "users";
};
};
};
}

View File

@ -8,4 +8,18 @@
useUserPackages = true;
useGlobalPkgs = true;
};
users = {
mutableUsers = false;
users = {
ellmau = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "audio"];
description = "Stefan Ellmauthaler";
shell = pkgs.zsh;
home = "/home/ellmau";
hashedPassword = "$6$JZPnaZYG$KL2c3e1it3j2avioovE1WveN/mpmq/tPsSAvHY1XRhtqKaE7TaSQkqRy69farkIR0Xs0.yTjltvKvv28kZtLO1";
};
};
};
}