nixos/users/malte/home.nix

190 lines
4.2 KiB
Nix

{ pkgs, lib, config, ... }:
let
script = name: path: pkgs.writeScriptBin name (builtins.readFile path);
wrap = name: pkg: postBuild:
pkgs.symlinkJoin {
inherit name postBuild;
paths = [ pkg ];
buildInputs = [ pkgs.makeWrapper ];
};
fixGdk = name: pkg:
wrap name pkg ''
wrapProgram $out/bin/${name} --set GDK_BACKEND x11
'';
fixElectron = name: pkg:
wrap name pkg ''
wrapProgram $out/bin/${name} --add-flags "--enable-features=UseOzonePlatform --ozone-platform=wayland"
'';
lutrisWithLibs = pkgs.lutris.override {
extraLibraries = pkgs:
with pkgs; [
xz
libstdcxx5
# For Hotline: Miami
expat
openal
nvidia_cg_toolkit
# For Dead Cells
# Provides libXss.1
xorg.libXScrnSaver
];
extraPkgs = pkgs: with pkgs; [ ];
};
in {
imports = [
./git.nix
./shell.nix
./kitty.nix
./sway.nix
./gpg.nix
./pass.nix
./zathura.nix
./taskwarrior.nix
./scarlett-solo.nix
./khal.nix
./cataclysm-dda.nix
./kakoune.nix
./colors.nix
./mpv.nix
./broot.nix
../modules/restic-backup.nix
];
config = {
settings.sway.enable = true;
home = {
packages = with pkgs; [
aseprite
element-desktop # FIXME: Once it works again? (fixElectron "element-desktop" element-desktop)
signal-desktop # FIXME: Once it works again? (fixElectron "signal-desktop" signal-desktop)
(fixGdk "Discord" discord)
(fixGdk "losslesscut" losslesscut-bin)
(fixGdk "skypeforlinux" skype)
(pkgs.callPackage ../../pkgs/2i-emulator.nix { })
(fenix.latest.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
(polymc.override {
msaClientID = builtins.readFile ../../build-secrets/polymc-client-id;
})
jq
cargo-readme
cargo-edit
cargo-udeps
feh
geekbench
gimp
gnome3.nautilus
gnome3.sushi
helvum
hledger
htop
inkscape
kbdlight
libnotify
#libreoffice-fresh
logisim
lutrisWithLibs
mensa
mosh
nixfmt
patchelf
pavucontrol
pdftk
pkgs."2a-emulator"
ponymix
pulseaudio
pulseeffects-pw
python3
qt5ct
qucs
qucs-s
rtorrent
screenfetch
sshfs
tdesktop
unar
unison
vlc
xdg_utils
xournalpp
yt-dlp # youtube-dl alternative that doesn't suck
wev
wl-clipboard
];
sessionVariables = {
LEDGER_FILE = "/home/${config.home.username}/ledger/current.journal";
};
# Use default US, so that games don't get too confused. But let me
# switch to a more comfortable workman layout!
keyboard = {
layout = "us,us";
variant = ",workman";
options = [ "compose:rctrl" "grp:alt_space_toggle" "grp_led:caps" ];
};
# Use some german units and formats but with the english language!
language = {
base = "en_US.UTF-8";
address = "de_DE.UTF-8";
measurement = "de_DE.UTF-8";
monetary = "de_DE.UTF-8";
name = "de_DE.UTF-8";
paper = "de_DE.UTF-8";
telephone = "de_DE.UTF-8";
time = "de_DE.UTF-8";
};
};
programs.firefox.enable = true;
programs.obs-studio = {
enable = true;
plugins = [
pkgs.obs-studio-plugins.wlrobs
#pkgs.obs-studio-plugins.v4l2sink
];
};
# Configure restic backups
services.restic = {
enable = true;
paths = [
"/home/malte/Documents"
"/home/malte/Lieder"
"/home/malte/Pictures"
"/home/malte/Tasks"
"/home/malte/Uni"
"/home/malte/helden"
"/home/malte/ledger"
"/home/malte/timewarrior"
"/home/malte/vimwiki"
];
};
fonts.fontconfig.enable = true;
services.mpris-proxy.enable = true;
services.pasystray.enable = true;
home.file.".yubico/authorized_yubikeys".text = "malte:ccccccvblrrf";
};
}