diff --git a/flake.nix b/flake.nix index 6a0001a..947da74 100644 --- a/flake.nix +++ b/flake.nix @@ -78,6 +78,7 @@ homeConfigurations."artem@mars" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-darwin; + specialArgs.primaryUser = "artem"; modules = [ self.homeModules.main ./hosts/mars/home.nix diff --git a/hosts/deimos/nixos.nix b/hosts/deimos/nixos.nix index aecedf8..f762978 100644 --- a/hosts/deimos/nixos.nix +++ b/hosts/deimos/nixos.nix @@ -62,7 +62,6 @@ exec /run/wrappers/bin/fusermount -u "$1" '') - silver-searcher file nixfmt nixd diff --git a/hosts/mars/home.nix b/hosts/mars/home.nix index d18bbd8..6b7d211 100644 --- a/hosts/mars/home.nix +++ b/hosts/mars/home.nix @@ -1,12 +1,14 @@ -{ pkgs, ... }: +{ pkgs, primaryUser, ... }: { + nixpkgs.hostPlatform = "x86_64-darwin"; + # TODO: consider # https://nest.pijul.com/yonkeltron/macOS-nix-config:main/ZLDSMIXK5XFW6.EIAAA # and # https://github.com/bgub/nix-macos-starter/tree/main - home.username = "artem"; - home.homeDirectory = "/Users/artem"; + home.username = primaryUser; + home.homeDirectory = "/Users/${primaryUser}"; home.packages = with pkgs; [ secretive diff --git a/modules/mac-portable.nix b/modules/mac-portable.nix index a41de01..97c2a5c 100644 --- a/modules/mac-portable.nix +++ b/modules/mac-portable.nix @@ -1,6 +1,5 @@ { pkgs, primaryUser, ... }: { - nixpkgs.hostPlatform = "x86_64-darwin"; nixpkgs.config.allowUnfree = true; system.primaryUser = primaryUser;