2022-03-23 13:10:18 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
2024-04-13 23:27:39 +02:00
|
|
|
lib,
|
2024-08-17 22:18:04 +02:00
|
|
|
config,
|
2022-03-23 13:10:18 +01:00
|
|
|
nixosConfig,
|
|
|
|
...
|
|
|
|
}: let
|
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
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
};
|
2023-11-07 15:23:43 +01:00
|
|
|
|
2023-11-12 22:33:39 +01:00
|
|
|
firefoxWithProfile = exe: profile:
|
|
|
|
pkgs.writeShellApplication {
|
|
|
|
name = exe;
|
|
|
|
runtimeInputs = [pkgs.firefox];
|
|
|
|
text = ''
|
|
|
|
firefox -P "${profile}"
|
|
|
|
'';
|
|
|
|
};
|
2023-12-14 10:29:29 +01:00
|
|
|
|
2024-03-23 12:24:26 +01:00
|
|
|
nnnIcons = pkgs.nnn.override {withNerdIcons = true;};
|
2021-05-26 21:13:02 +02:00
|
|
|
in {
|
2021-05-19 23:08:18 +02:00
|
|
|
imports = [
|
2024-03-10 17:11:16 +01:00
|
|
|
./modules/git.nix
|
|
|
|
./modules/shell.nix
|
|
|
|
./modules/kitty.nix
|
|
|
|
./modules/gpg.nix
|
|
|
|
./modules/mail.nix
|
|
|
|
./modules/pass.nix
|
|
|
|
./modules/zathura.nix
|
|
|
|
./modules/scarlett-solo.nix
|
|
|
|
./modules/helix.nix
|
|
|
|
./modules/mpv.nix
|
|
|
|
./modules/hypr.nix
|
|
|
|
./modules/notes.nix
|
2022-01-13 21:27:08 +01:00
|
|
|
../modules/restic-backup.nix
|
2024-02-03 21:02:24 +01:00
|
|
|
../modules/profiles-cleanup.nix
|
2024-05-31 11:49:57 +02:00
|
|
|
../modules/aichat.nix
|
2021-05-19 23:08:18 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
2023-08-16 23:11:56 +02:00
|
|
|
settings.hyprland.enable = true;
|
|
|
|
settings.mail.enable = true;
|
2022-03-12 23:23:53 +01: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
|
2023-11-07 15:23:43 +01:00
|
|
|
(firefoxWithProfile "ff" "default")
|
|
|
|
(firefoxWithProfile "ff-work" "Work")
|
2022-12-01 22:54:40 +01:00
|
|
|
]
|
2023-08-16 23:11:56 +02:00
|
|
|
++ (with pkgs; [
|
2022-12-01 22:54:40 +01:00
|
|
|
alejandra
|
|
|
|
element-desktop-wayland
|
2023-12-14 10:29:29 +01:00
|
|
|
feh
|
2024-05-03 14:12:03 +02:00
|
|
|
(pkgs.discord.override {
|
|
|
|
withOpenASAR = true;
|
|
|
|
withVencord = true;
|
|
|
|
})
|
|
|
|
vesktop
|
2024-06-17 08:52:26 +02:00
|
|
|
(pkgs.callPackage ../../pkgs/mattermost-desktop.nix {})
|
2022-12-01 22:54:40 +01:00
|
|
|
(fixGdk "losslesscut" losslesscut-bin)
|
|
|
|
(fixGdk "skypeforlinux" skypeforlinux)
|
2023-04-14 17:24:55 +02:00
|
|
|
# geekbench
|
2022-12-01 22:54:40 +01:00
|
|
|
gimp
|
2024-08-06 08:58:56 +02:00
|
|
|
nautilus
|
|
|
|
sushi
|
|
|
|
simple-scan
|
2022-12-01 22:54:40 +01:00
|
|
|
helvum
|
|
|
|
hledger
|
|
|
|
inkscape
|
|
|
|
kbdlight
|
|
|
|
libnotify
|
2023-04-15 00:43:38 +02:00
|
|
|
libreoffice
|
2022-12-01 22:54:40 +01:00
|
|
|
mensa
|
2024-04-11 20:59:21 +02:00
|
|
|
mumble
|
2022-12-01 22:54:40 +01:00
|
|
|
nickel
|
|
|
|
patchelf
|
|
|
|
pavucontrol
|
|
|
|
pdftk
|
2023-12-14 10:29:29 +01:00
|
|
|
pkgs."2i-emulator"
|
2022-12-01 22:54:40 +01:00
|
|
|
ponymix
|
|
|
|
pulseaudio
|
|
|
|
python3
|
|
|
|
qt5ct
|
|
|
|
rtorrent
|
|
|
|
screenfetch
|
2023-12-14 10:29:29 +01:00
|
|
|
signal-desktop # FIXME: Once it works again? (fixElectron "signal-desktop" signal-desktop)
|
2022-12-01 22:54:40 +01:00
|
|
|
sshfs
|
|
|
|
tdesktop
|
|
|
|
unar
|
|
|
|
unison
|
|
|
|
vlc
|
|
|
|
vscode
|
2023-12-14 10:29:29 +01:00
|
|
|
wev
|
2022-12-01 22:54:40 +01:00
|
|
|
xdg_utils
|
|
|
|
xournalpp
|
|
|
|
yt-dlp # youtube-dl alternative that doesn't suck
|
2024-03-23 12:24:26 +01:00
|
|
|
nnnIcons
|
2024-10-16 14:01:13 +02:00
|
|
|
nushell
|
|
|
|
protonmail-desktop
|
2023-08-16 23:11:56 +02:00
|
|
|
]);
|
2022-12-01 22:54:40 +01:00
|
|
|
|
2023-08-16 23:11:56 +02:00
|
|
|
sessionVariables = {
|
2022-03-20 13:25:32 +01:00
|
|
|
MOZ_USE_XINPUT2 = "1";
|
2022-01-21 09:15:17 +01:00
|
|
|
};
|
|
|
|
|
2024-04-25 21:09:28 +02:00
|
|
|
pointerCursor = {
|
2024-08-06 11:45:14 +02:00
|
|
|
name = "phinger-cursors-dark";
|
2024-04-25 21:09:28 +02:00
|
|
|
package = pkgs.phinger-cursors;
|
|
|
|
size = 32;
|
|
|
|
gtk.enable = true;
|
|
|
|
};
|
|
|
|
|
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!
|
2024-01-09 20:30:44 +01:00
|
|
|
keyboard = null;
|
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
|
|
|
|
2024-02-03 21:02:24 +01:00
|
|
|
xdg.enable = true;
|
|
|
|
|
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;
|
|
|
|
|
2024-05-31 11:49:57 +02:00
|
|
|
programs.aichat = {
|
|
|
|
enable = true;
|
|
|
|
openaiApiKeyFile = nixosConfig.sops.secrets.openai-aichat-api-key.path;
|
|
|
|
settings = {
|
|
|
|
model = "openai:gpt-4o";
|
|
|
|
clients = [
|
|
|
|
{type = "openai";}
|
|
|
|
];
|
|
|
|
save = true;
|
|
|
|
save_session = true;
|
|
|
|
highlight = true;
|
|
|
|
light_theme = true;
|
|
|
|
wrap = "auto";
|
|
|
|
keybindings = "vi";
|
|
|
|
};
|
|
|
|
roles = {
|
2024-06-03 10:26:39 +02:00
|
|
|
emoji.prompt = ''
|
2024-05-31 11:49:57 +02:00
|
|
|
I want you to translate the sentences I write into emojis.
|
|
|
|
I will write the sentence, and you will express it with emojis.
|
|
|
|
I don't want you to reply with anything but emoji.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-08-16 23:11:56 +02:00
|
|
|
programs.obs-studio = {
|
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/Uni"
|
|
|
|
"/home/malte/helden"
|
|
|
|
"/home/malte/ledger"
|
|
|
|
"/home/malte/vimwiki"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-11-12 22:33:39 +01:00
|
|
|
services.darkman = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
lat = 51.34;
|
|
|
|
lng = 12.36;
|
|
|
|
};
|
|
|
|
};
|
2022-05-09 09:25:44 +02:00
|
|
|
|
2023-08-16 23:11:56 +02:00
|
|
|
services.mpris-proxy.enable = true;
|
|
|
|
services.pasystray.enable = true;
|
2022-03-13 11:34:59 +01:00
|
|
|
|
2023-11-19 14:59:25 +01:00
|
|
|
services.pueue = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
2023-12-02 17:27:58 +01:00
|
|
|
shared = {};
|
|
|
|
daemon.callback = "notify-send \"Task {{ id }}\nCommand: {{ command }}\nStatus '{{ result }}'\nTook: $(${pkgs.bc}/bin/bc <<< \"{{end}} - {{start}}\") seconds\"";
|
2023-11-19 14:59:25 +01:00
|
|
|
};
|
|
|
|
};
|
2024-01-15 15:15:58 +01:00
|
|
|
programs.fish.shellAliases.p = "pueue";
|
2023-11-19 14:59:25 +01:00
|
|
|
|
|
|
|
fonts.fontconfig.enable = true;
|
|
|
|
|
2022-03-13 11:34:59 +01:00
|
|
|
home.file.".yubico/authorized_yubikeys".text = "malte:ccccccvblrrf";
|
2022-08-15 09:47:37 +02:00
|
|
|
|
2024-04-02 10:46:39 +02:00
|
|
|
xdg.configFile."nix/nix.conf".text = ''
|
|
|
|
include ${nixosConfig.sops.secrets.nix-conf-secrets.path}
|
|
|
|
'';
|
|
|
|
|
2024-04-13 23:27:39 +02:00
|
|
|
services.darkman.lightModeScripts."home-manager-generation" = lib.getExe (pkgs.writeShellApplication {
|
|
|
|
name = "darkman-switch-light-home-manager-generation";
|
|
|
|
runtimeInputs = [pkgs.findutils pkgs.gawk pkgs.home-manager pkgs.coreutils pkgs.bash];
|
|
|
|
text = ''
|
|
|
|
for path in $(home-manager generations | awk '{print $7}'); do
|
|
|
|
activate="$path/specialisation/light/activate"
|
|
|
|
if [ -x "$activate" ]; then
|
|
|
|
echo "$activate"
|
|
|
|
fi
|
|
|
|
done | head -n1 | xargs sh
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
|
|
|
services.darkman.darkModeScripts."home-manager-generation" = lib.getExe (pkgs.writeShellApplication {
|
|
|
|
name = "darkman-switch-dark-home-manager-generation";
|
|
|
|
runtimeInputs = [pkgs.findutils pkgs.gawk pkgs.home-manager pkgs.coreutils pkgs.bash];
|
|
|
|
text = ''
|
|
|
|
for path in $(home-manager generations | awk '{print $7}'); do
|
|
|
|
activate="$path/specialisation/dark/activate"
|
|
|
|
if [ -x "$activate" ]; then
|
|
|
|
echo "$activate"
|
|
|
|
fi
|
|
|
|
done | head -n1 | xargs sh
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
2022-08-15 09:47:37 +02:00
|
|
|
home.stateVersion = "18.09";
|
2021-05-19 23:08:18 +02:00
|
|
|
};
|
|
|
|
}
|