nix/common/home-manager.nix

382 lines
11 KiB
Nix
Raw Normal View History

2023-03-31 12:17:02 +00:00
{ config, pkgs, lib, ... }:
2022-07-25 14:59:32 +00:00
{
2022-08-01 21:11:10 +00:00
imports = [
<home-manager/nixos>
];
2022-07-25 14:59:32 +00:00
home-manager.users.sijmen = {
2022-08-08 12:43:21 +00:00
imports = [
./home-manager/home.nix
./home-manager/gtk.nix
];
2022-08-08 12:13:58 +00:00
2022-08-08 12:43:21 +00:00
nixpkgs.config.allowUnfree = true;
home.stateVersion = config.system.stateVersion;
2022-08-08 00:11:34 +00:00
2022-08-08 14:08:50 +00:00
programs = {
2023-03-31 12:17:02 +00:00
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";
};
};
firefox = {
enable = true;
package = pkgs.firefox-wayland;
};
ncmpcpp = {
enable = true;
2022-10-04 14:57:21 +00:00
settings = {
2023-03-31 12:17:02 +00:00
colors_enabled = false;
};
};
foot = {
enable = true;
settings = {
main = {
term = "xterm-256color";
font = "Iosevka:size=12";
};
2022-10-04 14:57:21 +00:00
colors = {
2023-03-31 12:17:02 +00:00
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";
2022-10-04 14:57:21 +00:00
};
};
};
2022-08-08 14:08:50 +00:00
git = {
enable = true;
lfs.enable = true;
2022-08-12 00:13:22 +00:00
package = pkgs.gitAndTools.gitFull;
2022-08-08 14:08:50 +00:00
userName = "Sijmen";
userEmail = "me@sijman.nl";
signing = {
signByDefault = true;
key = "0xDAF7821E067D9C48";
};
extraConfig = {
fetch.prune = true;
init.defaultBranch = "main";
pull.rebase = true;
push.autoSetupRemote = true;
safe.directory = [ "/etc/nixos" ];
};
};
2023-03-31 12:17:02 +00:00
mpv = {
2022-08-08 14:08:50 +00:00
enable = true;
2023-03-31 12:17:02 +00:00
config = {
script-opts = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp";
};
2022-07-25 14:59:32 +00:00
};
2022-08-08 14:08:50 +00:00
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
2022-08-12 00:14:31 +00:00
cmp-nvim-lsp
cmp_luasnip
2022-10-25 13:50:11 +00:00
ctrlp-vim
2022-08-08 14:08:50 +00:00
galaxyline-nvim
indentLine
2022-10-25 13:50:11 +00:00
leap-nvim
2022-08-08 14:08:50 +00:00
lualine-nvim
2022-08-12 00:14:31 +00:00
luasnip
2022-08-08 14:08:50 +00:00
neorg
2022-08-12 00:14:31 +00:00
nvim-cmp
2022-08-08 14:08:50 +00:00
nvim-colorizer-lua
nvim-lspconfig
nvim-tree-lua
nvim-treesitter.withAllGrammars
2022-08-08 14:08:50 +00:00
nvim-web-devicons
onehalf
pears-nvim
plenary-nvim
vim-closetag
vim-nix
2023-03-31 12:17:02 +00:00
vim-startify
2022-10-25 13:50:11 +00:00
vim-startuptime
2022-08-08 14:08:50 +00:00
];
2022-07-25 14:59:32 +00:00
};
2022-09-19 21:27:01 +00:00
tmux = {
enable = true;
prefix = "C-a";
extraConfig = ''
set -g mouse on
set-option -g set-titles on
set-option -g set-titles-string "#W"
'';
};
2023-03-31 12:17:02 +00:00
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";
};
};
ssh = {
enable = true;
matchBlocks = {
# Home
"rpi" = {
user = "root";
hostname = "cloud.sijmenschoon.nl";
};
"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";
};
"*.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";
};
"hidde" = {
user = "hidde";
hostname = "84.245.15.16";
};
};
extraConfig = ''
AddKeysToAgent 15m
'';
};
2022-08-08 14:08:50 +00:00
alot.enable = true;
2023-03-31 12:17:02 +00:00
chromium.enable = true;
2022-08-08 14:08:50 +00:00
gpg.enable = true;
home-manager.enable = true;
mbsync.enable = true;
2022-08-12 00:14:03 +00:00
msmtp.enable = true;
2023-03-31 12:17:02 +00:00
password-store.enable = true;
};
2022-07-25 14:59:32 +00:00
2023-03-31 12:17:02 +00:00
wayland.windowManager.sway = {
enable = true;
config = let
scintillaDellOutput = { pos = "0 0"; };
scintillaHpOutput = { pos = "0 120"; };
in rec {
modifier = "Mod4";
terminal = "foot";
fonts = {
names = [ "Ubuntu" ];
style = "Regular";
size = 11.0;
};
input = {
"type:touchpad" = {
natural_scroll = "enabled";
dwt = "disabled";
click_method = "clickfinger";
};
"type:keyboard" = {
xkb_layout = "us,kr";
xkb_options = "grp:alt_caps_toggle";
};
"type:mouse" = {
accel_profile = "flat";
};
};
output = {
"*" = {
bg = "~/Pictures/berg.jpg fill";
subpixel = "none";
};
"Unknown 0x095F 0x00000000" = { pos = "92 1200"; scale = "1.3"; }; # framework
"Dell Inc. DELL U2410 F525M13318GL" = scintillaDellOutput; # bibi
"Dell Inc. DELL U2410 F525M12P08RL" = scintillaDellOutput; # fabienne
"Hewlett Packard HP E222 CNK6110ZM2" = scintillaHpOutput; # floortje
"Hewlett Packard HP E222 CNK6110ZM7" = scintillaHpOutput;
"Hewlett Packard HP E222 CNK6110ZMF" = scintillaHpOutput; # tamara
"Hewlett Packard HP E222 CNK6110ZR8" = scintillaHpOutput; # megan
"Hewlett Packard HP E222 CNK611104P" = scintillaHpOutput; # charissa
"Hewlett Packard HP E222 CNK611104X" = scintillaHpOutput;
"Hewlett Packard HP E222 CNK6111052" = scintillaHpOutput; # ilona
"Goldstar Company Ltd LG Ultra HD 0x00008520" = { mode = "2560x1440@60Hz"; }; # thuis rechts
"Dell Inc. DELL S2722DGM 3P84Z83" = { mode = "2560x1440@144Hz"; }; # thuis links (hdmi)
};
keybindings = lib.mkOptionDefault {
XF86MonBrightnessDown = "exec ${pkgs.light}/bin/light -U 5";
XF86MonBrightnessUp = "exec ${pkgs.light}/bin/light -A 5";
"shift+XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 1";
"shift+XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 1";
XF86AudioRaiseVolume = "exec '${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%'";
XF86AudioLowerVolume = "exec '${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%'";
XF86AudioMute = "exec '${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle'";
Print = "exec '${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | wl-copy -t image/png'";
"${modifier}+alt+l" = "exec '${pkgs.swaylock}/bin/swaylock -c 000000 -i eDP-1:Pictures/vista32.jpg'";
"${modifier}+ctrl+Return" = "exec '${pkgs.gnome.nautilus}/bin/nautilus'";
"${modifier}+ctrl+Down" = "move workspace to down";
"${modifier}+ctrl+Up" = "move workspace to up";
"${modifier}+ctrl+Left" = "move workspace to left";
"${modifier}+ctrl+Right" = "move workspace to right";
"${modifier}+ctrl+j" = "move workspace to down";
"${modifier}+ctrl+k" = "move workspace to up";
"${modifier}+ctrl+h" = "move workspace to left";
"${modifier}+ctrl+l" = "move workspace to right";
"${modifier}+ctrl+f" = "exec '${pkgs.python3}/bin/python /etc/nixos/common/sway/next_free.py | xargs swaymsg -- workspace number'";
"${modifier}+comma" = "workspace prev_on_output";
"${modifier}+period" = "workspace next_on_output";
};
};
};
services = {
gpg-agent = {
2022-08-08 14:08:50 +00:00
enable = true;
2023-03-31 12:17:02 +00:00
pinentryFlavor = "qt";
2022-08-08 14:08:50 +00:00
};
2022-11-01 00:32:23 +00:00
2023-03-31 12:17:02 +00:00
gnome-keyring = {
2022-11-01 00:32:23 +00:00
enable = true;
2023-03-31 12:17:02 +00:00
components = ["secrets" "ssh"];
2022-11-01 00:32:23 +00:00
};
2023-03-31 12:17:02 +00:00
mpd = {
2022-11-01 00:32:23 +00:00
enable = true;
2023-03-31 12:17:02 +00:00
musicDirectory = "/home/sijmen/Music";
2022-11-01 00:32:23 +00:00
};
2022-07-30 13:59:10 +00:00
2023-03-31 12:17:02 +00:00
mako = {
enable = true;
font = "Ubuntu 11";
defaultTimeout = 5000;
groupBy = "app-name,summary";
};
2022-10-31 01:49:37 +00:00
};
2022-07-30 13:59:10 +00:00
accounts.email.accounts.Personal = {
primary = true;
address = "me@sijmenschoon.nl";
aliases = [ "me@sijman.nl" "me@vijf.life" "info@sijmenschoon.nl" ];
realName = "Sijmen Schoon";
userName = "me@sijmenschoon.nl";
passwordCommand = "pass show email/personal";
imap.host = "imap.soverin.net";
smtp.host = "smtp.soverin.net";
folders.inbox = "INBOX";
mbsync = {
enable = true;
create = "maildir";
};
2022-08-12 00:14:03 +00:00
msmtp.enable = true;
2022-07-30 13:59:10 +00:00
};
2023-03-31 12:17:02 +00:00
accounts.email.accounts.Scintilla = {
primary = false;
address = "sijmens@scintilla.utwente.nl";
aliases = [ "sschoon@scintilla.utwente.nl" ];
realName = "Sijmen Schoon";
userName = "sijmens";
passwordCommand = "pass show email/scintilla";
folders.inbox = "INBOX";
};
2022-07-25 14:59:32 +00:00
};
}