clan/modules/moritz/profiles/desktop.nix

145 lines
4 KiB
Nix

{
lib,
config,
pkgs,
inputs,
...
}: let
inherit (lib) mkEnableOption mkIf mkDefault;
cfg = config.my.profiles.desktop;
in {
options.my.profiles.desktop.enable = mkEnableOption "desktop profile";
config = mkIf cfg.enable {
my = {
wallpapers.enable = mkDefault true;
theming = {
enable = mkDefault true;
scheme = mkDefault "catppuccin-macchiato";
};
virtualisation.podman.enable = mkDefault true;
programs = {
chromium.enable = mkDefault true;
firefox.enable = mkDefault true;
gpg.enable = mkDefault true;
ghostty.settings = {
font-family = "IntoneMono Nerd Font";
window-decoration = false;
font-feature = ["ss01" "ss02"];
};
niri.enable = mkDefault true;
nvim.enable = mkDefault true;
python.versions."311".enable = mkDefault true;
spotify-player = {
enable = mkDefault true;
package = pkgs.spotify-player.overrideAttrs (old: {
buildFeatures = lib.lists.remove "notify" (old.buildFeatures or []);
});
config = {
client_id = "3172dbeaf64949728920c58b823bc24b";
copy_command = {
command = "wl-copy";
args = [];
};
enable_cover_image_cache = true;
default_device = "spotify-player-daemon";
enable_streaming = false;
playback_window_position = "Bottom";
cover_img_length = 20;
cover_img_width = 10;
};
};
ssh.enable = mkDefault true;
thunar.enable = mkDefault true;
wallpaper.enable = mkDefault true;
zathura.enable = mkDefault true;
};
services = {
dunst.enable = mkDefault true;
gammastep.enable = true;
kdeconnect.enable = mkDefault true;
printing.enable = true;
spotify-player = {
enable = mkDefault true;
config = {
client_id = "3172dbeaf64949728920c58b823bc24b";
device = {
name = "spotify-player-daemon";
device_type = "computer";
volume = 70;
bitrate = 320;
audio_cache = true;
};
};
};
timers.enable = true;
wireguard.enable = true;
};
};
environment.systemPackages = with pkgs; [
(inputs.filetags.packages.${pkgs.system}.default)
keepassxc
pavucontrol
stable.libreoffice # NOTE breaks often
stable.signal-desktop # NOTE breaks often
thunderbird
vlc
(symlinkJoin {
name = "obsidian-wayland";
paths = [obsidian];
nativeBuildInputs = [makeWrapper];
postBuild = ''
wrapProgram $out/bin/obsidian \
--add-flags "--socket=wayland --enable-features=UseOzonePlatform --ozone-platform=wayland"
'';
})
];
fonts = {
enableDefaultPackages = true;
packages = [
pkgs.nerd-fonts.fira-code
pkgs.nerd-fonts.intone-mono
];
};
programs.nix-ld.enable = true;
home-manager.users.moritz = {
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
systemd.user.services.nextcloud-client.Service = {
RestartSec = "500ms";
Restart = "on-failure";
};
};
services = {
illum.enable = true;
gnome.gnome-keyring.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
};
};
# faster startup https://majiehong.com/post/2021-07-30_slow_nixos_startup/
networking = {
# no need to wait interfaces to have an IP to continue booting
dhcpcd.wait = "background";
# avoid checking if IP is already taken to boot a few seconds faster
dhcpcd.extraConfig = "noarp";
};
# disable network-online.target
systemd.services.NetworkManager-wait-online.enable = false;
boot = {
consoleLogLevel = 0;
kernelParams = ["quiet" "udev.log_level=3"];
};
};
}