From 84ec7b5318ffad6ab951028b550ec3f28aa5f4eb Mon Sep 17 00:00:00 2001 From: Timo Bingmann Date: Sun, 21 Sep 2025 15:44:26 -0700 Subject: [PATCH] add nix settings and dir colors for MacOS --- flake.nix | 1 + system/default/nix.nix | 2 ++ system/default/prompt.nix | 1 + system/macos/environment.nix | 7 +++++++ system/macos/nix.nix | 12 ++++++++++++ 5 files changed, 23 insertions(+) create mode 100644 system/macos/nix.nix diff --git a/flake.nix b/flake.nix index 1b8230e..19426e1 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,7 @@ imports = [ ./system/macos/environment.nix ./system/macos/fonts.nix + ./system/macos/nix.nix ./system/macos/system.nix ]; }; diff --git a/system/default/nix.nix b/system/default/nix.nix index 469de3a..1c23d4c 100644 --- a/system/default/nix.nix +++ b/system/default/nix.nix @@ -2,6 +2,8 @@ { # Nix package manager configuration nix = { + enable = true; + settings = { # Enable experimental features for modern Nix functionality # - "nix-command": Enables the new unified 'nix' command interface diff --git a/system/default/prompt.nix b/system/default/prompt.nix index 5b2d674..8313fbd 100644 --- a/system/default/prompt.nix +++ b/system/default/prompt.nix @@ -33,6 +33,7 @@ let "rp1" = colors.turquoise; # Turquoise "mab" = colors.lavender; # Lavender "C02CLC7FLVDL" = colors.gold; # Gold + "M04MN219CK" = colors.gold; # Gold }; # Get the current hostname diff --git a/system/macos/environment.nix b/system/macos/environment.nix index a68cc65..e038ef4 100644 --- a/system/macos/environment.nix +++ b/system/macos/environment.nix @@ -2,4 +2,11 @@ { # Manage /etc/shells and place add nix version of bash environment.shells = [ pkgs.bash ]; + + # Enable ls colors + environment.variables = { + CLICOLOR = "1"; + LSCOLORS = "ExFxBxDxCxegedabagacad"; + }; + environment.shellAliases.ls = "ls --color"; } diff --git a/system/macos/nix.nix b/system/macos/nix.nix new file mode 100644 index 0000000..fe0b5fc --- /dev/null +++ b/system/macos/nix.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: +{ + # Enable the Nix package manager + nix = { + enable = true; + + settings = { + # Configure trusted users who can perform privileged Nix operations + trusted-users = lib.mkForce [ "@admin" "${config.system.primaryUser}" ]; + }; + }; +}