2024-06-15 16:10:55 +00:00
|
|
|
{ pkgs, lib, config, flake, inputs, ... }: {
|
2023-10-08 14:57:57 +00:00
|
|
|
imports = [
|
2024-06-09 20:00:47 +00:00
|
|
|
./modules/home-manager/neovim
|
|
|
|
./modules/home-manager/firefox
|
2024-06-15 16:10:55 +00:00
|
|
|
inputs.sops-nix.homeManagerModules.sops
|
2023-10-08 14:57:57 +00:00
|
|
|
];
|
|
|
|
|
2024-06-09 20:00:47 +00:00
|
|
|
xsession.enable = true;
|
2024-06-15 16:10:55 +00:00
|
|
|
services.syncthing.enable = true;
|
2024-06-15 12:18:36 +00:00
|
|
|
|
|
|
|
xdg = {
|
|
|
|
userDirs.enable = true;
|
|
|
|
|
|
|
|
mimeApps = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
defaultApplications =
|
|
|
|
let
|
|
|
|
applications = {
|
|
|
|
telegram = {
|
|
|
|
mimeApp = "org.telegram.desktop.desktop";
|
|
|
|
mimeTypes = [ "x-scheme-handler/tg" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
librewolf = {
|
|
|
|
mimeApp = "librewolf.desktop";
|
|
|
|
|
|
|
|
mimeTypes = [
|
|
|
|
"x-scheme-handler/http"
|
|
|
|
"text/html"
|
|
|
|
"application/xhtml+xml"
|
|
|
|
"x-scheme-handler/https"
|
|
|
|
"application/pdf"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
gnomeTextEditor = {
|
|
|
|
mimeApp = "org.gnome.TextEditor.desktop";
|
|
|
|
mimeTypes = [ "text/plain" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
thunderbird = {
|
|
|
|
mimeApp = "thunderbird.desktop";
|
|
|
|
mimeTypes = [ "x-scheme-handler/mailto" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
loupe = {
|
|
|
|
mimeApp = "org.gnome.Loupe.desktop";
|
|
|
|
mimeTypes = [
|
|
|
|
"image/jpeg"
|
|
|
|
"image/png"
|
|
|
|
"image/gif"
|
|
|
|
"image/webp"
|
|
|
|
"image/tiff"
|
|
|
|
"image/x-tga"
|
|
|
|
"image/vnd-ms.dds"
|
|
|
|
"image/x-dds"
|
|
|
|
"image/bmp"
|
|
|
|
"image/vnd.microsoft.icon"
|
|
|
|
"image/vnd.radiance"
|
|
|
|
"image/x-exr"
|
|
|
|
"image/x-portable-bitmap"
|
|
|
|
"image/x-portable-graymap"
|
|
|
|
"image/x-portable-pixmap"
|
|
|
|
"image/x-portable-anymap"
|
|
|
|
"image/x-qoi"
|
|
|
|
"image/svg+xml"
|
|
|
|
"image/svg+xml-compressed"
|
|
|
|
"image/avif"
|
|
|
|
"image/heic"
|
|
|
|
"image/jxl"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
mimeTypesForApp = { mimeApp, mimeTypes }: map
|
|
|
|
(
|
|
|
|
mimeType: { "${mimeType}" = mimeApp; }
|
|
|
|
)
|
|
|
|
mimeTypes;
|
|
|
|
in
|
|
|
|
lib.zipAttrs (lib.flatten (map mimeTypesForApp (builtins.attrValues applications)));
|
|
|
|
};
|
|
|
|
};
|
2024-06-09 20:00:47 +00:00
|
|
|
|
2023-10-08 14:57:57 +00:00
|
|
|
home = {
|
|
|
|
username = "pim";
|
|
|
|
homeDirectory = "/home/pim";
|
|
|
|
stateVersion = "23.05";
|
|
|
|
|
2024-06-09 21:01:34 +00:00
|
|
|
packages = (with pkgs; [
|
2023-11-04 17:38:37 +00:00
|
|
|
gnome.gnome-tweaks
|
2024-02-18 21:05:23 +00:00
|
|
|
jellyfin-media-player
|
2024-06-09 21:01:34 +00:00
|
|
|
virt-manager
|
|
|
|
]) ++ (with pkgs.unstable; [
|
|
|
|
attic-client
|
|
|
|
dbeaver-bin
|
|
|
|
devenv
|
|
|
|
bottles-unwrapped
|
|
|
|
gimp
|
|
|
|
hexchat
|
|
|
|
impression
|
|
|
|
insomnia
|
2024-06-15 16:10:55 +00:00
|
|
|
keepassxc
|
2024-06-09 21:01:34 +00:00
|
|
|
krita
|
|
|
|
libreoffice
|
2024-07-12 08:20:51 +00:00
|
|
|
# logseq # Has insecure electron dependency
|
2024-06-09 21:01:34 +00:00
|
|
|
moonlight-qt
|
|
|
|
nicotine-plus
|
|
|
|
qFlipper
|
|
|
|
signal-desktop
|
|
|
|
strawberry
|
|
|
|
telegram-desktop
|
|
|
|
vlc
|
|
|
|
vorta
|
|
|
|
wireshark
|
2024-07-22 18:26:10 +00:00
|
|
|
nheko
|
|
|
|
handbrake
|
2024-09-01 14:32:12 +00:00
|
|
|
feishin
|
2024-06-09 21:01:34 +00:00
|
|
|
]);
|
2023-10-08 14:57:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
home-manager.enable = true;
|
|
|
|
chromium.enable = true;
|
2024-06-09 20:00:47 +00:00
|
|
|
bat.enable = true;
|
|
|
|
|
2024-09-01 14:32:12 +00:00
|
|
|
fzf = {
|
|
|
|
enable = true;
|
|
|
|
enableZshIntegration = true;
|
|
|
|
};
|
|
|
|
|
2024-06-09 21:01:34 +00:00
|
|
|
alacritty = {
|
|
|
|
enable = true;
|
2024-06-11 17:59:58 +00:00
|
|
|
settings.shell = {
|
|
|
|
program = lib.getExe config.programs.tmux.package;
|
|
|
|
args = [ "attach" ];
|
|
|
|
};
|
2024-06-09 21:01:34 +00:00
|
|
|
};
|
|
|
|
|
2024-06-09 20:00:47 +00:00
|
|
|
thunderbird = {
|
|
|
|
enable = true;
|
2024-06-09 21:01:34 +00:00
|
|
|
profiles.default.isDefault = true;
|
2024-06-09 20:00:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
direnv = {
|
|
|
|
enable = true;
|
|
|
|
enableBashIntegration = true;
|
|
|
|
nix-direnv.enable = true;
|
|
|
|
};
|
|
|
|
|
2024-06-12 21:12:04 +00:00
|
|
|
atuin = {
|
2024-06-09 20:00:47 +00:00
|
|
|
enable = true;
|
2024-07-12 09:49:18 +00:00
|
|
|
flags = [ "--disable-up-arrow" ];
|
2024-06-12 21:12:04 +00:00
|
|
|
|
|
|
|
settings = {
|
|
|
|
auto_sync = true;
|
|
|
|
sync_frequency = "5m";
|
|
|
|
sync_address = "https://atuin.kun.is";
|
|
|
|
};
|
2024-06-09 20:00:47 +00:00
|
|
|
};
|
|
|
|
|
2024-06-09 21:01:34 +00:00
|
|
|
zsh = {
|
2024-06-09 20:00:47 +00:00
|
|
|
enable = true;
|
2024-06-09 21:01:34 +00:00
|
|
|
autocd = true;
|
|
|
|
autosuggestion.enable = true;
|
2024-06-15 13:16:59 +00:00
|
|
|
|
|
|
|
prezto = {
|
|
|
|
enable = true;
|
|
|
|
utility.safeOps = false;
|
|
|
|
};
|
2024-06-11 17:59:58 +00:00
|
|
|
|
|
|
|
shellAliases =
|
|
|
|
let
|
|
|
|
gitExe = lib.getExe config.programs.git.package;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
htop = lib.getExe pkgs.btop;
|
|
|
|
gp = "${gitExe} push";
|
|
|
|
gco = "${gitExe} checkout";
|
|
|
|
gd = "${gitExe} diff";
|
|
|
|
gc = "${gitExe} commit";
|
|
|
|
gpl = "${gitExe} pull";
|
|
|
|
gb = "${gitExe} branch";
|
|
|
|
ga = "${gitExe} add";
|
|
|
|
gl = "${gitExe} log";
|
|
|
|
gs = "${gitExe} status";
|
|
|
|
tf = lib.getExe pkgs.opentofu;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
tmux = {
|
|
|
|
enable = true;
|
|
|
|
shell = lib.getExe config.programs.zsh.package;
|
|
|
|
shortcut = "a";
|
|
|
|
clock24 = true;
|
|
|
|
newSession = true;
|
|
|
|
mouse = true;
|
|
|
|
escapeTime = 10;
|
|
|
|
terminal = "screen-256color";
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
unbind _
|
|
|
|
bind _ split-window -h
|
|
|
|
unbind -
|
|
|
|
bind - split-window -v
|
2024-06-12 21:12:04 +00:00
|
|
|
unbind h
|
|
|
|
bind h select-pane -L
|
|
|
|
unbind j
|
|
|
|
bind j select-pane -D
|
|
|
|
unbind k
|
|
|
|
bind k select-pane -U
|
|
|
|
unbind l
|
|
|
|
bind l select-pane -R
|
2024-06-11 17:59:58 +00:00
|
|
|
'';
|
2024-06-09 20:00:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ssh = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = "User root";
|
|
|
|
|
2024-07-23 20:52:04 +00:00
|
|
|
matchBlocks.github = lib.hm.dag.entryBefore [ "*" ] {
|
|
|
|
hostname = "github.com";
|
|
|
|
user = "pizzapim";
|
|
|
|
identitiesOnly = true;
|
2024-06-09 20:00:47 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
git = {
|
|
|
|
enable = true;
|
|
|
|
userName = "Pim Kunis";
|
|
|
|
userEmail = "pim@kunis.nl";
|
2024-06-09 21:01:34 +00:00
|
|
|
|
2024-06-09 20:00:47 +00:00
|
|
|
extraConfig = {
|
|
|
|
push.autoSetupRemote = true;
|
|
|
|
commit.verbose = true;
|
|
|
|
pull.rebase = true;
|
2024-06-22 14:24:50 +00:00
|
|
|
init.defaultBranch = "master";
|
2024-06-09 20:00:47 +00:00
|
|
|
};
|
|
|
|
};
|
2024-05-19 11:01:27 +00:00
|
|
|
|
|
|
|
# Currently, it is not possible to have Home Manager manage Liberwolf extensions.
|
|
|
|
# There is a draft PR which addresses this:
|
|
|
|
# https://github.com/nix-community/home-manager/pull/3339
|
|
|
|
# The extensions I currently use are:
|
|
|
|
# - ublock-origin (already installed by librewolf)
|
|
|
|
# - cookie-autodelete
|
|
|
|
# - clearurls
|
|
|
|
# - istilldontcareaboutcookies
|
|
|
|
# - keepassxc-browser
|
|
|
|
# - redirector
|
|
|
|
# - violentmonkey
|
|
|
|
# - boring-rss
|
|
|
|
# - kagi-search
|
|
|
|
# - refined-github
|
|
|
|
librewolf = {
|
|
|
|
enable = true;
|
2024-06-09 20:00:47 +00:00
|
|
|
|
2024-05-19 11:01:27 +00:00
|
|
|
settings = {
|
|
|
|
"identity.fxaccounts.enabled" = true;
|
|
|
|
"privacy.clearOnShutdown.history" = false;
|
|
|
|
"privacy.clearOnShutdown.downloads" = false;
|
|
|
|
"browser.translations.automaticallyPopup" = false;
|
|
|
|
"browser.aboutConfig.showWarning" = false;
|
2024-05-25 14:37:37 +00:00
|
|
|
"privacy.clearOnShutdown.cookies" = false;
|
2024-05-19 11:01:27 +00:00
|
|
|
};
|
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
};
|
|
|
|
|
2023-11-01 15:02:49 +00:00
|
|
|
dconf.settings = with lib.hm.gvariant; {
|
2024-06-09 18:31:39 +00:00
|
|
|
"org/gnome/desktop/sound".allow-volume-above-100-percent = true;
|
2024-06-12 21:12:04 +00:00
|
|
|
"org/gnome/desktop/wm.preferences".num-workspaces = 4;
|
|
|
|
"org/gnome/mutter".edge-tiling = true;
|
2024-06-09 18:31:39 +00:00
|
|
|
|
2024-06-09 20:00:47 +00:00
|
|
|
"org/gnome/shell" = {
|
2024-06-12 21:12:04 +00:00
|
|
|
disable-extension-version-validation = true;
|
2024-06-09 20:00:47 +00:00
|
|
|
|
|
|
|
enabled-extensions = [
|
|
|
|
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
|
|
|
|
"pop-shell@system76.com"
|
|
|
|
"windowIsReady_Remover@nunofarruca@gmail.com"
|
2024-06-13 21:32:04 +00:00
|
|
|
"randomwallpaper@iflow.space"
|
2024-06-09 20:00:47 +00:00
|
|
|
];
|
|
|
|
};
|
2024-06-09 18:31:39 +00:00
|
|
|
|
2023-11-01 15:02:49 +00:00
|
|
|
"org/gnome/desktop/input-sources" = {
|
2023-11-10 10:33:41 +00:00
|
|
|
sources = [ (mkTuple [ "xkb" "us" ]) ];
|
|
|
|
xkb-options = [ "terminate:ctrl_alt_bksp" "caps:escape" ];
|
2023-11-01 15:02:49 +00:00
|
|
|
};
|
2023-11-04 17:38:37 +00:00
|
|
|
|
2024-06-09 18:31:39 +00:00
|
|
|
"org/gnome/shell/extensions/pop-shell" = {
|
|
|
|
active-hint = true;
|
|
|
|
fullscreen-launcher = false;
|
|
|
|
mouse-cursor-focus-location = mkUint32 4;
|
|
|
|
mouse-cursor-follows-active-window = true;
|
|
|
|
show-skip-taskbar = false;
|
|
|
|
show-title = true;
|
|
|
|
smart-gaps = false;
|
|
|
|
snap-to-grid = false;
|
|
|
|
stacking-with-mouse = true;
|
|
|
|
tile-by-default = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
|
|
|
binding = "<Super>t";
|
|
|
|
command = lib.getExe config.programs.alacritty.package;
|
|
|
|
name = "Terminal";
|
2023-11-04 17:38:37 +00:00
|
|
|
};
|
2023-12-29 10:02:34 +00:00
|
|
|
|
2024-06-09 18:31:39 +00:00
|
|
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
|
|
|
|
binding = "<Super>e";
|
|
|
|
command = "${lib.getExe config.programs.librewolf.package} --browser";
|
|
|
|
name = "Browser";
|
2023-12-29 10:02:34 +00:00
|
|
|
};
|
2024-05-19 11:01:27 +00:00
|
|
|
|
2024-06-09 18:31:39 +00:00
|
|
|
"org/gnome/desktop/wm/keybindings" = {
|
|
|
|
close = [ "<Shift><Super>q" ];
|
|
|
|
minimize = mkEmptyArray type.string;
|
2024-06-12 21:12:04 +00:00
|
|
|
move-to-workspace-1 = [ "<Shift><Super>1" ];
|
2024-06-09 18:31:39 +00:00
|
|
|
move-to-workspace-2 = [ "<Shift><Super>2" ];
|
|
|
|
move-to-workspace-3 = [ "<Shift><Super>3" ];
|
|
|
|
move-to-workspace-4 = [ "<Shift><Super>4" ];
|
|
|
|
switch-applications = mkEmptyArray type.string;
|
|
|
|
switch-applications-backward = mkEmptyArray type.string;
|
|
|
|
switch-to-workspace-1 = [ "<Super>1" ];
|
|
|
|
switch-to-workspace-2 = [ "<Super>2" ];
|
|
|
|
switch-to-workspace-3 = [ "<Super>3" ];
|
|
|
|
switch-to-workspace-4 = [ "<Super>4" ];
|
|
|
|
toggle-fullscreen = [ "<Super>f" ];
|
2024-05-19 11:01:27 +00:00
|
|
|
};
|
2024-06-13 21:32:04 +00:00
|
|
|
|
|
|
|
"org/gnome/shell/extensions/space-iflow-randomwallpaper" = {
|
|
|
|
auto-fetch = true;
|
|
|
|
change-type = 2;
|
|
|
|
hide-panel-icon = true;
|
|
|
|
history-length = 1;
|
2024-06-15 13:16:59 +00:00
|
|
|
hours = 0;
|
2024-06-13 21:32:04 +00:00
|
|
|
minutes = 30;
|
|
|
|
sources = [ "42" ];
|
|
|
|
fetch-on-startup = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
"org/gnome/shell/extensions/space-iflow-randomwallpaper/sources/general/42".type = 4;
|
|
|
|
"org/gnome/shell/extensions/space-iflow-randomwallpaper/sources/localFolder/42".folder = "${flake}/wallpapers";
|
2023-11-01 15:02:49 +00:00
|
|
|
};
|
2024-06-15 16:10:55 +00:00
|
|
|
|
|
|
|
sops = {
|
|
|
|
age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt";
|
|
|
|
defaultSopsFile = ./secrets/pim.yaml;
|
|
|
|
|
|
|
|
secrets = {
|
|
|
|
"keepassxc".path = "${config.xdg.configHome}/keepassxc/keepassxc.ini";
|
|
|
|
"syncthing/key".path = "${config.xdg.configHome}/syncthing/key.pem";
|
|
|
|
"syncthing/cert".path = "${config.xdg.configHome}/syncthing/cert.pem";
|
|
|
|
};
|
|
|
|
};
|
2023-10-08 14:57:57 +00:00
|
|
|
}
|