From b4cd8edacda1552ad48cb16efe0545f7804755f8 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Sat, 17 May 2025 15:57:20 -0400 Subject: [PATCH] feat(nix): configure nh --- common/system/default.nix | 46 ++++++++++++++++++++++++--------------- flakes/darwin.nix | 2 +- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/common/system/default.nix b/common/system/default.nix index 12bec4c..309bb97 100644 --- a/common/system/default.nix +++ b/common/system/default.nix @@ -3,25 +3,35 @@ pkgs, ... }: { - nix.gc = { - automatic = true; - options = "--delete-older-than 30d"; + nix = { + gc = { + automatic = true; + options = "--delete-older-than 30d"; + }; + optimise.automatic = true; + settings = { + extra-experimental-features = [ + "flakes" + "nix-command" + ]; + keep-outputs = true; + log-lines = 25; + tarball-ttl = 43200; + trusted-users = [ + "root" + config.my.user + ]; + }; + package = pkgs.nix; }; - nix.optimise.automatic = true; - nix.settings = { - extra-experimental-features = [ - "flakes" - "nix-command" - ]; - keep-outputs = true; - log-lines = 25; - tarball-ttl = 43200; - trusted-users = [ - "root" - config.my.user - ]; - }; - nix.package = pkgs.nix; + + environment.systemPackages = with pkgs; [ + unstable.nh + ]; + + # TODO: make sure hostnames always match flake output name + environment.variables."NH_FLAKE" = ''${config.hm.home.homeDirectory}/Projects/nix-dots''; + programs.zsh.enable = true; time.timeZone = "America/New_York"; } diff --git a/flakes/darwin.nix b/flakes/darwin.nix index fa88a9c..362a507 100644 --- a/flakes/darwin.nix +++ b/flakes/darwin.nix @@ -30,7 +30,7 @@ ); in { flake.darwinConfigurations = { - mac = mkDarwin { + neptune = mkDarwin { modules = [ { hm = import ../user/environments/mac/home.nix;