From a17cf20b6d12d4fe5781f526c783464cacf912ba Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:31:15 +0100 Subject: [PATCH] Up --- README.md | 2 +- flake.lock | 71 ++++++++++++++++++++- flake.nix | 5 +- home/dunst/default.nix | 6 +- home/home.nix | 4 +- home/hyprland/default.nix | 2 +- home/hyprland/hyprlock.nix | 2 - home/kitty/default.nix | 2 - home/neofetch/config/{logo => ascii.txt} | 0 home/neofetch/config/config.conf | 2 +- home/nvim/default.nix | 38 +++++++---- home/qutebrowser/duckduckgo-colorscheme.nix | 2 - home/shell/zsh.nix | 2 +- home/spicetify/default.nix | 40 ++++++++++++ home/waybar/default.nix | 10 ++- home/wlogout/default.nix | 2 - home/wofi/default.nix | 2 - 17 files changed, 152 insertions(+), 40 deletions(-) rename home/neofetch/config/{logo => ascii.txt} (100%) create mode 100644 home/spicetify/default.nix diff --git a/README.md b/README.md index 540e64b..5a5bae2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is my dotfiles repo. It's a work in progress, and I'm still learning how to # TODOLIST -- [ ] import theme globally +- [x] import theme globally - [ ] Variable user & homeDir - [ ] Settings fzf - [ ] Nixvim Alpha config diff --git a/flake.lock b/flake.lock index 0d0b65f..712bea6 100644 --- a/flake.lock +++ b/flake.lock @@ -151,6 +151,24 @@ "type": "github" } }, + "flake-utils_4": { + "inputs": { + "systems": "systems_4" + }, + "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" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -267,6 +285,22 @@ "type": "github" } }, + "nixpkgs_3": { + "locked": { + "lastModified": 1686020360, + "narHash": "sha256-Wee7lIlZ6DIZHHLiNxU5KdYZQl0iprENXa/czzI6Cj4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4729ffac6fd12e26e5a8de002781ffc49b0e94b7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "devshell": "devshell", @@ -338,7 +372,8 @@ "apple-fonts": "apple-fonts", "home-manager": "home-manager", "nixpkgs": "nixpkgs_2", - "nixvim": "nixvim" + "nixvim": "nixvim", + "spicetify-nix": "spicetify-nix" } }, "sf-arabic": { @@ -389,6 +424,25 @@ "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg" } }, + "spicetify-nix": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1704167711, + "narHash": "sha256-kFDq+kf/Di/P8bq5sUP8pVwRkrSVrABksBjMPmLic3s=", + "owner": "the-argus", + "repo": "spicetify-nix", + "rev": "1325416f951d6a82cfddb1289864ad782e2b87c4", + "type": "github" + }, + "original": { + "owner": "the-argus", + "repo": "spicetify-nix", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, @@ -433,6 +487,21 @@ "repo": "default", "type": "github" } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 2e80921..9e3a473 100644 --- a/flake.nix +++ b/flake.nix @@ -12,9 +12,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; apple-fonts.url = "github:Lyndeno/apple-fonts.nix"; + spicetify-nix.url = "github:the-argus/spicetify-nix"; }; - outputs = inputs@{ nixpkgs, home-manager, nixvim, ... }: { + outputs = inputs@{ nixpkgs, home-manager, nixvim, spicetify-nix, ... }: { nixosConfigurations = { nixy = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -27,7 +28,7 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.hadi = import ./home/home.nix; - home-manager.extraSpecialArgs = { inherit inputs; }; + home-manager.extraSpecialArgs = { inherit inputs; inherit spicetify-nix; }; } ]; }; diff --git a/home/dunst/default.nix b/home/dunst/default.nix index 3bf47d4..263eee9 100644 --- a/home/dunst/default.nix +++ b/home/dunst/default.nix @@ -1,7 +1,5 @@ { config, lib, pkgs, ... }: { - imports = [ ../variables/theme ]; - home.packages = with pkgs; [ libnotify ]; services.dunst = { @@ -13,7 +11,7 @@ settings = { global = { rounded = "yes"; - origin = "top-right"; + origin = "top-center"; monitor = "0"; alignment = "left"; vertical_alignment = "center"; @@ -43,7 +41,7 @@ "%s\\n%b"; # format = "%s %p\n%b" frame_color = "#" + config.theme.colors.bg; frame_width = 1; - offset = "15x15"; + offset = "0x10"; horizontal_padding = 10; icon_position = "left"; indicate_hidden = "yes"; diff --git a/home/home.nix b/home/home.nix index 1236226..4465ca8 100644 --- a/home/home.nix +++ b/home/home.nix @@ -1,10 +1,10 @@ { config, pkgs, ... }: { + home.username = "hadi"; home.homeDirectory = "/home/hadi"; home.packages = with pkgs; [ swappy - spotify imv discord obsidian @@ -50,5 +50,7 @@ ./nextcloud ./scripts ./neofetch + ./spicetify + ./variables/theme ]; } diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 1b6a14b..af41c42 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -1,6 +1,6 @@ { pkgs, config, ... }: { - imports = [ ./hyprlock.nix ./hypridle.nix ../variables/theme ]; + imports = [ ./hyprlock.nix ./hypridle.nix ]; home.packages = with pkgs; [ xdg-desktop-portal-hyprland diff --git a/home/hyprland/hyprlock.nix b/home/hyprland/hyprlock.nix index b24c6e7..16b06b8 100644 --- a/home/hyprland/hyprlock.nix +++ b/home/hyprland/hyprlock.nix @@ -1,7 +1,5 @@ { pkgs, config, ... }: { - imports = [ ../variables/theme ]; - home.packages = with pkgs; [ hyprlock ]; xdg.configFile."hypr/hyprlock.conf".text = '' diff --git a/home/kitty/default.nix b/home/kitty/default.nix index 9106da5..309bc38 100644 --- a/home/kitty/default.nix +++ b/home/kitty/default.nix @@ -1,7 +1,5 @@ { config, ... }: { - imports = [ ../variables/theme ]; - programs.kitty = { enable = true; settings = { diff --git a/home/neofetch/config/logo b/home/neofetch/config/ascii.txt similarity index 100% rename from home/neofetch/config/logo rename to home/neofetch/config/ascii.txt diff --git a/home/neofetch/config/config.conf b/home/neofetch/config/config.conf index 1ce71e4..6d1b0f3 100644 --- a/home/neofetch/config/config.conf +++ b/home/neofetch/config/config.conf @@ -737,7 +737,7 @@ image_backend="ascii" # NOTE: 'auto' will pick the best image source for whatever image backend is used. # In ascii mode, distro ascii art will be used and in an image mode, your # wallpaper will be used. -image_source="auto" +image_source="$HOME/.config/neofetch/ascii.txt" # Ascii Options diff --git a/home/nvim/default.nix b/home/nvim/default.nix index f8a59d0..8101a5e 100644 --- a/home/nvim/default.nix +++ b/home/nvim/default.nix @@ -55,32 +55,46 @@ val = 4; } { - opts = { - position = "center"; - cursor = 3; - width = 50; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; type = "group"; val = [ { type = "button"; val = " New file"; on_press.__raw = "function() vim.cmd[[ene]] end"; - opts.shortcut = "n"; + opts = { + shortcut = "n"; + position = "center"; + cursor = 3; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; } { type = "button"; - val = " NixOs Config"; + val = " NixOs Config"; on_press.__raw = "function() vim.cmd[[e ~/.config/nixos]] end"; - opts.shortcut = "n"; + opts = { + shortcut = "c"; + position = "center"; + cursor = 3; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; } { type = "button"; - val = "󰩈 Quit Neovim"; + val = "󰩈 Quit Neovim"; on_press.__raw = "function() vim.cmd[[qa]] end"; - opts.shortcut = "q"; + opts = { + shortcut = "q"; + position = "center"; + cursor = 3; + width = 50; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; } ]; } diff --git a/home/qutebrowser/duckduckgo-colorscheme.nix b/home/qutebrowser/duckduckgo-colorscheme.nix index 3f4b50e..d054e5a 100644 --- a/home/qutebrowser/duckduckgo-colorscheme.nix +++ b/home/qutebrowser/duckduckgo-colorscheme.nix @@ -1,7 +1,5 @@ { config, ... }: { - imports = [ ../variables/theme ]; - xdg.configFile."duckduckgo-colorscheme.js".text = '' // Cookies string for your theme const cookie = '7=${config.theme.colors.bg}; j=${config.theme.colors.bg}; 9=${config.theme.colors.fg}; aa=${config.theme.colors.alt-fg}; 8=${config.theme.colors.color7}; x=${config.theme.colors.primary-bg}; 21=${config.theme.colors.alt-bg};'; diff --git a/home/shell/zsh.nix b/home/shell/zsh.nix index e32ebcf..0a1fa54 100644 --- a/home/shell/zsh.nix +++ b/home/shell/zsh.nix @@ -9,7 +9,7 @@ syntaxHighlighting.enable = true; historySubstringSearch.enable = true; - initExtraFirst = "nerdfetch"; + initExtraFirst = "neofetch"; history = { ignoreDups = true; diff --git a/home/spicetify/default.nix b/home/spicetify/default.nix new file mode 100644 index 0000000..2651081 --- /dev/null +++ b/home/spicetify/default.nix @@ -0,0 +1,40 @@ +{ pkgs, config, lib, spicetify-nix, ... }: +let spicePkgs = spicetify-nix.packages.${pkgs.system}.default; +in { + + imports = [ spicetify-nix.homeManagerModules.default ]; + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ "spotify" ]; + programs.spicetify = { + enable = true; + theme = spicePkgs.themes.text; + colorScheme = "custom"; + + customColorScheme = { + text = "${config.theme.colors.fg}"; + subtext = "${config.theme.colors.alt-fg}"; + sidebar-text = "${config.theme.colors.alt-fg}"; + main = "${config.theme.colors.bg}"; + sidebar = "${config.theme.colors.bg}"; + background = "${config.theme.colors.bg}"; + player = "${config.theme.colors.bg}"; + card = "${config.theme.colors.bg}"; + shadow = "000000"; + selected-row = "797979"; + button = "31748f"; + button-active = "31748f"; + button-disabled = "555169"; + tab-active = "00FF00"; + misc = "00FF00"; + }; + + enabledExtensions = with spicePkgs.extensions; [ + playlistIcons + lastfm + historyShortcut + hidePodcasts + fullAppDisplay + shuffle + ]; + }; +} diff --git a/home/waybar/default.nix b/home/waybar/default.nix index 27f746a..1955c71 100644 --- a/home/waybar/default.nix +++ b/home/waybar/default.nix @@ -1,5 +1,4 @@ { pkgs, config, lib, ... }: { - imports = [ ../variables/theme ]; services = { blueman-applet.enable = true; network-manager-applet.enable = true; @@ -207,7 +206,6 @@ #custom-logo { padding-right: 7px; - padding-left: 7px; font-size: 15px; color: #${config.theme.colors.primary-bg}; } @@ -232,14 +230,14 @@ } #battery.charging { - background-color: #1E1E2E; - color: #FBFBFB; + background-color: #${config.theme.colors.alt-bg}; + color: #${config.theme.colors.alt-fg}; animation: none; } #custom-power { - background-color: #9978F8; - color: #0C0C0C; + background-color: #${config.theme.colors.primary-bg}; + color: #${config.theme.colors.primary-fg}; } diff --git a/home/wlogout/default.nix b/home/wlogout/default.nix index 7d0df00..fbcab85 100644 --- a/home/wlogout/default.nix +++ b/home/wlogout/default.nix @@ -1,7 +1,5 @@ { config, ... }: { - imports = [ ../variables/theme ]; - programs.wlogout = { enable = true; layout = [ diff --git a/home/wofi/default.nix b/home/wofi/default.nix index ce748fa..036031d 100644 --- a/home/wofi/default.nix +++ b/home/wofi/default.nix @@ -1,7 +1,5 @@ { config, ... }: { - imports = [ ../variables/theme ]; - programs.wofi = { enable = true;