diff --git a/common/themes/default.nix b/common/themes/default.nix index a2ee3fd..cabf5d7 100644 --- a/common/themes/default.nix +++ b/common/themes/default.nix @@ -1,7 +1,20 @@ +{ inputs, ... }: +let + themes = { + catppuccin-mocha = { + image = ./wallpapers/auto/catppuccin-mocha-rain-world.png; + base16Scheme = "${inputs.catppuccin-base16}/base16/mocha.yaml"; + }; + rosepine-dawn = { + image = ./wallpapers/rosepine_light_field.png; + base16Scheme = "${inputs.rosepine-base16}/rose-pine-dawn.yaml"; + }; + }; +in { # Select your current theme here! imports = [ - ./rose-pine-dawn.nix + { stylix = themes.catppuccin-mocha; } ]; # Requires me to manually turn targets on! diff --git a/common/themes/rose-pine-dawn.nix b/common/themes/rose-pine-dawn.nix deleted file mode 100644 index a7b41cd..0000000 --- a/common/themes/rose-pine-dawn.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ inputs, ... }: { - stylix = { - image = ./wallpapers/rosepine_light_field.png; - base16Scheme = "${inputs.rosepine-base16}/rose-pine-dawn.yaml"; - }; -} diff --git a/common/themes/wallpapers/auto/catppuccin-mocha-eye.png b/common/themes/wallpapers/auto/catppuccin-mocha-eye.png new file mode 100644 index 0000000..3a35a6d Binary files /dev/null and b/common/themes/wallpapers/auto/catppuccin-mocha-eye.png differ diff --git a/common/themes/wallpapers/auto/catppuccin-mocha-rain-world.png b/common/themes/wallpapers/auto/catppuccin-mocha-rain-world.png new file mode 100644 index 0000000..8cd0d3a Binary files /dev/null and b/common/themes/wallpapers/auto/catppuccin-mocha-rain-world.png differ diff --git a/common/themes/wallpapers/auto/catppuccin-mocha-spaceship.png b/common/themes/wallpapers/auto/catppuccin-mocha-spaceship.png new file mode 100644 index 0000000..07bfeeb Binary files /dev/null and b/common/themes/wallpapers/auto/catppuccin-mocha-spaceship.png differ diff --git a/common/themes/wallpapers/auto/catppuccin-mocha-synth-city.png b/common/themes/wallpapers/auto/catppuccin-mocha-synth-city.png new file mode 100644 index 0000000..8d33f45 Binary files /dev/null and b/common/themes/wallpapers/auto/catppuccin-mocha-synth-city.png differ diff --git a/common/themes/wallpapers/spaceship.jpg b/common/themes/wallpapers/spaceship.jpg new file mode 100644 index 0000000..f8d3353 Binary files /dev/null and b/common/themes/wallpapers/spaceship.jpg differ diff --git a/common/themes/wallpapers/synth-city.jpg b/common/themes/wallpapers/synth-city.jpg new file mode 100644 index 0000000..53871d4 Binary files /dev/null and b/common/themes/wallpapers/synth-city.jpg differ diff --git a/flake.lock b/flake.lock index c419d7a..97318d8 100644 --- a/flake.lock +++ b/flake.lock @@ -303,6 +303,24 @@ "type": "github" } }, + "flake-utils_4": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "grub2-themes": { "inputs": { "nixpkgs": [ @@ -815,6 +833,7 @@ "nur": "nur", "rosepine-base16": "rosepine-base16", "slambda": "slambda", + "spicetify-nix": "spicetify-nix", "stylix": "stylix" } }, @@ -854,6 +873,27 @@ "type": "github" } }, + "spicetify-nix": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1686173678, + "narHash": "sha256-aYzl34xb3u9I57sqkvSldQKltCnxhjvvLABjgFRxOVE=", + "owner": "the-argus", + "repo": "spicetify-nix", + "rev": "f024752b691ac2dcb2ad378d72a2e3084ce83b79", + "type": "github" + }, + "original": { + "owner": "the-argus", + "repo": "spicetify-nix", + "type": "github" + } + }, "stylix": { "inputs": { "base16": "base16", @@ -909,6 +949,21 @@ "type": "github" } }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "wlroots": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 33e459c..3cd3a0c 100644 --- a/flake.nix +++ b/flake.nix @@ -72,6 +72,10 @@ # [the docs](https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#installation) # tell me not to override the nixpkgs input. nixd.url = "github:nix-community/nixd"; + + # Spotify client + spicetify-nix.url = "github:the-argus/spicetify-nix"; + spicetify-nix.inputs.nixpkgs.follows = "nixpkgs-unstable"; }; # }}} diff --git a/home/features/desktop/discord.nix b/home/features/desktop/discord/default.nix similarity index 54% rename from home/features/desktop/discord.nix rename to home/features/desktop/discord/default.nix index 5aa37b7..7c02d44 100644 --- a/home/features/desktop/discord.nix +++ b/home/features/desktop/discord/default.nix @@ -1,4 +1,8 @@ -{ config, ... }: { +{ config, pkgs, ... }: +let + themeMap = pkgs.callPackage (import ./themes.nix) { }; +in +{ programs.discord = { enable = true; enableOpenASAR = false; @@ -6,6 +10,11 @@ enableDevtools = true; }; + home.packages = [ pkgs.discocss ]; + + xdg.configFile."discocss/custom.css".source = + themeMap.${config.lib.stylix.scheme.scheme} or themeMap.default; + satellite.persistence.at.state.apps.Discord.directories = [ "${config.xdg.configHome}/discord" # Why tf does discord store it's state here 💀 ]; diff --git a/home/features/desktop/discord/themes.nix b/home/features/desktop/discord/themes.nix new file mode 100644 index 0000000..d6f2284 --- /dev/null +++ b/home/features/desktop/discord/themes.nix @@ -0,0 +1,20 @@ +{ lib, fetchurl, ... }: +lib.fix (self: { + "Catppuccin Mocha" = fetchurl { + url = "https://catppuccin.github.io/discord/dist/catppuccin-mocha.theme.css"; + sha256 = "0nv36q310mbm0p5v8anvz98bq68p9m3969rlp464m3mqkj8aszg2"; + }; + "Catppuccin Frappe" = fetchurl { + url = "https://catppuccin.github.io/discord/dist/catppuccin-frappe.theme.css"; + sha256 = "1d55rxp5z0c4m0g6qn6y28mrps7psfgvag1yf0h2ac3znmmyjrqk"; + }; + "Catppuccin Latte" = fetchurl { + url = "https://catppuccin.github.io/discord/dist/catppuccin-latte.theme.css"; + sha256 = "1m0vjq3bj62rm9n5cabpqhghxyaj1676q9k83z7dabsqq3d4blpv"; + }; + "Catppuccin Macchiato" = fetchurl { + url = "https://catppuccin.github.io/discord/dist/catppuccin-macchiato.theme.css"; + sha256 = "1wnphnzgv90r5zgxrr5w36pm1wa5qmkyb72gylj4j1wrk3h7vfvc"; + }; + default = self."Catppuccin Macchiato"; +}) diff --git a/home/features/desktop/firefox/default.nix b/home/features/desktop/firefox/default.nix index 96c0d78..8c4cd21 100644 --- a/home/features/desktop/firefox/default.nix +++ b/home/features/desktop/firefox/default.nix @@ -95,7 +95,6 @@ in type = "options"; }; - # Purescript packages "Pursuit" = mkBasicSearchEngine { url = "https://pursuit.purescript.org/search"; param = "q"; @@ -132,6 +131,12 @@ in aliases = [ "@rw" "@rain-world" ]; }; + "Arch wiki" = mkBasicSearchEngine { + url = "https://wiki.archlinux.org/index.php"; + param = "search"; + aliases = [ "@aw" "@arch-wiki" ]; + }; + "Factorio wiki" = mkBasicSearchEngine { url = "https://wiki.factorio.com/index.php"; param = "search"; diff --git a/home/features/desktop/keepassxc.nix b/home/features/desktop/keepassxc.nix new file mode 100644 index 0000000..f2ea6b4 --- /dev/null +++ b/home/features/desktop/keepassxc.nix @@ -0,0 +1,3 @@ +{ + services.keepassx.enable = true; +} diff --git a/home/features/desktop/spotify.nix b/home/features/desktop/spotify.nix new file mode 100644 index 0000000..a4e1dff --- /dev/null +++ b/home/features/desktop/spotify.nix @@ -0,0 +1,38 @@ +{ inputs, pkgs, config, ... }: +let + spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default; + themeMap = { + "Catppuccin Mocha" = spicePkgs.themes.catppuccin-mocha; + "Catppuccin Latte" = spicePkgs.themes.catppuccin-latte; + "Catppuccin Frappe" = spicePkgs.themes.catppuccin-frappe; + "Catppuccin Macchiato" = spicePkgs.themes.catppuccin-macchiato; + # TODO: add rosepine themes here + default = spicePkgs.themes.catppuccin-mocha; + }; +in +{ + programs.spicetify = { + enable = true; + theme = themeMap.${config.lib.stylix.scheme.scheme} or themeMap.default; + enabledExtensions = with spicePkgs.extensions; [ + fullAppDisplayMod + shuffle # Working shuffle + keyboardShortcut + skipStats # Track my skips + listPlaylistsWithSong # Adds button to show playlists which contain a song + playlistIntersection # Shows stuff that's in two different playlists + fullAlbumDate + bookmark + trashbin + groupSession + wikify # Shows an artist's wikipedia entry + songStats + showQueueDuration + genre + adblock + savePlaylists # Adds a button to duplicate playlists + ]; + }; + + # TODO: persistence +} diff --git a/home/features/desktop/spotifyd/default.nix b/home/features/desktop/spotifyd/default.nix new file mode 100644 index 0000000..abf3628 --- /dev/null +++ b/home/features/desktop/spotifyd/default.nix @@ -0,0 +1,16 @@ +{ config, lib, pkgs, ... }: { + services.spotifyd = { + enable = true; + settings = { + global = { + username = "mjmsimuzc910khmr6yoccgtyr"; + device_name = "nix"; # TODO: perhaps include the hostname here? + password_cmd = + # TODO: move this in it's own module + let identities = builtins.concatStringsSep " " (map (path: "-i ${path}") config.homeage.identityPaths); + in "${lib.getExe pkgs.age} --decrypt ${identities} ${./password.age}"; + }; + }; + }; +} + diff --git a/home/features/desktop/spotifyd/password.age b/home/features/desktop/spotifyd/password.age new file mode 100644 index 0000000..bbe9ffd --- /dev/null +++ b/home/features/desktop/spotifyd/password.age @@ -0,0 +1,8 @@ +age-encryption.org/v1 +-> ssh-ed25519 UUF9JQ FSx8O2svnwtbQ14eDPxFaBpnnUwx8rZbbzPKbg6yP2c +iZSfXaCF4b3vdpceO6cjdD4e+s+a0wowJJFNflO/JJQ +-> _nE-grease ,,1|@ +RtO87gZKvnqPCFUe5XcXgXuIOmMFMrJU7YU +--- dA0HKjUgZYdBU/DF+t6K7oeVu725up4Ve7ya7alP7yk +D$9?|G0>͊|4Z5>e$ +#kDgq \ No newline at end of file diff --git a/home/features/wayland/hyprland/hyprland.conf b/home/features/wayland/hyprland/hyprland.conf index f6fab3d..d34e307 100644 --- a/home/features/wayland/hyprland/hyprland.conf +++ b/home/features/wayland/hyprland/hyprland.conf @@ -33,7 +33,7 @@ gestures { } # Execute apps at launch -exec-once = wezterm & firefox & discord +exec-once = wezterm & firefox & discocss # {{{ Window rules # {{{ Automatically move stuff to workspaces diff --git a/home/global/default.nix b/home/global/default.nix index d6452be..039a616 100644 --- a/home/global/default.nix +++ b/home/global/default.nix @@ -1,4 +1,4 @@ -{ inputs, lib, pkgs, config, outputs, ... }: +{ inputs, lib, config, outputs, ... }: let # {{{ Imports imports = [ @@ -7,6 +7,7 @@ let inputs.nur.nixosModules.nur inputs.impermanence.nixosModules.home-manager.impermanence inputs.hyprland.homeManagerModules.default + inputs.spicetify-nix.homeManagerModules.spicetify ../features/cli ../features/neovim diff --git a/home/tethys.nix b/home/tethys.nix index 33b9bef..292f83f 100644 --- a/home/tethys.nix +++ b/home/tethys.nix @@ -2,9 +2,10 @@ imports = [ ./global - ./features/desktop/discord.nix ./features/desktop/zathura.nix + ./features/desktop/spotify.nix ./features/desktop/firefox + ./features/desktop/discord ./features/xorg/xmonad.nix ./features/wayland/hyprland diff --git a/overlays/default.nix b/overlays/default.nix index 9852ba1..5098e85 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -11,17 +11,17 @@ # }); # {{{ Wezterm - # REASON: https://github.com/wez/wezterm/issues/3529 doesn't seem to be fixed on stable - wezterm = prev.wezterm.overrideAttrs (_: { - version = "unstable-2023-06-12"; - src = prev.fetchFromGitHub { - owner = "wez"; - repo = "wezterm"; - rev = "baf9d970816e015bee41ed5eb9186ef7f71c454c"; - hash = "sha256-0pqfpn12963hfwdhgdwx9fwjngv6j2i6w9d20hcp1saxfd7q5l7m"; - fetchSubmodules = true; - }; - }); + # # REASON: https://github.com/wez/wezterm/issues/3529 doesn't seem to be fixed on stable + # wezterm = prev.wezterm.overrideAttrs (_: { + # version = "unstable-2023-06-12"; + # src = prev.fetchFromGitHub { + # owner = "wez"; + # repo = "wezterm"; + # rev = "baf9d970816e015bee41ed5eb9186ef7f71c454c"; + # sha256 = "0pqfpn12963hfwdhgdwx9fwjngv6j2i6w9d20hcp1saxfd7q5l7m"; + # fetchSubmodules = true; + # }; + # }); # }}} }; diff --git a/secrets.nix b/secrets.nix index 01479b1..91cf4d1 100644 --- a/secrets.nix +++ b/secrets.nix @@ -9,4 +9,5 @@ in # Scoped for the user "./home/features/desktop/wakatime/wakatime_config.age".publicKeys = [ adrielus ]; + "./home/features/desktop/spotifyd/password.age".publicKeys = [ adrielus ]; }