2022-03-23 13:10:18 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
nixosConfig,
|
2022-06-05 14:16:32 +02:00
|
|
|
nix-colors,
|
2022-03-23 13:10:18 +01:00
|
|
|
...
|
|
|
|
}: let
|
2022-12-01 22:54:40 +01:00
|
|
|
notDeck = !nixosConfig.users.custom.malte.steamDeck;
|
2021-05-26 21:13:02 +02:00
|
|
|
|
2021-06-15 18:56:08 +02:00
|
|
|
wrap = name: pkg: postBuild:
|
|
|
|
pkgs.symlinkJoin {
|
|
|
|
inherit name postBuild;
|
2022-03-23 13:10:18 +01:00
|
|
|
paths = [pkg];
|
|
|
|
buildInputs = [pkgs.makeWrapper];
|
2021-06-15 18:56:08 +02:00
|
|
|
};
|
|
|
|
|
2021-10-31 11:02:32 +01:00
|
|
|
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"
|
|
|
|
'';
|
2021-06-11 19:03:44 +02:00
|
|
|
|
2022-03-08 09:57:54 +01:00
|
|
|
lutrisWithLibs = pkgs.lutris.override {
|
2022-03-12 09:29:54 +01:00
|
|
|
extraLibraries = pkgs:
|
|
|
|
with pkgs; [
|
|
|
|
xz
|
|
|
|
libstdcxx5
|
|
|
|
# For Hotline: Miami
|
|
|
|
expat
|
|
|
|
openal
|
|
|
|
nvidia_cg_toolkit
|
2022-03-20 13:24:10 +01:00
|
|
|
# For Dead Cells
|
|
|
|
# Provides libXss.1
|
|
|
|
xorg.libXScrnSaver
|
2022-03-12 09:29:54 +01:00
|
|
|
];
|
2022-03-08 09:57:54 +01:00
|
|
|
};
|
2021-05-26 21:13:02 +02:00
|
|
|
in {
|
2021-05-19 23:08:18 +02:00
|
|
|
imports = [
|
|
|
|
./git.nix
|
|
|
|
./shell.nix
|
|
|
|
./kitty.nix
|
2021-05-19 23:19:34 +02:00
|
|
|
./sway.nix
|
2021-05-22 22:17:13 +02:00
|
|
|
./gpg.nix
|
2022-04-03 00:49:00 +02:00
|
|
|
./mail.nix
|
2021-05-22 22:17:13 +02:00
|
|
|
./pass.nix
|
2021-05-23 15:58:16 +02:00
|
|
|
./zathura.nix
|
2021-05-25 15:02:16 +02:00
|
|
|
./taskwarrior.nix
|
2021-11-29 16:36:30 +01:00
|
|
|
./scarlett-solo.nix
|
2021-08-18 15:00:41 +02:00
|
|
|
./cataclysm-dda.nix
|
2021-12-01 10:16:59 +01:00
|
|
|
./kakoune.nix
|
2022-09-12 13:00:29 +02:00
|
|
|
./helix.nix
|
2021-12-22 21:37:44 +01:00
|
|
|
./mpv.nix
|
2021-12-24 16:10:44 +01:00
|
|
|
./broot.nix
|
2022-12-24 00:20:51 +01:00
|
|
|
./hypr.nix
|
2022-01-13 21:27:08 +01:00
|
|
|
../modules/restic-backup.nix
|
2022-03-22 18:33:37 +01:00
|
|
|
../modules/synchronize-calendars.nix
|
2022-04-10 12:59:07 +02:00
|
|
|
../modules/persway.nix
|
2022-04-12 16:25:38 +02:00
|
|
|
../modules/protonmail-bridge.nix
|
2022-05-08 21:41:26 +02:00
|
|
|
../modules/darkman.nix
|
2022-06-14 20:59:54 +02:00
|
|
|
../modules/colors.nix
|
2021-05-19 23:08:18 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
2022-12-01 22:54:40 +01:00
|
|
|
settings.sway.enable = notDeck;
|
2022-12-24 00:20:51 +01:00
|
|
|
settings.hyprland.enable = notDeck;
|
2022-12-01 22:54:40 +01:00
|
|
|
settings.mail.enable = notDeck;
|
|
|
|
settings.taskwarrior.enable = notDeck;
|
2022-03-12 23:23:53 +01:00
|
|
|
|
2022-06-14 20:59:54 +02:00
|
|
|
# Define my color schemes
|
|
|
|
colorsLight = nix-colors.colorSchemes."gruvbox-light-medium";
|
|
|
|
colorsDark = nix-colors.colorSchemes."gruvbox-dark-medium";
|
2022-06-05 14:16:32 +02:00
|
|
|
|
2021-05-19 23:08:18 +02:00
|
|
|
home = {
|
2022-12-01 22:54:40 +01:00
|
|
|
packages =
|
|
|
|
[
|
2022-12-08 12:07:35 +01:00
|
|
|
pkgs.prismlauncher
|
2022-12-01 22:54:40 +01:00
|
|
|
pkgs.jq
|
|
|
|
pkgs.mosh
|
|
|
|
pkgs.wl-clipboard
|
|
|
|
lutrisWithLibs
|
|
|
|
]
|
|
|
|
++ (lib.optionals notDeck (with pkgs; [
|
|
|
|
aseprite
|
|
|
|
darkman
|
|
|
|
alejandra
|
|
|
|
element-desktop-wayland
|
|
|
|
signal-desktop # FIXME: Once it works again? (fixElectron "signal-desktop" signal-desktop)
|
|
|
|
(fixGdk "Discord" discord)
|
|
|
|
(fixGdk "losslesscut" losslesscut-bin)
|
|
|
|
(fixGdk "skypeforlinux" skypeforlinux)
|
|
|
|
(pkgs.callPackage ../../pkgs/2i-emulator.nix {})
|
|
|
|
(fenix.latest.withComponents [
|
|
|
|
"cargo"
|
|
|
|
"clippy"
|
|
|
|
"rust-src"
|
|
|
|
"rustc"
|
|
|
|
"rustfmt"
|
|
|
|
])
|
|
|
|
(fixElectron "mattermost-desktop" mattermost-desktop)
|
|
|
|
cargo-readme
|
|
|
|
cargo-edit
|
|
|
|
cargo-udeps
|
|
|
|
colmena
|
|
|
|
feh
|
|
|
|
geekbench
|
|
|
|
gimp
|
|
|
|
gnome3.nautilus
|
|
|
|
gnome3.sushi
|
|
|
|
gnome.simple-scan
|
|
|
|
helvum
|
|
|
|
hledger
|
|
|
|
inkscape
|
|
|
|
kbdlight
|
|
|
|
libnotify
|
|
|
|
libreoffice-fresh
|
|
|
|
logisim
|
|
|
|
mensa
|
|
|
|
nickel
|
|
|
|
patchelf
|
|
|
|
pavucontrol
|
|
|
|
pdftk
|
|
|
|
pkgs."2a-emulator"
|
|
|
|
ponymix
|
|
|
|
pulseaudio
|
|
|
|
pulseeffects-pw
|
|
|
|
python3
|
|
|
|
qt5ct
|
|
|
|
qucs
|
|
|
|
qucs-s
|
|
|
|
rtorrent
|
|
|
|
screenfetch
|
|
|
|
sshfs
|
|
|
|
tdesktop
|
|
|
|
unar
|
|
|
|
unison
|
|
|
|
vlc
|
|
|
|
vscode
|
|
|
|
xdg_utils
|
|
|
|
xournalpp
|
|
|
|
yt-dlp # youtube-dl alternative that doesn't suck
|
|
|
|
wev
|
|
|
|
]));
|
|
|
|
|
|
|
|
sessionVariables = lib.mkIf notDeck {
|
2022-01-21 09:15:17 +01:00
|
|
|
LEDGER_FILE = "/home/${config.home.username}/ledger/current.journal";
|
2022-03-20 13:25:32 +01:00
|
|
|
MOZ_USE_XINPUT2 = "1";
|
2022-01-21 09:15:17 +01:00
|
|
|
};
|
|
|
|
|
2021-07-18 13:33:50 +02:00
|
|
|
# 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";
|
2022-03-23 13:10:18 +01:00
|
|
|
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
|
|
|
|
2022-03-20 13:25:32 +01:00
|
|
|
# Make sure firefox is my default browser
|
2021-07-09 10:46:19 +02:00
|
|
|
programs.firefox.enable = true;
|
|
|
|
|
2022-12-01 22:54:40 +01:00
|
|
|
programs.obs-studio = lib.mkIf notDeck {
|
2021-07-06 18:23:17 +02:00
|
|
|
enable = true;
|
|
|
|
plugins = [
|
|
|
|
pkgs.obs-studio-plugins.wlrobs
|
|
|
|
#pkgs.obs-studio-plugins.v4l2sink
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-01-13 21:27:08 +01:00
|
|
|
# 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"
|
2022-05-14 15:28:02 +02:00
|
|
|
"/home/malte/.local/share/cataclysm-dda"
|
2022-01-13 21:27:08 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-03-22 18:33:37 +01:00
|
|
|
# Configure calendar synchronization
|
2022-12-01 22:54:40 +01:00
|
|
|
services.synchronize-calendars = lib.mkIf notDeck {
|
2022-03-22 18:33:37 +01:00
|
|
|
enable = true;
|
|
|
|
user = "malte";
|
|
|
|
passwordFile = nixosConfig.sops.secrets."radicale-password".path;
|
|
|
|
defaultCalendar = "Malte";
|
|
|
|
};
|
|
|
|
|
2022-10-15 12:50:04 +02:00
|
|
|
# TODO: Merge with Marie's part
|
2022-12-01 22:54:40 +01:00
|
|
|
systemd.user.mounts."home-malte-to\\x2dbe\\x2dprinted" = lib.mkIf notDeck {
|
2022-10-15 12:50:04 +02:00
|
|
|
Unit = {
|
|
|
|
Description = "Directory that prints everything";
|
|
|
|
};
|
|
|
|
Install = {
|
|
|
|
WantedBy = ["default.target"];
|
|
|
|
};
|
|
|
|
Mount = {
|
|
|
|
What = "sftp@faunus-ater:/srv/to-be-printed";
|
|
|
|
Where = "/home/malte/to-be-printed";
|
|
|
|
Type = "fuse.sshfs";
|
|
|
|
Options = "IdentityFile=/run/secrets/sftp-key";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-12-01 22:54:40 +01:00
|
|
|
services.protonmailBridge.enable = notDeck;
|
2022-04-12 16:25:38 +02:00
|
|
|
|
2022-12-01 22:54:40 +01:00
|
|
|
services.darkman.enable = notDeck;
|
2022-05-09 09:25:44 +02:00
|
|
|
|
2022-12-01 22:54:40 +01:00
|
|
|
fonts.fontconfig.enable = notDeck;
|
2021-06-16 16:47:50 +02:00
|
|
|
|
2022-12-01 22:54:40 +01:00
|
|
|
services.mpris-proxy.enable = notDeck;
|
|
|
|
services.pasystray.enable = notDeck;
|
2022-03-13 11:34:59 +01:00
|
|
|
|
|
|
|
home.file.".yubico/authorized_yubikeys".text = "malte:ccccccvblrrf";
|
2022-08-15 09:47:37 +02:00
|
|
|
|
|
|
|
home.stateVersion = "18.09";
|
2021-05-19 23:08:18 +02:00
|
|
|
};
|
|
|
|
}
|