nixos/malte/home.nix

166 lines
3.7 KiB
Nix
Raw Normal View History

2021-07-18 13:33:50 +02:00
{ pkgs, lib, config, ... }:
2021-05-19 23:08:18 +02:00
2021-05-26 21:13:02 +02:00
let
script = name: path: pkgs.writeScriptBin name (builtins.readFile path);
2021-06-15 18:56:08 +02:00
wrap = name: pkg: postBuild:
pkgs.symlinkJoin {
inherit name postBuild;
paths = [ pkg ];
buildInputs = [ pkgs.makeWrapper ];
};
2021-07-18 13:33:50 +02:00
fixGdkIfWayland = name: pkg:
if config.useLegacyX11 then
pkg
else
wrap name pkg ''
wrapProgram $out/bin/${name} --set GDK_BACKEND x11
'';
fixElectronIfWayland = name: pkg:
if config.useLegacyX11 then
pkg
else
wrap name pkg ''
wrapProgram $out/bin/${name} --add-flags "--enable-features=UseOzonePlatform --ozone-platform=wayland"
'';
2021-06-11 19:03:44 +02:00
2021-05-26 21:13:02 +02:00
in {
2021-05-19 23:08:18 +02:00
imports = [
./git.nix
./neovim.nix
./shell.nix
./kitty.nix
2021-05-19 23:19:34 +02:00
./sway.nix
./gpg.nix
./pass.nix
2021-05-23 15:58:16 +02:00
./zathura.nix
2021-06-04 16:07:13 +02:00
#./unison.nix
./taskwarrior.nix
2021-05-26 21:13:02 +02:00
#./i3.nix
2021-06-26 21:10:47 +02:00
./audio-fix.nix
2021-06-26 21:11:49 +02:00
./game-launchers.nix
2021-06-29 11:25:54 +02:00
./khal.nix
./cataclysm-dda.nix
2021-07-18 13:33:50 +02:00
#./desktop.nix
./restic-backups.nix
2021-05-19 23:08:18 +02:00
];
2021-07-18 13:33:50 +02:00
options = {
useLegacyX11 = lib.mkOption {
description = "Use X11 instead of Wayland. This will enable i3 and such.";
type = lib.types.bool;
default = false;
};
};
2021-05-19 23:08:18 +02:00
config = {
2021-05-24 14:46:33 +02:00
2021-05-19 23:08:18 +02:00
home = {
2021-07-18 13:33:50 +02:00
packages = with pkgs;
[
element-desktop # FIXME: Once it works again? (fixElectronIfWayland "element-desktop" element-desktop)
2021-07-18 13:33:50 +02:00
(fixElectronIfWayland "signal-desktop" signal-desktop)
(fixGdkIfWayland "Discord" discord)
(fixGdkIfWayland "losslesscut" losslesscut-bin)
(fixGdkIfWayland "skypeforlinux" skype)
(pkgs.callPackage ../pkgs/2i-emulator.nix { })
(script "hwp2021pizzazz" ../scripts/hwp2021pizzazz.py)
2021-10-13 17:38:24 +02:00
(fenix.latest.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
2021-10-17 12:48:54 +02:00
cargo-readme
2021-07-18 13:33:50 +02:00
feh
geekbench
gimp
gnome3.nautilus
gnome3.sushi
helvum
hledger
htop
inkscape
kbdlight
libnotify
libreoffice
logisim
2021-10-13 22:57:04 +02:00
mensa
2021-07-18 13:33:50 +02:00
mosh
mpv-with-scripts
2021-07-18 13:33:50 +02:00
nixfmt
patchelf
pavucontrol
pdftk
2021-08-29 16:17:38 +02:00
pkgs."2a-emulator"
2021-07-18 13:33:50 +02:00
ponymix
pulseaudio
pulseeffects-pw
python3
qt5ct
qucs
qucs-s
rtorrent
2021-10-13 17:38:24 +02:00
rust-analyzer-nightly
2021-07-18 13:33:50 +02:00
screenfetch
2021-08-29 16:17:38 +02:00
sshfs
2021-07-18 13:33:50 +02:00
tdesktop
unar
unison
vlc
xdg_utils
xournalpp
youtube-dl
] ++ (if config.useLegacyX11 then
[
# X11-only
]
else [
# Wayland-only
wev
wl-clipboard
]);
# Use default US, so that games don't get too confused. But let me
# switch to a more comfortable workman layout!
2021-05-19 23:08:18 +02:00
keyboard = {
2021-07-18 13:33:50 +02:00
layout = "us,us";
variant = ",workman";
options = [ "compose:rctrl" "grp:alt_space_toggle" "grp_led:caps" ];
2021-05-19 23:08:18 +02:00
};
2021-07-18 13:33:50 +02:00
# Use some german units and formats but with the english language!
2021-05-19 23:08:18 +02:00
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";
};
2021-05-23 17:55:37 +02:00
2021-05-19 23:08:18 +02:00
};
2021-05-23 17:55:37 +02:00
2021-07-09 10:46:19 +02:00
programs.firefox.enable = true;
2021-07-06 18:23:17 +02:00
programs.obs-studio = {
enable = true;
plugins = [
pkgs.obs-studio-plugins.wlrobs
#pkgs.obs-studio-plugins.v4l2sink
];
};
2021-05-23 17:55:37 +02:00
fonts.fontconfig.enable = true;
2021-06-16 16:47:50 +02:00
services.mpris-proxy.enable = true;
2021-05-19 23:08:18 +02:00
};
}