feat: final smb config

This commit is contained in:
Patrick Großmann 2024-01-11 13:09:16 +01:00
parent 2351cfb378
commit ebb24bace9
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
6 changed files with 30 additions and 12 deletions

View file

@ -25,6 +25,9 @@
systemd-coredump = uidGid 301;
patrick = uidGid 1000;
smb = uidGid 2000;
ggr = uidGid 2001;
david = uidGid 2004;
helen = uidGid 2001;
ggr = uidGid 2002;
family = uidGid 2003;
};
}

View file

@ -70,7 +70,6 @@ in {
extraApps = with config.services.nextcloud.package.packages.apps; {
inherit contacts calendar tasks notes maps;
};
# TODO increase outer nginx upload size as well
maxUploadSize = "2G";
extraAppsEnable = true;
database.createLocally = true;

View file

@ -25,7 +25,7 @@
# and next to the IPC connection in net view.
"server string = patricks-tolles-nas"
# Set the NetBIOS name by which the Samba server is known.
"netbios name = my-nas"
"netbios name = patricks-tolles-nas"
# Disable netbios support. We don't need to support browsing since all
# clients hardcode the host and share names.
"disable netbios = yes"
@ -86,14 +86,29 @@
user = "patrick";
group = "patrick";
} {})
(mkShare {
name = "helen-data";
user = "helen";
group = "helen";
} {})
(mkShare {
name = "david-data";
user = "david";
group = "david";
} {})
(mkShare {
name = "family-data";
user = "family";
group = "family";
} {})
((mkShare {name = "media";})
{
"read only" = "yes";
"write list" = "smb";
"write list" = "@family";
})
];
};
# to get this file start a smbd add users using 'smbpasswd -a <user>'
# to get this file start a smbd, add users using 'smbpasswd -a <user>'
# then export the database using 'pdbedit -e tdbsam:<location>'
age.secrets.smbpassdb = {
rekeyFile = ../../secrets/smbpassdb.tdb.age;
@ -120,6 +135,12 @@
ggr.extraGroups = [
"family"
];
david.extraGroups = [
"family"
];
helen.extraGroups = [
"family"
];
}
]);
groups = lib.mkMerge (lib.flip map groups (group: {

View file

@ -1,6 +1,5 @@
{
self,
nixpkgs,
devshell,
agenix-rekey,
...
@ -69,10 +68,6 @@ in
env = [
{
name = "NIX_CONFIG";
# Nix plugins braucht nix version 2.16
# Nixpkgs hat aber aktuell 2.15 also main version
# Daher der folgenda hack um zu verhindern das mein NixOS mit einer anderen nix version gebaut wird
# als der intendeten
value = ''
plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
extra-builtins-file = ${../nix}/extra-builtins.nix

View file

@ -11,7 +11,7 @@
home = {
packages = with pkgs; [
zathura
pinentry
pinentry-gnome
feh
mpv
];

View file

@ -1,6 +1,6 @@
{pkgs, ...}: {
programs.obs-studio = {
enable = false;
enable = true;
plugins = with pkgs.obs-studio-plugins; [
obs-backgroundremoval
obs-pipewire-audio-capture