dotfiles

My PC Dotfiles & Website
commit c70668edbd1de76f3ec320a652e37c35b6e7c664
parent 1e123e9ef557a3db8a0028288a82d927e6937f70
Author: maydayv7 <maydayv7@gmail.com>
Date:   Fri,  9 Jan 2026 14:52:02 +0530

refactor: Refactor `apps`

- Add `internet`, `tools`, `stream`
- Remove `media`
- Install KeePassXC
- Also update mimetypes

Diffstat:

MCHANGELOG.md | 5+++++
Mdevices/valkyrie/default.nix | 6++++--
Mdevices/vortex.nix | 1+
Mlib/_mime.nix | 46++++++++++++++++++++++++++++++++++++++++++++++
Mmodules/README.md | 2+-
Mmodules/apps/firefox.nix | 2--
Amodules/apps/internet.nix | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
Dmodules/apps/media.nix | 38--------------------------------------
Mmodules/apps/office.nix | 113+++++++++++++++++++++----------------------------------------------------------
Amodules/apps/stream.nix | 19+++++++++++++++++++
Amodules/apps/tools.nix | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mmodules/apps/vscode/default.nix | 1+
Mmodules/apps/vscode/mutable.nix | 1-
Mmodules/apps/wine.nix | 2+-
Mmodules/apps/youtube.nix | 2+-
Mmodules/base/firmware.nix | 73++++++++++++++++++-------------------------------------------------------
Mmodules/gui/desktop/_shared/utilities.nix | 5+++++
Mmodules/gui/desktop/gnome/default.nix | 2++
Mpackages/wine/7zip.nix | 39++++++++++++++-------------------------
Mpackages/wine/notepad++.nix | 66+++++++++++++-----------------------------------------------------
20 files changed, 276 insertions(+), 263 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -2,6 +2,11 @@ ### January +- Update mimetypes +- Refactor `apps` + - Add `internet`, `tools`, `stream` + - Remove `media` + - Install KeePassXC - Fix NVIDIA PRIME - Fix `flatpak` Configuration - Refine `apps.games` diff --git a/devices/valkyrie/default.nix b/devices/valkyrie/default.nix @@ -57,10 +57,12 @@ "flatpak" "games" "git" + "internet" "latex" - "media" "notes" "office" + "stream" + "tools" "vscode" "youtube" ]; @@ -82,7 +84,7 @@ }; gui = { - desktop = "hyprland"; + desktop = "niri"; display = "eDP-1"; wallpaper = "Quasar"; fancy = true; diff --git a/devices/vortex.nix b/devices/vortex.nix @@ -36,6 +36,7 @@ "discord" "firefox" "git" + "internet" "office" "vscode" "wine" diff --git a/lib/_mime.nix b/lib/_mime.nix @@ -78,6 +78,29 @@ "x-scheme-handler/webcal" ]; + code = [ + "application/json" + "application/toml" + "application/x-shellscript" + "application/x-yaml" + "text/x-c" + "text/x-c++" + "text/x-c++src" + "text/x-chdr" + "text/x-cmake" + "text/x-java" + "text/x-lua" + "text/x-makefile" + "text/x-markdown" + "text/x-nix" + "text/x-python" + "text/x-rust" + "text/x-scala" + "text/x-shellscript" + "text/x-toml" + "text/x-yaml" + ]; + directory = [ "inode/directory" ]; document = [ @@ -111,6 +134,15 @@ "image/x-gzeps" ]; + font = [ + "application/vnd.ms-opentype" + "application/x-font-ttf" + "font/otf" + "font/ttf" + "font/woff" + "font/woff2" + ]; + image = [ "image/avif" "image/bmp" @@ -126,10 +158,12 @@ "image/tiff" "image/vnd-ms.dds" "image/vnd.microsoft.icon" + "image/vnd.microsoft.icon" "image/vnd.radiance" "image/webp" "image/x-dds" "image/x-exr" + "image/x-icon" "image/x-portable-anymap" "image/x-portable-bitmap" "image/x-portable-graymap" @@ -159,6 +193,11 @@ "application/vnd.ms-powerpoint" ]; + password = [ + "application/x-keepass2" + "application/x-keepass" + ]; + pdf = [ "application/pdf" ]; text = [ @@ -247,4 +286,11 @@ "x-scheme-handler/rtmp" "x-scheme-handler/uvox" ]; + + virtualization = [ + "application/x-cd-image" + "application/x-qemu-disk" + "application/x-virtualbox-hdd" + "application/x-virtualbox-vbox" + ]; } diff --git a/modules/README.md b/modules/README.md @@ -6,7 +6,7 @@ The following is a summary of all the present configuration options exposed by t Configuration [Builder](./configuration.nix) - [`apps`](./apps): Module that configures various apps and/or environments - - - `list`: List of enabled applications - `[ "discord" "firefox" "flatpak" "games" "git" "latex" "media" "office" "spotify" "vscode" "wine" "youtube" ]` + - `list`: List of enabled applications - `[ "discord" "firefox" "flatpak" "games" "git" "internet" "latex" "notes" "office" "spotify" "stream" "tools" "vscode" "wine" "youtube" ]` - `git` - - `hosting` - - `enable`: Enable Gitea Code Hosting - `true / false` diff --git a/modules/apps/firefox.nix b/modules/apps/firefox.nix @@ -24,12 +24,10 @@ in ]; homeConfig = { - # File Associations xdg.mimeApps.defaultApplications = util.build.mime { browser = [ "firefox.desktop" ]; }; - # Profile programs.firefox = { enable = true; inherit package; diff --git a/modules/apps/internet.nix b/modules/apps/internet.nix @@ -0,0 +1,52 @@ +{ + config, + lib, + pkgs, + ... +}: +let + enable = builtins.elem "internet" config.apps.list; +in +{ + ## Internet Apps Configuration ## + config = lib.mkIf enable { + programs.chromium = { + enable = true; + extensions = [ + "cjpalhdlnbpafiamejdnhcphjbkeiagm" # UBlock Origin + "djflhoibgkdhkhhcedjiklpkjnoahfmg" # User Agent Switcher + "lckanjgmijmafbedllaakclkaicjfmnk" # ClearURLs + "oofgbpoabipfcfjapgnbbjjaenockbdp" # SetupVPN + "jghecgabfgfdldnmbfkhmffcabddioke" # Volume Booster + "jaioibhbkffompljnnipmpkeafhpicpd" # Tab Auto Refresh + "eimadpbcbfnmbkopoojfekhnkhdbieeh" # Dark Reader + "clngdbkpkpeebahjckkjfobafhncgmne" # Stylus + ]; + }; + + environment.systemPackages = with pkgs; [ + brave + linux-wifi-hotspot + openfortivpn + teams-for-linux + thunderbird + wasistlos + zoom-us + ]; + + user.persist = { + files = [ ".config/zoomus.conf" ]; + directories = [ + ".config/BraveSoftware" + ".cache/BraveSoftware" + ".thunderbird" + ".cache/thunderbird" + ".config/wasistlos" + ".local/share/wasistlos" + ".cache/wasistlos" + ".zoom" + ".cache/zoom" + ]; + }; + }; +} diff --git a/modules/apps/media.nix b/modules/apps/media.nix @@ -1,38 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - enable = builtins.elem "media" config.apps.list; -in -{ - ## Media Configuration ## - config = lib.mkIf enable { - environment.systemPackages = with pkgs; [ - identity - pitivi - vipsdisp - - pwvucontrol - qpwgraph - - stremio-linux-shell - ]; - - user = { - persist = { - files = [ ".config/rncbc.org/qpwgraph" ]; - directories = [ - ".config/pitivi" - ".stremio-server" - ".local/share/stremio" - ]; - }; - - # Audio Effects - homeConfig.services.easyeffects.enable = true; - }; - }; -} diff --git a/modules/apps/office.nix b/modules/apps/office.nix @@ -12,118 +12,63 @@ in { ## Office Environment Configuration ## config = lib.mkIf enable { - # Applications - programs = { - obs-studio = { - enable = true; - enableVirtualCamera = true; - plugins = with pkgs.obs-studio-plugins; [ - obs-mute-filter - obs-source-switcher - ]; - }; - - chromium = { - enable = true; - extensions = [ - "cjpalhdlnbpafiamejdnhcphjbkeiagm" # UBlock Origin - "djflhoibgkdhkhhcedjiklpkjnoahfmg" # User Agent Switcher - "lckanjgmijmafbedllaakclkaicjfmnk" # ClearURLs - "oofgbpoabipfcfjapgnbbjjaenockbdp" # SetupVPN - "jghecgabfgfdldnmbfkhmffcabddioke" # Volume Booster - "jaioibhbkffompljnnipmpkeafhpicpd" # Tab Auto Refresh - "eimadpbcbfnmbkopoojfekhnkhdbieeh" # Dark Reader - "clngdbkpkpeebahjckkjfobafhncgmne" # Stylus - ]; - }; - }; - - environment.systemPackages = with pkgs; [ - # Productivity - calibre - clapgrep - gscan2pdf - libreoffice - onlyoffice-desktopeditors - pdfarranger - simple-scan - - # Graphics - drawing - gimp3 - handbrake - inkscape - xournalpp + environment = { + systemPackages = with pkgs; [ + # Productivity + calibre + gscan2pdf + keepassxc + libreoffice + onlyoffice-desktopeditors + pdfarranger + simple-scan - # Internet - brave - linux-wifi-hotspot - openfortivpn - teams-for-linux - thunderbird - wasistlos - zoom-us + # Graphics + gimp3 + handbrake + inkscape + xournalpp - # Utilities - gearlever - hunspell - hunspellDicts.en_US-large - hyphen - popsicle - ]; + # Dictionary + hunspell + hunspellDicts.en_US-large + hyphen + ]; - # Dictionaries - environment = { + variables."DICPATH" = "/run/current-system/sw/share/hunspell:/run/current-system/sw/share/hyphen"; pathsToLink = [ "/share/hunspell" "/share/myspell" "/share/hyphen" ]; - - variables."DICPATH" = "/run/current-system/sw/share/hunspell:/run/current-system/sw/share/hyphen"; }; user = { - # Persisted Files persist = { - files = [ - ".config/gscan2pdfrc" - ".config/zoomus.conf" - ]; + files = [ ".config/gscan2pdfrc" ]; directories = [ - ".appimages" ".calibre" - ".thunderbird" - ".zoom" - ".config/BraveSoftware" ".config/calibre" - ".config/de.leopoldluley.Clapgrep" ".config/GIMP" + ".cache/gimp" ".config/inkscape" + ".config/keepassxc" + ".cache/keepassxc" ".config/libreoffice" - ".config/obs-studio" ".config/onlyoffice" - ".config/wasistlos" - ".local/share/data" ".local/share/onlyoffice" - ".local/share/wasistlos" - ".cache/BraveSoftware" - ".cache/gimp" - ".cache/thunderbird" - ".cache/wasistlos" - ".cache/zoom" + ".local/share/data" ]; }; homeConfig = { - # File Associations xdg.mimeApps.defaultApplications = util.build.mime { - appimage = [ "it.mijorus.gearlever.desktop" ]; office = [ "onlyoffice-desktopeditors.desktop" ]; + password = [ "org.keepassxc.KeePassXC.desktop" ]; }; - # AppImage Manager - dconf.settings."it/mijorus/gearlever".appimages-default-folder = "~/.appimages"; + # Password Manager + programs.keepassxc.enable = true; home.file = { # Document Templates diff --git a/modules/apps/stream.nix b/modules/apps/stream.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + pkgs, + ... +}: +let + enable = builtins.elem "stream" config.apps.list; +in +{ + ## Streaming Configuration ## + config = lib.mkIf enable { + environment.systemPackages = [ pkgs.stremio-linux-shell ]; + user.persist.directories = [ + ".stremio-server" + ".local/share/stremio" + ]; + }; +} diff --git a/modules/apps/tools.nix b/modules/apps/tools.nix @@ -0,0 +1,64 @@ +{ + config, + lib, + util, + pkgs, + ... +}: +let + enable = builtins.elem "tools" config.apps.list; +in +{ + ## Tools Configuration ## + config = lib.mkIf enable { + environment.systemPackages = with pkgs; [ + # Utilities + clapgrep + gearlever + popsicle + + # Graphics + drawing + identity + pitivi + vipsdisp + + # Audio + pwvucontrol + qpwgraph + ]; + + # Screen Record + programs.obs-studio = { + enable = true; + enableVirtualCamera = true; + plugins = with pkgs.obs-studio-plugins; [ + obs-mute-filter + obs-source-switcher + ]; + }; + + user = { + persist = { + files = [ ".config/rncbc.org/qpwgraph" ]; + directories = [ + ".appimages" + ".config/de.leopoldluley.Clapgrep" + ".config/obs-studio" + ".config/pitivi" + ]; + }; + + homeConfig = { + # AppImage Manager + dconf.settings."it/mijorus/gearlever".appimages-default-folder = "~/.appimages"; + xdg.mimeApps.defaultApplications = util.build.mime { + appimage = [ "it.mijorus.gearlever.desktop" ]; + }; + + # Audio Effects + services.easyeffects.enable = true; + }; + }; + }; +} diff --git a/modules/apps/vscode/default.nix b/modules/apps/vscode/default.nix @@ -32,6 +32,7 @@ in # Environment xdg.mimeApps.defaultApplications = util.build.mime { + code = [ "code.desktop" ]; markdown = [ "code.desktop" ]; text = [ "code.desktop" ]; }; diff --git a/modules/apps/vscode/mutable.nix b/modules/apps/vscode/mutable.nix @@ -5,7 +5,6 @@ ... }: let - # Path logic from nix-community/home-manager/modules/programs/vscode.nix configDir = { "vscode" = "Code"; diff --git a/modules/apps/wine.nix b/modules/apps/wine.nix @@ -19,6 +19,7 @@ let enable = elem "wine" config.apps.list; in { + ## Wine Configuration ## options.apps.wine = { utilities = mkEnableOption "Install Utility Windows apps"; package = mkOption { @@ -29,7 +30,6 @@ in }; }; - ## Wine Configuration ## config = mkIf enable { # Firmware services.samba.enable = true; diff --git a/modules/apps/youtube.nix b/modules/apps/youtube.nix @@ -17,13 +17,13 @@ let enable = elem "youtube" config.apps.list; in { + ## YT Configuration ## options.apps.ytmusic.style = mkOption { description = "YouTube Music CSS"; type = types.str; default = ""; }; - ## YT Configuration ## config = mkIf enable { environment.systemPackages = with pkgs; [ youtube-music diff --git a/modules/base/firmware.nix b/modules/base/firmware.nix @@ -5,7 +5,7 @@ ... }: let - inherit (lib) getExe' mkForce; + inherit (lib) mkForce; in { imports = [ inputs.gaming.nixosModules.pipewireLowLatency ]; @@ -13,12 +13,14 @@ in ## Device Firmware ## config = { # Drivers + security.rtkit.enable = true; hardware = { graphics.enable = true; enableRedistributableFirmware = true; }; # Audio + environment.systemPackages = [ pkgs.alsa-utils ]; services.pulseaudio.enable = mkForce false; services.pipewire = { enable = true; @@ -32,55 +34,8 @@ in }; }; - security.rtkit.enable = true; - environment.systemPackages = [ pkgs.alsa-utils ]; - hardware.alsa.enablePersistence = true; - services.actkbd = - let - step = "1%"; - mixer = getExe' pkgs.alsa-utils "amixer"; - in - { - enable = true; - bindings = [ - { - keys = [ 113 ]; # "Mute" Key - events = [ "key" ]; - command = "${mixer} -q set Master toggle"; - } - { - keys = [ 114 ]; # "Lower Volume" Key - events = [ - "key" - "rep" - ]; - command = "${mixer} -q set Master ${step}- unmute"; - } - { - keys = [ 115 ]; # "Raise Volume" Key - events = [ - "key" - "rep" - ]; - command = "${mixer} -q set Master ${step}+ unmute"; - } - { - keys = [ 190 ]; # "Mic Mute" Key - events = [ "key" ]; - command = "${mixer} -q set Capture toggle"; - } - ]; - }; - # Network Settings user.groups = [ "networkmanager" ]; - environment.persist.directories = [ - "/var/lib/alsa" - "/etc/NetworkManager/system-connections" - "/etc/ssh" - "/var/lib/bluetooth" - ]; - networking = { networkmanager.enable = true; firewall.enable = true; @@ -108,13 +63,6 @@ in enableSSHSupport = true; }; - user.persist.directories = [ - { - directory = ".gnupg"; - mode = "0700"; - } - ]; - # SSH services.openssh = { enable = true; @@ -132,5 +80,20 @@ in } ]; }; + + # Persisted Files + user.persist.directories = [ + { + directory = ".gnupg"; + mode = "0700"; + } + ]; + + environment.persist.directories = [ + "/etc/NetworkManager" + "/etc/ssh" + "/var/lib/alsa" + "/var/lib/bluetooth" + ]; }; } diff --git a/modules/gui/desktop/_shared/utilities.nix b/modules/gui/desktop/_shared/utilities.nix @@ -1,6 +1,7 @@ { config, lib, + util, pkgs, ... }: @@ -65,6 +66,10 @@ in ]; user.homeConfig = { + xdg.mimeApps.defaultApplications = util.build.mime { + font = [ "com.github.FontManager.FontViewer.desktop" ]; + }; + systemd.user.services.wlclock = let target = [ "graphical-session.target" ]; diff --git a/modules/gui/desktop/gnome/default.nix b/modules/gui/desktop/gnome/default.nix @@ -171,9 +171,11 @@ in magnet = [ "de.haeckerfelix.Fragments.desktop" ]; mail = [ "org.gnome.Geary.desktop" ]; markdown = [ "org.gnome.gitlab.somas.Apostrophe.desktop" ]; + password = [ "org.gnome.World.Secrets.desktop" ]; pdf = [ "org.gnome.Papers.desktop" ]; text = [ "org.gnome.TextEditor.desktop" ]; video = [ "io.github.celluloid_player.Celluloid.desktop" ]; + virtualization = [ "org.gnome.Boxes.desktop" ]; }; ## Terminal diff --git a/packages/wine/7zip.nix b/packages/wine/7zip.nix @@ -6,7 +6,6 @@ ... }: let - inherit (builtins) concatLists map; inherit (pkgs) copyDesktopItems fetchurl makeDesktopItem; inherit (build) copyDesktopIcons makeDesktopIcon mkWindowsApp; in @@ -43,10 +42,18 @@ mkWindowsApp rec { runHook postInstall ''; - desktopItems = - let - textTypes = map (n: "text/" + n) [ ]; - appTypes = map (n: "application/" + n) [ + desktopItems = [ + (makeDesktopItem { + name = pname; + exec = pname; + icon = pname; + desktopName = "7-Zip"; + genericName = "Archive Manager"; + categories = [ + "Office" + "Utility" + ]; + mimeTypes = builtins.map (n: "application/" + n) [ "epub+zip" "x-zip-compressed-fb2" "x-cbt" @@ -56,26 +63,8 @@ mkWindowsApp rec { "x-tar" "zip" ]; - - mimeTypes = concatLists [ - textTypes - appTypes - ]; - in - [ - (makeDesktopItem { - inherit mimeTypes; - name = pname; - exec = pname; - icon = pname; - desktopName = "7-Zip"; - genericName = "Archive Manager"; - categories = [ - "Office" - "Utility" - ]; - }) - ]; + }) + ]; desktopIcon = makeDesktopIcon { name = "7zip"; diff --git a/packages/wine/notepad++.nix b/packages/wine/notepad++.nix @@ -6,7 +6,6 @@ ... }: let - inherit (builtins) concatLists map; inherit (pkgs) copyDesktopItems fetchurl makeDesktopItem; inherit (build) copyDesktopIcons makeDesktopIcon mkWindowsAppNoCC; in @@ -49,59 +48,20 @@ mkWindowsAppNoCC rec { runHook postInstall ''; - desktopItems = - let - textTypes = map (s: "text/" + s) [ - "plain" - "html" - "rust" - "vbscript" - "x-cmake" - "x-changelog" - "x-cobol" - "x-common-lisp" - "x-csharp" - "x-c++src" - "x-csrc" - "x-erlang" - "x-fortran" - "x-haskell" - "x-java" - "x-log" - "x-makefile" - "x-objcsrc" - "x-python" - "x-readme" - "x-scheme" - "x-install" + desktopItems = [ + (makeDesktopItem { + name = "Notepad++"; + exec = pname; + icon = pname; + desktopName = "Notepad++"; + genericName = "Text Editor"; + mimeTypes = [ "text/plain" ]; + categories = [ + "Utility" + "TextEditor" ]; - - appTypes = map (s: "application/" + s) [ - "json" - "x-msi" - "xml" - "x-perl" - ]; - - mimeTypes = concatLists [ - textTypes - appTypes - ]; - in - [ - (makeDesktopItem { - inherit mimeTypes; - name = "Notepad++"; - exec = pname; - icon = pname; - desktopName = "Notepad++"; - genericName = "Text Editor"; - categories = [ - "Utility" - "TextEditor" - ]; - }) - ]; + }) + ]; desktopIcon = makeDesktopIcon { name = pname;