Forráskód Böngészése

feat(meili): enable linux builder and update flake inputs

This commit enables the Nix linux-builder on the 'meili' host to allow for building x86_64-linux and aarch64-linux derivations on macOS.

Key changes include:
- Configured and enabled the ephemeral linux-builder.
- Updated the system timezone to Europe/Vienna.
- Added docker-desktop to homebrew casks.
- Refactored the kanata keyboard configuration for better readability.

Additionally, all flake inputs have been updated to their latest versions.
Zander Hawke 8 hónapja
szülő
commit
3e1b9f827b
5 módosított fájl, 79 hozzáadás és 73 törlés
  1. 25 25
      flake.lock
  2. 21 19
      hosts/meili/default.nix
  3. 24 20
      hosts/meili/kanata.kbd
  4. 2 2
      hosts/meili/software.nix
  5. 7 7
      modules/global/nix-config.nix

+ 25 - 25
flake.lock

@@ -41,11 +41,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1748883665,
-        "narHash": "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A=",
+        "lastModified": 1752264895,
+        "narHash": "sha256-1zBPE/PNAkPNUsOWFET4J0cjlvziH8DOekesDmjND+w=",
         "owner": "cachix",
         "repo": "cachix",
-        "rev": "f707778d902af4d62d8dd92c269f8e70de09acbe",
+        "rev": "47053aef762f452e816e44eb9a23fbc3827b241a",
         "type": "github"
       },
       "original": {
@@ -110,11 +110,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1758366037,
-        "narHash": "sha256-5PK0eHAWMtwaexQ7PR68gzpeo5WjMY9hq2BcEBHjSLA=",
+        "lastModified": 1759437797,
+        "narHash": "sha256-+MwJvMExEcRpDIVKMwL1ZsSnC4AuhnooM7PNJh02S5I=",
         "owner": "cachix",
         "repo": "devenv",
-        "rev": "ebb56bfe1aa0936de2f8a68c616dabff1285e905",
+        "rev": "89ce1b7ac66ca381a335a60ad6acc723ef6f42f3",
         "type": "github"
       },
       "original": {
@@ -248,11 +248,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1750779888,
-        "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
+        "lastModified": 1758108966,
+        "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=",
         "owner": "cachix",
         "repo": "git-hooks.nix",
-        "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d",
+        "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b",
         "type": "github"
       },
       "original": {
@@ -354,11 +354,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1758375677,
-        "narHash": "sha256-BLtD+6qWz7fQjPk2wpwyXQLGI0E30Ikgf2ppn2nVadI=",
+        "lastModified": 1759337100,
+        "narHash": "sha256-CcT3QvZ74NGfM+lSOILcCEeU+SnqXRvl1XCRHenZ0Us=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "edc7468e12be92e926847cb02418e649b02b59dd",
+        "rev": "004753ae6b04c4b18aa07192c1106800aaacf6c3",
         "type": "github"
       },
       "original": {
@@ -437,16 +437,16 @@
         ]
       },
       "locked": {
-        "lastModified": 1755029779,
-        "narHash": "sha256-3+GHIYGg4U9XKUN4rg473frIVNn8YD06bjwxKS1IPrU=",
+        "lastModified": 1758763079,
+        "narHash": "sha256-Bx1A+lShhOWwMuy3uDzZQvYiBKBFcKwy6G6NEohhv6A=",
         "owner": "cachix",
         "repo": "nix",
-        "rev": "b0972b0eee6726081d10b1199f54de6d2917f861",
+        "rev": "6f0140527c2b0346df4afad7497baa08decb929f",
         "type": "github"
       },
       "original": {
         "owner": "cachix",
-        "ref": "devenv-2.30",
+        "ref": "devenv-2.30.5",
         "repo": "nix",
         "type": "github"
       }
