diff --git a/configuration.nix b/configuration.nix index 4ed807d..fbd49d3 100755 --- a/configuration.nix +++ b/configuration.nix @@ -10,6 +10,8 @@ ./system/nvidia.nix ./system/de/gdm.nix ./system/de/hypr/hyprland.nix + ./system/nfs.nix + ./system/fonts.nix inputs.home-manager.nixosModules.default ]; @@ -85,9 +87,6 @@ "networkmanager" "wheel" ]; - packages = with pkgs; [ - # thunderbird - ]; }; # Install firefox. @@ -103,6 +102,8 @@ neovim git openssh + pkgs.ntfs3g + xdg-user-dirs-gtk # This helps with Nautilus integration ]; services.openssh = { @@ -124,10 +125,42 @@ "flakes" ]; + # Mount my second drive + boot.supportedFilesystems = [ "ntfs" ]; + fileSystems."/mnt/working-files" = { + device = "/dev/disk/by-uuid/BE8EBBDA8EBB8A03"; + fsType = "ntfs"; + options = [ + "uid=1000" # your user ID (check with `id -u`) + "gid=100" # your primary group ID (check with `id -g`) + "dmask=022" # dir permissions + "fmask=133" # file permissions + "nofail" + + # make Nautilus show it with a friendly name/icon + "x-gvfs-show" + "x-gvfs-name=Working Files" + ]; + }; + + # Theme + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark.yaml"; + # image = "/home/javi/Documents/wallpapers/Fantasy-Mountain.png"; + polarity = "dark"; + }; + + # Enable home manager home-manager = { extraSpecialArgs = { inherit inputs; }; users = { - "javi" = import ./home.nix; + "javi" = { + imports = [ + inputs.hyprshell.homeManagerModules.default + ./home.nix + ]; + }; }; }; } diff --git a/flake.lock b/flake.lock index ed8bb87..b33171b 100755 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,142 @@ { "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1746562888, + "narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1752979451, + "narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "27cf1e66e50abc622fb76a3019012dc07c678fac", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1732806396, + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + } + }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1748383148, + "narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1748186689, + "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "48.2", + "repo": "gnome-shell", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -20,7 +157,41 @@ "type": "github" } }, + "hyprshell": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1754802608, + "narHash": "sha256-GRWUaXM5pCLAJgo68UHNRwPyR6BzujAr+OjfzORvBLA=", + "ref": "refs/heads/main", + "rev": "cf212539708422ef62469cb5e1abefd5303e28b3", + "revCount": 11, + "type": "git", + "url": "https://gitgud.foo/thegrind/hypr-shell.git" + }, + "original": { + "type": "git", + "url": "https://gitgud.foo/thegrind/hypr-shell.git" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1754725699, + "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1754498491, "narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=", @@ -36,10 +207,167 @@ "type": "github" } }, + "nur": { + "inputs": { + "flake-parts": [ + "stylix", + "flake-parts" + ], + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1751906969, + "narHash": "sha256-BSQAOdPnzdpOuCdAGSJmefSDlqmStFNScEnrWzSqKPw=", + "owner": "nix-community", + "repo": "NUR", + "rev": "ddb679f4131e819efe3bbc6457ba19d7ad116f25", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "hyprshell": "hyprshell", + "nixpkgs": "nixpkgs_2", + "stylix": "stylix" + } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-parts": "flake-parts", + "gnome-shell": "gnome-shell", + "nixpkgs": [ + "nixpkgs" + ], + "nur": "nur", + "systems": "systems", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-schemes": "tinted-schemes", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1754597531, + "narHash": "sha256-OpC9/PBIuL2WEJUkcuD/wVxI8r+3o6f5RylSIefjHo4=", + "owner": "danth", + "repo": "stylix", + "rev": "63bb34a66ad7d1af2e95ee20dd675896b2074c32", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "type": "github" + } + }, + "tinted-schemes": { + "flake": false, + "locked": { + "lastModified": 1750770351, + "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1751159871, + "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1751158968, + "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "86a470d94204f7652b906ab0d378e4231a5b3384", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 88127f9..7138bb1 100755 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,11 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + hyprshell.url = "git+https://gitgud.foo/thegrind/hypr-shell.git"; + stylix = { + url = "github:danth/stylix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -24,6 +29,7 @@ specialArgs = { inherit inputs; }; modules = [ inputs.home-manager.nixosModules.default + inputs.stylix.nixosModules.stylix ./configuration.nix ]; }; diff --git a/home.nix b/home.nix index f2a9766..cdb2cfb 100755 --- a/home.nix +++ b/home.nix @@ -1,6 +1,7 @@ { config, pkgs, + lib, ... }: { @@ -33,6 +34,7 @@ # Basics starship nautilus + quickshell # Terminal tools yazi @@ -47,13 +49,16 @@ vscode neovim nixfmt # Nix formatting + pkgs.libsForQt5.full # QML formatting (for working on quickshell) # System tools btop fastfetch + gnumake # Langs php + php84Packages.composer go nodejs_22 bun @@ -62,33 +67,50 @@ mpc ]; + programs.btop = { + enable = true; + }; + + programs.yazi = { + enable = true; + keymap = { + manager.prepend_keymap = [ + { + on = [ + "b" + "g" + ]; + run = "shell 'hyprctl hyprpaper preload \"$0\" && hyprctl hyprpaper wallpaper \", $0\"'"; + desc = "Set as wallpaper"; + } + ]; + }; + }; + + stylix = { + enable = true; + targets = { + btop.enable = true; + }; + }; + # Environment variables home.sessionVariables = { EDITOR = "code"; BROWSER = "brave"; TERMINAL = "kitty"; + NVD_BACKEND = "wayland"; + OZONE_PLATFORM = "wayland"; + OZONE_PLATFORM_HINT = "auto"; + XDG_CACHE_HOME = "${config.home.homeDirectory}/.cache"; + XDG_CONFIG_HOME = "${config.home.homeDirectory}/.config"; + XDG_DATA_HOME = "${config.home.homeDirectory}/.local/share"; + XDG_STATE_HOME = "${config.home.homeDirectory}/.local/state"; }; - # File associations - xdg.mimeApps = { - enable = true; - defaultApplications = { - "text/html" = "brave-browser.desktop"; - "x-scheme-handler/http" = "brave-browser.desktop"; - "x-scheme-handler/https" = "brave-browser.desktop"; - "x-scheme-handler/about" = "brave-browser.desktop"; - "x-scheme-handler/unknown" = "brave-browser.desktop"; - "application/pdf" = "org.gnome.Evince.desktop"; - "text/plain" = "code.desktop"; - "application/json" = "code.desktop"; - "application/javascript" = "code.desktop"; - "text/x-php" = "code.desktop"; - }; - }; - - # XDG directories + # Configure all the xdg stuff so apps work correctly xdg = { - enable = true; + # Normal expected directories userDirs = { enable = true; createDirectories = true; @@ -97,9 +119,27 @@ download = "${config.home.homeDirectory}/Downloads"; music = "${config.home.homeDirectory}/Music"; pictures = "${config.home.homeDirectory}/Pictures"; - videos = "${config.home.homeDirectory}/Videos"; - templates = "${config.home.homeDirectory}/Templates"; publicShare = "${config.home.homeDirectory}/Public"; + templates = "${config.home.homeDirectory}/Templates"; + videos = "${config.home.homeDirectory}/Videos"; + }; + + # File/app associations + + mimeApps = { + enable = true; + defaultApplications = { + "text/html" = "brave-browser.desktop"; + "x-scheme-handler/http" = "brave-browser.desktop"; + "x-scheme-handler/https" = "brave-browser.desktop"; + "x-scheme-handler/about" = "brave-browser.desktop"; + "x-scheme-handler/unknown" = "brave-browser.desktop"; + "application/pdf" = "org.gnome.Evince.desktop"; + "text/plain" = "code.desktop"; + "application/json" = "code.desktop"; + "application/javascript" = "code.desktop"; + "text/x-php" = "code.desktop"; + }; }; }; diff --git a/home/hyprland.nix b/home/hyprland.nix index f5e2ab9..c849632 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -6,18 +6,30 @@ }: { - home.packages = [ - pkgs.wofi - # pkgs.hyprlock - pkgs.mako - pkgs.libnotify - ]; - imports = [ # Configs ./hyprland/binds.nix # Ecosystem ./hyprland/hyprpaper.nix + # Desktop environment + ./hyprland/hyprpanel.nix + ]; + + home.packages = with pkgs; [ + # Running apps + wofi + + # Notifications + libnotify + + # Screenshots + grim + slurp + wl-clipboard + hyprshot + + # Desktop env + hyprpanel ]; # Important for certain apps working @@ -33,11 +45,11 @@ wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.settings = { - "$mod" = "SUPER"; - "$browser" = "brave"; - "$terminal" = "kitty"; - "$file_browser" = "nautilus"; - "$webapp" = "$browser --new-window --app="; + input = { + repeat_delay = 200; + repeat_rate = 20; + follow_mouse = 0; + }; monitor = [ "DP-5, 3440x1440@179.99, 0x0, 1" @@ -45,17 +57,17 @@ general = { layout = "master"; - gaps_out = 10; - gaps_in = 10; + gaps_out = 0; + gaps_in = 0; }; workspace = [ - 1 - 2 - 3 - 4 - 5 - 6 + "1, persistent:true" + "2, persistent:true" + "3, persistent:true" + "4, persistent:true" + "5, persistent:true" + "6, persistent:true" ]; # Window rules @@ -74,7 +86,10 @@ inactive_opacity = 1.0; }; - exec-once = [ ]; + exec-once = [ + # "quickshell -c hyprshell" + "hyprpanel" + ]; }; wayland.windowManager.hyprland.plugins = [ diff --git a/home/hyprland/binds.nix b/home/hyprland/binds.nix index 93cb79e..d9de5fe 100644 --- a/home/hyprland/binds.nix +++ b/home/hyprland/binds.nix @@ -28,7 +28,9 @@ "$mod SHIFT, o, exec, $browser" "$mod SHIFT, p, exec, $browser --incognito" "$mod, e, exec, $file_browser" - "$mod SHIFT, n, exec, kitty --start-as=normal -- bash -ic 'code ~/nix && exit'" + "$mod SHIFT, n, exec, $terminal --start-as=normal -- bash -ic 'code ~/nix && exit'" + "$mod SHIFT, ESC, exec, $terminal --start-as=normal -- bash -ic 'btop'" + "$mod ALT, p, exec, $terminal --start-as=normal -- bash -ic 'proj'" "$mod, RETURN, exec, $webapphttps://chatgpt.com" # Window and workspace navigation @@ -50,7 +52,10 @@ "$mod, v, togglefloating, active" "$mod, SPACE, exec, wofi --show drun" - "$mod SHIFT, s, togglespecialworkspace, comms" + "$mod SHIFT, s, exec, hyprshot --mode region" + ", PRINT, exec, hyprshot --mode output" + + "$mod SHIFT, c, togglespecialworkspace, comms" "$mod SHIFT, a, togglespecialworkspace, research" "$mod SHIFT ALT, x, exec, hyprctl dispatch exit" "SHIFT, Print, exec, grimblast copy area" diff --git a/home/hyprland/hyprpanel.nix b/home/hyprland/hyprpanel.nix new file mode 100644 index 0000000..fe63ac9 --- /dev/null +++ b/home/hyprland/hyprpanel.nix @@ -0,0 +1,57 @@ +{ inputs, pkgs, ... }: + +{ + programs.hyprpanel = { + enable = true; + settings = { + bar = { + layouts = { + "0" = { + left = [ + "dashboard" + "workspaces" + "cpu" + "ram" + "systray" + ]; + middle = [ + "clock" + ]; + right = [ + "media" + "volume" + "network" + "notifications" + ]; + }; + }; + }; + + bar.launcher.autoDetectIcon = true; + bar.workspaces.show_icons = true; + + menus.clock = { + time = { + military = false; + hideSeconds = true; + }; + weather.unit = "imperial"; + }; + + menus.dashboard.directories.enabled = false; + menus.dashboard.stats.enable_gpu = true; + + theme = import ./hyprpanel/theme-gruvbox.nix; + + # theme.bar.transparent = { + # transparent = false; + # buttons.style = "wave"; + # }; + + # theme.font = { + # name = "CaskaydiaCove NF"; + # size = "14px"; + # }; + }; + }; +} diff --git a/home/hyprland/hyprpanel/theme-gruvbox.nix b/home/hyprland/hyprpanel/theme-gruvbox.nix new file mode 100644 index 0000000..c66a28f --- /dev/null +++ b/home/hyprland/hyprpanel/theme-gruvbox.nix @@ -0,0 +1,685 @@ +{ + font.size = "14px"; + bar = { + background = "#1d2021"; + border.color = "#83a598"; + + buttons = { + style = "wave"; + background = "#282828"; + icon_background = "#242438"; + hover = "#504945"; + text = "#83a598"; + icon = "#83a598"; + borderColor = "#83a598"; + + dashboard = { + background = "#282828"; + icon = "#fabd2f"; + border = "#fabd2f"; + }; + + workspaces = { + background = "#282828"; + hover = "#504945"; + available = "#83a598"; + occupied = "#fb4934"; + active = "#d3869b"; + numbered_active_highlighted_text_color = "#21252b"; + numbered_active_underline_color = "#ffffff"; + border = "#ffffff"; + }; + + windowtitle = { + background = "#282828"; + text = "#d3869b"; + icon = "#d3869b"; + icon_background = "#d3869b"; + border = "#d3869b"; + }; + + media = { + background = "#282828"; + text = "#83a598"; + icon = "#83a598"; + icon_background = "#83a598"; + border = "#83a598"; + }; + + volume = { + background = "#282828"; + text = "#fe8018"; + icon = "#fe8018"; + icon_background = "#fe8018"; + border = "#fe8018"; + }; + + network = { + background = "#282828"; + text = "#b16286"; + icon = "#b16286"; + icon_background = "#b16286"; + border = "#b16286"; + }; + + bluetooth = { + background = "#282828"; + text = "#83a598"; + icon = "#83a598"; + icon_background = "#83a598"; + border = "#83a598"; + }; + + systray = { + background = "#282828"; + border = "#504945"; + customIcon = "#ebdbb2"; + }; + + battery = { + background = "#282828"; + text = "#fabd2f"; + icon = "#fabd2f"; + icon_background = "#fabd2f"; + border = "#fabd2f"; + }; + + clock = { + background = "#282828"; + text = "#d3869b"; + icon = "#d3869b"; + icon_background = "#d3869b"; + border = "#d3869b"; + }; + + notifications = { + background = "#282828"; + icon = "#83a598"; + icon_background = "#83a598"; + total = "#83a598"; + border = "#83a598"; + }; + + modules = { + power = { + background = "#282828"; + icon = "#cc241d"; + icon_background = "#282828"; + border = "#282828"; + }; + + weather = { + background = "#282828"; + text = "#fe8017"; + icon = "#fe8017"; + icon_background = "#282828"; + border = "#fe8017"; + }; + + updates = { + background = "#282828"; + text = "#b16286"; + icon = "#b16286"; + icon_background = "#282828"; + border = "#b16286"; + }; + + kbLayout = { + background = "#282828"; + text = "#83a598"; + icon = "#83a598"; + icon_background = "#282828"; + border = "#83a598"; + }; + + netstat = { + background = "#282828"; + text = "#b8bb26"; + icon = "#b8bb26"; + icon_background = "#282828"; + border = "#b8bb26"; + }; + + storage = { + background = "#282828"; + text = "#83a598"; + icon = "#83a598"; + icon_background = "#282828"; + border = "#83a598"; + }; + + cpu = { + background = "#282828"; + text = "#d3869b"; + icon = "#d3869b"; + icon_background = "#282828"; + border = "#d3869b"; + }; + + ram = { + background = "#282828"; + text = "#fabd2f"; + icon = "#fabd2f"; + icon_background = "#282828"; + border = "#fabd2f"; + }; + + submap = { + background = "#282828"; + text = "#8ec07c"; + border = "#8ec07c"; + icon = "#8ec07c"; + icon_background = "#282828"; + }; + + hyprsunset = { + icon = "#fabd2f"; + background = "#282828"; + icon_background = "#282828"; + text = "#fabd2f"; + border = "#fabd2f"; + }; + + hypridle = { + icon = "#83a598"; + background = "#282828"; + icon_background = "#282828"; + text = "#83a598"; + border = "#83a598"; + }; + + cava = { + text = "#8ec07c"; + background = "#282828"; + icon_background = "#282828"; + icon = "#8ec07c"; + border = "#8ec07c"; + }; + + microphone = { + border = "#b8bb26"; + background = "#282828"; + text = "#b8bb26"; + icon = "#b8bb26"; + icon_background = "#282828"; + }; + + worldclock = { + text = "#d3869b"; + background = "#282828"; + icon_background = "#d3869b"; + icon = "#d3869b"; + border = "#d3869b"; + }; + }; + }; + + menus = { + background = "#1d2021"; + cards = "#1d2021"; + border.color = "#3c3836"; + text = "#ebdbb2"; + dimtext = "#665c54"; + feinttext = "#3c3836"; + label = "#83a598"; + + popover = { + background = "#32302f"; + border = "#32302f"; + text = "#83a598"; + }; + + listitems = { + passive = "#ebdbb2"; + active = "#83a598"; + }; + + icons = { + passive = "#665c54"; + active = "#83a598"; + }; + + switch = { + enabled = "#83a598"; + disabled = "#3c3836"; + puck = "#504945"; + }; + + check_radio_button = { + background = "#3c3836"; + active = "#83a598"; + }; + + buttons = { + default = "#83a598"; + active = "#d3869b"; + disabled = "#665c54"; + text = "#32302f"; + }; + + iconbuttons = { + passive = "#ebdbb2"; + active = "#83a598"; + }; + + progressbar = { + foreground = "#83a598"; + background = "#504945"; + }; + + slider = { + primary = "#83a598"; + background = "#665c54"; + backgroundhover = "#504945"; + puck = "#7c6f64"; + }; + + dropdownmenu = { + background = "#1d2021"; + text = "#ebdbb2"; + divider = "#1d2021"; + }; + + tooltip = { + background = "#1d2021"; + text = "#ebdbb2"; + }; + + menu = { + media = { + background.color = "#1d2021"; + card.color = "#282828"; + border.color = "#3c3836"; + song = "#83a598"; + artist = "#8ec07c"; + album = "#d3869b"; + timestamp = "#ebdbb2"; + + buttons = { + inactive = "#665c54"; + enabled = "#8ec07c"; + background = "#83a598"; + text = "#1d2021"; + }; + + slider = { + primary = "#d3869b"; + background = "#665c54"; + backgroundhover = "#504945"; + puck = "#7c6f64"; + }; + }; + + volume = { + background.color = "#1d2021"; + border.color = "#3c3836"; + card.color = "#282828"; + label.color = "#fe8018"; + text = "#ebdbb2"; + + listitems = { + passive = "#ebdbb2"; + active = "#fe8018"; + }; + + iconbutton = { + passive = "#ebdbb2"; + active = "#fe8018"; + }; + + icons = { + passive = "#a89984"; + active = "#fe8018"; + }; + + audio_slider = { + primary = "#fe8018"; + background = "#665c54"; + backgroundhover = "#504945"; + puck = "#665c54"; + }; + + input_slider = { + primary = "#fe8018"; + background = "#665c54"; + backgroundhover = "#504945"; + puck = "#665c54"; + }; + }; + + network = { + background.color = "#1d2021"; + card.color = "#282828"; + border.color = "#3c3836"; + label.color = "#b16286"; + text = "#ebdbb2"; + status.color = "#7c6f64"; + scroller.color = "#b16286"; + + listitems = { + passive = "#ebdbb2"; + active = "#b16286"; + }; + + icons = { + passive = "#a89984"; + active = "#b16286"; + }; + + iconbuttons = { + passive = "#ebdbb2"; + active = "#b16286"; + }; + + switch = { + enabled = "#b16286"; + disabled = "#3c3836"; + puck = "#504945"; + }; + }; + + bluetooth = { + background.color = "#1d2021"; + card.color = "#282828"; + border.color = "#3c3836"; + label.color = "#83a598"; + text = "#ebdbb2"; + status = "#7c6f64"; + switch_divider = "#504945"; + scroller.color = "#83a598"; + + switch = { + enabled = "#83a598"; + disabled = "#3c3836"; + puck = "#504945"; + }; + + listitems = { + passive = "#ebdbb2"; + active = "#83a598"; + }; + + icons = { + passive = "#a89984"; + active = "#83a598"; + }; + + iconbutton = { + passive = "#ebdbb2"; + active = "#83a598"; + }; + }; + + systray = { + dropdownmenu = { + background = "#1d2021"; + text = "#ebdbb2"; + divider = "#1d2021"; + }; + }; + + battery = { + background.color = "#1d2021"; + card.color = "#282828"; + border.color = "#3c3836"; + label.color = "#fabd2f"; + text = "#ebdbb2"; + + listitems = { + passive = "#ebdbb2"; + active = "#fabd2f"; + }; + + icons = { + passive = "#a89984"; + active = "#fabd2f"; + }; + + slider = { + primary = "#fabd2f"; + background = "#665c54"; + backgroundhover = "#504945"; + puck = "#7c6f64"; + }; + }; + + clock = { + background.color = "#1d2021"; + card.color = "#282828"; + border.color = "#3c3836"; + text = "#ebdbb2"; + + time = { + time = "#d3869b"; + timeperiod = "#8ec07c"; + }; + + calendar = { + yearmonth = "#8ec07c"; + weekdays = "#d3869b"; + paginator = "#d3869b"; + currentday = "#d3869b"; + days = "#ebdbb2"; + contextdays = "#665c54"; + }; + + weather = { + icon = "#d3869b"; + temperature = "#ebdbb2"; + status = "#8ec07c"; + stats = "#d3869b"; + + thermometer = { + extremelyhot = "#cc241d"; + hot = "#fe8019"; + moderate = "#83a598"; + cold = "#458588"; + extremelycold = "#83a598"; + }; + + hourly = { + time = "#d3869b"; + icon = "#d3869b"; + temperature = "#d3869b"; + }; + }; + }; + + dashboard = { + background.color = "#1d2021"; + card.color = "#282828"; + border.color = "#3c3836"; + + profile = { + name = "#d3869b"; + }; + + powermenu = { + shutdown = "#cc241d"; + restart = "#fe8019"; + logout = "#b8bb26"; + sleep = "#83a598"; + + confirmation = { + card = "#1d2021"; + background = "#1d2021"; + border = "#3c3836"; + label = "#83a598"; + body = "#ebdbb2"; + confirm = "#8ec07b"; + deny = "#d3869b"; + button_text = "#1d2021"; + }; + }; + + shortcuts = { + background = "#83a598"; + text = "#32302f"; + recording = "#b8bb26"; + }; + + controls = { + disabled = "#665c54"; + + wifi = { + background = "#b16286"; + text = "#32302f"; + }; + + bluetooth = { + background = "#83a598"; + text = "#32302f"; + }; + + notifications = { + background = "#fabd2f"; + text = "#32302f"; + }; + + volume = { + background = "#fb4934"; + text = "#32302f"; + }; + + input = { + background = "#d3869b"; + text = "#32302f"; + }; + }; + + directories = { + left = { + top.color = "#d3869b"; + middle.color = "#fabd2f"; + bottom.color = "#fb4934"; + }; + + right = { + top.color = "#8ec07c"; + middle.color = "#b16286"; + bottom.color = "#83a598"; + }; + }; + + monitors = { + bar_background = "#504945"; + + cpu = { + icon = "#fb4934"; + bar = "#fb4934"; + label = "#fb4934"; + }; + + ram = { + icon = "#fabd2f"; + bar = "#fabd2f"; + label = "#fabd2f"; + }; + + gpu = { + icon = "#b8bb26"; + bar = "#b8bb26"; + label = "#b8bb26"; + }; + + disk = { + icon = "#d3869b"; + bar = "#d3869b"; + label = "#d3869b"; + }; + }; + }; + + power = { + background.color = "#1d2021"; + border.color = "#3c3836"; + + buttons = { + shutdown = { + background = "#282828"; + icon_background = "#cc241d"; + text = "#cc241d"; + icon = "#32302f"; + }; + + restart = { + background = "#282828"; + icon_background = "#fe8019"; + text = "#fe8019"; + icon = "#32302f"; + }; + + logout = { + background = "#282828"; + icon_background = "#b8bb26"; + text = "#b8bb26"; + icon = "#32302f"; + }; + + sleep = { + background = "#282828"; + icon_background = "#83a598"; + text = "#83a598"; + icon = "#32302f"; + }; + }; + }; + + notifications = { + background = "#1d2021"; + card = "#282828"; + border = "#3c3836"; + label = "#83a598"; + no_notifications_label = "#3c3836"; + switch_divider = "#504945"; + clear = "#83a598"; + + switch = { + enabled = "#83a598"; + disabled = "#3c3836"; + puck = "#504945"; + }; + + pager = { + background = "#1d2021"; + button = "#83a598"; + label = "#a89984"; + }; + + scrollbar = { + color = "#83a598"; + }; + }; + }; + }; + }; + + osd = { + bar_container = "#1d2021"; + icon_container = "#83a598"; + bar_color = "#83a598"; + bar_empty_color = "#3c3836"; + bar_overflow_color = "#cc241d"; + icon = "#1d2021"; + label = "#83a598"; + }; + + notification = { + background = "#32302f"; + label = "#83a598"; + border = "#3c3836"; + time = "#928374"; + text = "#ebdbb2"; + labelicon = "#83a598"; + + actions = { + background = "#83a598"; + text = "#32302f"; + }; + + close_button = { + background = "#83a598"; + label = "#1d2021"; + }; + }; +} diff --git a/home/hyprland/hyprpaper.nix b/home/hyprland/hyprpaper.nix index c92de6a..e655de9 100644 --- a/home/hyprland/hyprpaper.nix +++ b/home/hyprland/hyprpaper.nix @@ -5,6 +5,10 @@ ... }: +let + basePath = "/home/javi/Documents/wallpapers"; + wallpaper = "Fantasy-Mountain.png"; +in { home.packages = [ pkgs.hyprpaper @@ -15,11 +19,11 @@ ipc = "on"; splash = false; preload = [ - "/home/javi/Documents/wallpapers/Fantasy-Landscape2.png" + "${basePath}/${wallpaper}" ]; wallpaper = [ - ", /home/javi/Documents/wallpapers/Fantasy-Landscape2.png" + ", ${basePath}/${wallpaper}" ]; }; }; diff --git a/home/kitty.nix b/home/kitty.nix index a6f0287..8fcf075 100644 --- a/home/kitty.nix +++ b/home/kitty.nix @@ -6,8 +6,6 @@ }: let kittyConfig = '' - include current-theme.conf - font_size 16.0 background_opacity 0.7 diff --git a/home/shell.nix b/home/shell.nix index f90fe6c..752982a 100755 --- a/home/shell.nix +++ b/home/shell.nix @@ -12,74 +12,121 @@ # Shell aliases (equivalent to your script functions) shellAliases = { sudo = "sudo "; - # Better ls with eza - ls = "eza -lg --group-directories-first --icons"; - tree = "eza --tree"; - - # Convenience - rp = "source ~/.bashrc"; - co = "code ."; - # Nix - rb = "sudo nixos-rebuild switch --flake $HOME/nix#default"; + rb = "git add . && sudo nixos-rebuild switch --flake $HOME/nix#default"; - # Git shortcuts - gs = "git status"; - ga = "git add"; - gc = "git commit"; - gp = "git push"; - gl = "git pull"; - gco = "git checkout"; - gb = "git branch"; - gd = "git diff"; - glog = "git log --oneline --graph"; + eza = "eza"; + ls = "eza -lh --group-directories-first --icons"; + cat = "bat"; + bat = "bat"; - # Directory navigation + # Quicker navigation ".." = "cd .."; "..." = "cd ../.."; "...." = "cd ../../.."; + "....." = "cd ../../../.."; - # Development + # Git + gs = "git status"; + ga = "git add -A"; + gc = "git commit -m"; + grm = "git rm $(git ls-files --deleted)"; + gb = "git checkout -b"; + + # Docker aliases + dc = "docker-compose"; + bx = "docker buildx"; + de = "docker exec -it"; + dub = "docker compose up -d --build"; + dup = "docker-compose up"; + dwn = "docker-compose down"; + da = "docker_artisan"; + + # Laravel & php a = "php artisan"; - # System - grep = "rg"; + # Convenience + cls = "clear"; + home = "cd ~"; + projects = "cd ~/projects"; + co = "code ."; + clipboard = "xclip -selection clipboard"; + + # Jigsaw + jig = "vendor/bin/jigsaw"; + + # Golang + gr = "go run ."; + gmt = "go mod tidy"; - # System monitoring - top = "btop"; }; # Additional bash configuration bashrcExtra = '' - # Project selector function (equivalent to your custom keybinding) - proj() { - if [ -d "$HOME/projects" ]; then - cd "$HOME/projects" - if command -v eza > /dev/null 2>&1; then - eza -la - else - ls -la - fi - else - echo "Projects directory not found" - fi + function pape() { + hyprctl hyprpaper preload $1 + hyprctl hyprpaper wallpaper ", $1" + } + # Open something in the projects folder + function o() { + cd "$HOME/projects/$1" + } + + function proj() { + eza -ld $HOME/projects/* --color=never | + awk '{print $7}' | + fzf --reverse | xargs -I{} code {} -n && exit + } + + function makepasswd() { + openssl rand -base64 16 | clipboard + echo "Password copied to clipboard" + } + + function mountnewshares() { + sudo systemctl daemon-reload + sudo mount -a + } + + function makerole() { + mkdir -p "roles/$1/tasks" + mkdir -p "roles/$1/defaults" + touch "roles/$1/tasks/main.yml" + touch "roles/$1/defaults/main.yml" + } + + function pyvenv() { + python3 -m venv .venv + source .venv/bin/activate + } + + function newsshkey() { + KEY_NAME="id_ed25519_$1" + KEY_PATH="$HOME/.ssh/$KEY_NAME" + ssh-keygen -t ed25519 -C "$1" -f "$KEY_PATH" -N "" + ssh-add "$KEY_PATH" + echo "Key created and added" + echo "Key: $KEY_NAME" + echo "Saved to: $KEY_PATH" + } + + function listsshkeys() { + ls "$HOME/.ssh" + } + + function copypublickey() { + KEY_NAME="$1" + KEY_PATH="$HOME/.ssh/$KEY_NAME" + cat "$KEY_PATH.pub" | clipboard + echo "Key copied to clipboard" + } + + function makerole() { + mkdir -p "roles/$1/tasks" + mkdir -p "roles/$1/defaults" + touch "roles/$1/tasks/main.yml" + touch "roles/$1/defaults/main.yml" } - - # Make directory and cd into it - mkcd() { - mkdir -p "$1" && cd "$1" - } - - - # Better completion - bind "set completion-ignore-case on" - bind "set show-all-if-ambiguous on" - bind "set show-all-if-unmodified on" - - # Enable color support - if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - fi ''; }; } diff --git a/home/util/darkmode.nix b/home/util/darkmode.nix index 0c486cd..d81eb32 100644 --- a/home/util/darkmode.nix +++ b/home/util/darkmode.nix @@ -7,27 +7,47 @@ }: { - gtk = { - enable = true; - theme = { - name = "Adwaita-dark"; - package = pkgs.gnome-themes-extra; - }; - iconTheme = { - name = "Papirus-Dark"; - package = pkgs.papirus-icon-theme; - }; - }; - dconf.settings = { - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; - }; - }; - - # Make Qt apps follow dark mode - home.sessionVariables = { - QT_QPA_PLATFORMTHEME = "gtk2"; - QT_STYLE_OVERRIDE = "Adwaita-dark"; - }; } + +# { +# home.packages = with pkgs; [ +# papirus-icon-theme +# papirus-folders +# ]; +# gtk = { +# enable = true; +# theme = { +# name = "Breeze-Dark"; +# package = pkgs.libsForQt5.breeze-gtk; +# }; +# iconTheme = { +# name = "Papirus-Dark"; +# }; +# gtk3 = { +# extraConfig.gtk-application-prefer-dark-theme = true; +# }; +# }; + +# dconf.settings = { +# "org/gnome/desktop/interface" = { +# gtk-theme = "Breeze-Dark"; +# color-scheme = "prefer-dark"; +# }; +# }; + +# qt = { +# enable = true; +# platformTheme = "gtk"; +# style = { +# name = "gtk2"; +# package = pkgs.libsForQt5.breeze-qt5; +# }; +# }; + +# # Make Qt apps follow dark mode +# home.sessionVariables = { +# QT_QPA_PLATFORMTHEME = "gtk2"; +# QT_STYLE_OVERRIDE = "gtk2"; +# }; +# } diff --git a/system/fonts.nix b/system/fonts.nix new file mode 100644 index 0000000..8fc14cf --- /dev/null +++ b/system/fonts.nix @@ -0,0 +1,22 @@ +{ config, pkgs, ... }: + +{ + fonts.packages = + with pkgs; + [ + nerd-fonts.fira-code + nerd-fonts.sauce-code-pro + # nerd-fonts._Oxproto + nerd-fonts.space-mono + nerd-fonts.droid-sans-mono + noto-fonts-cjk-sans + noto-fonts-emoji + liberation_ttf + fira-code-symbols + mplus-outline-fonts.githubRelease + dina-font + proggyfonts + monaspace + ] + ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); +} diff --git a/system/nfs.nix b/system/nfs.nix new file mode 100644 index 0000000..f56b01e --- /dev/null +++ b/system/nfs.nix @@ -0,0 +1,49 @@ +{ lib, ... }: + +{ + services.gvfs.enable = true; + services.udisks2.enable = true; + fileSystems."/mnt/backups" = { + device = "10.89.0.15:/mnt/main/backups"; + fsType = "nfs"; + options = [ + "x-systemd.automount" + "noauto" + "rw" + "vers=4" + + # make Nautilus show it with a friendly name/icon + "x-gvfs-show" + "x-gvfs-name=NAS — backups" + "x-gvfs-icon=network-server" + ]; + }; +} +# let +# nasIp = "10.89.0.15"; +# baseMnt = "/mnt/main"; +# shares = [ +# "backups" +# "container-data" +# "javi" +# ]; +# nfsOptions = [ +# "x-systemd.automount" +# "noauto" +# "rw" +# "vers=4" +# ]; +# in +# { +# fileSystems = lib.genAttrs (map (name: "${baseMnt}/${name}}") shares) ( +# mountPoint: +# let +# name = builtins.baseNameOf mountPoint; +# in +# { +# device = "${nasIp}:${baseMnt}/${name}"; +# fsType = "nfs"; +# options = nfsOptions; +# } +# ); +# }