From 7ef2f2893846b06bc00e86041e886a0d6b05c27b Mon Sep 17 00:00:00 2001 From: xqtc161 Date: Sat, 30 Mar 2024 17:46:21 +0100 Subject: [PATCH] added some cool stuff idk anymore i should commit more frequently --- flake.lock | 83 ++++++++++++++++++++++--- flake.nix | 3 +- home/config-files/maxfetch.sh | 53 ++++++++++++++++ home/default.nix | 1 + home/modules/gtk.nix | 27 +++++++- home/modules/home-pkgs.nix | 5 +- home/modules/nixvim.nix | 4 +- home/modules/shell.nix | 2 +- home/modules/spicetify.nix | 20 ++++++ home/modules/wm.nix | 2 + hosts/x86_64-linux/asmodeus/default.nix | 9 +-- 11 files changed, 192 insertions(+), 17 deletions(-) create mode 100755 home/config-files/maxfetch.sh create mode 100644 home/modules/spicetify.nix diff --git a/flake.lock b/flake.lock index c1fe159..6cc9aac 100644 --- a/flake.lock +++ b/flake.lock @@ -198,6 +198,24 @@ "type": "github" } }, + "flake-utils_5": { + "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": [ @@ -317,11 +335,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1711629990, - "narHash": "sha256-GrFpJqyudEkhg4wPIX5iDvjE9W7s4nrg330zf7L0BAE=", + "lastModified": 1711747752, + "narHash": "sha256-iEeV/qrWaKfbdhR49B5F/sm/k0yxiGUAE5eXaoLSFNs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c3e603e788171c64c4f1a0a7901c860fbcd13f0c", + "rev": "387ef8710bf6ec095dea0829462f3d76a8a7f31f", "type": "github" }, "original": { @@ -363,6 +381,22 @@ "type": "github" } }, + "nixpkgs_4": { + "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", @@ -376,11 +410,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1711630555, - "narHash": "sha256-jslStwDlRwVZLwcFkExWegOGYv/Dn9q7yoocUX7AsIg=", + "lastModified": 1711745924, + "narHash": "sha256-ZYVrOg12pWNbY1hx1lOu3cwER6xalEHUUIXnfbkCtUY=", "owner": "nix-community", "repo": "nixvim", - "rev": "acb917fbf2bc9ce9c556516d8a1f257709b3cf1e", + "rev": "4f83bcf2906c1c933316396221024f3482a7b086", "type": "github" }, "original": { @@ -426,7 +460,8 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_3", "nixpkgs-master": "nixpkgs-master", - "nixvim": "nixvim" + "nixvim": "nixvim", + "spicetify-nix": "spicetify-nix" } }, "rust-overlay": { @@ -445,6 +480,25 @@ "type": "github" } }, + "spicetify-nix": { + "inputs": { + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_4" + }, + "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, @@ -489,6 +543,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 ea3f59b..08001e7 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,8 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - #inputs.agenix.url = "github:ryantm/agenix"; + #inputs.agenix.url = "github:ryantm/agenix"; + inputs.spicetify-nix.url = "github:the-argus/spicetify-nix"; inputs.firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixos-hardware.url = "github:NixOS/nixos-hardware/master"; inputs.nixvim = { diff --git a/home/config-files/maxfetch.sh b/home/config-files/maxfetch.sh new file mode 100755 index 0000000..e96c2a3 --- /dev/null +++ b/home/config-files/maxfetch.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +unicode=" " +version="1.2.0" + +_black=$(tput setaf 0) +red=$(tput setaf 1) +green=$(tput setaf 2) +yellow=$(tput setaf 3) +blue=$(tput setaf 4) +magenta=$(tput setaf 5) +cyan=$(tput setaf 6) +_white=$(tput setaf 7) +_bright=$(tput bold) +normal=$(tput sgr0) +_underline=$(tput smul) + +up=$(uptime | awk -F'( |,|:)+' '{ + d=h=m=0; + if ($7=="min") + m=$6; + else { + if ($7~/^day/) { d=$6; h=$8; m=$9} + else {h=$6;m=$7} + } + } + { print h+0,"h",m+0,"m" } +') +up=$(sed -e "s/ h/h/g" <<< ${up}) +up=$(sed -e "s/ m/m/g" <<< ${up}) + +pkgs=$(nix-store --query --requisites /run/current-system | wc -l) + +fetch() { + echo "${cyan}$(tput bold) _ ___ ____ ____ ${normal}$(tput sgr0)" + echo "${cyan}$(tput bold) / |/ (_)_ __/ __ \/ __/ ${normal}$(tput sgr0)" + echo "${cyan}$(tput bold) / / /\ \ / /_/ /\ \ ${normal}$(tput sgr0)" + echo "${cyan}$(tput bold) /_/|_/_//_\_"'\\'"____/___/ ${normal}$(tput sgr0)" + echo "" + echo " ╭─────────────╮ " + echo " │ ${red} ${normal} user │ ${red}$(whoami)${normal}" + echo " │ ${yellow} ${normal} distro │ ${yellow}$(sed -nE "s@PRETTY_NAME=\"([^\"]*)\"@\1@p" /etc/os-release)${normal} " + echo " │ ${green} ${normal} kernel │ ${green}$(uname -r)${normal} " + echo " │ ${cyan}󱂬 ${normal} de/wm │ ${cyan}$XDG_CURRENT_DESKTOP${normal} " + echo " │ ${blue} ${normal} uptime │ ${blue}${up}${normal} " + echo " │ ${magenta} ${normal} shell │ ${magenta}$(echo ${SHELL##*/})${normal} " + echo " │ ${red}󰏖 ${normal} pkgs │ ${red}${pkgs}${normal} " + echo " ├─────────────┤ " + echo " │ ${_white} ${normal}colors │${_white}$unicode${normal}${red}$unicode${normal}${yellow}$unicode${normal}${green}$unicode${normal}${cyan}$unicode${normal}${blue}$unicode${normal}${magenta}$unicode${normal}${_black}$unicode${normal}" + echo " ╰─────────────╯ " +} + +fetch && exit 0 diff --git a/home/default.nix b/home/default.nix index ce6b44b..21406ef 100644 --- a/home/default.nix +++ b/home/default.nix @@ -13,6 +13,7 @@ ./modules/gtk.nix ./modules/home-pkgs.nix ./modules/git.nix + ./modules/spicetify.nix #./modules/ssh.nix ]; home.username = "xqtc"; diff --git a/home/modules/gtk.nix b/home/modules/gtk.nix index 1f0b3e0..442db96 100644 --- a/home/modules/gtk.nix +++ b/home/modules/gtk.nix @@ -9,6 +9,23 @@ color-scheme = "prefer-dark"; cursor-theme = "Adwaita"; }; + "org/gnome/shell" = { + disable-user-extensions = false; + + # `gnome-extensions list` for a list + enabled-extensions = [ + "user-theme@gnome-shell-extensions.gcampax.github.com" + "trayIconsReloaded@selfmade.pl" + "Vitals@CoreCoding.com" + # "dash-to-panel@jderose9.github.com" + "blur-my-shell@aunetx" + "sound-output-device-chooser@kgshank.net" + "space-bar@luchrioh" + ]; + }; + "org/gnome/shell/extensions/user-theme" = { + name = "Catppuccin-Mocha-Compact-Pink-Dark"; + }; }; gtk = { @@ -33,5 +50,13 @@ ''; }; }; - home.sessionVariables.GTK_THEME = "palenight"; + home.packages = with pkgs; [ + gnomeExtensions.user-themes + gnomeExtensions.blur-my-shell + gnomeExtensions.tray-icons-reloaded + gnomeExtensions.vitals + gnomeExtensions.dash-to-panel + gnomeExtensions.sound-output-device-chooser + gnomeExtensions.space-bar + ]; } diff --git a/home/modules/home-pkgs.nix b/home/modules/home-pkgs.nix index 32f1748..f3009bf 100644 --- a/home/modules/home-pkgs.nix +++ b/home/modules/home-pkgs.nix @@ -10,14 +10,17 @@ pkgs.steam pkgs.protonup-qt pkgs.via - pkgs.spotify + # pkgs.spotify ] else []; + + maxfetch = pkgs.writeScriptBin "maxfetch" (builtins.readFile ../config-files/maxfetch.sh); in { home.packages = [ pkgs.neofetch pkgs.uwufetch + maxfetch pkgs.btop pkgs.iftop pkgs.ranger diff --git a/home/modules/nixvim.nix b/home/modules/nixvim.nix index 97c36c9..23813b8 100644 --- a/home/modules/nixvim.nix +++ b/home/modules/nixvim.nix @@ -32,9 +32,9 @@ copilot-lua = { enable = true; suggestion = { - enabled = false; + enabled = false; }; - panel.enabled = false; + panel.enabled = false; }; copilot-cmp.enable = true; lsp = { diff --git a/home/modules/shell.nix b/home/modules/shell.nix index 2ff1d69..0b4e984 100644 --- a/home/modules/shell.nix +++ b/home/modules/shell.nix @@ -14,7 +14,7 @@ nushell = { enable = true; shellAliases = {ls = "eza -l --icons --group-directories-first";}; - extraConfig = "uwufetch --image"; + extraConfig = "maxfetch"; configFile = { text = '' $env.config = { diff --git a/home/modules/spicetify.nix b/home/modules/spicetify.nix new file mode 100644 index 0000000..a7eaa9b --- /dev/null +++ b/home/modules/spicetify.nix @@ -0,0 +1,20 @@ +{ pkgs, lib, inputs, ... }: +let + spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default; +in +{ + imports = [ inputs.spicetify-nix.homeManagerModule ]; + + programs.spicetify = + { + enable = true; + theme = spicePkgs.themes.catppuccin; + colorScheme = "mocha"; + + enabledExtensions = with spicePkgs.extensions; [ + fullAppDisplay + shuffle # shuffle+ (special characters are sanitized out of ext names) + # hidePodcasts + ]; + }; +} diff --git a/home/modules/wm.nix b/home/modules/wm.nix index 781374c..4521424 100644 --- a/home/modules/wm.nix +++ b/home/modules/wm.nix @@ -63,5 +63,7 @@ font = "Hack Nerd Font 15"; backgroundColor = "#1e1e2e"; textColor = "#cdd6f4"; + icons = true; + actions = true; }; } diff --git a/hosts/x86_64-linux/asmodeus/default.nix b/hosts/x86_64-linux/asmodeus/default.nix index 03533cb..3ab652d 100644 --- a/hosts/x86_64-linux/asmodeus/default.nix +++ b/hosts/x86_64-linux/asmodeus/default.nix @@ -61,7 +61,7 @@ nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.stable; + # package = config.boot.kernelPackages.nvidiaPackages.stable; }; # Use the systemd-boot EFI boot loader. @@ -93,10 +93,11 @@ # Enable the X11 windowing system. services.xserver.enable = true; - #services.xserver.displayManager.gdm.enable = true; + services.xserver.displayManager.gdm.enable = true; #services.xserver.displayManager.sddm.enable = true; - services.xserver.desktopManager.plasma6.enable = true; - services.xserver.displayManager.defaultSession = "plasma"; + # services.xserver.desktopManager.plasma6.enable = true; + services.xserver.desktopManager.gnome.enable = true; + # services.xserver.displayManager.defaultSession = "plasma"; services.xserver.videoDrivers = ["nvidia"]; virtualisation.docker.enable = true;