2024-08-02 22:32:29 -04:00
|
|
|
self: {
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
2024-11-20 20:12:24 -05:00
|
|
|
inherit (self.lib.hypr) mkBind;
|
2024-08-02 22:32:29 -04:00
|
|
|
inherit (self.inputs) jellyfin-flake;
|
|
|
|
in {
|
|
|
|
imports = [./dolphin.nix];
|
|
|
|
|
|
|
|
config = let
|
2024-11-20 20:12:24 -05:00
|
|
|
inherit (lib) getExe map optionals;
|
2024-08-02 22:32:29 -04:00
|
|
|
inherit (pkgs.writers) writeTOML;
|
|
|
|
|
|
|
|
flakeDir = config.environment.variables.FLAKE;
|
|
|
|
cfg = config.roles.desktop;
|
2024-08-30 19:44:22 -04:00
|
|
|
isNvidia = config.nvidia.enable;
|
2024-08-02 22:32:29 -04:00
|
|
|
|
|
|
|
restartTailscale = pkgs.writeShellScriptBin "restartTailscale" ''
|
|
|
|
sudo ${pkgs.systemd}/bin/systemctl restart tailscaled.service
|
|
|
|
'';
|
|
|
|
in {
|
|
|
|
programs.kdeconnect.enable = true;
|
|
|
|
|
|
|
|
security.sudo.extraRules = [
|
|
|
|
{
|
|
|
|
users = [cfg.user];
|
|
|
|
groups = [100];
|
|
|
|
commands = [
|
|
|
|
{
|
|
|
|
command = "${pkgs.systemd}/bin/systemctl restart tailscaled.service";
|
|
|
|
options = ["SETENV" "NOPASSWD"];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
home-manager.users.${cfg.user} = {
|
|
|
|
imports = [
|
|
|
|
../home/foot.nix
|
|
|
|
(import ../home/mpv.nix self)
|
|
|
|
(import ../home/obs.nix self)
|
|
|
|
|
|
|
|
({config, ...}: let
|
2024-08-30 19:44:22 -04:00
|
|
|
inherit (config.lib.file) mkOutOfStoreSymlink;
|
2024-08-05 16:23:53 -04:00
|
|
|
configDir = "${flakeDir}/nixosModules/desktop/environment/config";
|
2024-08-02 22:32:29 -04:00
|
|
|
in {
|
2024-08-30 19:44:22 -04:00
|
|
|
xdg.configFile = {
|
|
|
|
"dolphinrc".source = mkOutOfStoreSymlink "${configDir}/dolphinrc";
|
|
|
|
"kdeglobals".source = mkOutOfStoreSymlink "${configDir}/kdeglobals";
|
|
|
|
"kiorc".source = mkOutOfStoreSymlink "${configDir}/kiorc";
|
|
|
|
"mimeapps.list".source = mkOutOfStoreSymlink "${configDir}/mimeapps.list";
|
|
|
|
|
|
|
|
"satty/config.toml".source = writeTOML "satty.toml" {
|
|
|
|
general = {
|
|
|
|
early-exit = true;
|
|
|
|
copy-command = "wl-copy";
|
|
|
|
initial-tool = "crop";
|
|
|
|
output-filename = "${config.home.homeDirectory}/Pictures/Screenshots/screen-%d-%m-%Y_%H:%M:%S.png";
|
2024-08-02 22:32:29 -04:00
|
|
|
};
|
2024-08-30 19:44:22 -04:00
|
|
|
font.family = "Ubuntu Mono";
|
2024-08-02 22:32:29 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
programs.sioyek = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
config = {
|
|
|
|
startup_commands = "toggle_custom_color";
|
|
|
|
ui_font = "JetBrainsMono Nerd Font Mono Regular";
|
|
|
|
font_size = "24";
|
2024-11-20 15:17:55 -05:00
|
|
|
source = toString self.scopedPackages.${pkgs.system}.dracula.sioyek;
|
2024-08-02 22:32:29 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
home.packages =
|
2024-08-31 19:16:06 -04:00
|
|
|
(builtins.attrValues {
|
2024-08-02 22:32:29 -04:00
|
|
|
# School
|
2024-08-31 19:16:06 -04:00
|
|
|
inherit (pkgs.hunspellDicts) en_CA;
|
|
|
|
inherit
|
|
|
|
(pkgs)
|
|
|
|
xournalpp
|
|
|
|
virt-manager
|
|
|
|
libreoffice-fresh # TODO: declarative conf?
|
|
|
|
hunspell
|
|
|
|
;
|
2024-08-02 22:32:29 -04:00
|
|
|
|
|
|
|
# Apps
|
2024-08-31 19:16:06 -04:00
|
|
|
inherit
|
|
|
|
(pkgs)
|
|
|
|
protonmail-desktop
|
|
|
|
spotifywm
|
|
|
|
photoqt
|
|
|
|
nextcloud-client
|
|
|
|
prismlauncher
|
|
|
|
;
|
2024-08-02 22:32:29 -04:00
|
|
|
|
|
|
|
# tools
|
2024-08-31 19:16:06 -04:00
|
|
|
inherit
|
|
|
|
(pkgs)
|
2024-10-03 09:11:53 -04:00
|
|
|
grim-hyprland
|
2024-08-31 19:16:06 -04:00
|
|
|
wl-color-picker
|
|
|
|
wl-clipboard
|
|
|
|
cliphist
|
|
|
|
slurp
|
|
|
|
satty
|
|
|
|
;
|
|
|
|
})
|
2024-08-02 22:32:29 -04:00
|
|
|
++ [
|
2024-08-30 19:44:22 -04:00
|
|
|
(jellyfin-flake
|
|
|
|
.packages
|
|
|
|
.${pkgs.system}
|
|
|
|
.jellyfin-media-player
|
|
|
|
.override {isNvidiaWayland = isNvidia;})
|
2024-08-31 19:16:06 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
Discord themes for Vencord
|
|
|
|
https://markchan0225.github.io/RoundedDiscord/RoundedDiscord.theme.css
|
|
|
|
https://raw.githubusercontent.com/dracula/BetterDiscord/master/Dracula_Official.theme.css
|
|
|
|
*/
|
|
|
|
(pkgs.discord.override {withVencord = true;})
|
|
|
|
|
|
|
|
# GParted
|
|
|
|
(let
|
|
|
|
inherit (pkgs) writeShellScriptBin libsForQt5 gparted makeWrapper symlinkJoin;
|
|
|
|
|
|
|
|
newWrapper = writeShellScriptBin "Gparted" ''
|
|
|
|
(
|
|
|
|
sleep 1.5
|
|
|
|
while killall -r -0 ksshaskpass > /dev/null 2>&1
|
|
|
|
do
|
|
|
|
sleep 0.1
|
|
|
|
if [[ $(hyprctl activewindow | grep Ksshaskpass) == "" ]]; then
|
|
|
|
killall -r ksshaskpass
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
) &
|
|
|
|
exec env SUDO_ASKPASS="${libsForQt5.ksshaskpass}/bin/ksshaskpass" sudo -k -EA "${getExe gparted}" "$@"
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
symlinkJoin {
|
|
|
|
name = "gparted";
|
|
|
|
paths = [gparted];
|
|
|
|
buildInputs = [makeWrapper];
|
|
|
|
postBuild = let
|
|
|
|
in ''
|
|
|
|
mkdir $out/.wrapped
|
|
|
|
mv $out/bin/gparted $out/.wrapped
|
|
|
|
cp ${getExe newWrapper} $out/bin/gparted
|
|
|
|
|
|
|
|
sed -i "s#Exec.*#Exec=$out/bin/gparted %f#" $out/share/applications/gparted.desktop
|
|
|
|
'';
|
|
|
|
})
|
2024-08-02 22:32:29 -04:00
|
|
|
];
|
|
|
|
|
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
settings = {
|
|
|
|
exec-once =
|
|
|
|
[
|
|
|
|
"${config.programs.kdeconnect.package}/libexec/kdeconnectd"
|
|
|
|
"kdeconnect-indicator"
|
|
|
|
|
|
|
|
"wl-paste --watch cliphist store"
|
|
|
|
|
|
|
|
"sleep 3; nextcloud --background"
|
|
|
|
|
2024-08-03 21:15:32 -04:00
|
|
|
"[workspace special:protonmail silent] sleep 10; proton-mail"
|
2024-08-02 22:32:29 -04:00
|
|
|
"[workspace special:spot silent] spotify"
|
|
|
|
]
|
|
|
|
++ optionals config.services.tailscale.enable [
|
|
|
|
"sleep 3; ${getExe restartTailscale}"
|
|
|
|
];
|
|
|
|
|
|
|
|
windowrule = [
|
|
|
|
"tile,^(libreoffice)$"
|
|
|
|
"float,^(org.gnome.Calculator)$"
|
|
|
|
"float,^(com.gabm.satty)$"
|
|
|
|
"size 1000 700,^(com.gabm.satty)$"
|
|
|
|
|
|
|
|
"float,^(com.nextcloud.desktopclient.nextcloud)$"
|
|
|
|
"move cursor -15 -10,^(com.nextcloud.desktopclient.nextcloud)$"
|
|
|
|
"size 400 581,^(com.nextcloud.desktopclient.nextcloud)$"
|
|
|
|
|
|
|
|
"workspace special:protonmail silent,^(Proton Mail)$"
|
|
|
|
"workspace special:spot silent,^(Spotify)$"
|
|
|
|
];
|
|
|
|
|
2024-11-20 20:12:24 -05:00
|
|
|
bind = map mkBind [
|
|
|
|
{
|
|
|
|
modifier = "$mainMod";
|
|
|
|
key = "Q";
|
|
|
|
command = "foot";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
modifier = "$mainMod SHIFT";
|
|
|
|
key = "C";
|
|
|
|
command = "wl-color-picker";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
modifier = "$mainMod";
|
|
|
|
key = "P";
|
|
|
|
dispatcher = "togglespecialworkspace";
|
|
|
|
command = "protonmail";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
modifier = "$mainMod";
|
|
|
|
key = "S";
|
|
|
|
dispatcher = "togglespecialworkspace";
|
|
|
|
command = "spot";
|
|
|
|
}
|
2024-08-02 22:32:29 -04:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# For accurate stack trace
|
|
|
|
_file = ./packages.nix;
|
|
|
|
}
|