From 6c8c5c43d4f2cb89a29d6d3df9ef242b7fea6365 Mon Sep 17 00:00:00 2001 From: alsaiduq-lab Date: Mon, 6 Oct 2025 13:02:01 -0600 Subject: [PATCH] initial switch to hyprland --- flake.lock | 100 +++++++++++++------ flake.nix | 54 ++++++---- home-manager/cobray.nix | 26 ++--- home-manager/init.nix | 41 ++++++++ home-manager/modules/cava.nix | 5 + home-manager/modules/dunst.nix | 146 ---------------------------- home-manager/modules/ffmpeg.nix | 2 +- home-manager/modules/fish.nix | 1 + home-manager/modules/ghostty.nix | 30 +++++- home-manager/modules/hyprspace.nix | 3 + home-manager/modules/matugen.nix | 3 + home-manager/modules/nvim.nix | 27 +---- home-manager/modules/picom.nix | 15 --- home-manager/modules/polybar.nix | 13 --- home-manager/modules/quickshell.nix | 6 ++ home-manager/modules/rgb.nix | 17 ++++ home-manager/modules/rofi.nix | 5 +- home-manager/modules/starship.nix | 7 +- home-manager/modules/thorium.nix | 5 +- home-manager/modules/udiskie.nix | 6 -- home-manager/modules/waybar.nix | 5 + hosts/modules/audio.nix | 2 - hosts/modules/core.nix | 7 +- hosts/modules/env.nix | 58 +++++------ hosts/modules/fonts.nix | 1 + hosts/modules/gtk.nix | 56 +++++------ hosts/modules/hyprland.nix | 57 +++++++++++ hosts/modules/i3.nix | 69 ------------- hosts/modules/libs.nix | 16 +-- hosts/modules/net.nix | 1 + hosts/modules/nvidia.nix | 16 ++- hosts/modules/python.nix | 5 +- hosts/modules/rgb.nix | 20 +++- hosts/modules/searxng.nix | 90 +++++++++++++++-- hosts/modules/settings.nix | 25 ----- hosts/modules/steam.nix | 8 -- hosts/modules/udiskie.nix | 9 ++ hosts/modules/user.nix | 22 +++-- hosts/modules/x11.nix | 12 --- hosts/settings.nix | 64 ++++++++++++ hosts/system-packages.nix | 8 +- 41 files changed, 562 insertions(+), 501 deletions(-) create mode 100644 home-manager/init.nix create mode 100644 home-manager/modules/cava.nix delete mode 100644 home-manager/modules/dunst.nix create mode 100644 home-manager/modules/hyprspace.nix create mode 100644 home-manager/modules/matugen.nix delete mode 100644 home-manager/modules/picom.nix delete mode 100644 home-manager/modules/polybar.nix create mode 100644 home-manager/modules/quickshell.nix create mode 100644 home-manager/modules/rgb.nix delete mode 100644 home-manager/modules/udiskie.nix create mode 100644 home-manager/modules/waybar.nix create mode 100644 hosts/modules/hyprland.nix delete mode 100644 hosts/modules/i3.nix delete mode 100644 hosts/modules/settings.nix create mode 100644 hosts/modules/udiskie.nix delete mode 100644 hosts/modules/x11.nix create mode 100644 hosts/settings.nix diff --git a/flake.lock b/flake.lock index 591c486..39a1041 100644 --- a/flake.lock +++ b/flake.lock @@ -21,11 +21,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1756770412, - "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "lastModified": 1759362264, + "narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4524271976b625a4a605beefd893f270620fd751", + "rev": "758cf7296bee11f1706a574c77d072b8a7baa881", "type": "github" }, "original": { @@ -61,11 +61,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1759249740, - "narHash": "sha256-csdhbTzHy7LjedNmSFVBIaUca3IBGK6YKeDO3UUd7nw=", + "lastModified": 1759677488, + "narHash": "sha256-fhRv6OdFLSfuiDDJpcfmmGRzy0fSSzOHbdMpuvwysTU=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "ceac472af000ce370520b31a9fba927f55e7aac7", + "rev": "fa3bc416ab08a7ab849ef878c01009c0710725b4", "type": "github" }, "original": { @@ -113,20 +113,20 @@ "url": "ssh://git@github.com/alsaiduq-lab/Hu-Tao-Animated-Cursor" } }, - "i3-dotfiles": { + "hyprland-dots": { "flake": false, "locked": { - "lastModified": 1758613492, - "narHash": "sha256-pYaBq0FCUoSZtTE73HAWDw97LEBvp56upVfJcLbdBH4=", + "lastModified": 1759689455, + "narHash": "sha256-GsuG+Gbs3XMbmmkK1azoWF+ZUJ891OhRMy3S6Fv8qo0=", "ref": "refs/heads/master", - "rev": "73238b6b91151a0feeb4c7162fc5d1ca4e8fb132", - "revCount": 14, + "rev": "3c8faf70c7b92a09399f6ab48bb7b06c47a7b833", + "revCount": 19, "type": "git", - "url": "ssh://git@github.com/alsaiduq-lab/i3-dotfiles" + "url": "ssh://git@github.com/alsaiduq-lab/hyprland-dots" }, "original": { "type": "git", - "url": "ssh://git@github.com/alsaiduq-lab/i3-dotfiles" + "url": "ssh://git@github.com/alsaiduq-lab/hyprland-dots" } }, "nix-gaming": { @@ -137,11 +137,11 @@ ] }, "locked": { - "lastModified": 1759110900, - "narHash": "sha256-fcu/r0ijvaYT2VHGkZGr0wq9uBMNFkiftVBy43/2oig=", + "lastModified": 1759629535, + "narHash": "sha256-VIXcJ2ahRgoqIUySwAz3r5mtITO2dp6tXGCVKVW6FmA=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "2ac6a49266e9159ccb001b4c8cb1f50f67d502ae", + "rev": "df388c42b54714bd121796a9cec9322b7fa2894e", "type": "github" }, "original": { @@ -152,15 +152,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1748189127, - "narHash": "sha256-zRDR+EbbeObu4V2X5QCd2Bk5eltfDlCr5yvhBwUT6pY=", - "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", + "lastModified": 315532800, + "narHash": "sha256-YwoXN6fthkakCFD7nXPcUK+rkNr6ZTNTuF8zdGaxZo0=", + "rev": "dc704e6102e76aad573f63b74c742cd96f8f1e6c", "type": "tarball", - "url": "https://releases.nixos.org/nixos/25.05/nixos-25.05.802491.7c43f080a7f2/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre870318.dc704e6102e7/nixexprs.tar.xz" }, "original": { "type": "tarball", - "url": "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz" + "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, "nixpkgs-lib": { @@ -209,11 +209,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1759143472, - "narHash": "sha256-TvODmeR2W7yX/JmOCmP+lAFNkTT7hAxYcF3Kz8SZV3w=", + "lastModified": 1759580034, + "narHash": "sha256-YWo57PL7mGZU7D4WeKFMiW4ex/O6ZolUS6UNBHTZfkI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5ed4e25ab58fd4c028b59d5611e14ea64de51d23", + "rev": "3bcc93c5f7a4b30335d31f21e2f1281cba68c318", "type": "github" }, "original": { @@ -223,14 +223,52 @@ "type": "github" } }, + "nvim-dots": { + "flake": false, + "locked": { + "lastModified": 1759115710, + "narHash": "sha256-IdLoHrGkhlqAJmfi4nRe2DAoHA5udyb5UTSCpNboaOo=", + "owner": "alsaiduq-lab", + "repo": "nvim-dotfiles", + "rev": "d251eb27eb70f67373aea50a15f1f71748af9039", + "type": "github" + }, + "original": { + "owner": "alsaiduq-lab", + "repo": "nvim-dotfiles", + "type": "github" + } + }, + "quickshell": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1759610621, + "narHash": "sha256-P3UPFd95mS/3aNgy40nCXAmyfR2bEEBd+tX6xfkYFb0=", + "ref": "refs/heads/master", + "rev": "c5c438f1cd1a76660a8658ef929a3d19e968e2ce", + "revCount": 689, + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + }, + "original": { + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + } + }, "root": { "inputs": { "ghostty": "ghostty", "home-manager": "home-manager", "hu-tao-cursor": "hu-tao-cursor", - "i3-dotfiles": "i3-dotfiles", + "hyprland-dots": "hyprland-dots", "nix-gaming": "nix-gaming", "nixpkgs": "nixpkgs_4", + "nvim-dots": "nvim-dots", + "quickshell": "quickshell", "unstable": "unstable" } }, @@ -251,11 +289,11 @@ }, "unstable": { "locked": { - "lastModified": 1759070547, - "narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=", + "lastModified": 1759632233, + "narHash": "sha256-krgZxGAIIIKFJS+UB0l8do3sYUDWJc75M72tepmVMzE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "647e5c14cbd5067f44ac86b74f014962df460840", + "rev": "d7f52a7a640bc54c7bb414cca603835bf8dd4b10", "type": "github" }, "original": { @@ -281,11 +319,11 @@ ] }, "locked": { - "lastModified": 1748261582, - "narHash": "sha256-3i0IL3s18hdDlbsf0/E+5kyPRkZwGPbSFngq5eToiAA=", + "lastModified": 1759192380, + "narHash": "sha256-0BWJgt4OSzxCESij5oo8WLWrPZ+1qLp8KUQe32QeV4Q=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "aafb1b093fb838f7a02613b719e85ec912914221", + "rev": "0bcd1401ed43d10f10cbded49624206553e92f57", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 99026a1..c775b79 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "NixOS configuration for Cobray"; + description = "NixOS configuration (hyprland) for Cobray"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; @@ -17,20 +17,38 @@ unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; - ghostty = { - url = "github:ghostty-org/ghostty"; + + quickshell = { + url = "git+https://git.outfoxxed.me/outfoxxed/quickshell"; + inputs.nixpkgs.follows = "nixpkgs"; }; - i3-dotfiles = { - url = "git+ssh://git@github.com/alsaiduq-lab/i3-dotfiles"; + + nvim-dots = { + url = "github:alsaiduq-lab/nvim-dotfiles"; flake = false; }; + + hyprland-dots = { + url = "git+ssh://git@github.com/alsaiduq-lab/hyprland-dots"; + flake = false; + }; + hu-tao-cursor = { url = "git+ssh://git@github.com/alsaiduq-lab/Hu-Tao-Animated-Cursor"; }; - # TODO: sops-nix = { - # url = "github:Mic92/sops-nix"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; + + ghostty = { + url = "github:ghostty-org/ghostty"; + }; + + # TODO: sops-nix = { + # url = "github:Mic92/sops-nix"; + # inputs.nixpkgs.follows = "nixpkgs"; + # }; + + # Hyprspace = { + # url = "github:rich/Hyprspace"; + # }; }; outputs = { @@ -65,7 +83,7 @@ inherit system; specialArgs = { inherit inputs; - i3dotfiles = inputs.i3-dotfiles; + hyprlanddots = inputs.hyprland-dots; }; modules = [ @@ -77,8 +95,11 @@ }; hostPlatform = system; overlays = [ - (final: prev: {ollama = unstablePkgs.ollama;}) - (final: prev: {rpcs3 = unstablePkgs.rpcs3;}) + (final: prev: { + ollama = unstablePkgs.ollama; + rpcs3 = unstablePkgs.rpcs3; + quickshell = unstable.legacyPackages.${system}.quickshell; + }) (final: prev: { inherit (customPkgs) @@ -94,9 +115,7 @@ binary-font = prev.binary-font.binary-clock-font; }) (final: prev: {ghostty = inputs.ghostty.packages.${system}.default;}) - (final: prev: { - hu-tao-animated-cursor = inputs.hu-tao-cursor.packages.${system}.default; - }) + (final: prev: {hu-tao-animated-cursor = inputs.hu-tao-cursor.packages.${system}.default;}) ]; }; } @@ -107,8 +126,9 @@ useGlobalPkgs = true; useUserPackages = true; extraSpecialArgs = { - inherit inputs unstable; - i3dotfiles = inputs.i3-dotfiles; + inherit inputs; + hyprlanddots = inputs.hyprland-dots; + nvimDotfiles = inputs.nvim-dots; }; users.cobray = import ./home-manager/cobray.nix; }; diff --git a/home-manager/cobray.nix b/home-manager/cobray.nix index b6c2bef..a0c3b3f 100644 --- a/home-manager/cobray.nix +++ b/home-manager/cobray.nix @@ -1,16 +1,17 @@ { pkgs, - inputs, + config, + lib, + hyprlanddots, + nvimDotfiles, ... }: { imports = [ - ./modules/dunst.nix + ./init.nix ./modules/fish.nix ./modules/ghostty.nix ./modules/lazygit.nix ./modules/nvim.nix - ./modules/picom.nix - ./modules/polybar.nix ./modules/rofi.nix ./modules/starship.nix ./modules/zellij.nix @@ -20,11 +21,15 @@ ./modules/thorium.nix ./modules/spotify.nix ./modules/obs.nix - ./modules/udiskie.nix ./modules/mpv.nix + ./modules/waybar.nix ./modules/ani-cli.nix - # temp removed, currently broken on nixpkgs? lmao - # ./modules/bambustudio.nix + ./modules/quickshell.nix + # currently broken + # ./modules/hyprspace.nix + ./modules/cava.nix + ./modules/matugen.nix + ./modules/rgb.nix ]; home.username = "cobray"; @@ -35,13 +40,8 @@ xdg.mime.enable = false; home.packages = with pkgs; [ - coreutils - gnused - findutils - yazi - htop btop nvtopPackages.full - arandr + kdePackages.dolphin ]; } diff --git a/home-manager/init.nix b/home-manager/init.nix new file mode 100644 index 0000000..4db2a32 --- /dev/null +++ b/home-manager/init.nix @@ -0,0 +1,41 @@ +{ + lib, + config, + pkgs, + hyprlanddots, + nvimDotfiles, + ... +}: { + home.activation.HyprlandDots = lib.hm.dag.entryAfter ["linkGeneration"] '' + set -euo pipefail + umask 022 + repo=${lib.escapeShellArg hyprlanddots} + nvimrepo=${lib.escapeShellArg nvimDotfiles} + mkdir -p "${config.xdg.configHome}" + copy_dir() { + src="$1"; dest="$2" + [ -d "$src" ] || return 0 + [ -e "$dest" ] && return 0 + mkdir -p "$dest" + if [ -x ${pkgs.rsync}/bin/rsync ]; then + ${pkgs.rsync}/bin/rsync -rlD \ + --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r \ + -- "$src"/ "$dest"/ + else + cp -R -P --no-preserve=mode,ownership,timestamps -- "$src"/. "$dest"/ + fi + chmod -R u+rwX "$dest" + } + + copy_dir "$repo/fish" "${config.xdg.configHome}/fish" + copy_dir "$repo/hypr" "${config.xdg.configHome}/hypr" + copy_dir "$repo/quickshell" "${config.xdg.configHome}/quickshell" + copy_dir "$repo/waybar" "${config.xdg.configHome}/waybar" + copy_dir "$repo/cava" "${config.xdg.configHome}/cava" + copy_dir "$nvimrepo" "${config.xdg.configHome}/nvim" + + if [ -f "$repo/starship.toml" ] && [ ! -e "${config.xdg.configHome}/starship.toml" ]; then + install -Dm0644 "$repo/starship.toml" "${config.xdg.configHome}/starship.toml" + fi + ''; +} diff --git a/home-manager/modules/cava.nix b/home-manager/modules/cava.nix new file mode 100644 index 0000000..4223fc7 --- /dev/null +++ b/home-manager/modules/cava.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ cava ]; +} diff --git a/home-manager/modules/dunst.nix b/home-manager/modules/dunst.nix deleted file mode 100644 index 5ef762c..0000000 --- a/home-manager/modules/dunst.nix +++ /dev/null @@ -1,146 +0,0 @@ -{pkgs, ...}: let - urgencyLowBackground = "#1a1b26"; - urgencyLowForeground = "#c0caf5"; - urgencyLowFrameColor = "#7aa2f7"; - urgencyNormalBackground = "#24283b"; - urgencyNormalForeground = "#c0caf5"; - urgencyNormalFrameColor = "#7aa2f7"; - urgencyCriticalBackground = "#f7768e"; - urgencyCriticalForeground = "#1a1b26"; - urgencyCriticalFrameColor = "#ff757f"; - - volumeHighlight = "#f5c2e7"; - volumeFrameColor = "#eba0ac"; - volumeBackground = "#45475a"; - volumeForeground = "#f5e0dc"; - - brightnessHighlight = "#94e2d5"; - brightnessFrameColor = "#74c7ec"; - brightnessBackground = "#313244"; - brightnessForeground = "#a6e3a1"; - - networkHighlight = "#f9e2af"; - networkFrameColor = "#f38ba8"; - networkBackground = "#1e1e2e"; - networkForeground = "#fab387"; - - globalFrameColor = "#7aa2f7"; - globalCornerRadius = 10; - globalMargin = 8; - globalPadding = 12; - globalBorderWidth = 2; - globalFont = "0xProto Nerd Font Bold 10"; - globalIconPath = "/usr/share/icons/Candy/16x16/status/:/usr/share/icons/Candy/16x16/devices/:/usr/share/icons/Candy/16x16/apps/"; -in { - services.dunst = { - enable = true; - settings = { - global = { - monitor = 0; - follow = "mouse"; - width = "(300, 400)"; - height = 300; - origin = "top-right"; - offset = "15x50"; - scale = 0; - notification_limit = 0; - - progress_bar = true; - progress_bar_height = 10; - progress_bar_frame_width = 1; - progress_bar_min_width = 150; - progress_bar_max_width = 300; - - transparency = 5; - padding = globalPadding; - horizontal_padding = globalPadding; - text_icon_padding = 12; - frame_width = globalBorderWidth; - frame_color = globalFrameColor; - separator_color = "frame"; - separator_height = 2; - corner_radius = globalCornerRadius; - gap_size = globalMargin; - line_height = 0; - - font = globalFont; - markup = "full"; - format = "%s\n%b"; - alignment = "left"; - vertical_alignment = "center"; - show_age_threshold = 60; - ellipsize = "middle"; - ignore_newline = "no"; - stack_duplicates = true; - hide_duplicate_count = false; - show_indicators = true; - - enable_recursive_icon_lookup = true; - icon_position = "left"; - min_icon_size = 32; - max_icon_size = 128; - icon_path = globalIconPath; - - sticky_history = "yes"; - history_length = 20; - - mouse_left_click = "do_action, close_current"; - mouse_middle_click = "close_all"; - mouse_right_click = "close_current"; - }; - - urgency_low = { - background = urgencyLowBackground; - foreground = urgencyLowForeground; - frame_color = urgencyLowFrameColor; - timeout = 5; - }; - - urgency_normal = { - background = urgencyNormalBackground; - foreground = urgencyNormalForeground; - frame_color = urgencyNormalFrameColor; - timeout = 5; - }; - - urgency_critical = { - background = urgencyCriticalBackground; - foreground = urgencyCriticalForeground; - frame_color = urgencyCriticalFrameColor; - timeout = 0; - }; - - volume = { - appname = "Volume"; - summary = "*"; - format = "%s\n%b"; - highlight = volumeHighlight; - frame_color = volumeFrameColor; - background = volumeBackground; - foreground = volumeForeground; - }; - brightness = { - appname = "Brightness"; - summary = "*"; - format = "%s\n%b"; - highlight = brightnessHighlight; - frame_color = brightnessFrameColor; - background = brightnessBackground; - foreground = brightnessForeground; - }; - network = { - appname = "Network"; - summary = "*"; - format = "%s\n%b"; - highlight = networkHighlight; - frame_color = networkFrameColor; - background = networkBackground; - foreground = networkForeground; - }; - }; - }; - - home.packages = with pkgs; [ - dunst - ]; -} diff --git a/home-manager/modules/ffmpeg.nix b/home-manager/modules/ffmpeg.nix index 2aaeeba..b42ed78 100644 --- a/home-manager/modules/ffmpeg.nix +++ b/home-manager/modules/ffmpeg.nix @@ -1,5 +1,5 @@ {pkgs, ...}: { home.packages = [ - (pkgs.ffmpeg-full.override {withXcb = true;}) + pkgs.ffmpeg ]; } diff --git a/home-manager/modules/fish.nix b/home-manager/modules/fish.nix index 154df38..de46f50 100644 --- a/home-manager/modules/fish.nix +++ b/home-manager/modules/fish.nix @@ -6,5 +6,6 @@ eza fd ugrep + yazi ]; } diff --git a/home-manager/modules/ghostty.nix b/home-manager/modules/ghostty.nix index 6526f6d..dd97c70 100644 --- a/home-manager/modules/ghostty.nix +++ b/home-manager/modules/ghostty.nix @@ -1,10 +1,38 @@ -{pkgs, ...}: { +{ + pkgs, + config, + lib, + ... +}: { home.packages = with pkgs; [ + ghostty fastfetch ]; programs.ghostty = { enable = true; enableFishIntegration = true; + + settings = { + command = "${pkgs.fish}/bin/fish --login --interactive"; + font-family = "0xProto Nerd Font"; + font-size = 12; + theme = "TokyoNight Storm"; + window-padding-x = 10; + window-padding-y = 10; + cursor-color = "#7AA2F7"; + cursor-style = "block"; + cursor-style-blink = true; + window-decoration = "none"; + window-theme = "dark"; + selection-background = "#364A82"; + selection-foreground = "#C0CAF5"; + + keybind = [ + "super+t=new_tab" + "super+w=close_surface" + ]; + }; }; + home.file."${config.xdg.configHome}/ghostty/config".force = lib.mkForce true; } diff --git a/home-manager/modules/hyprspace.nix b/home-manager/modules/hyprspace.nix new file mode 100644 index 0000000..e83ebba --- /dev/null +++ b/home-manager/modules/hyprspace.nix @@ -0,0 +1,3 @@ +{pkgs, ...}: { + home.packages = [pkgs.hyprspace]; +} diff --git a/home-manager/modules/matugen.nix b/home-manager/modules/matugen.nix new file mode 100644 index 0000000..7e7d519 --- /dev/null +++ b/home-manager/modules/matugen.nix @@ -0,0 +1,3 @@ +{pkgs, ...}: { + home.packages = [pkgs.matugen]; +} diff --git a/home-manager/modules/nvim.nix b/home-manager/modules/nvim.nix index 0070014..d02a53a 100644 --- a/home-manager/modules/nvim.nix +++ b/home-manager/modules/nvim.nix @@ -3,35 +3,12 @@ pkgs, lib, ... -}: let - gitDir = "${pkgs.git}/bin/git"; - nvim = "${config.home.homeDirectory}/.config/nvim"; -in { - programs.neovim = { - enable = true; - }; - +}: { + programs.neovim.enable = true; home.packages = with pkgs; [ git luajit luaPackages.luarocks tree-sitter ]; - - home.sessionPath = ["$HOME/.local/share/nvim/mason/bin"]; - - home.activation.nvimConfig = lib.hm.dag.entryAfter ["writeBoundary"] '' - if [ ! -d "${nvim}/.git" ]; then - ${gitDir} clone --depth 1 \ - https://github.com/alsaiduq-lab/nvim-dotfiles.git "${nvim}" - echo "Neovim config at ${nvim} was installed" - else - if ${gitDir} -C "${nvim}" pull --ff-only origin master \ - | grep -q 'Already up to date.'; then - echo "Neovim config at ${nvim} is unchanged" - else - echo "Neovim config at ${nvim} was updated" - fi - fi - ''; } diff --git a/home-manager/modules/picom.nix b/home-manager/modules/picom.nix deleted file mode 100644 index c25f51a..0000000 --- a/home-manager/modules/picom.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - i3dotfiles, - pkgs, - ... -}: { - home.packages = with pkgs; [ - picom - ]; - - xdg.configFile."picom" = { - source = "${i3dotfiles}/picom"; - recursive = true; - force = true; - }; -} diff --git a/home-manager/modules/polybar.nix b/home-manager/modules/polybar.nix deleted file mode 100644 index d914ade..0000000 --- a/home-manager/modules/polybar.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - i3dotfiles, - pkgs, - ... -}: { - home.packages = pkgs.polybar.all; - - xdg.configFile."polybar" = { - source = "${i3dotfiles}/polybar"; - recursive = true; - force = true; - }; -} diff --git a/home-manager/modules/quickshell.nix b/home-manager/modules/quickshell.nix new file mode 100644 index 0000000..eac9e06 --- /dev/null +++ b/home-manager/modules/quickshell.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + quickshell + ]; + home.sessionPath = ["${pkgs.quickshell}/bin"]; +} diff --git a/home-manager/modules/rgb.nix b/home-manager/modules/rgb.nix new file mode 100644 index 0000000..3860675 --- /dev/null +++ b/home-manager/modules/rgb.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: { + home.packages = [pkgs.openrgb-with-all-plugins]; + + systemd.user.services.openrgb-gui = { + Unit = { + Description = "OpenRGB GUI (daemon)"; + After = ["graphical-session.target"]; + PartOf = ["graphical-session.target"]; + }; + Service = { + ExecStart = "${pkgs.openrgb-with-all-plugins}/bin/openrgb --gui --startminimized --server 127.0.0.1:6742 --profile default"; + Restart = "on-failure"; + Environment = "QT_QPA_PLATFORM=wayland;xcb"; + }; + Install.WantedBy = ["graphical-session.target"]; + }; +} diff --git a/home-manager/modules/rofi.nix b/home-manager/modules/rofi.nix index b64defc..a0f45ef 100644 --- a/home-manager/modules/rofi.nix +++ b/home-manager/modules/rofi.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: { +{pkgs, ...}: { home.packages = with pkgs; [ rofi ]; diff --git a/home-manager/modules/starship.nix b/home-manager/modules/starship.nix index 3c2b7dd..230261f 100644 --- a/home-manager/modules/starship.nix +++ b/home-manager/modules/starship.nix @@ -1,11 +1,6 @@ -{i3dotfiles, ...}: { +{...}: { programs.starship = { enable = true; enableFishIntegration = true; }; - - xdg.configFile."starship.toml" = { - source = "${i3dotfiles}/starship.toml"; - force = true; - }; } diff --git a/home-manager/modules/thorium.nix b/home-manager/modules/thorium.nix index 87018fa..94320f8 100644 --- a/home-manager/modules/thorium.nix +++ b/home-manager/modules/thorium.nix @@ -1,4 +1,3 @@ -{ pkgs, ... }: -{ - home.packages = [ pkgs.thorium ]; +{pkgs, ...}: { + home.packages = [pkgs.thorium]; } diff --git a/home-manager/modules/udiskie.nix b/home-manager/modules/udiskie.nix deleted file mode 100644 index 2be6b78..0000000 --- a/home-manager/modules/udiskie.nix +++ /dev/null @@ -1,6 +0,0 @@ -{...}: { - services.udiskie = { - enable = true; - tray = "always"; - }; -} diff --git a/home-manager/modules/waybar.nix b/home-manager/modules/waybar.nix new file mode 100644 index 0000000..b5ce347 --- /dev/null +++ b/home-manager/modules/waybar.nix @@ -0,0 +1,5 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + waybar + ]; +} diff --git a/hosts/modules/audio.nix b/hosts/modules/audio.nix index ae50b29..314d1a4 100644 --- a/hosts/modules/audio.nix +++ b/hosts/modules/audio.nix @@ -10,12 +10,10 @@ }; environment.systemPackages = with pkgs; [ - cava pulseaudio alsa-utils portaudio alsa-lib pavucontrol - clang ]; } diff --git a/hosts/modules/core.nix b/hosts/modules/core.nix index 53235b9..b0d18e7 100644 --- a/hosts/modules/core.nix +++ b/hosts/modules/core.nix @@ -6,13 +6,11 @@ gawk psmisc unzip - bash - maim wrk bitwarden hashcat cachix - gcc + gcc14 gnumake cmake ninja @@ -28,5 +26,8 @@ libclang argc appimage-run + clang + rsync + openssl ]; } diff --git a/hosts/modules/env.nix b/hosts/modules/env.nix index e651cda..1397e2a 100644 --- a/hosts/modules/env.nix +++ b/hosts/modules/env.nix @@ -3,62 +3,62 @@ lib, config, ... -}: let - t = config.theme; -in { - environment.shellInit = '' - if [ -d "$HOME/.cargo/bin" ]; then - export PATH="$PATH:$HOME/.cargo/bin" - fi - ''; - +}: { environment.variables = { - EDITOR = "nvim"; - VISUAL = "nvim"; - TERM = "ghostty"; - BROWSER = "thorium"; - XCURSOR_THEME = t.cursorName; - XCURSOR_SIZE = toString t.cursorSize; + EDITOR = config.theme.Editor; + TERM = config.theme.Terminal; + BROWSER = config.theme.Browser; + XCURSOR_THEME = config.theme.cursorName; + XCURSOR_SIZE = toString config.theme.cursorSize; + GTK_THEME = "${config.theme.gtkTheme}:${config.theme.gtkThemeMode}"; + QT_QPA_PLATFORMTHEME = config.theme.qtTheme; + QT_STYLE_OVERRIDE = config.theme.qtOverride; + + XDG_SESSION_TYPE = "wayland"; + XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_SESSION_DESKTOP = "Hyprland"; + GDK_BACKEND = "wayland,x11"; + QT_QPA_PLATFORM = "wayland;xcb"; + SDL_VIDEODRIVER = "wayland"; + MOZ_ENABLE_WAYLAND = "1"; + NIXOS_OZONE_WL = "1"; + + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + GBM_BACKEND = "nvidia-drm"; + LIBVA_DRIVER_NAME = "nvidia"; + CC = "${pkgs.gcc}/bin/gcc"; + LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib"; + LUA_PATH = "${pkgs.luajit}/share/lua/5.1/?.lua;${pkgs.luajit}/share/lua/5.1/?/init.lua;;"; LUA_CPATH = "${pkgs.luajit}/lib/lua/5.1/?.so;;"; PKG_CONFIG_PATH = lib.makeSearchPath "lib/pkgconfig" [ - pkgs.mesa - pkgs.openssl.dev - pkgs.libxml2.dev - pkgs.zlib.dev pkgs.portaudio pkgs.alsa-lib pkgs.stdenv.cc.cc - pkgs.xorg.libX11.dev - pkgs.xorg.libXtst - pkgs.xorg.libXi.dev ]; LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.libglvnd pkgs.mesa pkgs.gcc-unwrapped.lib - pkgs.linuxPackages.nvidia_x11 pkgs.cudatoolkit pkgs.mangohud pkgs.portaudio pkgs.alsa-lib pkgs.stdenv.cc.cc.lib - pkgs.xorg.libX11 - pkgs.xorg.libXtst - pkgs.xorg.libXi + pkgs.wayland + pkgs.libxkbcommon pkgs.glib ]; - CUDA_HOME = "${pkgs.cudatoolkit}"; + CUDA_HOME = pkgs.cudatoolkit; CPATH = "${pkgs.cudatoolkit}/include"; - LIBCLANG_PATH = "${pkgs.llvmPackages.libclang}/lib"; }; environment.pathsToLink = [ - "/share/fish" + "/share/${config.theme.Shell}" "/bin" "/share/icons" "/share/pixmaps" diff --git a/hosts/modules/fonts.nix b/hosts/modules/fonts.nix index 5f148af..9709b3c 100644 --- a/hosts/modules/fonts.nix +++ b/hosts/modules/fonts.nix @@ -12,6 +12,7 @@ kochi-substitute clear-sans binary-font + fontconfig ]; fontconfig = { enable = true; diff --git a/hosts/modules/gtk.nix b/hosts/modules/gtk.nix index 7a627c0..1dc2690 100644 --- a/hosts/modules/gtk.nix +++ b/hosts/modules/gtk.nix @@ -2,39 +2,32 @@ config, pkgs, ... -}: let - t = config.theme; - cursorName = t.cursorName; - cursorSize = toString t.cursorSize; - gtkTheme = t.gtkTheme; - iconTheme = t.iconTheme; - fontName = t.fontName; -in { +}: { environment.etc = { "gtk-2.0/gtkrc".text = '' - gtk-theme-name=${gtkTheme} - gtk-icon-theme-name=${iconTheme} - gtk-font-name=${fontName} - gtk-cursor-theme-name=${cursorName} - gtk-cursor-theme-size=${cursorSize} + gtk-theme-name=${config.theme.gtkTheme} + gtk-icon-theme-name=${config.theme.iconTheme} + gtk-font-name=${config.theme.font} + gtk-cursor-theme-name=${config.theme.cursorName} + gtk-cursor-theme-size="${builtins.toString config.theme.cursorSize}" ''; "gtk-3.0/settings.ini".text = '' [Settings] - gtk-application-prefer-dark-theme=1 - gtk-theme-name=${gtkTheme} - gtk-icon-theme-name=${iconTheme} - gtk-font-name=${fontName} - gtk-cursor-theme-name=${cursorName} - gtk-cursor-theme-size=${cursorSize} + gtk-application-prefer-${config.theme.gtkThemeMode}-theme=1 + gtk-theme-name=${config.theme.gtkTheme} + gtk-icon-theme-name=${config.theme.iconTheme} + gtk-font-name=${config.theme.font} + gtk-cursor-theme-name=${config.theme.cursorName} + gtk-cursor-theme-size="${builtins.toString config.theme.cursorSize}" ''; "gtk-4.0/settings.ini".text = '' [Settings] - gtk-application-prefer-dark-theme=1 - gtk-theme-name=${gtkTheme} - gtk-icon-theme-name=${iconTheme} - gtk-font-name=${fontName} - gtk-cursor-theme-name=${cursorName} - gtk-cursor-theme-size=${cursorSize} + gtk-application-prefer-${config.theme.gtkThemeMode}-theme=1 + gtk-theme-name=${config.theme.gtkTheme} + gtk-icon-theme-name=${config.theme.iconTheme} + gtk-font-name=${config.theme.font} + gtk-cursor-theme-name=${config.theme.cursorName} + gtk-cursor-theme-size="${builtins.toString config.theme.cursorSize}" ''; }; @@ -42,11 +35,16 @@ in { programs.dconf.profiles.user.databases = [ { settings."org/gnome/desktop/interface" = { - gtk-theme = gtkTheme; - icon-theme = iconTheme; - cursor-theme = cursorName; - font-name = fontName; + gtk-theme = config.theme.gtkTheme; + icon-theme = config.theme.iconTheme; + cursor-theme = config.theme.cursorName; + font-name = config.theme.font; + color-scheme = "prefer-${config.theme.gtkThemeMode}"; }; } ]; + + environment.sessionVariables = { + GTK_THEME = "${config.theme.gtkTheme}:${config.theme.gtkThemeMode}"; + }; } diff --git a/hosts/modules/hyprland.nix b/hosts/modules/hyprland.nix new file mode 100644 index 0000000..2bab322 --- /dev/null +++ b/hosts/modules/hyprland.nix @@ -0,0 +1,57 @@ +{ + lib, + config, + pkgs, + ... +}: { + services.xserver.enable = false; + + programs.hyprland = { + enable = true; + xwayland.enable = true; + }; + + services.greetd = { + enable = true; + package = pkgs.greetd.tuigreet; + settings.default_session = { + user = "greeter"; + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd ${pkgs.hyprland}/bin/Hyprland"; + }; + }; + + xdg.portal = { + enable = true; + extraPortals = with pkgs; [xdg-desktop-portal-hyprland xdg-desktop-portal-gtk]; + config = { + common.default = ["gtk"]; + hyprland.default = ["hyprland" "gtk"]; + }; + }; + systemd.user.services.xdg-desktop-portal-hyprland.unitConfig.ConditionPathExists = "%t/wayland-0"; + + security.polkit.enable = true; + + environment.systemPackages = with pkgs; [ + qt5.qtwayland + qt6.qtwayland + polkit_gnome + candy-icons + hu-tao-animated-cursor + tokyonight-gtk-theme + hyprlock + wlogout + wl-clipboard + xclip + wofi + hyprshot + hypridle + polkit_gnome + grim + slurp + swappy + imv + syshud + hyprpaper + ]; +} diff --git a/hosts/modules/i3.nix b/hosts/modules/i3.nix deleted file mode 100644 index d550fde..0000000 --- a/hosts/modules/i3.nix +++ /dev/null @@ -1,69 +0,0 @@ -{pkgs, ...}: { - services.xserver = { - enable = true; - xkb = { - layout = "us"; - variant = ""; - }; - - windowManager.i3 = { - enable = true; - package = pkgs.i3-gaps; - extraSessionCommands = '' - if [ -f /var/lib/lightdm-background/.last-wallpaper ]; then - ${pkgs.feh}/bin/feh --bg-fill "$(cat /var/lib/lightdm-background/.last-wallpaper)" - fi - ''; - }; - - # this is actually here because i get peeved personally when I see a none in "none+i3" - desktopManager.xfce = { - enable = true; - noDesktop = true; - enableXfwm = false; - }; - - desktopManager.session = [ - { - name = "xfce+i3"; - start = '' - if [ -f /var/lib/lightdm-background/.last-wallpaper ]; then - ${pkgs.feh}/bin/feh --bg-fill "$(cat /var/lib/lightdm-background/.last-wallpaper)" - fi - export XDG_DATA_DIRS="${pkgs.tokyonight-gtk-theme}/share:${pkgs.candy-icons}/share:${pkgs.hicolor-icon-theme}/share:${pkgs.adwaita-icon-theme}/share:$XDG_DATA_DIRS" - ${pkgs.xfce.xfce4-session}/bin/xfce4-session --with-ck-launch & - ${pkgs.i3-gaps}/bin/i3 - ''; - } - ]; - }; - - environment.systemPackages = with pkgs; [ - dmenu - i3status - i3lock-color - i3blocks - picom - feh - i3-auto-layout - yt-dlp - flameshot - imagemagick - slop - ghostscript - via - arandr - xsettingsd - lxappearance - gsettings-desktop-schemas - adwaita-qt - candy-icons - tokyonight-gtk-theme - hicolor-icon-theme - adwaita-icon-theme - gnome-themes-extra - findutils - coreutils - hu-tao-animated-cursor - ]; -} diff --git a/hosts/modules/libs.nix b/hosts/modules/libs.nix index 2e395b5..f33ec89 100644 --- a/hosts/modules/libs.nix +++ b/hosts/modules/libs.nix @@ -1,17 +1,11 @@ {pkgs, ...}: { environment.systemPackages = with pkgs; [ - linuxHeaders - freetype.dev - pixman - mesa - libglvnd - dbus.dev - openssl - openssl.dev - libxml2 - zlib - zlib.dev texlive.combined.scheme-full poppler_utils + libnotify + egl-wayland + vulkan-tools + libva-utils + vdpauinfo ]; } diff --git a/hosts/modules/net.nix b/hosts/modules/net.nix index f793a28..b3b0bd1 100644 --- a/hosts/modules/net.nix +++ b/hosts/modules/net.nix @@ -3,6 +3,7 @@ networkmanagerapplet wget curl + aria2 cloudflared nmap httpie diff --git a/hosts/modules/nvidia.nix b/hosts/modules/nvidia.nix index eba34a7..c5724b7 100644 --- a/hosts/modules/nvidia.nix +++ b/hosts/modules/nvidia.nix @@ -9,27 +9,35 @@ package = config.boot.kernelPackages.nvidiaPackages.stable; open = true; modesetting.enable = true; # must be true for Wayland - powerManagement.enable = false; + powerManagement.enable = false; # laptops need this nvidiaSettings = true; + nvidiaPersistenced = true; }; hardware.graphics = { enable = true; enable32Bit = true; + extraPackages = with pkgs; [nvidia-vaapi-driver]; }; programs.nix-ld = { enable = true; libraries = with pkgs; [ - stdenv.cc.cc.lib - cudaPackages.cudatoolkit.lib + cudaPackages.cudatoolkit cudaPackages.cudnn cudaPackages.nccl + config.hardware.nvidia.package ]; }; environment.systemPackages = with pkgs; [ - glxinfo + mesa-demos + vulkan-tools + vulkan-headers + vulkan-validation-layers + libva-utils + vdpauinfo + egl-wayland cudaPackages.cudatoolkit ]; } diff --git a/hosts/modules/python.nix b/hosts/modules/python.nix index 58cd706..ec6af10 100644 --- a/hosts/modules/python.nix +++ b/hosts/modules/python.nix @@ -1,8 +1,7 @@ {pkgs, ...}: { environment.systemPackages = with pkgs; [ - (python311.withPackages (ps: + (python312.withPackages (ps: with ps; [ - i3ipc requests ipython six @@ -19,10 +18,10 @@ datasets debugpy pynvim + pkginfo ])) isort uv - python311 ruff ]; } diff --git a/hosts/modules/rgb.nix b/hosts/modules/rgb.nix index df68a29..61c5c44 100644 --- a/hosts/modules/rgb.nix +++ b/hosts/modules/rgb.nix @@ -1,4 +1,9 @@ -{pkgs, ...}: { +{ + lib, + config, + pkgs, + ... +}: { services.hardware.openrgb = { enable = true; package = pkgs.openrgb-with-all-plugins; @@ -6,9 +11,16 @@ server.port = 6742; }; - services.udev.packages = [pkgs.openrgb-with-all-plugins]; boot.kernelModules = ["i2c-dev" "i2c-piix4"]; - users.groups.i2c.members = ["cobray"]; + services.udev.packages = [pkgs.openrgb-with-all-plugins]; - systemd.services.openrgb.serviceConfig.Environment = "QT_QPA_PLATFORM=offscreen"; + users.groups = { + i2c = {}; + plugdev = {}; + }; + + users.users.${config.theme.user}.extraGroups = ["i2c" "plugdev"]; + + systemd.services.openrgb.serviceConfig.Environment = ["QT_QPA_PLATFORM=offscreen"]; + environment.sessionVariables.QT_QPA_PLATFORM = "wayland;xcb"; } diff --git a/hosts/modules/searxng.nix b/hosts/modules/searxng.nix index bbd7e38..b6f7d41 100644 --- a/hosts/modules/searxng.nix +++ b/hosts/modules/searxng.nix @@ -17,7 +17,7 @@ in { server = { bind_address = "127.0.0.1"; port = 11212; - limiter = true; + limiter = false; image_proxy = true; base_url = lib.mkIf (domain != null) "https://${domain}"; }; @@ -27,18 +27,25 @@ in { }; search = { safe_search = 0; - autocomplete = "google"; - default_engine = "google_web"; - default_categories = ["general" "it" "images" "videos" "map"]; + autocomplete = "duckduckgo"; + default_engine = ""; + default_categories = ["general" "it" "images" "videos" "map" "news" "science"]; + formats = ["html" "json"]; }; - enabled_plugins = ["hash" "self_info" "tracker_url_remover" "hostname_replace"]; + enabled_plugins = [ + "hash" + "self_info" + "tracker_url_remover" + "hostname_replace" + "open_access_doi_rewrite" + ]; engines = [ { name = "duckduckgo_web"; engine = "duckduckgo"; disabled = false; categories = ["general"]; - weight = 0.9; + weight = 1.0; timeout = 3.0; } { @@ -46,7 +53,7 @@ in { engine = "google"; disabled = false; categories = ["general"]; - weight = 0.75; + weight = 1.0; timeout = 4.0; } { @@ -54,7 +61,39 @@ in { engine = "bing"; disabled = false; categories = ["general"]; - weight = 0.4; + weight = 1.0; + timeout = 4.0; + } + { + name = "brave"; + engine = "brave"; + disabled = false; + categories = ["general"]; + weight = 1.0; + timeout = 3.0; + } + { + name = "mojeek"; + engine = "mojeek"; + disabled = false; + categories = ["general"]; + weight = 0.9; + timeout = 3.0; + } + { + name = "qwant"; + engine = "qwant"; + disabled = false; + categories = ["general"]; + weight = 0.8; + timeout = 3.0; + } + { + name = "startpage"; + engine = "startpage"; + disabled = false; + categories = ["general"]; + weight = 0.9; timeout = 4.0; } { @@ -64,6 +103,13 @@ in { categories = ["general"]; timeout = 3.0; } + { + name = "wikidata"; + engine = "wikidata"; + disabled = false; + categories = ["general"]; + timeout = 3.0; + } { name = "wikibooks"; engine = "wikibooks"; @@ -78,6 +124,27 @@ in { categories = ["general"]; timeout = 3.0; } + { + name = "arxiv"; + engine = "arxiv"; + disabled = false; + categories = ["science"]; + timeout = 4.0; + } + { + name = "crossref"; + engine = "crossref"; + disabled = false; + categories = ["science"]; + timeout = 4.0; + } + { + name = "semantic_scholar"; + engine = "semantic_scholar"; + disabled = false; + categories = ["science"]; + timeout = 4.0; + } { name = "github_code"; engine = "github"; @@ -85,6 +152,13 @@ in { categories = ["it"]; timeout = 4.0; } + { + name = "stackoverflow"; + engine = "stackoverflow"; + disabled = false; + categories = ["it"]; + timeout = 4.0; + } { name = "wikicommons_img"; engine = "wikicommons"; diff --git a/hosts/modules/settings.nix b/hosts/modules/settings.nix deleted file mode 100644 index c864434..0000000 --- a/hosts/modules/settings.nix +++ /dev/null @@ -1,25 +0,0 @@ -{lib, ...}: -with lib; { - options.theme = { - cursorName = mkOption { - type = types.str; - default = "Hu-Tao-Animated-Cursor"; - }; - cursorSize = mkOption { - type = types.int; - default = 24; - }; - gtkTheme = mkOption { - type = types.str; - default = "Tokyonight-Dark"; - }; - iconTheme = mkOption { - type = types.str; - default = "candy-icons"; - }; - fontName = mkOption { - type = types.str; - default = "Clear Sans 10"; - }; - }; -} diff --git a/hosts/modules/steam.nix b/hosts/modules/steam.nix index 654ebf1..354e09e 100644 --- a/hosts/modules/steam.nix +++ b/hosts/modules/steam.nix @@ -18,14 +18,6 @@ protontricks gamemode mangohud - vulkan-tools - vulkan-loader - vulkan-headers - vulkan-validation-layers libstrangle - piper - portaudio - alsa-lib - libglvnd ]; } diff --git a/hosts/modules/udiskie.nix b/hosts/modules/udiskie.nix new file mode 100644 index 0000000..bf29279 --- /dev/null +++ b/hosts/modules/udiskie.nix @@ -0,0 +1,9 @@ +{ + config, + pkgs, + ... +}: { + security.polkit.enable = true; + services.udisks2.enable = true; + services.gvfs.enable = true; +} diff --git a/hosts/modules/user.nix b/hosts/modules/user.nix index 3281a4c..b2bd5f4 100644 --- a/hosts/modules/user.nix +++ b/hosts/modules/user.nix @@ -1,10 +1,14 @@ -{pkgs, ...}: { - # Define a user account. Don't forget to set a password with 'passwd'. - users.users.cobray = { +{ + pkgs, + lib, + config, + ... +}: { + users.users.${config.theme.user} = { isNormalUser = true; - description = "Mon Aie"; - extraGroups = ["networkmanager" "wheel" "docker" "video"]; - shell = pkgs.fish; + shell = builtins.getAttr config.theme.Shell pkgs; + extraGroups = ["wheel" "networkmanager" "docker" "video" "render" "input" "audio"]; + linger = true; }; security.sudo = { @@ -12,7 +16,7 @@ wheelNeedsPassword = true; }; - programs.fish = { - enable = true; - }; + programs."${config.theme.Shell}".enable = true; + + nix.settings.trusted-users = ["root" config.theme.user]; } diff --git a/hosts/modules/x11.nix b/hosts/modules/x11.nix deleted file mode 100644 index a9da349..0000000 --- a/hosts/modules/x11.nix +++ /dev/null @@ -1,12 +0,0 @@ -# For xorgsisters only -{pkgs, ...}: { - environment.systemPackages = with pkgs; [ - xorg.xdpyinfo - slop - xorg.libX11 - xorg.libXtst - xorg.libXi - xorg.xorgproto - xclip - ]; -} diff --git a/hosts/settings.nix b/hosts/settings.nix new file mode 100644 index 0000000..6ecfce1 --- /dev/null +++ b/hosts/settings.nix @@ -0,0 +1,64 @@ +# used to seed my config +{lib, ...}: +with lib; { + options.theme = { + user = mkOption { + type = types.str; + default = "cobray"; + }; + cursorName = mkOption { + type = types.str; + default = "Hu-Tao-Animated-Cursor"; + }; + cursorSize = mkOption { + type = types.int; + default = 24; + }; + gtkTheme = mkOption { + type = types.str; + default = "Tokyonight-Dark"; + }; + gtkThemeMode = mkOption { + type = types.str; + # light or dark mode + default = "dark"; + }; + qtTheme = mkOption { + type = types.str; + # qt5 or 6 it seems + default = "qt6ct"; + }; + qtOverride = mkOption { + type = types.str; + default = "Fusion"; + }; + iconTheme = mkOption { + type = types.str; + default = "candy-icons"; + }; + font = mkOption { + type = types.str; + default = "Clear Sans 10"; + }; + Terminal = mkOption { + type = types.str; + default = "ghostty"; + }; + TerminalFont = mkOption { + type = types.str; + default = "0xProto Nerd Font"; + }; + Browser = mkOption { + type = types.str; + default = "thorium"; + }; + Editor = mkOption { + type = types.str; + default = "nvim"; + }; + Shell = mkOption { + type = types.str; + default = "fish"; + }; + }; +} diff --git a/hosts/system-packages.nix b/hosts/system-packages.nix index 57de6f0..48e8f25 100644 --- a/hosts/system-packages.nix +++ b/hosts/system-packages.nix @@ -1,8 +1,7 @@ {pkgs, ...}: { imports = [ + ./settings.nix ./cachix.nix - ./modules/settings.nix - ./modules/i3.nix ./modules/gtk.nix ./modules/audio.nix ./modules/bluetooth.nix @@ -20,7 +19,6 @@ ./modules/npm.nix ./modules/tailscale.nix ./modules/ld.nix - ./modules/x11.nix ./modules/ollama.nix ./modules/cups.nix ./modules/rust.nix @@ -29,9 +27,11 @@ ./modules/core.nix ./modules/libs.nix ./modules/rgb.nix - ./modules/nano.nix + ./modules/hyprland.nix ./modules/searxng.nix + ./modules/nano.nix ./modules/qt.nix + ./modules/udiskie.nix ]; npm.enable = true; services.udisks2.enable = true;