From 40f157fe75f6e38aecfc2ced776b056881847b17 Mon Sep 17 00:00:00 2001 From: Peter Esselius Date: Tue, 22 Oct 2024 23:24:47 +0200 Subject: [PATCH] vm --- darwin-modules/homebrew-packages/work.nix | 5 ++++ darwin-modules/nix.nix | 12 +++++++- flake.lock | 36 +++++++++++------------ home-modules/default.nix | 1 + home-modules/nix.nix | 17 +++++++++++ home-modules/profiles/tools/common.nix | 4 +++ nixos-configurations/vm.nix | 8 +++++ 7 files changed, 64 insertions(+), 19 deletions(-) create mode 100644 home-modules/nix.nix create mode 100644 nixos-configurations/vm.nix diff --git a/darwin-modules/homebrew-packages/work.nix b/darwin-modules/homebrew-packages/work.nix index a8545e8..d769bdb 100644 --- a/darwin-modules/homebrew-packages/work.nix +++ b/darwin-modules/homebrew-packages/work.nix @@ -12,10 +12,15 @@ "intune-company-portal" "microsoft-teams" "tunnelblick" + "postman" + "dbvisualizer" + "activitywatch" + "wireshark" ]; brews = lib.mkIf (config.context == "work") [ "azure-cli" + "protobuf" ]; }; } diff --git a/darwin-modules/nix.nix b/darwin-modules/nix.nix index 6745cd7..90e9e65 100644 --- a/darwin-modules/nix.nix +++ b/darwin-modules/nix.nix @@ -10,7 +10,17 @@ use-case-hack = false ''; - settings.trusted-users = [ "@admin" ]; + settings = { + trusted-users = [ "@admin" ]; + substituters = [ + "https://esselius.cachix.org" + "https://nix-community.cachix.org" + ]; + trusted-public-keys = [ + "esselius.cachix.org-1:h6FQzpdflxdZfnnL0caV88xt5K5sNzgO0VIHQthTymA=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; gc = { automatic = true; diff --git a/flake.lock b/flake.lock index 63a304c..046f65f 100644 --- a/flake.lock +++ b/flake.lock @@ -190,11 +190,11 @@ ] }, "locked": { - "lastModified": 1725703823, - "narHash": "sha256-tDgM4d8mLK0Hd6YMB2w1BqMto1XBXADOzPEaLl10VI4=", + "lastModified": 1726989464, + "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", "owner": "nix-community", "repo": "home-manager", - "rev": "208df2e558b73b6a1f0faec98493cb59a25f62ba", + "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", "type": "github" }, "original": { @@ -270,11 +270,11 @@ ] }, "locked": { - "lastModified": 1726188813, - "narHash": "sha256-Vop/VRi6uCiScg/Ic+YlwsdIrLabWUJc57dNczp0eBc=", + "lastModified": 1727003835, + "narHash": "sha256-Cfllbt/ADfO8oxbT984MhPHR6FJBaglsr1SxtDGbpec=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "21fe31f26473c180390cfa81e3ea81aca0204c80", + "rev": "bd7d1e3912d40f799c5c0f7e5820ec950f1e0b3d", "type": "github" }, "original": { @@ -337,11 +337,11 @@ ] }, "locked": { - "lastModified": 1726370017, - "narHash": "sha256-CJOV4JiLhd++w9K+h2z00DiB4R1CCuElWzhldrXSq5w=", + "lastModified": 1726975622, + "narHash": "sha256-bPDZosnom0+02ywmMZAvmj7zvsQ6mVv/5kmvSgbTkaY=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "0a2fba621b6bbf06be0b4edd974236e3d2fcc1a9", + "rev": "c7515c2fdaf2e1f3f49856cef6cec95bb2138417", "type": "github" }, "original": { @@ -352,11 +352,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726320982, - "narHash": "sha256-RuVXUwcYwaUeks6h3OLrEmg14z9aFXdWppTWPMTwdQw=", + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8f7492cce28977fbf8bd12c72af08b1f6c7c3e49", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", "type": "github" }, "original": { @@ -368,11 +368,11 @@ }, "nixpkgs-darwin": { "locked": { - "lastModified": 1726328674, - "narHash": "sha256-qmd7YxokSkpZSwuXoD8a734JkIQmm2kaDrBzocKpVrA=", + "lastModified": 1727284797, + "narHash": "sha256-roj2jFZ/VNBQBBmUvvYRGiWbegZEgRk9Y1dhcY8kgLA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b51904c22eef2070055aa4dc9e8004c19faac776", + "rev": "37df9bcf93431c7f9f9358aec2d7ed0a52d7ba1d", "type": "github" }, "original": { @@ -396,11 +396,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1726365531, - "narHash": "sha256-luAKNxWZ+ZN0kaHchx1OdLQ71n81Y31ryNPWP1YRDZc=", + "lastModified": 1727335715, + "narHash": "sha256-1uw3y94dA4l22LkqHRIsb7qr3rV5XdxQFqctINfx8Cc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9299cdf978e15f448cf82667b0ffdd480b44ee48", + "rev": "28b5b8af91ffd2623e995e20aee56510db49001a", "type": "github" }, "original": { diff --git a/home-modules/default.nix b/home-modules/default.nix index da2c60e..49c3dbb 100644 --- a/home-modules/default.nix +++ b/home-modules/default.nix @@ -5,6 +5,7 @@ ezModules.context ezModules.agenix ezModules.terminal + ezModules.nix ]; home = { diff --git a/home-modules/nix.nix b/home-modules/nix.nix new file mode 100644 index 0000000..60561a6 --- /dev/null +++ b/home-modules/nix.nix @@ -0,0 +1,17 @@ +{ + nix = { + settings = { + substituters = [ + "https://cache.nixos.org" + "https://esselius.cachix.org" + "https://nix-community.cachix.org" + "https://devenv.cachix.org" + ]; + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "esselius.cachix.org-1:h6FQzpdflxdZfnnL0caV88xt5K5sNzgO0VIHQthTymA=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" + ]; + }; +} diff --git a/home-modules/profiles/tools/common.nix b/home-modules/profiles/tools/common.nix index d4cda27..b4efa16 100644 --- a/home-modules/profiles/tools/common.nix +++ b/home-modules/profiles/tools/common.nix @@ -34,5 +34,9 @@ yq zstd nixd + duckdb + tree + attic-server + attic-client ]; } diff --git a/nixos-configurations/vm.nix b/nixos-configurations/vm.nix new file mode 100644 index 0000000..b85c3dd --- /dev/null +++ b/nixos-configurations/vm.nix @@ -0,0 +1,8 @@ +{ + nixpkgs.hostPlatform = "aarch64-linux"; + + system.stateVersion = "24.05"; + + context = "work"; + formfactor = "vm"; +}