move pkgs to host config

This commit is contained in:
Niccolo Borgioli 2025-02-04 15:08:43 +01:00
parent 1e7e973472
commit c7aeaaef8d
6 changed files with 20 additions and 23 deletions

View File

@ -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;

View File

@ -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; };
}
];
};

View File

@ -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";

View File

@ -11,6 +11,7 @@ with pkgs;
gnutar
gnupg
htop
btop
rclone
rename
tmux

View File

@ -1,9 +0,0 @@
{ pkgs }:
with pkgs;
[
vault
cocoapods
phrase-cli
boundary
awscli2
]

View File

@ -9,5 +9,13 @@
"datagrip"
"tailscale"
];
pkgs =
pkgs: with pkgs; [
vault
cocoapods
phrase-cli
boundary
awscli2
];
};
}