nix-config/home.nix

537 lines
13 KiB
Nix
Raw Normal View History

2024-01-30 17:29:47 +01:00
{ config, pkgs, lib, ... }:
{
2025-03-25 14:02:55 +01:00
imports = [
modules/gnome
modules/niri
2025-04-11 13:13:32 +02:00
modules/sops
2025-03-25 14:02:55 +01:00
modules/sway
2025-04-11 13:13:32 +02:00
modules/waybar
2025-03-25 14:02:55 +01:00
];
2024-06-05 15:31:00 +02:00
home = {
username = "muhh";
homeDirectory = "/home/muhh";
activation.setupEtc = config.lib.dag.entryAfter [ "writeBoundary" ] ''
/run/current-system/sw/bin/systemctl start --user sops-nix
'';
2024-06-05 15:31:00 +02:00
packages = with pkgs; [
2024-12-06 18:05:54 +01:00
_1password-cli
2024-06-05 15:31:00 +02:00
_1password-gui
atkinson-hyperlegible
atkinson-monolegible
2024-07-05 12:17:07 +02:00
alacritty
2024-08-13 12:48:34 +02:00
blueman
2024-06-05 15:31:00 +02:00
brightnessctl
2024-12-05 16:53:48 +01:00
chafa
2024-06-05 15:31:00 +02:00
curl
2024-07-17 17:21:16 +02:00
darktable
2024-06-19 16:54:29 +02:00
ddcutil
2024-12-05 16:53:48 +01:00
ddev
2024-11-28 18:16:12 +01:00
devenv
2024-06-05 15:31:00 +02:00
distrobox
2025-01-02 14:50:30 +01:00
# dog
2024-12-06 18:54:13 +01:00
fastfetch
2024-06-05 15:31:00 +02:00
fd
ffmpegthumbnailer
2024-07-05 12:17:07 +02:00
fuzzel
2024-06-05 15:31:00 +02:00
git
2025-03-25 14:09:39 +01:00
gurk-rs
2024-09-23 09:17:57 +02:00
heroku
2024-06-05 15:31:00 +02:00
htop
httpie
2025-03-25 14:09:39 +01:00
jq
2024-06-12 22:39:51 +02:00
just
2024-08-13 12:50:40 +02:00
libreoffice
2025-03-25 14:09:39 +01:00
localsend
2024-12-06 18:05:54 +01:00
nerd-fonts.iosevka
2024-06-05 15:31:00 +02:00
maid
mediainfo
mpv
morgen
obsidian
2024-10-01 15:59:34 +02:00
offpunk
2024-08-13 12:48:34 +02:00
pamixer
2024-06-05 15:31:00 +02:00
pavucontrol
powertop
prettyping
2024-06-05 15:31:00 +02:00
qutebrowser
rclone
2024-08-13 12:50:40 +02:00
rockbox-utility
rose-pine-cursor
2024-07-01 17:37:23 +02:00
signal-desktop
2024-06-05 15:31:00 +02:00
solargraph
sops
2024-08-13 12:50:40 +02:00
spot
2024-06-05 15:31:00 +02:00
sxiv
steam-run
tmux
unzip
via
wget
2024-07-01 17:38:26 +02:00
whois
2024-06-05 15:31:00 +02:00
wl-clipboard
2024-06-16 18:06:04 +02:00
wl-mirror
sway-launcher-desktop
2024-08-13 12:50:40 +02:00
vivaldi
2024-06-05 15:31:00 +02:00
xdg-utils
zellij
zulip
];
2024-01-30 17:29:47 +01:00
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
2024-06-05 15:31:00 +02:00
file = {
2024-01-30 17:29:47 +01:00
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
2024-06-05 15:31:00 +02:00
};
2024-01-30 17:29:47 +01:00
# You can also manage environment variables but you will have to manually
# source
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/muhh/etc/profile.d/hm-session-vars.sh
#
# if you don't want to manage your shell through Home Manager.
2024-06-05 15:31:00 +02:00
sessionVariables = {
EDITOR = "nvim";
};
2024-01-30 17:29:47 +01:00
};
2024-02-29 10:22:10 +01:00
accounts = {
email = {
accounts = {
privat = {
2024-02-29 10:22:10 +01:00
primary = true;
address = "markus@heurung.net";
realName = "Markus Heurung";
userName = "markus@heurung.net";
passwordCommand = ''(/run/current-system/sw/bin/cat $XDG_RUNTIME_DIR/secrets/mail/privat/password)'';
2024-02-29 10:22:10 +01:00
imap.host = "imap.mailbox.org";
# neomutt.enable = true;
mbsync = {
enable = true;
create = "both";
};
2024-02-29 10:22:10 +01:00
};
};
};
};
2024-01-30 17:29:47 +01:00
programs = {
atuin = {
enable = true;
enableFishIntegration = true;
flags = [
"--disable-up-arrow"
];
2024-05-22 10:14:20 +02:00
settings = {
auto_sync = true;
2024-11-28 18:16:12 +01:00
history_filter = [
"^..$"
"^cd "
"^ls "
"^mv "
"^rm "
];
2024-05-22 10:14:20 +02:00
key_path = config.sops.secrets.atuin_key.path;
};
2024-01-30 17:29:47 +01:00
};
bat = {
enable = true;
};
btop = {
enable = true;
};
2024-05-17 16:37:59 +02:00
direnv = {
enable = true;
nix-direnv.enable = true;
};
2024-05-20 17:38:01 +02:00
firefox = {
enable = true;
};
2024-01-30 17:29:47 +01:00
fish = {
enable = true;
shellAliases = {
cat = "bat";
ping = "prettyping";
2024-01-30 17:29:47 +01:00
};
};
fzf = {
enable = true;
enableFishIntegration = true;
};
2025-01-02 14:50:35 +01:00
ghostty = {
enable = true;
enableFishIntegration = true;
};
2024-01-30 17:29:47 +01:00
git = {
enable = true;
userEmail = "markus@heurung.net";
userName = "Markus Heurung";
extraConfig = {
apply.whitespace = "warn";
color = {
diff = "auto";
status = "auto";
branch = "auto";
ui = "always";
};
fetch.prune = true;
init.defaultBranch = "main";
pull.ff = "only";
2024-09-12 15:49:28 +02:00
pull.rebase = true;
2024-01-30 17:29:47 +01:00
push.default = "current";
status.submodule = "1";
user.useConfigOnly = true;
};
delta = {
enable = true;
options = {
light = false;
line-numbers = true;
navigate = true;
};
};
ignores = [
"*~"
".DS_Store"
".sublime-*"
"*.swp"
];
};
keychain = {
enable = true;
enableFishIntegration = true;
2024-03-06 12:10:11 +01:00
keys = [
"id_ed25519"
2024-06-05 15:28:46 +02:00
"id_rsa"
2024-03-06 12:10:11 +01:00
];
2024-01-30 17:29:47 +01:00
};
kitty = {
enable = true;
shellIntegration.enableFishIntegration = true;
keybindings = {
"ctrl+shift+g" = "show_last_command_output";
"ctrl+alt+enter" = "launch --cwd=current";
"ctrl+alt+t" = "launch --type=tab --cwd=current";
"ctrl+h" = "neighboring_window left";
"ctrl+j" = "neighboring_window bottom";
"ctrl+k" = "neighboring_window top";
"ctrl+l" = "neighboring_window right";
"ctrl+shift+h" = "move_window left";
"ctrl+shift+j" = "move_window down";
"ctrl+shift+k" = "move_window up";
"ctrl+shift+l" = "move_window right";
"ctrl+shift+z" = "next_layout";
2024-11-28 18:16:12 +01:00
"ctrl+shift+c" = "copy_to_clipboard";
"ctrl+shift+v" = "paste_from_clipboard";
2024-01-30 17:29:47 +01:00
};
settings = {
2024-06-05 15:28:46 +02:00
background_opacity = lib.mkForce "0.95";
2024-01-30 17:29:47 +01:00
dynamic_background_opacity = true;
2024-10-14 17:00:54 +02:00
enabled_layouts = "tall:bias=50;full_size=1;mirrored=false,stack";
2024-01-30 17:29:47 +01:00
scrollback_lines = 10000;
scrollback_pager_history_size = 4096;
strip_trailing_space = "smart";
tab_bar_edge = "bottom";
tab_bar_min_tabs = 2;
tab_bar_style = "powerline";
tab_powerline_style = "round";
2024-01-30 17:29:47 +01:00
tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}";
};
};
lazygit = {
enable = true;
};
2024-01-30 17:29:47 +01:00
lsd = {
enable = true;
enableAliases = true;
};
2024-02-29 10:22:10 +01:00
neomutt = {
enable = true;
vimKeys = true;
sidebar.enable = true;
};
2024-12-11 08:50:59 +01:00
neovide = {
enable = true;
settings = {};
};
2024-11-28 18:16:12 +01:00
newsboat = {
enable = true;
extraConfig = ''
color background color234 default # Dark Everforest background
color listnormal color249 default # Neutral gray for readability
color listnormal_unread color142 default # Highlighted for unread items
color listfocus color234 color142 # Inverse for focused items
color listfocus_unread color234 color142 bold
color info color108 color234 # Subtle info text
color article color249 default # Neutral for article content
# Highlights
highlight article "^(Feed|Link):.*$" color109 default bold
highlight article "^(Title|Date|Author):.*$" color109 default bold
highlight article "https?://[^ ]+" color214 default underline # Bright orange-yellow for links
highlight article "\\[[0-9]+\\]" color142 default bold # Matches unread highlight
highlight article "\\[image\\ [0-9]+\\]" color142 default bold # Matches unread highlight
highlight feedlist "^.*$" color142 color234 bold
'';
};
2024-01-30 17:29:47 +01:00
nixvim = {
enable = true;
2024-06-19 15:27:01 +02:00
defaultEditor = true;
2024-01-30 17:29:47 +01:00
vimAlias = true;
viAlias = true;
2024-06-19 15:27:01 +02:00
vimdiffAlias = true;
2024-01-30 17:29:47 +01:00
clipboard.providers.wl-copy.enable = true;
globals.mapleader = " ";
globals.maplocalleader = " ";
keymaps = [
{
key = "<leader>ff";
action = "<cmd>Telescope find_files<cr>";
}
{
key = "<leader>fg";
action = "<cmd>Telescope live_grep<cr>";
}
{
key = "<leader>fb";
action = "<cmd>Telescope buffers<cr>";
}
{
key = "<leader>fh";
action = "<cmd>Telescope help_tags<cr>";
}
{
key = "\\";
action = "<cmd>Neotree toggle<cr>";
}
2024-10-02 13:58:09 +02:00
{
key = "<leader>?";
action = "<cmd>WhichKey<cr>";
}
2024-01-30 17:29:47 +01:00
];
2024-05-17 12:26:27 +02:00
opts = {
conceallevel = 1;
2024-01-30 17:29:47 +01:00
expandtab = true;
ignorecase = true;
number = true;
relativenumber = true;
ruler = true;
2024-01-30 17:29:47 +01:00
shiftwidth = 2;
smartcase = true;
tabstop = 2;
};
plugins = {
2024-12-10 17:38:32 +01:00
colorizer.enable = true;
comment.enable = true;
2024-10-02 16:42:47 +02:00
cmp = {
enable = true;
autoEnableSources = true;
settings.sources = [
{ name = "cmdline"; }
{ name = "emoji"; }
{ name = "fish"; }
{ name = "nvim-lsp"; }
];
};
2025-03-25 14:11:46 +01:00
# lualine.enable = true;
2024-10-02 13:58:09 +02:00
fidget.enable = true;
fugitive.enable = true;
2024-01-30 17:29:47 +01:00
gitblame.enable = true;
gitsigns.enable = true;
lsp = {
enable = true;
servers = {
html.enable = true;
jsonls.enable = true;
marksman.enable = true;
solargraph.enable = true;
yamlls.enable = true;
2024-01-30 17:29:47 +01:00
};
};
2025-03-25 14:11:46 +01:00
mini = {
enable = true;
mockDevIcons = true;
modules = {
files = {};
icons = {};
notify = {};
statusline = {};
};
};
2024-10-02 13:58:09 +02:00
neogit.enable = true;
2024-01-30 17:29:47 +01:00
neo-tree = {
enable = true;
enableGitStatus = true;
gitStatusAsync = true;
enableModifiedMarkers = true;
closeIfLastWindow = true;
};
nix.enable = true;
2024-10-02 13:58:09 +02:00
noice.enable = false;
2025-03-25 14:11:46 +01:00
# notify.enable = false;
nvim-autopairs.enable = true;
2024-01-30 17:29:47 +01:00
obsidian = {
enable = true;
settings = {
2024-11-28 18:16:12 +01:00
dir = "~/muhhmory";
daily_notes = {
folder = "Journal/Daily Pages";
template = "Daily Page.md";
};
templates = {
subdir = "Templates";
};
};
2024-01-30 17:29:47 +01:00
};
oil.enable = true;
2024-10-02 13:58:09 +02:00
render-markdown.enable = true;
2024-09-23 09:18:05 +02:00
vim-surround.enable = true;
2024-10-02 13:58:09 +02:00
which-key.enable = true;
2024-01-30 17:29:47 +01:00
telescope = {
enable = true;
extensions = {
fzf-native.enable = true;
};
};
transparent.enable = true;
toggleterm.enable = true;
treesitter = {
enable = true;
2024-08-13 12:50:48 +02:00
settings = {
indent.enable = true;
};
};
2025-03-25 14:11:46 +01:00
# web-devicons.enable = true;
2024-10-02 13:58:09 +02:00
zen-mode.enable = true;
2024-01-30 17:29:47 +01:00
};
extraPlugins = with pkgs.vimPlugins; [
];
};
2024-05-22 10:14:35 +02:00
nnn = {
enable = true;
2024-06-05 15:31:16 +02:00
extraPackages = with pkgs; [
ffmpegthumbnailer
mediainfo
sxiv
];
package = pkgs.nnn.override ({
withNerdIcons = true;
});
plugins = {
mappings = {
c = "fzcd";
f = "finder";
v = "imgview";
};
src = (pkgs.fetchFromGitHub {
owner = "jarun";
repo = "nnn";
rev = "v4.9";
sha256 = "sha256-Hpc8YaJeAzJoEi7aJ6DntH2VLkoR6ToP6tPYn3llR7k=";
}) + "/plugins";
};
2024-05-22 10:14:35 +02:00
};
mbsync = {
enable = true;
};
2024-06-19 14:18:18 +02:00
obs-studio = {
enable = true;
plugins = [
pkgs.obs-studio-plugins.wlrobs
];
};
2024-01-30 17:29:47 +01:00
ripgrep.enable = true;
starship = {
enable = true;
enableFishIntegration = true;
};
yazi = {
enable = true;
enableFishIntegration = true;
};
2024-01-30 17:29:47 +01:00
zoxide = {
enable = true;
};
};
services = {
mbsync = {
enable = true;
preExec = "";
postExec = "";
};
2024-12-06 18:05:54 +01:00
gnome-keyring.enable = true;
2024-01-30 17:29:47 +01:00
playerctld.enable = true;
syncthing = {
enable = true;
# dataDir = "/home/muhh/Sync";
# configDir = "/home/muhh/.config/syncthing";
};
2024-01-30 17:29:47 +01:00
};
2024-06-05 15:28:46 +02:00
stylix = {
2024-06-19 15:26:43 +02:00
enable = true;
2024-06-05 15:28:46 +02:00
image = /home/muhh/Sync/Backgrounds/wald.jpg;
polarity = "dark";
2024-06-19 15:26:43 +02:00
# base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
2024-07-05 16:07:43 +02:00
# base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-city-terminal-dark.yaml";
#base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml";
2025-04-15 13:08:34 +02:00
# base16Scheme = ./share/themes/flexoki-light.yaml;
base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-dawn.yaml";
cursor = {
2025-04-15 13:08:34 +02:00
# name = "Rosé Pine";
name = "BreezeX-RosePine-Linux";
package = pkgs.rose-pine-cursor;
2025-04-15 13:08:34 +02:00
size = 32;
};
2024-06-19 15:26:43 +02:00
fonts = {
monospace = {
2024-12-06 18:05:54 +01:00
package = pkgs.nerd-fonts.iosevka;
2024-06-19 15:26:43 +02:00
name = "Iosevka Nerd Font";
2025-04-15 13:08:34 +02:00
};
sansSerif = {
package = pkgs.atkinson-hyperlegible;
name = "Atkinson Hyperlegible";
2024-06-19 15:26:43 +02:00
};
sizes = {
2025-04-15 13:08:34 +02:00
applications = 14;
desktop = 10;
popups = 10;
2024-06-19 15:26:43 +02:00
terminal = 14;
};
};
2024-06-05 15:28:46 +02:00
};
2025-03-25 14:09:39 +01:00
# catppuccin = {
# enable = true;
# flavor = "mocha";
# };
2024-06-05 15:29:30 +02:00
xdg = {
enable = true;
mimeApps.enable = true;
};
2024-01-30 17:29:47 +01:00
# leave things below alone.
home.stateVersion = "23.05";
programs.home-manager.enable = true;
}