nixos-config/home/home.nix

762 lines
17 KiB
Nix

{ nix-flatpak, lib, config, pkgs, inputs, outputs, ... }:
{
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};
home = {
packages = with pkgs; [
inputs.affinity-nix.packages.x86_64-linux.photo
inputs.affinity-nix.packages.x86_64-linux.publisher
inputs.affinity-nix.packages.x86_64-linux.designer
guix
uv
thonny
just
yt-dlp
erdtree
age
figlet
ffmpeg-full
rlwrap
pinentry
gcr
gnutar
unzip
zip
stdenv
tldr
delta
htop
dconf
dconf2nix
readline
gnupg
imagemagick
# gcc
gnutls
gettext
xorg.libX11
xorg.libxcb
freetype
gnumake
flex
bison
mesa
neofetch
nvd
nitch
ripgrep-all
silver-searcher
maestral
maestral-gui
nix-index
fstl
godot_4
sane-airscan
xsane
dbus
gst_all_1.gstreamer
alsa-oss
powertop
age
sops
nix-du
usbutils
pciutils
util-linux
coreutils
binutils
# libgcc
# cmake
# libuv.dev
# SDL2.dev
protonplus
ispell
aspell
aspellDicts.en
aspellDicts.en-computers
texlive.combined.scheme-full
appimage-run
libappimage
transmission_4-gtk
lsof
# ruby
# janet
# jpm
guile
python311
python311Packages.pip
python311Packages.mido
python311Packages.simpleeval
python311Packages.parsedatetime
python311Packages.pytz
python311Packages.pint
python311Packages.babel
python311Packages.requests
ruff
(sbcl.withPackages (ps: with ps; [
# asdf_3_3
cffi
arrow-macros
alexandria
serapeum
]))
ccl
racket
gdu
poppler_utils
editorconfig-core-c
# clang-tools
cljfmt
libxml2
gdtoolkit_4
openssl.out
nixfmt-rfc-style
wl-clipboard
maim
php
rustup
shfmt
html-tidy
tree-sitter
libsecret
samba4Full
shellcheck
# waylandpp.dev
wayland-utils
libffi.dev
nodejs_18
platformio-core
icloudpd
libheif.out
openal
pkg-config
ftgl
gperf
numbat
# libGLU
glpng
# libGL
nurl
freecad
procs
rpi-imager
caligula
prusa-slicer
# global node packages
nodePackages.typescript-language-server
nodePackages.vscode-langservers-extracted
nodePackages.prettier
nodePackages.javascript-typescript-langserver
nodePackages.stylelint
nodePackages.svelte-language-server
nodePackages.typescript
nodePackages.js-beautify
nixd
nixdoc
nix-init
fishPlugins.foreign-env
fishPlugins.z
fishPlugins.fzf-fish
fishPlugins.bass
fishPlugins.autopair
fishPlugins.forgit
fishPlugins.colored-man-pages
imgcat
via
vial
bitwarden-cli
bitwarden-desktop
tailscale
trayscale
font-manager
scribus
pdfarranger
tdf
pdfchain
pdftk
ghostscript
zathura
gpu-viewer
mesa-demos
gnomeExtensions.just-perfection
gnomeExtensions.dash-to-dock
# gnomeExtensions.solaar-extension
gnomeExtensions.paperwm
gnomeExtensions.custom-hot-corners-extended
gnomeExtensions.media-controls
gnomeExtensions.looking-glass-button
gnomeExtensions.auto-power-profile
gnomeExtensions.appindicator
gnome-software
gnome-tweaks
gnome-photos
gpaste
ulauncher
soundconverter
gtop
wmctrl
colloid-gtk-theme
colloid-icon-theme
whitesur-gtk-theme
whitesur-cursors
whitesur-icon-theme
bibata-cursors
icloudpd
squirreldisk
papers
newsflash
planify
borgbackup
vorta
stirling-pdf
trash-cli
wineWowPackages.stagingFull
winetricks
(yabridge.override {
wine = wineWowPackages.stagingFull;
})
(yabridgectl.override {
wine = wineWowPackages.stagingFull;
})
spice
spice-gtk
spice-protocol
virt-viewer
virt-manager
bfg-repo-cleaner
# opensnitch
# opensnitch-ui
thunderbird-latest
emojify
smile
gnomeExtensions.smile-complementary-extension
impression
zoom-us
nyxt
ungoogled-chromium
obsidian
vlc
unstable.polychromatic
discord
slack
signal-desktop
calcurse
onlyoffice-desktopeditors
libreoffice
hyphenDicts.en_US
plexamp
amberol
carla
# audacity
tenacity
supercollider-with-plugins
#unstable.bitwig-studio
bitwig-studio-beta
blender
davinci-resolve-studio
steam
zotero
jre
tesseract
handbrake
renoise
krita
darling
darling-dmg
rawtherapee
inkscape
gimp
epsonscan2
kicad
turbocase
openscad-unstable
openscad-lsp
picard
evolutionWithPlugins
mpv
plugdata
pavucontrol
qpwgraph
helvum
coppwr
alsa-utils
alsa-tools
clapper
ardour
parinfer-rust-emacs
dockfmt
mioctl
# Audio plugins (LV2, VST2, VST3, LADSPA)
eq10q
geonkick
bespokesynth
helm
surge
odin2
calf
chow-kick
chow-phaser
chow-centaur
chow-tape-model
easyeffects
vcv-rack
cardinal
roomeqwizard
guitarix
# paulxstretch
vital
helio-workstation
stochas
tal-bassline
tal-j8
tal-u-no-lx
amplocker
chair-snare
chair-cymb
tus-vavra
tus-nodal-red
tus-xenia
tus-ostirus
tus-osirus
# Fonts
fira-code
fira
cooper-hewitt
ibm-plex
jetbrains-mono
iosevka
spleen
fira-code-symbols
powerline-fonts
nerdfonts
noto-fonts-color-emoji
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
];
username = "emenel";
homeDirectory = "/home/emenel";
sessionPath = [ "/home/emenel/.config/emacs/bin" "/home/emenel/.npm-packages/bin" "/home/emenel/Applications" "/home/emenel/.local/bin" "/home/emenel/.local/share" "/home/emenel/.nix-profile/lib"];
sessionVariables = {
WINEFSYNC = 1;
PKG_CONFIG_PATH = "/home/emenel/.nix-profile/lib/pkgconfig:/home/emenel/.nix-profile/lib64/pkgconfig:/home/emenal/.nix-profile/share/pkgconfig";
GI_TYPELIB_PATH = "/run/current-system/sw/lib/girepository-1.0";
BW_CLIENTID = "$(cat ${config.sops.defaultSymlinkPath}/bw_client_id)";
BW_CLIENTSECRET = "$(cat ${config.sops.defaultSymlinkPath}/bw_api_key)";
NIXOS_OZONE_WL = "1";
};
stateVersion = "24.05";
};
fonts.fontconfig = {
enable = true;
};
sops = {
age.keyFile = "/home/emenel/.config/sops/age/keys.txt"; # must have no password!
defaultSopsFile = ./secrets.yaml;
defaultSymlinkPath = "/run/user/1000/secrets";
defaultSecretsMountPoint = "/run/user/1000/secrets.d";
secrets = {
bw_client_id = {
path = "${config.sops.defaultSymlinkPath}/bw_client_id";
};
bw_api_key = {
path = "${config.sops.defaultSymlinkPath}/bw_api_key";
};
ssh_key = {
path = "${config.sops.defaultSymlinkPath}/ssh_key";
};
borg_url = {
path = "${config.sops.defaultSymlinkPath}/borg_url";
};
};
};
programs = {
home-manager.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
};
fish = {
enable = true;
shellAliases = {
"ls" = "eza";
".j" = "just -g";
"em" = "emacsclient -n -r";
"mkdir" = "mkdir -pv";
};
interactiveShellInit = ''
bind --erase \ct
'';
plugins = [
{
name = "upto";
src = pkgs.fetchFromGitHub {
owner = "Markcial";
repo = "upto";
rev = "2d1f35453fb55747d50da8c1cb1809840f99a646";
sha256 = "sha256-Lv2XtP2x9dkIkUUjMBWVpAs/l55Ztu7gIjKYH6ZzK4s=";
};
}
# {
# name = "zellij.fish";
# src = pkgs.fetchFromGitHub {
# owner = "kpbaks";
# repo = "zellij.fish";
# rev = "0b2393b48b55a7f3b200b5a12ac0cf26444b7172";
# sha256 = "sha256-Nxo6usCI5tqLJ/CZ1YXtCFJ+piy1DGlzFIi9/HSgDIk=";
# };
# }
];
};
starship = {
enable = true;
};
mu.enable = true;
mbsync.enable = true;
msmtp.enable = true;
emacs = {
enable = true;
package = (pkgs.emacs.override {
withXwidgets = true;
withGTK3 = true;
withNativeCompilation = true;
withTreeSitter = true;
withImageMagick = true;
});
extraPackages = epkgs: [
epkgs.mu4e
epkgs.vterm
epkgs.sly
epkgs.sly-quicklisp
epkgs.geiser-racket
epkgs.editorconfig
epkgs.shfmt
epkgs.nixpkgs-fmt
epkgs.nixfmt
epkgs.parinfer-rust-mode
epkgs.tree-sitter-langs
epkgs.gpastel
epkgs.emacs-everywhere
];
};
ripgrep = {
enable = true;
};
thefuck = {
enable = true;
};
ghostty = {
enable = true;
package = inputs.ghostty.packages.x86_64-linux.ghostty;
enableFishIntegration = true;
};
wezterm = {
enable = true;
package = inputs.wezterm.packages.${pkgs.system}.default;
};
# zellij = {
# enable = true;
# package = pkgs.unstable.zellij;
# enableFishIntegration = true;
# enableBashIntegration = true;
# };
bat = {
enable = true;
};
borgmatic = {
enable = true;
backups = {
eddie = {
location = {
patterns = [
"R /home/emenel"
"- home/emenel/.cache"
"- home/emenel/.nix*"
"- home/emenel/.steam*"
"- home/emenel/Dropbox"
"- home/emenel/Sync"
"- home/emenel/.dropbox*"
"- home/emenel/.BitwigStudio"
"- home/emenel/.local/share/bitwig"
];
repositories = [
{
"path" = "ssh://oyi3ydnz@oyi3ydnz.repo.borgbase.com/./repo";
"label" = "eddie on borgbase";
}
];
};
retention = {
keepDaily = 3;
keepHourly = 3;
keepMonthly = 2;
};
};
};
};
eza = {
enable = true;
};
fd = {
enable = true;
};
fzf = {
enable = true;
enableFishIntegration = false;
};
broot = {
enable = true;
};
git = {
enable = true;
lfs.enable = true;
};
htop.enable = true;
nnn = {
enable = true;
};
pandoc.enable = true;
password-store.enable = true;
#waybar.enable = true;
lazygit.enable = true;
jq.enable = true;
firefox.enable = true;
# thunderbird = {
# enable = true;
# package = pkgs.thunderbird-latest;
# };
rbw = {
enable = true;
package = pkgs.rbw-latest;
};
};
dconf.settings = {
"org/gnome/desktop/background" = {
picture-options = "none";
primary-color = "#333333";
};
"org/gnome/shell/keybindings" = {
shift-overview-up = ["disabled"];
shift-overview-down = ["disabled"];
switch-to-application-1 = ["disabled"];
switch-to-application-2 = ["disabled"];
switch-to-application-3 = ["disabled"];
switch-to-application-4 = ["disabled"];
switch-to-application-5 = ["disabled"];
switch-to-application-6 = ["disabled"];
switch-to-application-7 = ["disabled"];
switch-to-application-8 = ["disabled"];
switch-to-application-9 = ["disabled"];
switch-to-application-10 = ["disabled"];
};
"org/gnome/desktop/wm/keybindings" = {
switch-to-workspace-up = ["disabled"];
switch-to-workspace-down = ["disabled"];
move-to-workspace-up = ["disabled"];
move-to-workspace-down = ["disabled"];
};
};
nixpkgs.config.packageOverrides = pkgs: {
renoise = pkgs.renoise.override {
releasePath = ../binary-installers/rns_344_linux_x86_64.tar.gz;
};
};
services = {
flatpak.enable = true;
syncthing = {
enable = true;
};
borgmatic = {
enable = true;
};
gpg-agent = {
enable = true;
};
emacs = {
enable = true;
defaultEditor = true;
package = pkgs.emacs;
socketActivation.enable = true;
client = {
enable = true;
arguments = ["-n" "-r"];
};
};
};
xdg.systemDirs.data = [
"/home/emenel/.local/share/applications/wine/Programs"
"/home/emenel/.local/share/applications"
"/var/lib/flatpak/exports/share"
"/home/emenel/.local/share/flatpak/exports/share"
"/home/emenel/.nix-profile/share/applications"
];
services.flatpak.packages = [
"com.github.tchx84.Flatseal"
"nl.hjdskes.gcolor3"
"org.linuxshowplayer.LinuxShowPlayer"
];
systemd.user = {
enable = true;
startServices = "sd-switch"; # auto reload services when home is rebuilt
sessionVariables = {
GSK_RENDERER = "ngl";
MOZ_ENABLE_WAYLAND = 1;
};
services = {
syncthingtray = {
Service.ExecStart = lib.mkForce "${pkgs.syncthingtray}/bin/syncthingtray --wait";
};
ulauncher = {
Unit = {
Description = "Start Ulauncher";
After = "graphical-session.target";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
Restart = "always";
RestartSec = 1;
ExecStart = "${pkgs.ulauncher}/bin/ulauncher --hide-window";
};
};
};
};
# moving files!
xdg.configFile."just/justfile".source = ../dotfiles/dot_config/just/justfile;
xdg.configFile."starship.toml".source = ../dotfiles/dot_config/starship.toml;
xdg.configFile."ghostty".source = ../dotfiles/dot_config/ghostty;
xdg.configFile."wezterm".source = ../dotfiles/dot_config/wezterm;
xdg.configFile."git".source = ../dotfiles/dot_config/git;
xdg.configFile."rbw".source = ../dotfiles/dot_config/rbw;
home.file.".ssh/config".source = ../dotfiles/dot_ssh/config;
home.file.".npmrc".source = ../dotfiles/dot_npmrc;
home.file.".vst3/yabridge/yabridge.toml".source = ../dotfiles/dot_vst3/yabridge.toml;
home.file.".sbclrc".source = ../dotfiles/dot_sbclrc;
home.file.".signature".source = ../dotfiles/dot_signature;
home.file.".config/fish/functions" = {
source = ../dotfiles/dot_config/fish/functions;
recursive = true;
};
home.file.".config/fish/completions" = {
source = ../dotfiles/dot_config/fish/completions;
recursive = true;
};
xdg.configFile."emacs".enable = false;
xdg.configFile."zellij/config.kdl".text = ''
theme "molokai-dark"
pane_frames false
default_shell "fish"
copy_on_select false
keybinds {
shared {
bind "Ctrl Alt Left" { GoToPreviousTab; }
bind "Ctrl Alt Right" { GoToNextTab; }
bind "Ctrl Alt Up" { FocusPreviousPane; }
bind "Ctrl Alt Down" { FocusNextPane; }
bind "Ctrl Enter" { NewPane "Down"; }
bind "Ctrl Shift Enter" { NewPane "Right"; }
}
locked {
bind "Ctrl t" { NewTab; }
bind "Ctrl w" { CloseTab; }
}
}
'';
home.file.".msmtprc".source = ../dotfiles/dot_msmtprc;
home.file.".mbsyncrc".source = ../dotfiles/dot_mbsyncrc;
xdg.configFile."isyncrc".enable = false;
home.file.".local/bin" = {
source = ../dotfiles/dot_local/bin;
recursive = true;
};
home.file.".local/share/flf".source = ../dotfiles/dot_local/share/flf;
home.file.".local/share/The Usual Suspects/Vavra" = {
recursive = true;
source = ../packages/the-usual-suspects/vavra;
};
home.file.".local/share/The Usual Suspects/Xenia" = {
recursive = true;
source = ../packages/the-usual-suspects/xenia;
};
home.file.".local/share/The Usual Suspects/Osirus" = {
recursive = true;
source = ../packages/the-usual-suspects/osirus;
};
home.file.".local/share/The Usual Suspects/OsTIrus" = {
recursive = true;
source = ../packages/the-usual-suspects/ostirus;
};
home.file.".local/share/The Usual Suspects/NodalRed2x" = {
recursive = true;
source = ../packages/the-usual-suspects/nodal-red;
};
}