nix/common/home-manager/programs.nix

289 lines
6.6 KiB
Nix
Raw Normal View History

{ pkgs, ... }:
{
programs = {
bash = {
enable = true;
initExtra = ''
source ${pkgs.fetchurl {
url = "https://raw.githubusercontent.com/rupa/z/b82ac78a2d4457d2ca09973332638f123f065fd1/z.sh";
sha256 = "98e4438cd31afb3ce594130335e7fbd8be5d75d9a53e4f3e084d97e6b8d19b0e";
}}
# SSH agent
eval $(${pkgs.openssh}/bin/ssh-agent) > /dev/null
trap 'test -n "$SSH_AUTH_SOCK" && eval $(${pkgs.openssh}/bin/ssh-agent -k)' 0
'';
sessionVariables = {
PYTHON_KEYRING_BACKEND = "keyring.backends.null.Keyring";
};
};
zsh = {
enable = true;
enableAutosuggestions = true;
enableSyntaxHighlighting = true;
prezto.enable = true;
autocd = true;
plugins = [
2023-06-19 12:19:44 +00:00
{
name = "zsh-z";
file = "zsh-z.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "agkozak";
repo = "zsh-z";
rev = "dc9e2bc0cdbaa0a507371c248d3dcc9f58db8726";
sha256 = "sha256-T0iZK9Tb7ExJaZ6e2UmwecnKHMQilwAPkyAa/uhqrw0=";
};
}
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.5.0";
sha256 = "0za4aiwwrlawnia4f29msk822rj9bgcygw6a8a6iikiwzjjz0g91";
};
}
];
initExtra = ''
# SSH agent
eval $(${pkgs.openssh}/bin/ssh-agent) > /dev/null
trap 'test -n "$SSH_AUTH_SOCK" && eval $(${pkgs.openssh}/bin/ssh-agent -k)' 0
setopt rm_star_silent
'';
};
firefox = {
enable = true;
package = pkgs.firefox-wayland;
};
ncmpcpp = {
enable = true;
settings = {
colors_enabled = false;
};
};
foot = {
enable = true;
settings = {
main = {
term = "xterm-256color";
font = "Iosevka:size=12";
};
colors = {
background = "fafafa";
foreground = "383a42";
regular0 = "383a42";
regular1 = "e45649";
regular2 = "50a14f";
regular3 = "c18401";
regular4 = "0184bc";
regular5 = "a626a4";
regular6 = "0997b3";
regular7 = "fafafa";
bright0 = "383a42";
bright1 = "e45649";
bright2 = "50a14f";
bright3 = "c18401";
bright4 = "0184bc";
bright5 = "a626a4";
bright6 = "0997b3";
bright7 = "fafafa";
};
};
};
git = {
enable = true;
lfs.enable = true;
package = pkgs.gitAndTools.gitFull;
userName = "Sijmen";
userEmail = "me@sijman.nl";
signing = {
signByDefault = true;
key = "0xDAF7821E067D9C48";
};
extraConfig = {
fetch.prune = true;
init.defaultBranch = "main";
pull.ff = "only";
push.autoSetupRemote = true;
safe.directory = [ "/etc/nixos" ];
core.editor = "vim";
alias = {
duw = "push";
vertakking = "branch";
tak = "branch";
schakel = "switch";
committeer = "commit";
voegtoe = "add";
afstand = "remote";
};
};
};
mpv = {
enable = true;
config = {
script-opts = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp";
profile = "gpu-hq";
hwdec = true;
};
};
neovim = {
enable = true;
vimAlias = true;
extraConfig = ''
luafile /etc/nixos/common/nvim.lua
'';
extraPackages = with pkgs; [
gcc
rnix-lsp
nodePackages.pyright
];
plugins = with pkgs.vimPlugins; [
bufferline-nvim
cmp-nvim-lsp
cmp_luasnip
ctrlp-vim
galaxyline-nvim
indentLine
leap-nvim
lualine-nvim
luasnip
markdown-preview-nvim
neorg
nvim-cmp
nvim-colorizer-lua
nvim-lspconfig
nvim-tree-lua
nvim-treesitter.withAllGrammars
nvim-web-devicons
onehalf
pears-nvim
plenary-nvim
vim-closetag
vim-nix
vim-startify
vim-startuptime
];
};
tmux = {
enable = true;
prefix = "C-a";
extraConfig = ''
set -g mouse on
set-option -g set-titles on
set-option -g set-titles-string "#W"
'';
};
yt-dlp = {
enable = true;
settings = {
sponsorblock-mark = "sponsor,selfpromo,intro,outro,poi_highlight";
};
};
waybar = {
enable = true;
};
beets = {
enable = true;
settings = {
paths.default = "$albumartist/$year - $album%aunique{}/$track $title";
import.autotag = false;
plugins = [ "fetchart" ];
};
};
ssh = {
enable = true;
matchBlocks = {
# Home
"rpi" = {
user = "sijmen";
hostname = "10.100.0.1";
identityFile = "/home/sijmen/.ssh/id_ed25519_plain";
};
"desktop" = {
user = "vijfhoek";
hostname = "192.168.1.99";
proxyJump = "cloud.sijmenschoon.nl";
};
"nas" = {
user = "sijmen";
hostname = "192.168.1.123";
proxyJump = "cloud.sijmenschoon.nl";
};
# Servers
"hermes" = {
user = "ubuntu";
hostname = "hermes.sijmenschoon.nl";
};
# Scintilla
"linscin" = {
user = "sijmens";
hostname = "linscin.scintilla.utwente.nl";
};
"britt" = {
user = "sijmens";
hostname = "britt.scintilla.utwente.nl";
proxyJump = "linscin";
};
"alexia" = {
user = "sijmens";
hostname = "alexia.scintilla.utwente.nl";
proxyJump = "linscin";
};
"*.scintilla.utwente.nl" = {
user = "sijmens";
};
"*.scintilla.nl" = {
user = "sijmens";
};
# Uni
"xoc2" = {
user = "s2639149";
hostname = "xoc2.ewi.utwente.nl";
proxyJump = "sijmens@linscin.scintilla.utwente.nl";
};
"noc2" = {
user = "s2639149";
hostname = "noc2.ewi.utwente.nl";
proxyJump = "sijmens@linscin.scintilla.utwente.nl";
};
};
extraConfig = ''
AddKeysToAgent 15m
'';
};
alot.enable = true;
chromium.enable = true;
gpg.enable = true;
home-manager.enable = true;
mbsync.enable = true;
msmtp.enable = true;
password-store.enable = true;
};
}