dotfiles/home.nix

123 lines
2.7 KiB
Nix
Raw Normal View History

2023-02-10 07:46:37 +01:00
{
config,
lib,
nur,
pkgs,
sops,
machine,
...
}: let
inherit (pkgs.stdenv.hostPlatform) isLinux;
inherit (pkgs.stdenv.hostPlatform) isDarwin;
2023-02-10 07:46:37 +01:00
in {
imports =
[
nur
sops
./catppuccin
./modules/firefox.nix
./modules/git.nix
./modules/gpg.nix
./modules/i3.nix
./modules/kubernetes.nix
./modules/mail.nix
./modules/music.nix
./modules/neovim.nix
./modules/newsboat.nix
./modules/sops.nix
./modules/vscode.nix
./modules/wezterm.nix
./modules/zsh.nix
]
++ lib.optionals (builtins.pathExists ./modules/secrets.nix) [
# hotfix: use fucking git-secret, this is atrocious beyond belief
./modules/secrets.nix
];
catppuccin = {
defaultTheme = "frappe";
bat.enable = true;
btop.enable = true;
dircolors.enable = true;
k9s.enable = true;
};
manual.manpages.enable = false;
home = {
packages = with pkgs; ([
2023-02-10 07:46:37 +01:00
zsh
fd
ffmpeg
file
imagemagick
mdcat
ranger
ripgrep
git-secret
cargo
unstable.deno
rustc
2023-02-10 09:02:50 +01:00
gh
2023-02-10 10:56:43 +01:00
org-stats
catppuccin-catwalk
2023-02-10 07:46:37 +01:00
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
unstable.wezterm
]
++ lib.optionals isDarwin [
iina
]
++ lib.optionals isLinux [
_1password-gui
insomnia
mattermost-desktop
]
++ lib.optionals (isLinux && machine.personal) [
2023-02-10 10:56:43 +01:00
discover-overlay
2023-02-10 07:46:37 +01:00
unstable.discord
lutris
]);
2023-02-10 07:46:37 +01:00
sessionVariables =
{
TERMINAL = "wezterm";
LESSHISTFILE = "-";
2023-02-10 07:46:37 +01:00
CARGO_HOME = "${config.xdg.dataHome}/cargo";
NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc";
RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
PATH = "$PATH:${config.xdg.dataHome}/krew/bin:$GOPATH/bin";
}
// (
if isDarwin
then {
# https://github.com/NixOS/nix/issues/2033
NIX_PATH = "$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels\${NIX_PATH:+:$NIX_PATH}";
SSH_AUTH_SOCK = "${config.xdg.configHome}/gnupg/S.gpg-agent.ssh";
}
else {}
);
stateVersion = "22.11";
};
programs = {
home-manager.enable = true;
go = {
enable = true;
goPath = ".local/share/go";
};
man.enable = true;
taskwarrior.enable = true;
};
xdg = {
enable = true;
userDirs.enable = isLinux;
2023-02-10 06:34:05 +01:00
cacheHome = "${config.home.homeDirectory}/.cache";
configHome = "${config.home.homeDirectory}/.config";
dataHome = "${config.home.homeDirectory}/.local/share";
};
}