Commit 180402387b21

Vincent Demeester <vincent@sbr.pm>
2026-01-14 11:56:16
chore(fmt): fix deadnix warnings and apply formatting
- Prefix unused lambda parameters with underscore in nagoya configs - Apply nixfmt-rfc-style formatting to system-manager config Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent c8e2a8f
Changed files (3)
systems/nagoya/home.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, ... }:
+{ ... }:
 {
   # Syncthing will be configured here via home-manager
   # For now, just enable the user service
systems/nagoya/system.nix
@@ -1,11 +1,4 @@
-{
-  config,
-  lib,
-  pkgs,
-  globals,
-  hostname,
-  ...
-}:
+{ pkgs, ... }:
 {
   config = {
     # Platform
@@ -28,9 +21,16 @@
     systemd.services.docker = {
       description = "Docker Application Container Engine";
       wants = [ "network-online.target" ];
-      after = [ "network-online.target" "containerd.service" ];
+      after = [
+        "network-online.target"
+        "containerd.service"
+      ];
       wantedBy = [ "system-manager.target" ];
-      path = [ pkgs.docker pkgs.kmod pkgs.iptables ];
+      path = [
+        pkgs.docker
+        pkgs.kmod
+        pkgs.iptables
+      ];
       serviceConfig = {
         Type = "notify";
         ExecStart = "${pkgs.docker}/bin/dockerd";
systems/system-manager.nix
@@ -38,75 +38,78 @@
       allowUnfree = true;
     };
   };
-  nix = lib.optionalAttrs (!(config.system-manager.allowAnyDistro or false)) {
-    # This will add each flake input as a registry
-    # To make nix3 commands consistent with your flake
-    # NOTE: These options only exist in NixOS, not in system-manager
-    registry = lib.mkForce (lib.mapAttrs (_: value: { flake = value; }) inputs);
+  nix =
+    lib.optionalAttrs (!(config.system-manager.allowAnyDistro or false)) {
+      # This will add each flake input as a registry
+      # To make nix3 commands consistent with your flake
+      # NOTE: These options only exist in NixOS, not in system-manager
+      registry = lib.mkForce (lib.mapAttrs (_: value: { flake = value; }) inputs);
 
-    # This will additionally add your inputs to the system's legacy channels
-    # Making legacy nix commands consistent as well, awesome!
-    nixPath = lib.mkForce (
-      lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry
-    );
-  } // lib.optionalAttrs (!(config.system-manager.allowAnyDistro or false)) {
-    # NOTE: optimise only exists in NixOS, not in system-manager
-    optimise = {
-      automatic = true;
-      dates = [
-        "01:10"
-        "12:10"
-      ];
+      # This will additionally add your inputs to the system's legacy channels
+      # Making legacy nix commands consistent as well, awesome!
+      nixPath = lib.mkForce (
+        lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry
+      );
+    }
+    // lib.optionalAttrs (!(config.system-manager.allowAnyDistro or false)) {
+      # NOTE: optimise only exists in NixOS, not in system-manager
+      optimise = {
+        automatic = true;
+        dates = [
+          "01:10"
+          "12:10"
+        ];
+      };
+    }
+    // {
+
+      settings = {
+        auto-optimise-store = true;
+        experimental-features = [
+          "nix-command"
+          "flakes"
+        ];
+        sandbox = true;
+        allowed-users = [
+          "@wheel"
+        ];
+        trusted-users = [
+          "root"
+          "@wheel"
+        ];
+        # See https://nixos.org/manual/nix/stable/command-ref/conf-file#conf-use-xdg-base-directories
+        use-xdg-base-directories = true;
+
+        # Add some "caches" (substituters)
+        substituters = [
+          "https://cache.nixos.org/"
+          "https://r-ryantm.cachix.org"
+          "https://shortbrain.cachix.org"
+          "https://vdemeester.cachix.org"
+          "https://chapeau-rouge.cachix.org"
+        ];
+        trusted-public-keys = [
+          "r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c="
+          "shortbrain.cachix.org-1:dqXcXzM0yXs3eo9ChmMfmob93eemwNyhTx7wCR4IjeQ="
+          "mic92.cachix.org-1:gi8IhgiT3CYZnJsaW7fxznzTkMUOn1RY4GmXdT/nXYQ="
+          "chapeau-rouge.cachix.org-1:r34IG766Ez4Eeanr7Zx+egzXLE2Zgvc+XRspYZPDAn8="
+          "vdemeester.cachix.org-1:eZWNOrLR9A9szeMahn9ENaoT9DB3WgOos8va+d2CU44="
+        ];
+      };
+
+      extraOptions = ''
+        connect-timeout = 20
+        build-cores = 0
+        keep-outputs = true
+        keep-derivations = true
+        builders-use-substitutes = true
+      '';
+    }
+    // lib.optionalAttrs (!(config.system-manager.allowAnyDistro or false)) {
+      # On laptops at least, make the daemon and builders low priority
+      # to have a responding system while building
+      # NOTE: These options only exist in NixOS, not in system-manager
+      daemonIOSchedClass = "idle";
+      daemonCPUSchedPolicy = "idle";
     };
-  } // {
-
-    settings = {
-      auto-optimise-store = true;
-      experimental-features = [
-        "nix-command"
-        "flakes"
-      ];
-      sandbox = true;
-      allowed-users = [
-        "@wheel"
-      ];
-      trusted-users = [
-        "root"
-        "@wheel"
-      ];
-      # See https://nixos.org/manual/nix/stable/command-ref/conf-file#conf-use-xdg-base-directories
-      use-xdg-base-directories = true;
-
-      # Add some "caches" (substituters)
-      substituters = [
-        "https://cache.nixos.org/"
-        "https://r-ryantm.cachix.org"
-        "https://shortbrain.cachix.org"
-        "https://vdemeester.cachix.org"
-        "https://chapeau-rouge.cachix.org"
-      ];
-      trusted-public-keys = [
-        "r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c="
-        "shortbrain.cachix.org-1:dqXcXzM0yXs3eo9ChmMfmob93eemwNyhTx7wCR4IjeQ="
-        "mic92.cachix.org-1:gi8IhgiT3CYZnJsaW7fxznzTkMUOn1RY4GmXdT/nXYQ="
-        "chapeau-rouge.cachix.org-1:r34IG766Ez4Eeanr7Zx+egzXLE2Zgvc+XRspYZPDAn8="
-        "vdemeester.cachix.org-1:eZWNOrLR9A9szeMahn9ENaoT9DB3WgOos8va+d2CU44="
-      ];
-    };
-
-    extraOptions = ''
-      connect-timeout = 20
-      build-cores = 0
-      keep-outputs = true
-      keep-derivations = true
-      builders-use-substitutes = true
-    '';
-  }
-  // lib.optionalAttrs (!(config.system-manager.allowAnyDistro or false)) {
-    # On laptops at least, make the daemon and builders low priority
-    # to have a responding system while building
-    # NOTE: These options only exist in NixOS, not in system-manager
-    daemonIOSchedClass = "idle";
-    daemonCPUSchedPolicy = "idle";
-  };
 }