From a00086f63df186181c254a164c77b974cc7a5c7c Mon Sep 17 00:00:00 2001 From: Skullheadx Date: Mon, 29 Jun 2026 14:38:08 -0400 Subject: DRY for username --- hosts/bear/configuration.nix | 9 +++++++-- hosts/icon/configuration.nix | 3 ++- hosts/kenosis/configuration.nix | 8 +++++--- hosts/kenosis/legacy.nix | 3 ++- hosts/nepsis/configuration.nix | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) (limited to 'hosts') diff --git a/hosts/bear/configuration.nix b/hosts/bear/configuration.nix index dc96c7a..7b0eed3 100644 --- a/hosts/bear/configuration.nix +++ b/hosts/bear/configuration.nix @@ -3,15 +3,20 @@ pkgs, inputs, nvim, + username, ... }: { + imports = [ + ./../../hjem-darwin.nix + ]; + networking = { computerName = "bear"; hostName = "bear"; localHostName = "bear"; }; # Primary user for user-specific settings (dock, etc.) - system.primaryUser = "andrewmontgomery"; + system.primaryUser = username; # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget environment.systemPackages = with pkgs; [ @@ -70,7 +75,7 @@ homebrew = { enable = true; - user = "andrewmontgomery"; + user = username; taps = [ ]; diff --git a/hosts/icon/configuration.nix b/hosts/icon/configuration.nix index 62c5bb8..f47a87f 100644 --- a/hosts/icon/configuration.nix +++ b/hosts/icon/configuration.nix @@ -2,6 +2,7 @@ config, pkgs, inputs, + username, ... }: { imports = [ @@ -63,7 +64,7 @@ # systemd.services.fcgiwrap.serviceConfig.ReadOnlyPaths = ["/srv/git"]; # Define a user account. Don't forget to set a password with ‘passwd’. users.users = { - andrew = { + ${username} = { isNormalUser = true; extraGroups = [ diff --git a/hosts/kenosis/configuration.nix b/hosts/kenosis/configuration.nix index be792e9..68498c5 100644 --- a/hosts/kenosis/configuration.nix +++ b/hosts/kenosis/configuration.nix @@ -3,10 +3,12 @@ pkgs, inputs, nvim, + username, ... }: { imports = [ # ./legacy.nix + ./../../hjem-darwin.nix ]; networking = { @@ -15,7 +17,7 @@ localHostName = "kenosis"; }; # Primary user for user-specific settings (dock, etc.) - system.primaryUser = "andrew"; + system.primaryUser = username; # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget environment.systemPackages = with pkgs; [ @@ -48,7 +50,7 @@ homebrew = { enable = true; - user = "andrew"; + user = username; taps = [ ]; @@ -61,7 +63,7 @@ "firefox" "chatgpt" "capcut" - "docker" + "docker-desktop" "musicbrainz-picard" "gimp" ]; diff --git a/hosts/kenosis/legacy.nix b/hosts/kenosis/legacy.nix index 5d3ed93..9058952 100644 --- a/hosts/kenosis/legacy.nix +++ b/hosts/kenosis/legacy.nix @@ -1,6 +1,7 @@ { config, pkgs, + username, ... }: { environment.systemPackages = with pkgs; [ @@ -14,7 +15,7 @@ homebrew = { enable = true; - user = "andrew"; + user = username; taps = [ ]; diff --git a/hosts/nepsis/configuration.nix b/hosts/nepsis/configuration.nix index 0cf4c69..c7ef1f0 100644 --- a/hosts/nepsis/configuration.nix +++ b/hosts/nepsis/configuration.nix @@ -8,7 +8,7 @@ ./hardware-configuration.nix ./../../lockscreen.nix ./../../x11.nix - ./../../hjem.nix + ./../../hjem-linux.nix ./../../audio.nix ./../../vim.nix ]; -- cgit v1.3.1