nixos-configs/nixosModules/desktop/environment/modules/packages.nix
matt1432 32f7efd88d
All checks were successful
Discord / discord commits (push) Has been skipped
chore: update flake.lock
Flake Inputs:
• Updated input 'agsV2':
    'github:Aylur/ags/ff3740e' (2024-09-27)
  → 'github:Aylur/ags/1341310' (2024-09-30)

• Updated input 'astal':
    'github:Aylur/astal/f17b28d' (2024-09-29)
  → 'github:Aylur/astal/cb6fd7b' (2024-09-30)

• Updated input 'hyprland':
    'github:hyprwm/Hyprland/6649255' (2024-09-29)
  → 'github:hyprwm/Hyprland/5c6c300' (2024-09-30)

• Updated input 'hyprland-plugins':
    'github:hyprwm/hyprland-plugins/13301ee' (2024-09-29)
  → 'github:hyprwm/hyprland-plugins/9215288' (2024-09-30)

• Updated input 'nix-index-db':
    'github:Mic92/nix-index-database/a2ab158' (2024-09-29)
  → 'github:Mic92/nix-index-database/f9fdf82' (2024-09-30)

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/1925c60' (2024-09-26)
  → 'github:NixOS/nixpkgs/06cf0e1' (2024-09-29)

• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/206b2a2' (2024-09-29)
  → 'github:nix-community/nixpkgs-wayland/50e4446' (2024-09-30)

• Updated input 'pcsd':
    'github:matt1432/nixos-pcsd/d8425da' (2024-09-24)
  → 'github:matt1432/nixos-pcsd/a2ef219' (2024-09-30)

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/127a96f' (2024-09-27)
  → 'github:Mic92/sops-nix/3198a24' (2024-09-30)

• Updated input 'spotifywebapi-src':
    'github:thlucas1/SpotifyWebApiPython/9f5ea3d' (2024-09-28)
  → 'github:thlucas1/SpotifyWebApiPython/bf379b9' (2024-09-29)

Firefox Addons:
ttv-lol-pro: 2.3.9 -> 2.3.10

Misc Sources:
Vuetorrent: 2.13.1 -> 2.13.3
2024-09-30 22:44:12 -04:00

210 lines
6.1 KiB
Nix

self: {
config,
lib,
pkgs,
...
}: let
inherit (self.inputs) jellyfin-flake;
in {
imports = [./dolphin.nix];
config = let
inherit (lib) getExe optionals;
inherit (pkgs.writers) writeTOML;
flakeDir = config.environment.variables.FLAKE;
cfg = config.roles.desktop;
isNvidia = config.nvidia.enable;
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
inherit (config.lib.file) mkOutOfStoreSymlink;
configDir = "${flakeDir}/nixosModules/desktop/environment/config";
in {
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";
};
font.family = "Ubuntu Mono";
};
};
})
];
programs.sioyek = {
enable = true;
config = {
startup_commands = "toggle_custom_color";
ui_font = "JetBrainsMono Nerd Font Mono Regular";
font_size = "24";
source = toString self.legacyPackages.${pkgs.system}.dracula.sioyek;
};
};
home.packages =
(builtins.attrValues {
# School
inherit (pkgs.hunspellDicts) en_CA;
inherit
(pkgs)
xournalpp
virt-manager
libreoffice-fresh # TODO: declarative conf?
hunspell
;
# Apps
inherit
(pkgs)
protonmail-desktop
protonmail-bridge
spotifywm
photoqt
nextcloud-client
prismlauncher
;
# tools
inherit
(pkgs)
wl-color-picker
wl-clipboard
cliphist
slurp
satty
;
})
++ [
(pkgs.grim-hyprland.overrideAttrs (o: {
buildInputs = o.buildInputs ++ [pkgs.wayland-scanner];
}))
(jellyfin-flake
.packages
.${pkgs.system}
.jellyfin-media-player
.override {isNvidiaWayland = isNvidia;})
/*
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
'';
})
];
wayland.windowManager.hyprland = {
settings = {
exec-once =
[
"${config.programs.kdeconnect.package}/libexec/kdeconnectd"
"kdeconnect-indicator"
"wl-paste --watch cliphist store"
"sleep 3; nextcloud --background"
"sleep 10; tmux new-session -s protonmail-bridge -d 'bash -c protonmail-bridge -c'"
"[workspace special:protonmail silent] sleep 10; proton-mail"
"[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)$"
];
bind = [
"$mainMod, Q, exec, foot"
"$mainMod SHIFT, C, exec, wl-color-picker"
"$mainMod, P, togglespecialworkspace, protonmail"
"$mainMod, S, togglespecialworkspace, spot"
];
};
};
};
};
# For accurate stack trace
_file = ./packages.nix;
}