all repos — nixfiles @ bd2f43382e6166e72ba86d18c1215d5dc509cdc3

System and user configuration, managed by nix and home-manager

nanopi: make compatible with flakes
Alan Pearce alan@alanpearce.eu
Wed, 27 Nov 2024 19:43:34 +0100
commit

bd2f43382e6166e72ba86d18c1215d5dc509cdc3

parent

43c030f9dfd6a6814c442f9b93c3033798b1d162

3 files changed, 25 insertions(+), 28 deletions(-)

jump to
M flake.lockflake.lock
@@ -526,11 +526,11 @@ "pre-commit-hooks": "pre-commit-hooks",         "simple-css": "simple-css"
       },
       "locked": {
-        "lastModified": 1732097766,
-        "narHash": "sha256-jb936r49JL4ZHeyrs8thL3RAY4EW3F5oxutmbJNqsJs=",
+        "lastModified": 1732730423,
+        "narHash": "sha256-BDFakTnbh+xeBccZu4zSEuKFUar59sOIgpEmvzxh174=",
         "ref": "refs/heads/main",
-        "rev": "1f0be0997233e9a681811f7f633de5997ef4b9fa",
-        "revCount": 284,
+        "rev": "ec4946ee959b2d7d28287e9cd4643a0698833f6b",
+        "revCount": 286,
         "type": "git",
         "url": "https://git.alanpearce.eu/searchix"
       },
M flake.nixflake.nix
@@ -103,6 +103,7 @@ system = utils.lib.system.aarch64-linux;         specialArgs = { inherit inputs; };
         modules = [
           agenix.nixosModules.default
+          nixos-hardware.nixosModules.friendlyarm-nanopi-r5s
           ./system/nanopi.nix
         ];
       };
M system/nanopi.nixsystem/nanopi.nix
@@ -11,9 +11,6 @@ in {
   imports = [
     ./nanopi-hardware.nix
-    <agenix/modules/age.nix>
-    <nixos-hardware/friendlyarm/nanopi-r5s>
-    <home-manager/nixos>
   ];
 
   age.secrets = {
@@ -616,7 +613,6 @@ openssh.authorizedKeys.keys = [       "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMvcW4Z9VxOQgEJjsRC1uSMwEJ4vru9BwjT+Z50nawp4 lan"
     ];
   };
-  home-manager.users.alan = import ../user/nanopi.nix;
 
   users.groups = {
     linde.members = [ ];
@@ -765,34 +761,34 @@ }; 
   services.samba = {
     enable = true;
-    enableNmbd = false;
-    extraConfig = ''
-      log level = 1
+    nmbd.enable = false;
+    settings = {
+      global = {
+        "log level" = 1;
 
-      interfaces = bridge0
+        "interfaces" = "bridge0";
 
-      min protocol = SMB2
-      disable netbios = yes
-      smb ports = 445
+        "min protocol" = "SMB2";
+        "disable netbios" = true;
+        "smb ports" = 445;
 
-      socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=65536 SO_SNDBUF=65536
-      max xmit = 131072
-      min receivefile size = 131072
+        "socket options" = "IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=65536 SO_SNDBUF=65536";
+        "max xmit" = 131072;
+        "min receivefile size" = 131072;
 
-      aio read size = 1
-      aio write size = 1
+        "aio read size" = 1;
+        "aio write size" = 1;
 
-      load printers = no
-      disable spoolss = yes
+        "load printers" = false;
+        "disable spoolss" = true;
 
-      mdns name = mdns
+        "mdns name" = "mdns";
 
-      follow symlinks = yes
+        "follow symlinks" = true;
 
-      veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/
-      delete veto files = yes
-    '';
-    shares = {
+        "veto files" = "/Thumbs.db/.DS_Store/._.DS_Store/.apdisk/";
+        "delete veto files" = true;
+      };
       public = {
         path = "/srv/public";
         browseable = "yes";