From aa9be16abf1e4203cd10ba02b8ac0356becd2960 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 27 Sep 2024 14:28:23 -0600 Subject: [PATCH] [NixOS] Add macos virtualmachine to nixquick --- nixos/flake.lock | 182 ++++++++++++++++++++++++++++++++---- nixos/flake.nix | 5 +- nixos/machines/nixquick.nix | 6 ++ 3 files changed, 173 insertions(+), 20 deletions(-) diff --git a/nixos/flake.lock b/nixos/flake.lock index 2c4de28c..59e01302 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -217,6 +217,45 @@ "type": "indirect" } }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_5": { + "inputs": { + "nixpkgs-lib": [ + "nixtheplanet", + "hercules-ci-effects", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1696343447, + "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, "flake-utils": { "inputs": { "systems": [ @@ -594,7 +633,7 @@ "lsp": "lsp", "lsp-test": "lsp-test", "lsp-types": "lsp-types", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_8", "ormolu-052": "ormolu-052", "ormolu-07": "ormolu-07", "stylish-haskell-0145": "stylish-haskell-0145" @@ -629,7 +668,7 @@ "lsp": "lsp_2", "lsp-test": "lsp-test_2", "lsp-types": "lsp-types_2", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_10", "ormolu-052": "ormolu-052_2", "ormolu-07": "ormolu-07_2", "stylish-haskell-0145": "stylish-haskell-0145_2" @@ -671,6 +710,25 @@ "type": "github" } }, + "hercules-ci-effects_2": { + "inputs": { + "flake-parts": "flake-parts_5", + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1701009247, + "narHash": "sha256-GuX16rzRze2y7CsewJLTV6qXkXWyEwp6VCZXi8HLruU=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "31b6cd7569191bfcd0a548575b0e2ef953ed7d09", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, "hiedb": { "flake": false, "locked": { @@ -1061,6 +1119,24 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1701253981, + "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -1077,6 +1153,36 @@ "type": "github" } }, + "nixpkgs_10": { + "locked": { + "lastModified": 1686874404, + "narHash": "sha256-u2Ss8z+sGaVlKtq7sCovQ8WvXY+OoXJmY1zmyxITiaY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "efc10371d5c5b8d2d58bab6c1100753efacfe550", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "haskell-updates", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1682134069, + "narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fd901ef4bf93499374c5af385b2943f5801c0833", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1723688146, @@ -1143,31 +1249,31 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1686874404, - "narHash": "sha256-u2Ss8z+sGaVlKtq7sCovQ8WvXY+OoXJmY1zmyxITiaY=", + "lastModified": 1697723726, + "narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "efc10371d5c5b8d2d58bab6c1100753efacfe550", + "rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0", "type": "github" }, "original": { "owner": "NixOS", - "ref": "haskell-updates", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_7": { "locked": { - "lastModified": 1709703039, - "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", - "owner": "NixOS", + "lastModified": 1703255338, + "narHash": "sha256-Z6wfYJQKmDN9xciTwU3cOiOk+NElxdZwy/FiHctCzjU=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", + "rev": "6df37dc6a77654682fe9f071c62b4242b5342e04", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -1191,16 +1297,39 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1682134069, - "narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=", + "lastModified": 1709703039, + "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fd901ef4bf93499374c5af385b2943f5801c0833", + "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", "type": "github" }, "original": { - "id": "nixpkgs", - "type": "indirect" + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixtheplanet": { + "inputs": { + "flake-parts": "flake-parts_4", + "hercules-ci-effects": "hercules-ci-effects_2", + "nixpkgs": "nixpkgs_7", + "osx-kvm": "osx-kvm" + }, + "locked": { + "lastModified": 1727105240, + "narHash": "sha256-FEuqbcZ4TDUMwCpTA/E3J5L7pLD4U+zXPnZbmXSmaJo=", + "owner": "matthewcroughan", + "repo": "nixtheplanet", + "rev": "2f622af217807da78e44a5a15f620743dac57f46", + "type": "github" + }, + "original": { + "owner": "matthewcroughan", + "repo": "nixtheplanet", + "type": "github" } }, "notifications-tray-icon": { @@ -1278,11 +1407,27 @@ "url": "https://hackage.haskell.org/package/ormolu-0.7.1.0/ormolu-0.7.1.0.tar.gz" } }, + "osx-kvm": { + "flake": false, + "locked": { + "lastModified": 1701316418, + "narHash": "sha256-Sk8LYhFovoMX1ln7DWYArJQphW2a4h8Xg7/ZEZXwZv4=", + "owner": "kholia", + "repo": "OSX-KVM", + "rev": "09daff670a7eb9ff616073df329586c5995623a9", + "type": "github" + }, + "original": { + "owner": "kholia", + "repo": "OSX-KVM", + "type": "github" + } + }, "railbird-secrets": { "inputs": { "agenix": "agenix_2", "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_9" }, "locked": { "lastModified": 1726075726, @@ -1312,6 +1457,7 @@ "nixos-hardware": "nixos-hardware", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs_5", + "nixtheplanet": "nixtheplanet", "notifications-tray-icon": "notifications-tray-icon", "railbird-secrets": "railbird-secrets", "status-notifier-item": "status-notifier-item", @@ -1595,7 +1741,7 @@ "vscode-server": { "inputs": { "flake-utils": "flake-utils_6", - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_11" }, "locked": { "lastModified": 1713958148, diff --git a/nixos/flake.nix b/nixos/flake.nix index 36df46db..165001e9 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -1,5 +1,6 @@ { inputs = { + nixtheplanet.url = "github:matthewcroughan/nixtheplanet"; railbird-secrets = { url = "git+ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git"; }; @@ -112,7 +113,7 @@ }; outputs = inputs@{ - self, nixpkgs, nixos-hardware, home-manager, taffybar, xmonad, + self, nixpkgs, nixos-hardware, home-manager, taffybar, xmonad, nixtheplanet, xmonad-contrib, notifications-tray-icon, nix, agenix, imalison-taffybar, ... }: let @@ -124,7 +125,7 @@ name = machineNameFromFilename filename; value = { modules = [ - (machinesFilepath + ("/" + filename)) agenix.nixosModules.default + (machinesFilepath + ("/" + filename)) agenix.nixosModules.default nixtheplanet.nixosModules.macos-ventura ]; }; }; diff --git a/nixos/machines/nixquick.nix b/nixos/machines/nixquick.nix index 12ba5b32..49595c07 100644 --- a/nixos/machines/nixquick.nix +++ b/nixos/machines/nixquick.nix @@ -4,6 +4,12 @@ ../configuration.nix ]; + services.macos-ventura = { + enable = true; + openFirewall = true; + vncListenAddr = "0.0.0.0"; + }; + features.full.enable = true; myModules.cache-server = { enable = true;