From 6c9a7b9a0a7df6ab74c14ddfb28078fc27986b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Wed, 2 Oct 2024 15:32:22 +0100 Subject: [PATCH] add helix on work mac --- nixos/boxes/cushy/README.md | 1 + nixos/boxes/cushy/default.nix | 6 ++++++ nixos/helix/default.nix | 12 ++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/nixos/boxes/cushy/README.md b/nixos/boxes/cushy/README.md index b73d018c..b37ec4cc 100644 --- a/nixos/boxes/cushy/README.md +++ b/nixos/boxes/cushy/README.md @@ -1,2 +1,3 @@ https://discourse.nixos.org/t/ssl-ca-cert-error-on-macos/31171/6 +`nix run nix-darwin -- switch --flake '.#cushy'` diff --git a/nixos/boxes/cushy/default.nix b/nixos/boxes/cushy/default.nix index 01fc959e..1dcce175 100644 --- a/nixos/boxes/cushy/default.nix +++ b/nixos/boxes/cushy/default.nix @@ -21,6 +21,12 @@ in { inherit config; cyplo.username = username; }) + (import ../../helix { + inherit pkgs; + inherit lib; + inherit config; + cyplo.username = username; + }) ]; services.nix-daemon.enable = true; diff --git a/nixos/helix/default.nix b/nixos/helix/default.nix index 72ef39e1..bb676b58 100644 --- a/nixos/helix/default.nix +++ b/nixos/helix/default.nix @@ -2,8 +2,16 @@ config, pkgs, lib, + cyplo, ... -}: { +}: +let + username = + if cyplo ? username + then "${cyplo.username}" + else "cyryl"; +in +{ nix.settings = { trusted-substituters = [ "https://helix.cachix.org" @@ -12,5 +20,5 @@ "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" ]; }; - home-manager.users.cyryl = {...}: {imports = [./home.nix];}; + home-manager.users."${username}" = {...}: {imports = [./home.nix];}; }