nixconfigs/home/home.nix

465 lines
9.3 KiB
Nix
Raw Normal View History

2018-09-26 01:30:11 +02:00
{ pkgs, ... }:
with pkgs;
let
# nix-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable
#unstable = import <nixos-unstable> { };
# nix-channel --add https://github.com/nix-community/NUR/archive/master.tar.gz NUR
nur = import <NUR> { inherit pkgs; };
myNur = nur.repos.schmittlauch;
2018-09-26 01:30:11 +02:00
desktopApps = [
# use pre-built Mozilla binary until nixpkgs build has similar performance (build profiling information)
firefox-bin
chromium
falkon
2019-05-03 00:13:22 +02:00
thunderbird
2019-01-14 13:24:34 +01:00
calibre
2021-06-03 13:28:46 +02:00
dino
2020-05-08 00:03:26 +02:00
zotero
2019-01-14 13:24:34 +01:00
keepassxc
ding
aspell
aspellDicts.de
aspellDicts.en
# for kate/KDE applications
hunspellDicts.de-de
hunspellDicts.en-us
hunspellDicts.en-gb-ise
seafile-client
alacritty
libreoffice-qt # fresh with KDE integration
2019-01-14 13:24:34 +01:00
backintime-common
2021-06-03 13:28:46 +02:00
anki-bin
2019-01-14 13:24:34 +01:00
signal-desktop
(tor-browser-bundle-bin.override {
mediaSupport = true;
pulseaudioSupport = true;
# prevent segfault on Intel graphics systems
useHardenedMalloc = false;
})
2019-01-14 13:24:34 +01:00
pdfpc
quaternion
2019-10-10 01:05:02 +02:00
nheko
2019-01-14 13:24:34 +01:00
gpx-viewer
gpxsee
2021-06-03 13:28:46 +02:00
cawbird
subsurface
yate
# split and merge PDFs in a GUI
pdfarranger
qbittorrent
#(pkgs.pidgin-with-plugins.override {
# plugins = [ pkgs.pidginotr ];})
2019-01-09 12:11:11 +01:00
2019-08-07 18:44:04 +02:00
# for Hibiscus banking software
jameica
2019-10-10 01:05:02 +02:00
#ToDo: which of these drivers is actually used?
geckodriver
chromedriver
2019-11-12 17:59:59 +01:00
];
2018-09-26 01:30:11 +02:00
graphicsApps = [
2019-01-14 13:24:34 +01:00
inkscape
2019-10-10 01:05:02 +02:00
darktable
2019-01-14 13:24:34 +01:00
hugin
luminanceHDR
exiftool
gimp
xournal
2019-11-12 17:59:59 +01:00
]
++ (
with gimpPlugins; [
2021-06-03 13:28:46 +02:00
resynthesizer
2019-11-12 17:59:59 +01:00
fourier
lqrPlugin
2019-01-14 13:24:34 +01:00
]
2019-11-12 17:59:59 +01:00
);
2018-09-26 01:30:11 +02:00
multimediaApps = [
2022-01-02 19:09:23 +01:00
mpv
#vlc
2019-10-10 01:05:02 +02:00
#amarok
#clementine
#elisa
yt-dlp
2019-10-10 01:05:02 +02:00
#sonic-pi
#musescore
#audacity
#avidemux
2020-01-07 12:36:24 +01:00
#linphone
#soundkonverter
2019-11-12 17:59:59 +01:00
];
2018-09-26 01:30:11 +02:00
cliApps = [
2018-10-14 16:57:02 +02:00
myVim
2019-01-14 13:24:34 +01:00
htop
tmux
httpie
ponysay
gti
2018-11-18 15:12:30 +01:00
tree
lsof
2019-01-14 13:24:34 +01:00
mosh
openssh
sshfs-fuse
2019-01-14 13:24:34 +01:00
cryfs
#smbnetfs # for FUSE smb mounting
2019-01-14 13:24:34 +01:00
sshuttle
thefuck
gnupg
unar
2020-05-08 00:03:26 +02:00
lzop
p7zip
2019-01-14 13:24:34 +01:00
pwgen
pandoc
agrep
pdfgrep
torsocks
ncdu
#psmisc # for killall
2019-01-14 13:24:34 +01:00
dos2unix
#reptyr # re-bind running program to other tty
xclip
2019-02-11 22:15:45 +01:00
unzip
#myNur.lolcommits # from NUR
2019-11-12 17:59:59 +01:00
];
2018-09-26 01:30:11 +02:00
nixHelpers = [
2019-08-21 23:45:09 +02:00
lorri
2019-10-10 01:05:02 +02:00
nix-review
nixpkgs-fmt
2019-11-12 17:59:59 +01:00
];
2021-06-03 13:28:46 +02:00
kdeTools = with plasma5Packages; with kdeGear; [
okular
2019-01-14 13:24:34 +01:00
gwenview
yakuake
kmail
kontact
korganizer
akonadi-mime #for KOrganizer
kaddressbook
kdeconnect
dolphin
spectacle
kate
kleopatra
qdirstat
ark
kwalletmanager
2019-02-07 01:33:36 +01:00
ktouch
2019-01-13 23:37:09 +01:00
kcharselect
2019-01-14 13:24:34 +01:00
konversation
okteta
krdc
skanlite
akonadiconsole
plasma-browser-integration
2019-11-12 17:59:59 +01:00
]
++ (
with kdeFrameworks; [
networkmanager-qt
kcrash
2021-06-03 13:28:46 +02:00
breeze-gtk
phonon-backend-vlc
2019-11-12 17:59:59 +01:00
#(phonon-backend-vlc.override {qtbase=qt5.qtbase; qtx11extras=qt5.qtx11extras;})
2019-01-14 13:24:34 +01:00
]
2019-11-12 17:59:59 +01:00
);
2018-09-26 01:30:11 +02:00
devTools = [
curl
2019-01-14 13:24:34 +01:00
httpie
gdb
#strace
#ltrace
#valgrind
#zeal
2019-01-14 13:24:34 +01:00
gcc
shellcheck
mtr
ripgrep
gitui
2022-05-06 15:59:52 +02:00
pre-commit
2020-02-16 21:58:11 +01:00
# Haskell
2019-08-21 23:45:09 +02:00
ghc
2020-01-29 17:11:06 +01:00
cabal2nix
2019-11-12 17:59:59 +01:00
];
2018-09-26 01:30:11 +02:00
latexApps = [
texmaker
2019-10-10 01:05:02 +02:00
kile
2019-03-07 21:28:16 +01:00
biber
2019-01-14 13:24:34 +01:00
# customize texlive installation
2019-11-12 17:59:59 +01:00
(
texlive.combine {
inherit (texlive)
scheme-medium
2019-01-14 13:24:34 +01:00
2019-11-12 17:59:59 +01:00
xetex
luatex
unicode-math
fontspec
collection-binextra
collection-fontsrecommended
collection-latex
collection-latexextra
collection-latexrecommended
collection-langgerman
IEEEtran
moderncv
fontawesome5
academicons
2019-11-12 17:59:59 +01:00
acronym
ccicons
fontawesome
biblatex
logreq
koma-script
;
}
)
2018-09-26 01:30:11 +02:00
];
pythonApps = with python3Packages; [
2019-01-14 13:24:34 +01:00
notebook
ipython
pip
numpy
matplotlib
jedi
black
flake8
mypy
2021-06-01 16:08:08 +02:00
];
2018-09-26 01:30:11 +02:00
fonts = [
2019-01-14 13:24:34 +01:00
comic-neue
source-sans-pro
source-code-pro
2019-01-14 13:24:34 +01:00
source-serif-pro
fira-code
ubuntu_font_family
twemoji-color-font
open-sans
2021-06-05 02:01:12 +02:00
(iosevka-bin.override {
variant = "curly-slab";
})
2021-04-02 19:49:57 +02:00
myNur.vollkorn
2019-01-14 13:24:34 +01:00
# TODO: humor-sans
];
2019-08-08 01:48:20 +02:00
games = [
2019-10-10 01:05:02 +02:00
superTuxKart
#hedgewars
2018-10-07 19:47:28 +02:00
];
2018-09-26 01:30:11 +02:00
in
{
home.packages =
cliApps
#++ desktopApps
#++ latexApps
2018-09-26 01:30:11 +02:00
++ pythonApps
#++ graphicsApps
++ multimediaApps
2019-01-14 13:24:34 +01:00
++ devTools
#++ kdeTools
2019-01-14 13:24:34 +01:00
++ fonts
++ nixHelpers
#++ games
2020-04-15 19:34:27 +02:00
;
2018-09-26 01:30:11 +02:00
programs.home-manager.enable = true;
#programs.home-manager.path = "$HOME/.nix-defexpr/channels/home-manager";
home.stateVersion = "22.05";
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "os";
home.homeDirectory = "/Users/os";
2018-10-31 00:20:35 +01:00
programs.direnv =
2019-11-12 17:59:59 +01:00
{
enable = true;
2019-01-14 13:24:34 +01:00
enableZshIntegration = true;
};
2018-10-14 16:57:02 +02:00
2019-11-12 17:59:59 +01:00
# programs.vim =
# { enable = true;
# };
2019-04-15 00:28:14 +02:00
programs.bat.enable = true;
2019-11-12 17:59:59 +01:00
# services.gpg-agent =
# {
# enable = true;
# enableSshSupport = true;
# pinentryFlavor = "qt";
# };
programs.ssh =
{
enable = true;
# ssh host config
matchBlocks = {
"hydra01" = {
hostname = "hydra01.fe.whq.fcio.net";
user = "os";
};
"fcio-whq-jump" = {
hostname = "vpn-whq.services.fcio.net";
extraOptions.LogLevel = "Verbose";
};
};
};
2019-11-12 17:59:59 +01:00
programs.tmux = {
enable = true;
keyMode = "vi";
extraConfig =
# for direnv not messing up the environment
''set-option -g update-environment "DIRENV_DIFF DIRENV_DIR DIRENV_WATCHES"
2019-05-14 15:33:26 +02:00
set-environment -gu DIRENV_DIFF
set-environment -gu DIRENV_DIR
set-environment -gu DIRENV_WATCHES
set-environment -gu DIRENV_LAYOUT
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel'';
2019-11-12 17:59:59 +01:00
terminal = "screen-256color";
};
2019-05-14 15:33:26 +02:00
#systemd.user.startServices = true;
#services.lorri.enable = true;
# media button control support from Bluetooth devices
#services.mpris-proxy.enable = true;
fonts.fontconfig.enable = true;
programs.git =
let contacts = import ./secrets/contacts.nix;
in
{
enable = true;
includes = [
{
condition = "gitdir:~/Seafile/Studium/";
contents = {
user.name = contacts.realName;
user.email = contacts.uniMail;
};
}
{
condition = "gitdir:~/src/nixpkgs/";
contents = {
user.name = "Trolli Schmittlauch";
user.email = contacts.nixosMail;
};
}
]
# set default name for several other common locations
++ map
(dir: {
condition = "gitdir:${dir}";
contents = {
user.name = "Trolli Schmittlauch";
user.email = contacts.mainMail;
};
}) [ "~/src/" "~/bin/" "~/tmp/" "~/nixconfigs/" ];
extraConfig = {
credential.helper = "cache";
push.default = "simple";
init.defaultBranch = "mainline";
diff.tool = "vimdiff";
merge.tool = "vimdiff";
core.excludesfile = toString (pkgs.writeText ".gitignore_global" ''
# Direnv stuff
.direnv
.envrc
# Editor files #
################
*~
*.swp
*.swo
'');
core.whitespace = "-blank-at-eol,blank-at-eof,space-before-tab";
};
lfs.enable = true;
};
2022-05-12 22:31:59 +02:00
# shell config
programs.zsh = {
enable = true;
enableSyntaxHighlighting = true;
history.ignoreSpace = true;
initExtra = ''
# Uncomment following line if you want red dots to be displayed while waiting for completion
COMPLETION_WAITING_DOTS="true"
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=''${''${(s.:.)widgets[self-insert]}[2,3]}
2022-05-12 22:31:59 +02:00
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
}
pastefinish() {
zle -N self-insert $OLD_SELF_INSERT
}
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
# automatic rehash of path completion
zstyle ':completion:*' rehash true
eval "$(${pkgs.thefuck}/bin/thefuck --alias)"
## helper functions
nixify() {
if [ ! -e ./.envrc ]; then
echo "eval \"$(lorri direnv)\"" > .envrc
direnv allow
fi
if [ ! -e shell.nix ]; then
cat > shell.nix <<'EOF'
with import <nixpkgs> {};
mkShell {
buildInputs = [
bashInteractive
];
}
EOF
${EDITOR:-vim} default.nix
fi
}
binpath() {
realpath $(${pkgs.which}/bin/which $1)
}
'';
oh-my-zsh = {
enable = true;
theme = "bira";
plugins = [ "git" "python" "systemd" "gpg-agent"];
2022-05-12 22:31:59 +02:00
};
};
home.shellAliases = {
ip = "ip --color";
ipb = "ip --color --brief";
ll = "ls -l";
wavesynth = "nix-shell -p sox --run 'play -n synth brownnoise synth pinknoise mix synth 0 0 0 15 40 80 trapezium amod 0.2 20'";
vim = "nvim";
2022-05-12 22:31:59 +02:00
};
home.sessionVariables = {
EDITOR = "nvim";
2022-05-12 22:31:59 +02:00
};
2018-09-26 01:30:11 +02:00
}