@@ -468,11 +468,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1758346548,
-        "narHash": "sha256-afXE7AJ7MY6wY1pg/Y6UPHNYPy5GtUKeBkrZZ/gC71E=",
+        "lastModified": 1759281824,
+        "narHash": "sha256-FIBE1qXv9TKvSNwst6FumyHwCRH3BlWDpfsnqRDCll0=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "b2a3852bd078e68dd2b3dfa8c00c67af1f0a7d20",
+        "rev": "5b5be50345d4113d04ba58c444348849f5585b4a",
         "type": "github"
       },
       "original": {
@@ -484,11 +484,11 @@
     },
     "nixpkgs-darwin": {
       "locked": {
-        "lastModified": 1758397774,
-        "narHash": "sha256-ui5ciTMlP4nSkxHAjfJTUCt/INLykPuv/Z7Ifj4GmhA=",
+        "lastModified": 1759397282,
+        "narHash": "sha256-ohaApD0NtpszUBgTl/GGBUkNYwVgaQWivugNpuip9X8=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "c3d456aad3a84fcd76b4bebf8b48be169fc45c31",
+        "rev": "b2f842e4d99dc35a0951b9582c64bb26789e929d",
         "type": "github"
       },
       "original": {
@@ -500,11 +500,11 @@
     },
     "nixpkgs-unstable": {
       "locked": {
-        "lastModified": 1758262103,
-        "narHash": "sha256-aBGl3XEOsjWw6W3AHiKibN7FeoG73dutQQEqnd/etR8=",
+        "lastModified": 1759417375,
+        "narHash": "sha256-O7eHcgkQXJNygY6AypkF9tFhsoDQjpNEojw3eFs73Ow=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "12bd230118a1901a4a5d393f9f56b6ad7e571d01",
+        "rev": "dc704e6102e76aad573f63b74c742cd96f8f1e6c",
         "type": "github"
       },
       "original": {

+ 21 - 19
hosts/meili/default.nix

@@ -9,24 +9,26 @@
   ++ (builtins.attrValues outputs.modules.darwin);
 
   # NOTE: might be valuable to put this in it's own file
-  # nix.linux-builder = {
-  #   enable = true;
-  #   ephemeral = true;
-  #   package = pkgs.darwin.linux-builder;
-  #   supportedFeatures = [ "kvm" "benchmark" "big-parallel" "nixos-test" ];
-  #   maxJobs = 4;
-  #   config = {
-  #     # nix.settings.sandbox = false;
-  #     virtualisation = {
-  #       darwin-builder = {
-  #         diskSize = 40 * 1024;
-  #         memorySize = 8 * 1024;
-  #       };
-  #       cores = 6;
-  #     };
-  #   };
-  # };
-  # nix.settings.system-features = [ "nixos-test" "apple-virt" "nixos-test" "benchmark" "big-parallel" "kvm" ];
+  nix.linux-builder = {
+    enable = true;
+    systems = [ "aarch64-linux" "x86_64-linux" ];
+    ephemeral = true;
+    supportedFeatures = [ "kvm" "benchmark" "big-parallel" "nixos-test" ];
+    maxJobs = 4;
+    config = {
+      # Enable x86_64 emulation
+      boot.binfmt.emulatedSystems = [ "x86_64-linux" ];
+
+      virtualisation = {
+        darwin-builder = {
+          diskSize = 40 * 1024;
+          memorySize = 8 * 1024;
+        };
+        cores = 6;
+      };
+    };
+  };
+  nix.settings.system-features = [ "nixos-test" "apple-virt" "benchmark" "big-parallel" "kvm" ];
   # nix.settings.extra-platforms = [ "aarch64-linux" ];
   # launchd.daemons.linux-builder = {
   #   serviceConfig = {
@@ -76,6 +78,6 @@
     remote-login = true;
   };
 
-  time.timeZone = "America/Los_Angeles";
+  time.timeZone = "Europe/Vienna";
   system.stateVersion = 4;
 }

+ 24 - 20
hosts/meili/kanata.kbd

@@ -12,6 +12,20 @@
   )
 )
 
+(defvar
+  ;; Timing values - adjust based on your typing speed
+  tap-repress-timeout 100
+  hold-timeout 200
+  tt $tap-repress-timeout
+  ht $hold-timeout
+
+  ;; Define which keys are on each hand for bilateral combinations
+  left-hand-keys (q w e r t a s d f g z x c v b)
+  right-hand-keys (y u i o p h j k l ; n m , . /)
+  lhk $left-hand-keys
+  rhk $right-hand-keys
+)
+
 (defsrc
   ;; esc  f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12
        f1   f2                                      f10  f11  f12
@@ -75,16 +89,6 @@
   to-base (layer-switch base)
 )
 
