From 71deb2f3a74261fc6af29d1a612c57a3504c1521 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Wed, 8 Jan 2025 21:20:39 -0800 Subject: [PATCH] Update system - Switch back to a reasonable home-manager.backupFileExtension - Extract defaultApplications to its own file, fix default apps not being "sticky" by using the `.desktop` file alone (without absolute path). - Run "fastfetch" by name in zsh.initExtra. --- dotfiles/flake.lock | 136 ++++---- dotfiles/flake.nix | 4 +- dotfiles/systems/desktop/configuration.nix | 8 +- .../systems/desktop/defaultApplications.nix | 320 ++++++++++++++++++ .../systems/desktop/desktop-environment.nix | 69 +--- .../systems/desktop/terminal-environment.nix | 8 +- 6 files changed, 406 insertions(+), 139 deletions(-) create mode 100644 dotfiles/systems/desktop/defaultApplications.nix diff --git a/dotfiles/flake.lock b/dotfiles/flake.lock index 4e5638b0..da8a64d9 100644 --- a/dotfiles/flake.lock +++ b/dotfiles/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1734906446, - "narHash": "sha256-6OWluVE2A8xi+8V3jN9KA72RCgJjYdyyuLBUjxZ2q2U=", + "lastModified": 1736102453, + "narHash": "sha256-5qb4kb7Xbt8jJFL/oDqOor9Z2+E+A+ql3PiyDvsfWZ0=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "eecb74dc79bb6752a2a507e6edee3042390a6091", + "rev": "4846091641f3be0ad7542086d52769bb7932bde6", "type": "github" }, "original": { @@ -119,6 +119,22 @@ "type": "github" } }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1734969791, + "narHash": "sha256-A9PxLienMYJ/WUvqFie9qXrNC2MeRRYw7TG/q7DRjZg=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "92f4890bd150fc9d97b61b3583680c0524a8cafe", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -261,11 +277,11 @@ "zig": "zig" }, "locked": { - "lastModified": 1736031329, - "narHash": "sha256-jKWHpdlWyN8fa/1MvSRX2qVf+ZBJLu8NsH7T9xK4WRo=", + "lastModified": 1736372994, + "narHash": "sha256-iCb3+KniUL0Ic1AUkaM3CpO2UGNW6CQSigVzuVUQ8T0=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "0306c592a7dbaa394da481ab2219b3bcd2b8b48f", + "rev": "eb40cce45e6593a4065a32681d27c75c4ca3a9c9", "type": "github" }, "original": { @@ -373,11 +389,11 @@ ] }, "locked": { - "lastModified": 1735344290, - "narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=", + "lastModified": 1736373539, + "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", "owner": "nix-community", "repo": "home-manager", - "rev": "613691f285dad87694c2ba1c9e6298d04736292d", + "rev": "bd65bc3cde04c16755955630b344bc9e35272c56", "type": "github" }, "original": { @@ -454,11 +470,11 @@ ] }, "locked": { - "lastModified": 1734906236, - "narHash": "sha256-vH/ysV2ONGQgYZPtcJKwc8jJivzyVxru2aaOxC20ZOE=", + "lastModified": 1736115290, + "narHash": "sha256-Jcn6yAzfUMcxy3tN/iZRbi/QgrYm7XLyVRl9g/nbUl4=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "6dea3fba08fd704dd624b6d4b261638fb4003c9c", + "rev": "52202272d89da32a9f866c0d10305a5e3d954c50", "type": "github" }, "original": { @@ -485,11 +501,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1736008833, - "narHash": "sha256-1Fej194tgc7Cqb1A07d9HLQ++l/+nxO+FAb536mwOSk=", + "lastModified": 1736370994, + "narHash": "sha256-0rt/+Ma9a3HMmvxziMMmUTb5dPu4gN+lSbW+K/zxG6o=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "b0bae15499ad57bbfeae8be958df8c022201e583", + "rev": "c9822b08f914da2997e8ef47c8bef8016e5ff313", "type": "github" }, "original": { @@ -510,11 +526,11 @@ ] }, "locked": { - "lastModified": 1735734474, - "narHash": "sha256-9OV4lOqrEJVLdOrpNN/9msNwAhI6FQTu4N7fufilG08=", + "lastModified": 1735774328, + "narHash": "sha256-vIRwLS9w+N99EU1aJ+XNOU6mJTxrUBa31i1r82l0V7s=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "271df559dd30e4bc5ec6af02d017ac0aaabd63a7", + "rev": "e3b6af97ddcfaafbda8e2828c719a5af84f662cb", "type": "github" }, "original": { @@ -539,11 +555,11 @@ ] }, "locked": { - "lastModified": 1734906472, - "narHash": "sha256-pWPRv/GA/X/iAwoE6gMNUqn/ZeJX1IeLPRpZI0tTPK0=", + "lastModified": 1736114838, + "narHash": "sha256-FxbuGQExtN37ToWYnGmO6weOYN6WPHN/RAqbr7gNPek=", "owner": "hyprwm", "repo": "hyprland-qtutils", - "rev": "c77109d7e1ddbcdb87cafd32ce411f76328ae152", + "rev": "6997fe382dcf396704227d2b98ffdd5066da6959", "type": "github" }, "original": { @@ -568,11 +584,11 @@ ] }, "locked": { - "lastModified": 1734906259, - "narHash": "sha256-P79t/7HbACO4/PuJBroGpTptvCWJtXTv+gWsF+sM6MI=", + "lastModified": 1735393019, + "narHash": "sha256-NPpqA8rtmDLsEmZOmz+qR67zsB6Y503Jnv+nSFLKJZ8=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "0404833ea18d543df44df935ebf1b497310eb046", + "rev": "55608efdaa387af7bfdc0eddb404c409958efa43", "type": "github" }, "original": { @@ -593,11 +609,11 @@ ] }, "locked": { - "lastModified": 1735316583, - "narHash": "sha256-AiiUwHWHfEdpFzXy7l1x3zInCUa1xcRMrbZ1XRSkzwU=", + "lastModified": 1736164519, + "narHash": "sha256-1LimBKvDpBbeX+qW7T240WEyw+DBVpDotZB4JYm8Aps=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "8f15d45b120b33712f6db477fe5ffb18034d0ea8", + "rev": "3c895da64b0eb19870142196fa48c07090b441c4", "type": "github" }, "original": { @@ -618,11 +634,11 @@ ] }, "locked": { - "lastModified": 1734793513, - "narHash": "sha256-rrrHcXapXJvGFqX+L/Bb0182L25jofAZ0fm1FInvrTQ=", + "lastModified": 1735493474, + "narHash": "sha256-fktzv4NaqKm94VAkAoVqO/nqQlw+X0/tJJNAeCSfzK4=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "4d7367b6eee87397e2dbca2e78078dd0a4ef4c61", + "rev": "de913476b59ee88685fdc018e77b8f6637a2ae0b", "type": "github" }, "original": { @@ -633,11 +649,11 @@ }, "nix-flatpak": { "locked": { - "lastModified": 1735913600, + "lastModified": 1736334301, "narHash": "sha256-370z+WLVnD7LrN/SvTCZxPl/XPTshS5NS2dHN4iyK6o=", "owner": "gmodena", "repo": "nix-flatpak", - "rev": "78ed84ff81e8d8510926e7165d508bcacef49ff1", + "rev": "5f4ec93d432cd5288f6fe20d8842dceb5a065885", "type": "github" }, "original": { @@ -697,22 +713,6 @@ "type": "github" } }, - "nixpkgs-stable_2": { - "locked": { - "lastModified": 1730741070, - "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-unstable": { "locked": { "lastModified": 1733229606, @@ -731,11 +731,11 @@ }, "nixpkgs-unstable_2": { "locked": { - "lastModified": 1735834308, - "narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=", + "lastModified": 1736012469, + "narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6df24922a1400241dae323af55f30e4318a6ca65", + "rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d", "type": "github" }, "original": { @@ -762,11 +762,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1735922141, - "narHash": "sha256-vk0xwGZSlvZ/596yxOtsk4gxsIx2VemzdjiU8zhjgWw=", + "lastModified": 1736200483, + "narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d29ab98cd4a70a387b8ceea3e930b3340d41ac5a", + "rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751", "type": "github" }, "original": { @@ -799,15 +799,14 @@ "nixpkgs": [ "hyprland", "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable_2" + ] }, "locked": { - "lastModified": 1734797603, - "narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=", + "lastModified": 1735882644, + "narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498", + "rev": "a5a961387e75ae44cc20f0a57ae463da5e959656", "type": "github" }, "original": { @@ -838,11 +837,11 @@ ] }, "locked": { - "lastModified": 1735844895, - "narHash": "sha256-CIRlqX9tBK2awJkmVu2cKuap/0QziDXStQZ/u/+e8Z4=", + "lastModified": 1736203741, + "narHash": "sha256-eSjkBwBdQk+TZWFlLbclF2rAh4JxbGg8az4w/Lfe7f4=", "owner": "Mic92", "repo": "sops-nix", - "rev": "24d89184adf76d7ccc99e659dc5f3838efb5ee32", + "rev": "c9c88f08e3ee495e888b8d7c8624a0b2519cb773", "type": "github" }, "original": { @@ -857,6 +856,7 @@ "base16-fish": "base16-fish", "base16-helix": "base16-helix", "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", "flake-compat": "flake-compat_4", "flake-utils": "flake-utils_3", "git-hooks": "git-hooks", @@ -871,11 +871,11 @@ "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1736019457, - "narHash": "sha256-MWe3RXEV9dov1wFZraWagVAxynPo/VceStIYfNRgqG4=", + "lastModified": 1736300250, + "narHash": "sha256-xyEutjs7pWQ7cLqfdTnhvWWeJ136wu6Jlxz5ez4htHE=", "owner": "danth", "repo": "stylix", - "rev": "5204b085385c0bfaa1eb1bb0f8dc81922012128d", + "rev": "743ad1da11fec9711f46c2fcf46e7142da0594cd", "type": "github" }, "original": { @@ -1059,11 +1059,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1735971783, - "narHash": "sha256-JhV87lwIdK9S/o7CnVtomkyrilz+DEldIBEgBkVD7ag=", + "lastModified": 1736267677, + "narHash": "sha256-7FH/gFShKOzf46yKqA4VWAaWxuyHBRnXOdaffbTxVo4=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "655b385dfefa016699e1e6baf22027b40205976e", + "rev": "c96c6a1ebf1bea782f9528dc316d986a6087ebc0", "type": "github" }, "original": { diff --git a/dotfiles/flake.nix b/dotfiles/flake.nix index ef6af590..298fb824 100644 --- a/dotfiles/flake.nix +++ b/dotfiles/flake.nix @@ -56,7 +56,7 @@ }; in { nixosConfigurations = { - desktop = let + desktop = let sys = { username = "joey"; hostname = "desktop@jafner.net"; @@ -67,7 +67,7 @@ wallpaper = ./assets/romb-3840x2160.png; arch = "x86_64-linux"; flakeDir = "Git/Jafner.net/dotfiles"; - }; + }; system = "x86_64-linux"; lib = nixpkgs.lib; pkgs = import inputs.nixpkgs { diff --git a/dotfiles/systems/desktop/configuration.nix b/dotfiles/systems/desktop/configuration.nix index 09bb34ce..7f8f29be 100644 --- a/dotfiles/systems/desktop/configuration.nix +++ b/dotfiles/systems/desktop/configuration.nix @@ -7,7 +7,7 @@ ./theme.nix ]; - home-manager.backupFileExtension = "2025-08-01"; + home-manager.backupFileExtension = "bk"; home-manager.users."${sys.username}" = { nixGL = { vulkan.enable = true; @@ -71,12 +71,12 @@ fonts.packages = with pkgs; [ font-awesome - noto-fonts + noto-fonts noto-fonts-cjk-sans noto-fonts-emoji powerline-symbols - (pkgs.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}) - ]; + (pkgs.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}) + ]; system.autoUpgrade = { enable = true; diff --git a/dotfiles/systems/desktop/defaultApplications.nix b/dotfiles/systems/desktop/defaultApplications.nix new file mode 100644 index 00000000..045a1947 --- /dev/null +++ b/dotfiles/systems/desktop/defaultApplications.nix @@ -0,0 +1,320 @@ +{ sys, ... }: let + webBrowser = "zen.desktop"; + emailClient = "proton-mail.desktop"; + phoneHandler = "org.kde.kdeconnect.handler.desktop"; + imageViewer = "org.kde.gwenview.desktop"; + musicPlayer = "vlc.desktop"; + videoPlayer = "vlc.desktop"; + textEditor = "dev.zed.Zed.desktop"; + docViewer = "zen.desktop"; + fileManager = "org.kde.dolphin.desktop"; + terminal = "org.kde.konsole.desktop"; + archiveManager = "org.kde.ark.desktop"; +in { + home-manager.users."${sys.username}".xdg.mimeApps = { + enable = true; + defaultApplications = { + # Forked from https://github.com/KDE/plasma-desktop/blob/df7412e472d3e8acd06e51b65ebb1371bfa4e1c0/kde-mimeapps.list + # Misc + "application/x-krita" = "${imageViewer}"; + "image/x-xcf" = "${imageViewer}"; + + # Discover (disabled) + # "x-scheme-handler/appstream" = "org.kde.discover.urlhandler.desktop"; + # "application/vnd.debian.binary-package" = "org.kde.discover.desktop"; + + # Archive Manager + "application/x-tar" = "${archiveManager}"; + "application/x-compressed-tar" = "${archiveManager}"; + "application/x-bzip-compressed-tar" = "${archiveManager}"; + "application/x-tarz" = "${archiveManager}"; + "application/x-xz-compressed-tar" = "${archiveManager}"; + "application/x-lzma-compressed-tar" = "${archiveManager}"; + "application/x-lzip-compressed-tar" = "${archiveManager}"; + "application/x-tzo" = "${archiveManager}"; + "application/x-lrzip-compressed-tar" = "${archiveManager}"; + "application/x-lz4-compressed-tar" = "${archiveManager}"; + "application/x-zstd-compressed-tar" = "${archiveManager}"; + "application/x-cd-image" = "${archiveManager}"; + "application/x-bcpio" = "${archiveManager}"; + "application/x-cpio" = "${archiveManager}"; + "application/x-cpio-compressed" = "${archiveManager}"; + "application/x-sv4cpio" = "${archiveManager}"; + "application/x-sv4crc" = "${archiveManager}"; + "application/x-source-rpm" = "${archiveManager}"; + "application/vnd.ms-cab-compressed" = "${archiveManager}"; + "application/x-xar" = "${archiveManager}"; + "application/x-iso9660-appimage" = "${archiveManager}"; + "application/x-archive" = "${archiveManager}"; + "application/vnd.rar" = "${archiveManager}"; + "application/x-rar" = "${archiveManager}"; + "application/x-7z-compressed" = "${archiveManager}"; + "application/zip" = "${archiveManager}"; + "application/x-compress" = "${archiveManager}"; + "application/gzip" = "${archiveManager}"; + "application/x-bzip" = "${archiveManager}"; + "application/x-lzma" = "${archiveManager}"; + "application/x-xz" = "${archiveManager}"; + "application/zstd" = "${archiveManager}"; + "application/x-lha" = "${archiveManager}"; + + # Browser + "x-scheme-handler/http" = "${webBrowser}"; + "x-scheme-handler/https" = "${webBrowser}"; + + # Email + "x-scheme-handler/mailto" = "${emailClient}"; + + # File Manager + "inode/directory" = "${fileManager}"; + + # Geo + "x-scheme-handler/geo" = ""; + + # Image Viewer + "image/avif" = "${imageViewer}"; + "image/gif" = "${imageViewer}"; + "image/heif" = "${imageViewer}"; + "image/jpeg" = "${imageViewer}"; + "image/jxl" = "${imageViewer}"; + "image/png" = "${imageViewer}"; + "image/bmp" = "${imageViewer}"; + "image/x-eps" = "${imageViewer}"; + "image/x-icns" = "${imageViewer}"; + "image/x-ico" = "${imageViewer}"; + "image/x-portable-bitmap" = "${imageViewer}"; + "image/x-portable-graymap" = "${imageViewer}"; + "image/x-portable-pixmap" = "${imageViewer}"; + "image/x-xbitmap" = "${imageViewer}"; + "image/x-xpixmap" = "${imageViewer}"; + "image/tiff" = "${imageViewer}"; + "image/x-psd" = "${imageViewer}"; + "image/x-webp" = "${imageViewer}"; + "image/webp" = "${imageViewer}"; + "image/x-tga" = "${imageViewer}"; + + # Music Player + "audio/aac" = "${musicPlayer}"; + "audio/mp4" = "${musicPlayer}"; + "audio/mpeg" = "${musicPlayer}"; + "audio/mpegurl" = "${musicPlayer}"; + "audio/ogg" = "${musicPlayer}"; + "audio/vnd.rn-realaudio" = "${musicPlayer}"; + "audio/vorbis" = "${musicPlayer}"; + "audio/x-flac" = "${musicPlayer}"; + "audio/x-mp3" = "${musicPlayer}"; + "audio/x-mpegurl" = "${musicPlayer}"; + "audio/x-ms-wma" = "${musicPlayer}"; + "audio/x-musepack" = "${musicPlayer}"; + "audio/x-oggflac" = "${musicPlayer}"; + "audio/x-pn-realaudio" = "${musicPlayer}"; + "audio/x-scpls" = "${musicPlayer}"; + "audio/x-speex" = "${musicPlayer}"; + "audio/x-vorbis" = "${musicPlayer}"; + "audio/x-vorbis+ogg" = "${musicPlayer}"; + "audio/x-wav" = "${musicPlayer}"; + + # PDF Viewer + "application/pdf" = "${webBrowser}"; + + # Phone App + "x-scheme-handler/tel" = "${phoneHandler}"; + "x-scheme-handler/sms" = "${phoneHandler}"; + + # Text Editor + "text/plain" = "${textEditor}"; + "text/x-cmake" = "${textEditor}"; + "text/markdown" = "${textEditor}"; + "application/x-docbook+xml" = "${textEditor}"; + "application/json" = "${textEditor}"; + "application/x-yaml" = "${textEditor}"; + + # Video Player + "video/3gp" = "${videoPlayer}"; + "video/3gpp" = "${videoPlayer}"; + "video/3gpp2" = "${videoPlayer}"; + "video/avi" = "${videoPlayer}"; + "video/divx" = "${videoPlayer}"; + "video/dv" = "${videoPlayer}"; + "video/fli" = "${videoPlayer}"; + "video/flv" = "${videoPlayer}"; + "video/mp2t" = "${videoPlayer}"; + "video/mp4" = "${videoPlayer}"; + "video/mp4v-es" = "${videoPlayer}"; + "video/mpeg" = "${videoPlayer}"; + "video/msvideo" = "${videoPlayer}"; + "video/ogg" = "${videoPlayer}"; + "video/quicktime" = "${videoPlayer}"; + "video/vnd.divx" = "${videoPlayer}"; + "video/vnd.mpegurl" = "${videoPlayer}"; + "video/vnd.rn-realvideo" = "${videoPlayer}"; + "video/webm" = "${videoPlayer}"; + "video/x-avi" = "${videoPlayer}"; + "video/x-flv" = "${videoPlayer}"; + "video/x-m4v" = "${videoPlayer}"; + "video/x-matroska" = "${videoPlayer}"; + "video/x-mpeg2" = "${videoPlayer}"; + "video/x-ms-asf" = "${videoPlayer}"; + "video/x-msvideo" = "${videoPlayer}"; + "video/x-ms-wmv" = "${videoPlayer}"; + "video/x-ms-wmx" = "${videoPlayer}"; + "video/x-ogm" = "${videoPlayer}"; + "video/x-ogm+ogg" = "${videoPlayer}"; + "video/x-theora" = "${videoPlayer}"; + "video/x-theora+ogg" = "${videoPlayer}"; + "application/x-matroska" = "${videoPlayer}"; + }; + }; + + xdg.mime.defaultApplications = { + # Forked from https://github.com/KDE/plasma-desktop/blob/df7412e472d3e8acd06e51b65ebb1371bfa4e1c0/kde-mimeapps.list + # Misc + "application/x-krita" = "${imageViewer}"; + "image/x-xcf" = "${imageViewer}"; + + # Discover (disabled) + # "x-scheme-handler/appstream" = "org.kde.discover.urlhandler.desktop"; + # "application/vnd.debian.binary-package" = "org.kde.discover.desktop"; + + # Archive Manager + "application/x-tar" = "${archiveManager}"; + "application/x-compressed-tar" = "${archiveManager}"; + "application/x-bzip-compressed-tar" = "${archiveManager}"; + "application/x-tarz" = "${archiveManager}"; + "application/x-xz-compressed-tar" = "${archiveManager}"; + "application/x-lzma-compressed-tar" = "${archiveManager}"; + "application/x-lzip-compressed-tar" = "${archiveManager}"; + "application/x-tzo" = "${archiveManager}"; + "application/x-lrzip-compressed-tar" = "${archiveManager}"; + "application/x-lz4-compressed-tar" = "${archiveManager}"; + "application/x-zstd-compressed-tar" = "${archiveManager}"; + "application/x-cd-image" = "${archiveManager}"; + "application/x-bcpio" = "${archiveManager}"; + "application/x-cpio" = "${archiveManager}"; + "application/x-cpio-compressed" = "${archiveManager}"; + "application/x-sv4cpio" = "${archiveManager}"; + "application/x-sv4crc" = "${archiveManager}"; + "application/x-source-rpm" = "${archiveManager}"; + "application/vnd.ms-cab-compressed" = "${archiveManager}"; + "application/x-xar" = "${archiveManager}"; + "application/x-iso9660-appimage" = "${archiveManager}"; + "application/x-archive" = "${archiveManager}"; + "application/vnd.rar" = "${archiveManager}"; + "application/x-rar" = "${archiveManager}"; + "application/x-7z-compressed" = "${archiveManager}"; + "application/zip" = "${archiveManager}"; + "application/x-compress" = "${archiveManager}"; + "application/gzip" = "${archiveManager}"; + "application/x-bzip" = "${archiveManager}"; + "application/x-lzma" = "${archiveManager}"; + "application/x-xz" = "${archiveManager}"; + "application/zstd" = "${archiveManager}"; + "application/x-lha" = "${archiveManager}"; + + # Browser + "x-scheme-handler/http" = "${webBrowser}"; + "x-scheme-handler/https" = "${webBrowser}"; + + # Email + "x-scheme-handler/mailto" = "${emailClient}"; + + # File Manager + "inode/directory" = "${fileManager}"; + + # Geo + "x-scheme-handler/geo" = ""; + + # Image Viewer + "image/avif" = "${imageViewer}"; + "image/gif" = "${imageViewer}"; + "image/heif" = "${imageViewer}"; + "image/jpeg" = "${imageViewer}"; + "image/jxl" = "${imageViewer}"; + "image/png" = "${imageViewer}"; + "image/bmp" = "${imageViewer}"; + "image/x-eps" = "${imageViewer}"; + "image/x-icns" = "${imageViewer}"; + "image/x-ico" = "${imageViewer}"; + "image/x-portable-bitmap" = "${imageViewer}"; + "image/x-portable-graymap" = "${imageViewer}"; + "image/x-portable-pixmap" = "${imageViewer}"; + "image/x-xbitmap" = "${imageViewer}"; + "image/x-xpixmap" = "${imageViewer}"; + "image/tiff" = "${imageViewer}"; + "image/x-psd" = "${imageViewer}"; + "image/x-webp" = "${imageViewer}"; + "image/webp" = "${imageViewer}"; + "image/x-tga" = "${imageViewer}"; + + # Music Player + "audio/aac" = "${musicPlayer}"; + "audio/mp4" = "${musicPlayer}"; + "audio/mpeg" = "${musicPlayer}"; + "audio/mpegurl" = "${musicPlayer}"; + "audio/ogg" = "${musicPlayer}"; + "audio/vnd.rn-realaudio" = "${musicPlayer}"; + "audio/vorbis" = "${musicPlayer}"; + "audio/x-flac" = "${musicPlayer}"; + "audio/x-mp3" = "${musicPlayer}"; + "audio/x-mpegurl" = "${musicPlayer}"; + "audio/x-ms-wma" = "${musicPlayer}"; + "audio/x-musepack" = "${musicPlayer}"; + "audio/x-oggflac" = "${musicPlayer}"; + "audio/x-pn-realaudio" = "${musicPlayer}"; + "audio/x-scpls" = "${musicPlayer}"; + "audio/x-speex" = "${musicPlayer}"; + "audio/x-vorbis" = "${musicPlayer}"; + "audio/x-vorbis+ogg" = "${musicPlayer}"; + "audio/x-wav" = "${musicPlayer}"; + + # PDF Viewer + "application/pdf" = "${webBrowser}"; + + # Phone App + "x-scheme-handler/tel" = "${phoneHandler}"; + "x-scheme-handler/sms" = "${phoneHandler}"; + + # Text Editor + "text/plain" = "${textEditor}"; + "text/x-cmake" = "${textEditor}"; + "text/markdown" = "${textEditor}"; + "application/x-docbook+xml" = "${textEditor}"; + "application/json" = "${textEditor}"; + "application/x-yaml" = "${textEditor}"; + + # Video Player + "video/3gp" = "${videoPlayer}"; + "video/3gpp" = "${videoPlayer}"; + "video/3gpp2" = "${videoPlayer}"; + "video/avi" = "${videoPlayer}"; + "video/divx" = "${videoPlayer}"; + "video/dv" = "${videoPlayer}"; + "video/fli" = "${videoPlayer}"; + "video/flv" = "${videoPlayer}"; + "video/mp2t" = "${videoPlayer}"; + "video/mp4" = "${videoPlayer}"; + "video/mp4v-es" = "${videoPlayer}"; + "video/mpeg" = "${videoPlayer}"; + "video/msvideo" = "${videoPlayer}"; + "video/ogg" = "${videoPlayer}"; + "video/quicktime" = "${videoPlayer}"; + "video/vnd.divx" = "${videoPlayer}"; + "video/vnd.mpegurl" = "${videoPlayer}"; + "video/vnd.rn-realvideo" = "${videoPlayer}"; + "video/webm" = "${videoPlayer}"; + "video/x-avi" = "${videoPlayer}"; + "video/x-flv" = "${videoPlayer}"; + "video/x-m4v" = "${videoPlayer}"; + "video/x-matroska" = "${videoPlayer}"; + "video/x-mpeg2" = "${videoPlayer}"; + "video/x-ms-asf" = "${videoPlayer}"; + "video/x-msvideo" = "${videoPlayer}"; + "video/x-ms-wmv" = "${videoPlayer}"; + "video/x-ms-wmx" = "${videoPlayer}"; + "video/x-ogm" = "${videoPlayer}"; + "video/x-ogm+ogg" = "${videoPlayer}"; + "video/x-theora" = "${videoPlayer}"; + "video/x-theora+ogg" = "${videoPlayer}"; + "application/x-matroska" = "${videoPlayer}"; + }; +} diff --git a/dotfiles/systems/desktop/desktop-environment.nix b/dotfiles/systems/desktop/desktop-environment.nix index a80c89cc..a17be997 100644 --- a/dotfiles/systems/desktop/desktop-environment.nix +++ b/dotfiles/systems/desktop/desktop-environment.nix @@ -1,36 +1,7 @@ -{ pkgs, sys, inputs, usr, ... }: -let defaultApps = { - webBrowser.pkg = "${inputs.zen-browser.packages."${sys.arch}".default}"; - webBrowser.desktopFile = "zen.desktop"; - - emailClient.pkg = "${pkgs.protonmail-desktop}"; - emailClient.desktopFile = "proton-mail.desktop"; - - imageViewer.pkg = "${pkgs.kdePackages.gwenview}"; - imageViewer.desktopFile = "org.kde.gwenview.desktop"; - - musicPlayer.pkg = "${pkgs.vlc}"; - musicPlayer.desktopFile = "vlc.desktop"; - - videoPlayer.pkg = "${pkgs.vlc}"; - videoPlayer.desktopFile = "vlc.desktop"; - - textEditor.pkg = "${pkgs.zed-editor}"; - textEditor.desktopFile = "dev.zed.Zed.desktop"; - - docViewer.pkg = "${inputs.zen-browser.packages."${sys.arch}".default}"; - docViewer.desktopFile = "zen.desktop"; - - fileManager.pkg = "${pkgs.kdePackages.dolphin}"; - fileManager.desktopFile = "org.kde.dolphin.desktop"; - - terminal.pkg = "${pkgs.kdePackages.konsole}"; - terminal.desktopFile = "org.kde.konsole.desktop"; - - archiveManager.pkg = "${pkgs.kdePackages.ark}"; - archiveManager.desktopFile = "org.kde.ark.desktop"; -}; -in { +{ pkgs, sys, inputs, usr, ... }: { + imports = [ + ./defaultApplications.nix + ]; programs.kdeconnect.enable = true; programs.xwayland.enable = true; programs.steam.enable = true; @@ -40,11 +11,11 @@ in { }; programs.gamemode = { enable = true; - enableRenice = true; + enableRenice = true; }; home-manager.users."${sys.username}" = { - home.packages = with pkgs; + home.packages = with pkgs; [ # Productivity obsidian libreoffice-qt6 @@ -347,7 +318,7 @@ in { output_folder = "/home/${sys.username}/.config/MangoHud"; - + }; settingsPerApplication = { Overwatch = { @@ -425,7 +396,7 @@ in { }; }; ollama = { - exec = "${defaultApps.terminal.pkg}/share/applications/${defaultApps.terminal.desktopFile} ollama-wrapped"; + exec = "ollama-wrapped"; icon = "/home/${sys.username}/.icons/custom/ollama.png"; name = "AI Chat"; categories = [ "Utility" ]; @@ -462,30 +433,6 @@ in { }; }; - xdg.mimeApps = { - enable = true; - defaultApplications = let - webBrowser = "${defaultApps.webBrowser.pkg}/share/applications/${defaultApps.webBrowser.desktopFile}"; - textEditor = "${defaultApps.textEditor.pkg}/share/applications/${defaultApps.textEditor.desktopFile}"; - videoPlayer = "${defaultApps.videoPlayer.pkg}/share/applications/${defaultApps.videoPlayer.desktopFile}"; - in { - "x-scheme-handler/http" = "${webBrowser}"; - "x-scheme-handler/https" = "${webBrowser}"; - "x-scheme-handler/about" = "${webBrowser}"; - "x-scheme-handler/unknown" = "${webBrowser}"; - "application/json" = "${textEditor}"; - "application/pdf" = "${webBrowser}"; - "application/vnd.apple.keynote" = "${textEditor}"; - "application/vnd.ms-publisher" = "${textEditor}"; - "application/x-desktop" = "${textEditor}"; - "application/x-executable" = "${textEditor}"; - "text/css" = "${textEditor}"; - "text/html" = "${textEditor}"; - "text/plain" = "${textEditor}"; - "video/mp4" = "${videoPlayer}"; - "video/x-matroska" = "${videoPlayer}"; - }; - }; systemd.user.services.librespot = { Unit = { Description = "Librespot (an open source Spotify client)"; diff --git a/dotfiles/systems/desktop/terminal-environment.nix b/dotfiles/systems/desktop/terminal-environment.nix index 6ec677c8..65d08522 100644 --- a/dotfiles/systems/desktop/terminal-environment.nix +++ b/dotfiles/systems/desktop/terminal-environment.nix @@ -71,8 +71,8 @@ in { zeditor "/home/${sys.username}/${flake.repoPath}" } - where() { - tree "$(realpath "$(which "$1")" | cut -d'/' -f-4)" + where() { + tree "$(realpath "$(which "$1")" | cut -d'/' -f-4)" } finish() { @@ -352,8 +352,8 @@ in { fd --hidden --exclude .git . "$1" } eval "$(~/.nix-profile/bin/fzf --zsh)" - fetch + fastfetch ''; }; }; -} \ No newline at end of file +}