diff --git a/darwin.nix b/darwin.nix index f2a41c2..97ff748 100644 --- a/darwin.nix +++ b/darwin.nix @@ -62,8 +62,7 @@ homebrew = { enable = true; - # casks = (if builtins.hasAttr "casks" host then host.casks else [ ]) ++ (import ./cask.nix); - casks = (lib.attrByPath [ "extras" "casks" ] [ ] host) ++ (import ./cask.nix); + casks = (import ./cask.nix) ++ (lib.attrByPath [ "extras" "casks" ] [ ] host); taps = [ "lihaoyun6/tap" ]; onActivation = { autoUpdate = true; diff --git a/flake.nix b/flake.nix index 7188e59..0e34349 100644 --- a/flake.nix +++ b/flake.nix @@ -45,7 +45,7 @@ home-manager.backupFileExtension = "backup"; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.${host.username} = import ./home.nix { inherit host; }; + home-manager.users.${host.username} = import ./home/home.nix { inherit host; }; } ]; }; diff --git a/home.nix b/home/home.nix similarity index 76% rename from home.nix rename to home/home.nix index ff658b3..fcf8dd3 100644 --- a/home.nix +++ b/home/home.nix @@ -15,10 +15,8 @@ home.homeDirectory = "/Users/${host.username}"; home.packages = - [ ] - ++ (import ./home/shared.nix { inherit pkgs; }) - # TODO: Move to host config - ++ lib.optionals (host.hostName == "sflx") (import ./home/sflx.nix { inherit pkgs; }); + (import ./pkgs.nix { inherit pkgs; }) + ++ ((lib.attrByPath [ "extras" "pkgs" ] (pkgs: [ ]) host) pkgs); fonts.fontconfig.enable = true; @@ -28,12 +26,12 @@ }; file = { - ".config/omp/config.yaml".source = ./files/omp/config.yaml; - ".config/ghostty/config".source = ./files/ghostty/config; - ".gitconfig".source = ./files/git/gitconfig; - ".gitignore_global".source = ./files/git/gitignore_global; - ".gitconfig.local".source = ./files/git/config.work; - ".config/nvim".source = ./files/nvim; + ".config/omp/config.yaml".source = ../files/omp/config.yaml; + ".config/ghostty/config".source = ../files/ghostty/config; + ".gitconfig".source = ../files/git/gitconfig; + ".gitignore_global".source = ../files/git/gitignore_global; + ".gitconfig.local".source = ../files/git/config.work; + ".config/nvim".source = ../files/nvim; }; shellAliases = { @@ -89,7 +87,7 @@ # Secrets sops = { age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; - defaultSopsFile = ./secrets/ssh.yaml; + defaultSopsFile = ../secrets/ssh.yaml; secrets.config = { mode = "0600"; path = "${config.home.homeDirectory}/.ssh/config"; diff --git a/home/shared.nix b/home/pkgs.nix similarity index 98% rename from home/shared.nix rename to home/pkgs.nix index 96267e0..b53fa00 100644 --- a/home/shared.nix +++ b/home/pkgs.nix @@ -11,6 +11,7 @@ with pkgs; gnutar gnupg htop + btop rclone rename tmux diff --git a/home/sflx.nix b/home/sflx.nix deleted file mode 100644 index ab21526..0000000 --- a/home/sflx.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ pkgs }: -with pkgs; -[ - vault - cocoapods - phrase-cli - boundary - awscli2 -] diff --git a/hosts/mac16.nix b/hosts/mac16.nix index 50c6090..115725e 100644 --- a/hosts/mac16.nix +++ b/hosts/mac16.nix @@ -9,5 +9,13 @@ "datagrip" "tailscale" ]; + pkgs = + pkgs: with pkgs; [ + vault + cocoapods + phrase-cli + boundary + awscli2 + ]; }; }