From 2f4b5070c6e7e94e1cbd28353365be146d8e21e6 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Thu, 12 Dec 2024 21:51:05 -0600 Subject: [PATCH 1/3] bigbird: Update samba to structured config for 24.11 --- bigbird/smb.nix | 44 +++++++++----------------------------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/bigbird/smb.nix b/bigbird/smb.nix index 59fe09d..aa4cc9b 100644 --- a/bigbird/smb.nix +++ b/bigbird/smb.nix @@ -1,42 +1,16 @@ { services.samba = { enable = true; - securityType = "user"; openFirewall = true; - ## Switch to structured config with NixOS 24.11 - # settings = { - # global = { - # "workgroup" = "WORKGROUP"; - # "hosts allow" = "192.168."; - # "hosts deny" = "0.0.0.0/0"; - # "guest account" = "nobody"; - # "map to guest" = "bad user"; - # }; - # "public" = { - # "path" = "/nas/chandler/Public"; - # "browseable" = "yes"; - # "read only" = "yes"; - # "guest ok" = "yes"; # aka "public = yes" - # }; - # # "private" = { - # # "path" = "/mnt/Shares/Private"; - # # "browseable" = "yes"; - # # "read only" = "no"; - # # "guest ok" = "no"; - # # "create mask" = "0644"; - # # "directory mask" = "0755"; - # # "force user" = "username"; - # # "force group" = "groupname"; - # # }; - # }; - extraConfig = '' - workgroup = WORKGROUP - hosts allow = 192.168. - hosts deny = 0.0.0.0/0 - guest account = nobody - map to guest = bad user - ''; - shares = { + settings = { + global = { + "workgroup" = "WORKGROUP"; + "hosts allow" = "192.168."; + "hosts deny" = "0.0.0.0/0"; + "guest account" = "nobody"; + "map to guest" = "bad user"; + "security" = "user"; + }; "public" = { "path" = "/nas/chandler/public"; "browseable" = "yes"; From 8ff8cd5424608867dc70c63f9669051559a874cf Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Thu, 12 Dec 2024 21:51:40 -0600 Subject: [PATCH 2/3] bigbird: add kathe smb share --- bigbird/README.md | 5 +++++ bigbird/smb.nix | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/bigbird/README.md b/bigbird/README.md index 0ccdd49..e9af318 100644 --- a/bigbird/README.md +++ b/bigbird/README.md @@ -7,3 +7,8 @@ entirely sure at this point. For now, I took the easy way out: Just keep trying SD cards until one works! Thankfully, it seems to be reliable that an SD card works either 100% or 0% of the time. Currently using a 32GB Microcenter cheapo, in place of the nicer 128GB ones I was planning on instead. + +## Manual configuration +``` +smbpasswd -a kathe +``` diff --git a/bigbird/smb.nix b/bigbird/smb.nix index aa4cc9b..c45d308 100644 --- a/bigbird/smb.nix +++ b/bigbird/smb.nix @@ -17,6 +17,13 @@ "read only" = "yes"; "guest ok" = "yes"; # aka "public = yes" }; + kathe = { + path = "/nas/katherine"; + browseable = "yes"; + "valid users" = "kathe"; + "read only" = "no"; + "guest ok" = "no"; + }; }; }; } From f05ca666ed7c0ffc3f18b367ce2280e32053d825 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Fri, 27 Dec 2024 19:22:14 -0600 Subject: [PATCH 3/3] oscar: Manage vscodium extensions with nix --- oscar/configuration.nix | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/oscar/configuration.nix b/oscar/configuration.nix index bbf7aeb..b0c41e9 100644 --- a/oscar/configuration.nix +++ b/oscar/configuration.nix @@ -202,9 +202,32 @@ ]; }; - programs.vscode = { + programs.vscode = let + extensionrepo = + (import (builtins.fetchGit { + url = "https://github.com/nix-community/nix-vscode-extensions"; + ref = "refs/heads/master"; + })).extensions.${builtins.currentSystem}; + in { enable = true; package = pkgs.vscodium; + mutableExtensionsDir = false; + extensions = with extensionrepo.open-vsx; [ # TODO: -release ? + eamodio.gitlens + editorconfig.editorconfig + golang.go + jeandeaual.lilypond-syntax + jeandeaual.scheme + jeanp413.open-remote-ssh + jnoortheen.nix-ide + llvm-vs-code-extensions.vscode-clangd + ms-azuretools.vscode-docker + ms-python.debugpy + ms-python.python + rust-lang.rust-analyzer + stkb.rewrap + xaver.clang-format + ]; userSettings = { "files.autoSave" = "afterDelay"; "editor.renderWhitespace" = "boundary";