-(defvar
-  ;; Timing values - adjust based on your typing speed
-  tap-time 135
-  hold-time 135
-
-  ;; Define which keys are on each hand for bilateral combinations
-  left-hand-keys (q w e r t a s d f g z x c v b)
-  right-hand-keys (y u i o p h j k l ; n m , . /)
-)
-
 (defalias
   spotlight (multi lmet spc)  ;; Command + Space
   ;; Tap behavior: switch to nomods layer temporarily, then back to base
@@ -95,18 +99,18 @@
 
   ;; Home row modifiers with bilateral combinations
   ;; Left hand keys with LEFT-side modifiers
-  a (tap-hold-release-keys $tap-time $hold-time (multi a @tap) lmet $right-hand-keys)
-  s (tap-hold-release-keys $tap-time $hold-time (multi s @tap) lalt $right-hand-keys) 
-  d (tap-hold-release-keys $tap-time $hold-time (multi d @tap) lctl $right-hand-keys)
-  f (tap-hold-release-keys $tap-time $hold-time (multi f @tap) lsft $right-hand-keys)
+  a (tap-hold-release-keys $tt $ht (multi a @tap) lmet $rhk)
+  s (tap-hold-release-keys $tt $ht (multi s @tap) lalt $rhk) 
+  d (tap-hold-release-keys $tt $ht (multi d @tap) lctl $rhk)
+  f (tap-hold-release-keys $tt $ht (multi f @tap) lsft $rhk)
   
   ;; Right hand keys with RIGHT-side modifiers
-  j (tap-hold-release-keys $tap-time $hold-time (multi j @tap) rsft $left-hand-keys)
-  k (tap-hold-release-keys $tap-time $hold-time (multi k @tap) rctl $left-hand-keys)
-  l (tap-hold-release-keys $tap-time $hold-time (multi l @tap) ralt $left-hand-keys)
-  ; (tap-hold-release-keys $tap-time $hold-time (multi ; @tap) rmet $left-hand-keys)
+  j (tap-hold-release-keys $tt $ht (multi j @tap) rsft $lhk)
+  k (tap-hold-release-keys $tt $ht (multi k @tap) rctl $lhk)
+  l (tap-hold-release-keys $tt $ht (multi l @tap) ralt $lhk)
+  ; (tap-hold-release-keys $tt $ht (multi ; @tap) rmet $lhk)
 
-  v (tap-hold $tap-time $hold-time (multi v @tap) (layer-toggle numbers))
-  esc (tap-hold $tap-time $hold-time (multi esc @tap) (layer-toggle mouse))
+  v (tap-hold $tt $ht (multi v @tap) (layer-toggle numbers))
+  esc (tap-hold $tt $ht (multi esc @tap) (layer-toggle mouse))
   lmet (layer-toggle symbols)
 )

+ 2 - 2
hosts/meili/software.nix

@@ -23,7 +23,7 @@
       # "alacritty" # => we're using the home-manager package now
       # "bitwarden"
       # "brave-browser"
-      # "docker"
+      "docker-desktop"
       # "deepl"
       "ghostty"
       # "hot"
@@ -35,7 +35,7 @@
       # "orbstack"
 
       "proton-drive"
-      "proton-mail-bridge"
+      # "proton-mail-bridge"
       "proton-pass"
       "protonvpn"
 

+ 7 - 7
modules/global/nix-config.nix

@@ -1,9 +1,8 @@
-{
-  lib,
-  pkgs,
-  config,
-  outputs,
-  ...
+{ lib
+, pkgs
+, config
+, outputs
+, ...
 }:
 {
   nix = {
@@ -27,6 +26,7 @@
       ];
 
       trusted-users = [
+        "thomas"
         "root"
         "@wheel"
         "@admin"
@@ -39,7 +39,7 @@
       auto-optimise-store = true
     ''
     + lib.optionalString (pkgs.system == "aarch64-darwin") ''
-      extra-platforms = x86_64-darwin aarch64-darwin x86_64-linux aarch64-linux
+      extra-platforms = x86_64-darwin aarch64-darwin
     '';
 
     gc = {