From 02d03af96da4a38f22cc83e57ea9f37beea76d57 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Mon, 2 Dec 2024 00:04:31 +0000 Subject: [PATCH] backyard: update to 24.11 --- flake.lock | 17 ++++++++++ flake.nix | 4 ++- machine/backyard/samba.nix | 66 +++++++++++++++++++------------------- 3 files changed, 53 insertions(+), 34 deletions(-) diff --git a/flake.lock b/flake.lock index 84c90ef..2dba8c5 100644 --- a/flake.lock +++ b/flake.lock @@ -130,6 +130,22 @@ "type": "github" } }, + "nixpkgs-backyard": { + "locked": { + "lastModified": 1732981179, + "narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-unfolder": { "locked": { "lastModified": 1732824227, @@ -170,6 +186,7 @@ "nixpkgs-2311": "nixpkgs-2311", "nixpkgs-2405": "nixpkgs-2405", "nixpkgs-2411": "nixpkgs-2411", + "nixpkgs-backyard": "nixpkgs-backyard", "nixpkgs-unfolder": "nixpkgs-unfolder", "nixpkgs-unstable": "nixpkgs-unstable" } diff --git a/flake.nix b/flake.nix index a67c017..709e23c 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,7 @@ nixpkgs-2311.url = "github:NixOS/nixpkgs/23.11"; nixpkgs-2405.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs-2411.url = "github:NixOS/nixpkgs/nixos-24.11"; + nixpkgs-backyard.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs-unfolder.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-compat = { @@ -25,6 +26,7 @@ nixpkgs-2311, nixpkgs-2405, nixpkgs-2411, + nixpkgs-backyard, nixpkgs-unfolder, nixpkgs-unstable, flake-compat, @@ -38,7 +40,7 @@ }; nixosConfigurations = { - backyard = nixpkgs-2405.lib.nixosSystem { + backyard = nixpkgs-backyard.lib.nixosSystem { system = "x86_64-linux"; modules = [ self.nixosModules.beatific diff --git a/machine/backyard/samba.nix b/machine/backyard/samba.nix index 7ce77b8..e418d3a 100644 --- a/machine/backyard/samba.nix +++ b/machine/backyard/samba.nix @@ -11,39 +11,7 @@ services.samba = { enable = true; openFirewall = true; - securityType = "user"; - extraConfig = '' - workgroup = beatific - server string = backyard smb server - netbios name = backyard - deadtime = 300 - - local master = yes - domain master = yes - preferred master = yes - - guest account = nobody - map to guest = bad user - - case sensitive = yes - veto files = /^.DS_Store$/^.Trash-1000$/ - - load printers = no - printcap name = /dev/null - printing = bsd - - log file = /var/log/samba/client-%m.log - log level = 2 - max log size = 64 - - hide dot files = no - hosts allow = 10.22.20., 192.168.1. - map archive = no - unix extensions = yes - - ntlm auth = yes - ''; - shares = let + settings = let homeShare = user: { path = "/home/${user}"; comment = "${user}'s home folder"; @@ -55,8 +23,40 @@ "directory mask" = "0750"; "force directory mode" = "0750"; "valid users" = "${user}"; + "security" = "user"; }; in { + global = { + "workgroup" = "beatific"; + "server string" = "backyard smb server"; + "netbios name" = "backyard"; + "deadtime" = "300"; + + "local master" = "yes"; + "domain master" = "yes"; + "preferred master" = "yes"; + + "guest account" = "nobody"; + "map to guest" = "bad user"; + + "case sensitive" = "yes"; + "veto files" = "/^.DS_Store$/^.Trash-1000$/"; + + "load printers" = "no"; + "printcap name" = "/dev/null"; + "printing" = "bsd"; + + "log file" = "/var/log/samba/client-%m.log"; + "log level" = "2"; + "max log size" = "64"; + + "hide dot files" = "no"; + "hosts allow" = "10.22.20., 192.168.1."; + "map archive" = "no"; + "unix extensions" = "yes"; + + "ntlm auth" = "yes"; + }; tvb = homeShare "tvb"; }; };