dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit c6f77810c86f65c3066877422a975f89272009b6 parent 763ea67cba28b8a5165d7f667c6c18d2e061fd05 Author: maydayv7 <maydayv7@gmail.com> Date: Mon, 27 Nov 2023 15:38:38 +0530 refactor: Separate `games` module + Add `apps.wine.utilities` + Fix GNOME Sounds + Use `bottles` --> https://usebottles.com/
Diffstat:
| M | README.md | | | 1 | + |
| M | devices/Vortex/default.nix | | | 5 | ++++- |
| M | files/gnome/dconf.nix | | | 12 | ++++++++++-- |
| M | modules/README.md | | | 6 | ++++-- |
| A | modules/apps/games.nix | | | 38 | ++++++++++++++++++++++++++++++++++++++ |
| M | modules/apps/wine.nix | | | 44 | ++++++++++++++++++-------------------------- |
| M | modules/gui/desktop/gnome.nix | | | 11 | ++++++----- |
| M | modules/gui/desktop/xfce.nix | | | 7 | +++---- |
8 files changed, 84 insertions(+), 40 deletions(-)
diff --git a/README.md b/README.md @@ -419,6 +419,7 @@ You can navigate to the `README`s present in the various directories to know mor - Support declarative [Flatpak](https://flatpak.org/) application install - Allow patching Default Package Channel - Upgrade to GNOME 45 +- Separate `games` module - Miscellaneous Updates ### v13 diff --git a/devices/Vortex/default.nix b/devices/Vortex/default.nix @@ -32,7 +32,10 @@ }; shell.utilities = true; - apps.list = ["discord" "firefox" "git" "office" "vscode" "wine"]; + apps = { + list = ["discord" "firefox" "git" "office" "vscode" "wine"]; + wine.utilities = true; + }; # User V7 user = { diff --git a/files/gnome/dconf.nix b/files/gnome/dconf.nix @@ -185,7 +185,7 @@ in { "org/gnome/desktop/sound" = { allow-volume-above-100-percent = true; event-sounds = true; - theme-name = "freedesktop"; + theme-name = "__custom"; }; "org/gnome/desktop/background" = { @@ -326,6 +326,7 @@ in { "status-area-horizontal-spacing@mathematical.coffee.gmail.com" "top-bar-organizer@julian.gse.jsts.xyz" "transparent-top-bar@ftpix.com" + "unmess@ezix.org" "user-theme@gnome-shell-extensions.gcampax.github.com" "Vitals@CoreCoding.com" "windowgestures@extension.amarullz.com" @@ -389,8 +390,8 @@ in { name = "Wine"; apps = [ "7zip.desktop" + "com.usebottles.bottles.desktop" "Notepad++.desktop" - "playonlinux.desktop" "net.lutris.Lutris.desktop" ]; }; @@ -517,6 +518,13 @@ in { incognito-shortcut = ["<Ctrl><Super>v"]; play-audio-on-copy = false; send-notification-on-copy = false; + window-position = mkUint32 2; + item-date-font-family = head fonts.sansSerif; + item-date-font-size = 11; + item-title-font-family = head fonts.sansSerif; + item-title-font-size = 20; + search-bar-font-family = head fonts.sansSerif; + search-bar-font-size = 14; }; "org/gnome/shell/extensions/quick-settings-avatar" = { diff --git a/modules/README.md b/modules/README.md @@ -6,7 +6,7 @@ The `modules` directory contains custom-made pure Flakes-compatible configuratio - [`apps`](./apps): Module that configures various apps and/or environments - - - `list`: List of all enabled applications - `[ "discord" "firefox" "flatpak" "git" "office" "wine" ]` + - `list`: List of all enabled applications - `[ "discord" "firefox" "flatpak" "games" "git" "office" "wine" ]` - `git` - - `hosting` - - `enable`: Enable Gitea Code Hosting - `true / false` @@ -15,7 +15,9 @@ The `modules` directory contains custom-made pure Flakes-compatible configuratio - `runner` - - `support`: Enable Support for `git` Runners - `"github" / "gitlab"` - `secret`: Path to Secret for `git` Runner - - `wine.package`: Package to use for `wine` - Ex. `pkgs.wineWowPackages.staging` + - `wine` - + - `enable`: Install Utility Windows apps - `true / false` + - `package`: Package to use for `wine` - Ex. `pkgs.winePackages.staging` - [`base`](./base): Module that contains the base common/shared configuration diff --git a/modules/apps/games.nix b/modules/apps/games.nix @@ -0,0 +1,38 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib) mkAfter mkIf; + enable = builtins.elem "games" config.apps.list; + wine = builtins.elem "wine" config.apps.list; +in { + ## Games Configuration ## + config = mkIf enable { + assertions = [ + { + assertion = wine; + message = '' + Wine support is required + - Add 'wine to 'apps.list' + ''; + } + ]; + + user.persist.directories = [ + "Games" + ".cache/lutris" + ".config/lutris" + ".local/share/bottles" + ".local/share/lutris" + ]; + + # Packages + apps.wine.package = pkgs.gaming.wine-ge; + environment.systemPackages = with pkgs; [ + bottles + lutris + ]; + }; +} diff --git a/modules/apps/wine.nix b/modules/apps/wine.nix @@ -7,15 +7,18 @@ ... }: let inherit (builtins) attrValues elem map; - inherit (lib) mkIf mkOption types; + inherit (lib) mkIf mkEnableOption mkOption optionals types; + cfg = config.apps.wine; enable = elem "wine" config.apps.list; - wine = config.apps.wine.package; in { - options.apps.wine.package = mkOption { - description = "Package to use for 'wine'"; - type = types.package; - default = pkgs.wineWowPackages.stable; - example = pkgs.gaming.wine-tkg; + options.apps.wine = { + utilities = mkEnableOption "Install Utility Windows apps"; + package = mkOption { + description = "Package to use for 'wine'"; + type = types.package; + default = pkgs.winePackages.stable; + example = pkgs.gaming.wine-tkg; + }; }; ## Wine Configuration ## @@ -26,31 +29,20 @@ in { hardware.opengl.driSupport32Bit = true; # Utilities - user.persist.directories = [ - "Games" - ".cache/lutris" - ".config/lutris" - ".config/notepad++" - ".local/share/lutris" - ".wine" - ]; - + user.persist.directories = [".wine"] ++ optionals cfg.utilities [".config/notepad++"]; environment.systemPackages = with pkgs.wine // pkgs; map (name: if (name.override.__functionArgs ? wine) - then name.override {inherit wine;} - else name) [ - lutris - playonlinux - mkwindowsapp-tools - notepad-plus-plus - ] + then name.override {wine = cfg.package;} + else name) ([mkwindowsapp-tools] + ++ optionals cfg.utilities [notepad-plus-plus]) # Wrapped Packages - ++ attrValues (util.map.modules ../../packages/wine + ++ optionals cfg.utilities (attrValues (util.map.modules ../../packages/wine (name: pkgs.callPackage name { - inherit lib pkgs wine; + inherit lib pkgs; + wine = cfg.package; build = inputs.wine.lib."${system}"; - })); + }))); }; } diff --git a/modules/gui/desktop/gnome.nix b/modules/gui/desktop/gnome.nix @@ -7,10 +7,9 @@ ... }: with files; let - inherit (builtins) elem; inherit (config.gui) desktop; - apps = config.environment.systemPackages; - inherit (lib) mkIf mkForce mkMerge; + inherit (lib) mkIf mkForce mkMerge optional; + exists = app: builtins.elem app config.environment.systemPackages; in { ## GNOME Desktop Configuration ## config = mkIf (desktop == "gnome" || desktop == "gnome-minimal") (mkMerge [ @@ -116,7 +115,7 @@ in { # Discord DNOME Theme ".config/BetterDiscord/data/stable/custom.css" = - mkIf (elem pkgs.discord apps) + mkIf (exists pkgs.discord) {text = ''@import "https://raw.githack.com/GeopJr/DNOME/dist/DNOME.css";'';}; # Firefox GNOME Theme @@ -129,7 +128,7 @@ in { ## 3rd Party Apps Configuration # Code Editor - programs.vscode = mkIf (elem pkgs.vscode apps) { + programs.vscode = mkIf (exists pkgs.vscode) { extensions = [pkgs.vscode-extensions.piousdeer.adwaita-theme]; userSettings = { "workbench.preferredDarkColorTheme" = "Adwaita Dark"; @@ -231,6 +230,7 @@ in { status-area-horizontal-spacing transparent-top-bar-adjustable-transparency top-bar-organizer + unmess user-avatar-in-quick-settings vitals window-gestures @@ -256,6 +256,7 @@ in { ".local/share/gnome-builder" ".local/share/lollypop" ".local/share/nautilus" + ".local/share/sounds" ".local/share/telepathy" ".local/share/webkitgtk" ".cache/fractal" diff --git a/modules/gui/desktop/xfce.nix b/modules/gui/desktop/xfce.nix @@ -7,9 +7,8 @@ ... }: with files; let - inherit (builtins) elem readFile; inherit (config.gui) desktop wallpaper; - apps = config.environment.systemPackages; + exists = app: builtins.elem app config.environment.systemPackages; inherit (lib) mapAttrs' mkIf mkForce mkMerge nameValuePair replaceStrings; # GTK+ Theme @@ -163,11 +162,11 @@ in { (util.map.files xfce.settings (file: replaceStrings ["@system" "@wallpaper"] - [path.system wallpaper] (readFile file)) ".xml"); + [path.system wallpaper] (builtins.readFile file)) ".xml"); ## 3rd Party Apps Configuration # Code Editor - programs.vscode = mkIf (elem pkgs.vscode apps) { + programs.vscode = mkIf (exists pkgs.vscode) { extensions = pkgs.vscode-utils.extensionsFromVscodeMarketplace [ { name = "arc-dark";