diff --git a/configuration.nix b/configuration.nix index 8a7df7c..00ca1c6 100644 --- a/configuration.nix +++ b/configuration.nix @@ -15,6 +15,7 @@ ./modules/users.nix ./modules/storage.nix ./modules/root-programs.nix + ./modules/smb.nix ]; # Use the GRUB 2 boot loader. diff --git a/modules/result b/modules/result index 414001c..cc62bbd 120000 --- a/modules/result +++ b/modules/result @@ -1 +1 @@ -/nix/store/f63q5ak4m5rxgway2sz1n7f1kgbcpgq7-nixos-system-bfds-23.11.2217.d02d818f22c7 \ No newline at end of file +/nix/store/sclc7xdap0rv2y88aaifir19b7475yp7-nixos-system-bfds-23.11.2217.d02d818f22c7 \ No newline at end of file diff --git a/modules/smb.nix b/modules/smb.nix new file mode 100644 index 0000000..51c0d87 --- /dev/null +++ b/modules/smb.nix @@ -0,0 +1,39 @@ +{ config, ... }: + +{ + services.samba-wsdd = { + # make shares visible for Windows clients + enable = true; + openFirewall = true; + }; + + services.samba = { + enable = true; + securityType = "user"; + extraConfig = '' + workgroup = WORKGROUP + server string = smbnix + netbios name = smbnix + security = user + #use sendfile = yes + #max protocol = smb2 + # note: localhost is the ipv6 localhost ::1 + hosts allow = 192.168.0. 127.0.0.1 localhost + hosts deny = 0.0.0.0/0 + guest account = nobody + map to guest = bad user + ''; + shares = { + public = { + path = "/bfds-nix/"; ## "/mnt/Shares/Public"; + browseable = "yes"; + "read only" = "no"; + "guest ok" = "yes"; + "create mask" = "0644"; + "directory mask" = "0755"; + "force user" = "username"; + "force group" = "groupname"; + }; + }; + }; +} diff --git a/modules/storage.nix.save b/modules/storage.nix.save deleted file mode 100644 index c0cd057..0000000 --- a/modules/storage.nix.save +++ /dev/null @@ -1,43 +0,0 @@ -{ config, ... }: -{ - systemd.services.zfs-mount.enable = false; - - networking.hostId = "07019099"; - boot.supportedFilesystems = [ "zfs" ]; - boot.zfs.devNodes = "/dev/disk/by-id/ata-WDC_WD30EZRZ-00Z5HB0_WD-WCC4N7LL2J1S-part1"; #oder mit -part1 am ende - - #fileSystems."/bfds-nix" = - # { device = "bfds-nix"; - # fsType = "zfs"; - # }; - - fileSystems."/bfds-nix/music" = - { device = "bfds-nix/music"; - fsType = "zfs"; - }; - - fileSystems."/bfds-nix/rob" = - { device = "bfds-nix/rob"; - fsType = "zfs"; - }; - - fileSystems."/bfds-nix/hoerbuecher" = - { device = "bfds-nix/hoerbuecher"; - fsType = "zfs"; - }; - - fileSystems."/bfds-nix/movies" = - { device = "bfds-nix/movies"; - fsType = "zfs"; - }; - - fileSystems."/bfds-nix/peggy" = - { device = "bfds-nix/peggy"; - fsType = "zfs"; - }; - - fileSystems."/bfds-nix/ebooks" = - { device = "bfds-nix/ebooks"; - fsType = "zfs"; - }; -}