dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit 2c8b8420916dfdc03c43b96d0ef8978300bfc72c parent 2b649e4194e334f2fdcb4effa4961ba658be18d2 Author: maydayv7 <maydayv7@gmail.com> Date: Wed, 11 Sep 2024 18:04:43 +0530 feat: Add `spotify` Configuration Using the `spicetify-nix` module
Diffstat:
| M | README.md | | | 2 | +- |
| M | devices/valkyrie/default.nix | | | 1 | + |
| M | files/gnome/settings/extensions.nix | | | 2 | +- |
| M | flake.lock | | | 48 | +++++++++++++++++++++++++++++++++++++++++++----- |
| M | flake.nix | | | 6 | ++++++ |
| M | modules/README.md | | | 2 | +- |
| A | modules/apps/spotify.nix | | | 75 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| M | modules/gui/desktop/gnome/default.nix | | | 1 | - |
| M | modules/gui/gtk.nix | | | 11 | +++++++++-- |
9 files changed, 137 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md @@ -391,7 +391,7 @@ It is not recommended to use NixOS if you are a beginner just starting out, with _May change according to available hardware_ -This configuration works well with an Intel CPU + iGPU, and is not tested with anything else +This configuration works well with an Intel CPU + iGPU, and is currently being improved to support AMD CPU + iGPU + Nvidia GPU. Any other setup is untested The `hardware.modules` option can be used to load relevant configuration from [`nixos-hardware`](https://github.com/nixos/nixos-hardware) See [this](./modules/hardware/README.md) for additional information diff --git a/devices/valkyrie/default.nix b/devices/valkyrie/default.nix @@ -31,6 +31,7 @@ "firefox" "git" "office" + "spotify" "vscode" ]; }; diff --git a/files/gnome/settings/extensions.nix b/files/gnome/settings/extensions.nix @@ -15,9 +15,9 @@ {package = gamemode-indicator-in-system-settings;} {package = gsconnect;} {package = guillotine;} + {package = media-progress;} {package = overview-hover;} {package = removable-drive-menu;} - {package = smile-complementary-extension;} {package = transparent-top-bar;} {package = xlanguagetray;} { diff --git a/flake.lock b/flake.lock @@ -212,6 +212,22 @@ "flake-compat_2": { "flake": false, "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { + "flake": false, + "locked": { "lastModified": 1673956053, "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "owner": "edolstra", @@ -225,7 +241,7 @@ "type": "github" } }, - "flake-compat_3": { + "flake-compat_4": { "flake": false, "locked": { "lastModified": 1696426674, @@ -241,7 +257,7 @@ "type": "github" } }, - "flake-compat_4": { + "flake-compat_5": { "flake": false, "locked": { "lastModified": 1673956053, @@ -863,6 +879,7 @@ ], "proprietary": "proprietary", "sops": "sops", + "spotify": "spotify", "stable": "stable", "stylix": "stylix", "systems": "systems_2", @@ -922,6 +939,27 @@ "type": "github" } }, + "spotify": { + "inputs": { + "flake-compat": "flake-compat_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726028305, + "narHash": "sha256-pKiu7tnsanAj7U6dRWzgRTfonsb3Ty3DHIR3K8tfXLQ=", + "owner": "Gerg-L", + "repo": "spicetify-nix", + "rev": "28d73b741367fc51ea1b1a5a2252c8364d4134da", + "type": "github" + }, + "original": { + "owner": "Gerg-L", + "repo": "spicetify-nix", + "type": "github" + } + }, "stable": { "locked": { "lastModified": 1725876614, @@ -947,7 +985,7 @@ "base16-kitty": "base16-kitty", "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "gnome-shell": "gnome-shell", "home-manager": [ "home-manager" @@ -1084,7 +1122,7 @@ }, "vscode": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "flake-utils": [ "utils" ], @@ -1146,7 +1184,7 @@ }, "windows": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "nixpkgs": [ "unstable" ] diff --git a/flake.nix b/flake.nix @@ -178,6 +178,12 @@ # Declarative Flatpak Wrapper flatpak.url = "github:gmodena/nix-flatpak"; + # Spicetify Module + spotify = { + url = "github:Gerg-L/spicetify-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # VS Code Extensions vsppuccin.url = "github:catppuccin/vscode"; vscode = { diff --git a/modules/README.md b/modules/README.md @@ -6,7 +6,7 @@ Configuration [Builder](./configuration.nix) - [`apps`](./apps): Module that configures various apps and/or environments - - - `list`: List of all enabled applications - `[ "discord" "firefox" "flatpak" "games" "git" "office" "wine" ]` + - `list`: List of all enabled applications - `[ "discord" "firefox" "flatpak" "games" "git" "office" "spotify" "wine" ]` - `git` - - `hosting` - - `enable`: Enable Gitea Code Hosting - `true / false` diff --git a/modules/apps/spotify.nix b/modules/apps/spotify.nix @@ -0,0 +1,75 @@ +{ + config, + lib, + inputs, + pkgs, + ... +}: let + enable = builtins.elem "spotify" config.apps.list; + spice = inputs.spotify.legacyPackages.${pkgs.system}; +in { + ## Spotify Configuration ## + config = lib.mkIf enable { + environment.systemPackages = with pkgs; [spotify spicetify-cli]; + + user = { + persist.directories = [".config/spotify" ".cache/spotify"]; + homeConfig = { + imports = [inputs.spotify.homeManagerModules.default]; + programs.spicetify = { + enable = true; + + # Theming + theme = + spice.themes.sleek + // { + additionalCss = "* { font-family: ${config.stylix.fonts.sansSerif.name} !important } "; + }; + + colorScheme = "custom"; + customColorScheme = with config.lib.stylix.colors; { + "text" = "${base0C}"; + "subtext" = "${base05}"; + "nav-active-text" = "${bright-green}"; + "main" = "${base00}"; + "sidebar" = "${base00}"; + "player" = "${base00}"; + "card" = "${base00}"; + "shadow" = "${base02}"; + "main-secondary" = "${base01}"; + "button" = "${base0C}"; + "button-secondary" = "${green}"; + "button-active" = "${base0D}"; + "button-disabled" = "${base0D}"; + "nav-active" = "${base0D}"; + "play-button" = "${green}"; + "tab-active" = "${yellow}"; + "notification" = "${base0C}"; + "notification-error" = "${orange}"; + "playback-bar" = "${bright-green}"; + "misc" = "${bright-green}"; + }; + + # Player Improvements + enabledCustomApps = with spice.apps; [ + betterLibrary + localFiles + newReleases + ]; + + enabledExtensions = with spice.extensions; [ + beautifulLyrics + goToSong + history + loopyLoop + playNext + popupLyrics + seekSong + showQueueDuration + volumePercentage + ]; + }; + }; + }; + }; +} diff --git a/modules/gui/desktop/gnome/default.nix b/modules/gui/desktop/gnome/default.nix @@ -178,7 +178,6 @@ in { gradience gthumb lollypop - smile video-trimmer wike diff --git a/modules/gui/gtk.nix b/modules/gui/gtk.nix @@ -5,8 +5,9 @@ files, ... }: let - inherit (lib) mkEnableOption mkForce mkIf mkOption types; + inherit (lib) mkEnableOption mkIf mkOption types; cfg = config.gui.gtk; + inherit (config.stylix) fonts; in { options.gui.gtk = { enable = mkEnableOption "Enable GTK Configuration"; @@ -49,12 +50,18 @@ in { home.file.".config/gtk-3.0/bookmarks".text = files.gtk.bookmarks; # Theming + stylix.targets.gtk.enable = false; dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; gtk = { enable = true; - theme = mkForce cfg.theme; + inherit (cfg) theme; iconTheme = config.gui.icons; cursorTheme = config.gui.cursors; + font = { + inherit (fonts.sansSerif) package name; + size = fonts.sizes.applications; + }; + gtk3.extraConfig.gtk-application-prefer-dark-theme = 1; gtk4.extraConfig.gtk-application-prefer-dark-theme = 1; };