nix/home.nix

387 lines
7.8 KiB
Nix
Raw Normal View History

2024-09-18 12:03:23 +02:00
{
pkgs,
2025-04-10 14:48:36 +02:00
pkgs-unstable,
2024-09-18 12:03:23 +02:00
nixvim,
river-shifttags,
other-transcode,
2024-09-18 12:03:23 +02:00
kitty-unstable,
2024-10-02 15:23:06 +02:00
nix-doom-emacs-unstraightened,
2025-02-02 18:10:31 +01:00
cassowary,
2024-09-18 12:03:23 +02:00
...
}: let
username = "khais";
in {
imports = [
./stylix.nix
2024-08-14 12:10:46 +02:00
./wm
2024-08-14 13:48:04 +02:00
./direnv.nix
2024-10-02 15:23:06 +02:00
nix-doom-emacs-unstraightened
];
home = {
packages = with pkgs; [
# system tools & bragging
2024-09-18 12:03:23 +02:00
htop
2025-04-30 13:39:37 +02:00
fastfetch
2024-09-18 12:03:23 +02:00
ripgrep
usbutils
wget
curl
ncdu
trashy
unzip
2024-10-02 15:22:33 +02:00
parallel
2025-03-16 14:12:31 +01:00
tcpdump
libqalculate
ouch
inetutils
2025-04-12 16:27:54 +02:00
fd
bat
# remote working
remmina
# communication
discord
# passwords
bitwarden-desktop
2025-02-27 16:09:04 +01:00
bitwarden-cli
# editors
2024-09-18 12:02:41 +02:00
nixvim
# make clipboard yanking work in neovim
# https://superuser.com/a/1803183
wl-clipboard
# wm river utils
2024-09-18 12:03:23 +02:00
playerctl
brightnessctl
river-shifttags
wlr-randr
# dev tools
2024-09-18 12:03:23 +02:00
gitu
lnav
# music
cmus
2024-09-17 17:31:13 +02:00
# music collection tools
2024-09-18 12:03:23 +02:00
picard
kid3
2024-09-17 17:31:13 +02:00
# audio
audacity
2025-01-18 12:28:58 +01:00
pavucontrol
2024-09-18 12:03:02 +02:00
# video
mpv
other-transcode
2025-04-12 16:27:54 +02:00
ani-cli
# file sending
magic-wormhole
# drawing apps
2024-09-18 12:03:23 +02:00
krita
inkscape
2024-09-17 14:39:04 +02:00
# office apps
libreoffice-fresh
hunspellDicts.fr-moderne
hunspellDicts.de-de
hunspellDicts.en-us
2025-05-04 14:25:32 +02:00
# spell check
ispell
hunspell
aspell
# nixos tools
2024-09-18 12:03:23 +02:00
nh
nix-output-monitor
2024-10-07 11:22:12 +02:00
alejandra
2024-10-09 15:58:15 +02:00
# archiving
archivebox
2025-01-18 12:28:58 +01:00
# games
lutris
2025-02-01 12:42:56 +01:00
wine
2025-03-16 14:12:31 +01:00
prismlauncher
2025-01-19 18:33:43 +01:00
# ai
ollama
2025-02-02 18:10:31 +01:00
# windows
cassowary
# xmonad
# apparently this is needed for the haskell lsp
ghc
2025-02-09 13:19:01 +01:00
i3lock
xmobar
2025-02-10 16:17:09 +01:00
# show volume in xmobar
alsa-utils
2025-03-16 14:12:31 +01:00
# remote
rustdesk
];
file = {
# konsole configuration
".local/share/konsole/Nixos.profile".source = ./konsole/Nixos.profile;
".config/nixpkgs/config.nix".text = ''
{ allowUnfree = true; }
'';
};
sessionVariables = {
EDITOR = "nvim";
};
inherit username;
homeDirectory = "/home/${username}";
stateVersion = "23.11";
};
nixpkgs.config.allowUnfree = true;
programs.git = {
enable = true;
userEmail = "khais.colin@gmail.com";
userName = "Khaïs COLIN";
# better diffs
diff-so-fancy.enable = true;
# set editor
extraConfig.core.editor = "nvim";
# always show diff in commits
extraConfig.commit.verbose = true;
};
programs.jujutsu = {
2025-04-10 14:48:36 +02:00
package = pkgs-unstable.jujutsu;
enable = true;
ediff = true;
settings = {
user = {
email = "khais.colin@gmail.com";
name = "Khaïs COLIN";
};
signing = {
2025-04-13 12:13:11 +02:00
behaviour = "own";
backend = "ssh";
key = "/home/khais/.ssh/id_ed25519.pub";
};
ui = {
editor = "emacsclient -a ''";
2024-12-24 13:05:59 +01:00
default-command = "log";
2024-12-29 16:07:33 +01:00
movement.edit = true;
# do not page if output fits on one screen
pager = "less -FRX";
2024-12-24 13:05:59 +01:00
};
fix.tools = {
clang-format = {
command = ["${pkgs.clang-tools}/bin/clang-format" "--assume-filename=$path"];
patterns = ["glob:'**/*.cpp'" "glob:'**/*.hpp'"];
};
whitespace = {
command = ["${pkgs.perl}/bin/perl" "-p" "-e" "s/ +$//" "$path"];
patterns = ["glob:'**/*'"];
};
};
};
};
programs.zsh = {
enable = true;
enableVteIntegration = true;
prezto = {
enable = true;
};
shellAliases = {
gc = "git commit -v";
ga = "git add";
gst = "git status";
gp = "git push";
gd = "git diff";
gds = "git diff --staged";
vim = "nvim";
vi = "nvim";
# progress cp
# https://serverfault.com/questions/43014/copying-a-large-directory-tree-locally-cp-or-rsync
pcp = "rsync --info=progress2 --archive --hard-links --acls --xattrs --human-readable --sparse --stats";
};
2024-08-15 17:03:35 +02:00
initExtra = ''
# enable jj completion
source <(jj util completion zsh)
# bind ctrl-backspace to delete word
bindkey '^H' backward-kill-word
2024-08-15 17:03:35 +02:00
'';
};
2025-01-18 12:20:41 +01:00
programs.fish = {
enable = true;
shellAliases = {
vim = "nvim";
vi = "nvim";
# progress cp
# https://serverfault.com/questions/43014/copying-a-large-directory-tree-locally-cp-or-rsync
pcp = "rsync --info=progress2 --archive --hard-links --acls --xattrs --human-readable --sparse --stats";
};
};
programs.kitty = {
package = kitty-unstable;
enable = true;
keybindings = {
"super+shift+enter" = "new_os_window_with_cwd";
};
settings = {
text_fg_override_threshold = 10;
};
};
programs.fuzzel.enable = true;
programs.zellij.enable = true;
2024-08-24 12:39:49 +02:00
programs.ssh = {
enable = true;
matchBlocks = {
"quasar" = {
hostname = "109.199.126.230";
user = "root";
};
2025-04-12 16:38:52 +02:00
"*.005540.xyz" = {
port = 2201;
};
"005540.xyz" = {
port = 2201;
};
"void" = {
port = 2201;
};
"void.hummingbird-stork.ts.net" = {
port = 2201;
};
};
};
# default connection to qemu for virt-manager
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
2024-09-09 13:12:59 +02:00
programs.beets = {
enable = true;
settings = {
directory = "/pile/Music";
library = "/pile/beets.db";
import = {
move = false;
copy = true;
incremental = false;
write = true;
};
2024-09-18 12:03:23 +02:00
plugins = ["lyrics" "web" "info" "edit"];
2024-09-09 13:12:59 +02:00
};
};
2024-09-13 14:22:22 +02:00
programs.yt-dlp = {
enable = true;
settings = {
embed-thumbnail = true;
embed-subs = true;
sub-langs = "all";
};
};
2024-10-02 15:23:06 +02:00
programs.doom-emacs = {
enable = true;
doomDir = ./doom.d;
extraBinPackages = with pkgs; [clang-tools nil nixd haskell-language-server ghc];
2024-10-02 15:23:06 +02:00
};
2024-11-09 21:04:00 +01:00
programs.yazi = {
enable = true;
};
2025-02-09 13:19:01 +01:00
xsession.windowManager.xmonad = {
enable = true;
config = ./xmonad.hs;
enableContribAndExtras = true;
};
2025-02-27 14:48:50 +01:00
programs.xmobar = {
enable = true;
extraConfig = builtins.readFile ./xmobarrc;
};
2025-02-09 13:19:01 +01:00
programs.rofi.enable = true;
2025-02-27 16:09:04 +01:00
# email
programs.mbsync.enable = true;
programs.msmtp.enable = true;
2025-03-08 10:48:05 +01:00
programs.offlineimap.enable = true;
2025-02-27 16:09:04 +01:00
programs.lieer = {
enable = true;
};
accounts.email.accounts.gmail = {
address = "khais.colin@gmail.com";
lieer = {
enable = true;
settings.local_trash_tag = "killed";
sync.enable = true;
};
msmtp.enable = true;
notmuch.enable = true;
primary = true;
realName = "Khaïs COLIN";
signature = {
text = ''
Cordialement,
-- Khaïs COLIN
'';
showSignature = "append";
};
passwordCommand = "cat /home/khais/.home-manager-gmail-password";
userName = "khais.colin@gmail.com";
flavor = "gmail.com";
};
2025-03-08 10:48:05 +01:00
accounts.email.accounts.orange = {
address = "kh.col@orange.fr";
offlineimap = {
enable = true;
};
msmtp.enable = true;
notmuch.enable = true;
realName = "Khaïs COLIN";
signature = {
text = ''
Cordialement,
-- Khaïs COLIN
'';
showSignature = "append";
};
passwordCommand = "cat /home/khais/.home-manager-orange-password";
userName = "kh.col@orange.fr";
imap = {
host = "imap.orange.fr";
port = 993;
};
smtp = {
host = "smtp.orange.fr";
};
};
2025-02-27 16:09:04 +01:00
programs.notmuch = {
enable = true;
new = {
tags = ["new" "unread"];
};
hooks = {
2025-03-08 10:48:05 +01:00
preNew = "gmi sync --path ~/Maildir/gmail; offlineimap";
2025-02-27 16:09:04 +01:00
postNew = "afew --verbose --tag --new";
};
search.excludeTags = [
"killed"
"spam"
];
};
programs.afew = {
enable = true;
extraConfig = builtins.readFile ./afew.config;
};
}