diff --git a/home/default.nix b/home/default.nix index 62e4062..bce1459 100644 --- a/home/default.nix +++ b/home/default.nix @@ -9,6 +9,7 @@ ./neovim.nix ./starship.nix ./terminal.nix + ./git.nix ./direnv.nix ./zellij.nix # ./nushell.nix (intergrates extremely poorly with the system) diff --git a/home/terminal.nix b/home/terminal.nix index 7aabf11..d39d0e0 100644 --- a/home/terminal.nix +++ b/home/terminal.nix @@ -1,7 +1,7 @@ { pkgs, lib, ... }: +# Platform-independent terminal setup { - # Key packages required on nixos and macos home.packages = with pkgs; [ # Unixy tools ripgrep diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index 4022be6..a359b68 100644 --- a/nix-darwin/default.nix +++ b/nix-darwin/default.nix @@ -7,18 +7,15 @@ home-manager.users.${config.people.myself} = { pkgs, ... }: { imports = [ self.homeModules.common-darwin - ../home/terminal.nix - ../home/git.nix ]; }; }; + default.imports = [ self.darwinModules.home-manager self.darwinModules.myself - ../nixos/nix.nix - ../nixos/caches + self.nixosModules.common ]; }; - }; } diff --git a/nixos/default.nix b/nixos/default.nix index 5fa066e..a5a0d63 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1,27 +1,28 @@ -{ self, inputs, config, ... }: -let - mkHomeModule = name: extraModules: { - users.users.${name}.isNormalUser = true; - home-manager.users.${name} = { - imports = [ - self.homeModules.common-linux - ../home/git.nix - ] ++ extraModules; - }; - }; -in +{ self, config, ... }: + { # Configuration common to all Linux systems flake = { nixosModules = { - myself = mkHomeModule config.people.myself [ - ../home/terminal.nix + myself = { + users.users.${config.people.myself}.isNormalUser = true; + home-manager.users.${config.people.myself} = { + imports = [ + self.homeModules.common-linux + ]; + }; + }; + + # Common to all platforms + common.imports = [ + ./nix.nix + ./caches ]; + default.imports = [ self.nixosModules.home-manager self.nixosModules.myself - ./nix.nix - ./caches + self.nixosModules.common ./self-ide.nix ./ssh-authorize.nix ./current-location.nix