From 38eda7fdd668b33440c8fe6758ea8123625f6986 Mon Sep 17 00:00:00 2001 From: alsaiduq-lab Date: Sat, 20 Sep 2025 00:33:23 -0600 Subject: [PATCH 1/3] last update for x11 for a while --- flake.lock | 56 ++++++++++++++++---------------- home-manager/cobray.nix | 1 + home-manager/modules/ani-cli.nix | 6 ++++ hosts/modules/qt.nix | 5 +++ hosts/system-packages.nix | 1 + 5 files changed, 41 insertions(+), 28 deletions(-) create mode 100644 home-manager/modules/ani-cli.nix create mode 100644 hosts/modules/qt.nix diff --git a/flake.lock b/flake.lock index f5e4645..f9ca476 100644 --- a/flake.lock +++ b/flake.lock @@ -61,11 +61,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1758143944, - "narHash": "sha256-OzGUBNKrGTPZRVx6ix5kKbbVp0aa5bMtk3Uzn20Iea0=", + "lastModified": 1758616426, + "narHash": "sha256-pPzbbpuh44gGHtA/diB5pv8w8qe9w6+TZLWm1qPUjwk=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "1efde5caba2d9f1fbd3e3f1a100f341feca095b4", + "rev": "3eb646ea6baf5eb45bbd39cd7ad624cda0264554", "type": "github" }, "original": { @@ -81,11 +81,11 @@ ] }, "locked": { - "lastModified": 1757808926, - "narHash": "sha256-K6PEI5PYY94TVMH0mX3MbZNYFme7oNRKml/85BpRRAo=", + "lastModified": 1758463745, + "narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=", "owner": "nix-community", "repo": "home-manager", - "rev": "f21d9167782c086a33ad53e2311854a8f13c281e", + "rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3", "type": "github" }, "original": { @@ -98,11 +98,11 @@ "i3-dotfiles": { "flake": false, "locked": { - "lastModified": 1758014321, - "narHash": "sha256-CpGiZ0yYuoqsQT/zFDM6JLYrJL8P6aXze2wK2i5WQkU=", + "lastModified": 1758613492, + "narHash": "sha256-pYaBq0FCUoSZtTE73HAWDw97LEBvp56upVfJcLbdBH4=", "ref": "refs/heads/master", - "rev": "ad5a8a4e4a8742d2513cd2f43e3a71b0825703af", - "revCount": 13, + "rev": "73238b6b91151a0feeb4c7162fc5d1ca4e8fb132", + "revCount": 14, "type": "git", "url": "ssh://git@github.com/alsaiduq-lab/i3-dotfiles" }, @@ -119,11 +119,11 @@ ] }, "locked": { - "lastModified": 1757814419, - "narHash": "sha256-wmlDAkOrwX9cvhXQa7wekGr/5G6SfE2D5KlvuvSEEXc=", + "lastModified": 1758420014, + "narHash": "sha256-a7IGWXPRppgXMRpBosBl2Afr5DICt21ogeZL45uVkX0=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "17db183a6a2ba1217bbfc123b47d4b5ee70b256a", + "rev": "cd931e08409954b2e3595b1532039f8052dd8198", "type": "github" }, "original": { @@ -162,24 +162,24 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1755972213, - "narHash": "sha256-VYK7aDAv8H1enXn1ECRHmGbeY6RqLnNwUJkOwloIsko=", - "rev": "73e96df7cff5783f45e21342a75a1540c4eddce4", + "lastModified": 1758360447, + "narHash": "sha256-XDY3A83bclygHDtesRoaRTafUd80Q30D/Daf9KSG6bs=", + "rev": "8eaee110344796db060382e15d3af0a9fc396e0e", "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable-small/nixos-25.11pre850642.73e96df7cff5/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixos/unstable/nixos-25.11pre864002.8eaee1103447/nixexprs.tar.xz" }, "original": { "type": "tarball", - "url": "https://channels.nixos.org/nixos-unstable-small/nixexprs.tar.xz" + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" } }, "nixpkgs_3": { "locked": { - "lastModified": 1758070117, - "narHash": "sha256-uLwwHFCZnT1c3N3biVe/0hCkag2GSrf9+M56+Okf+WY=", + "lastModified": 1758346548, + "narHash": "sha256-afXE7AJ7MY6wY1pg/Y6UPHNYPy5GtUKeBkrZZ/gC71E=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e9b7f2ff62b35f711568b1f0866243c7c302028d", + "rev": "b2a3852bd078e68dd2b3dfa8c00c67af1f0a7d20", "type": "github" }, "original": { @@ -216,11 +216,11 @@ }, "unstable": { "locked": { - "lastModified": 1758029226, - "narHash": "sha256-TjqVmbpoCqWywY9xIZLTf6ANFvDCXdctCjoYuYPYdMI=", + "lastModified": 1758446476, + "narHash": "sha256-5rdAi7CTvM/kSs6fHe1bREIva5W3TbImsto+dxG4mBo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "08b8f92ac6354983f5382124fef6006cade4a1c1", + "rev": "a1f79a1770d05af18111fbbe2a3ab2c42c0f6cd0", "type": "github" }, "original": { @@ -264,17 +264,17 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1757167408, - "narHash": "sha256-4XyJ6fmKd9wgJ7vHUQuULYy5ps2gUgkkDk/PrJb2OPY=", + "lastModified": 1758405547, + "narHash": "sha256-WgaDgvIZMPvlZcZrpPMjkaalTBnGF2lTG+62znXctWM=", "owner": "jcollie", "repo": "zon2nix", - "rev": "dc78177e2ad28d5a407c9e783ee781bd559d7dd5", + "rev": "bf983aa90ff169372b9fa8c02e57ea75e0b42245", "type": "github" }, "original": { "owner": "jcollie", "repo": "zon2nix", - "rev": "dc78177e2ad28d5a407c9e783ee781bd559d7dd5", + "rev": "bf983aa90ff169372b9fa8c02e57ea75e0b42245", "type": "github" } } diff --git a/home-manager/cobray.nix b/home-manager/cobray.nix index a5f4abc..b6c2bef 100644 --- a/home-manager/cobray.nix +++ b/home-manager/cobray.nix @@ -22,6 +22,7 @@ ./modules/obs.nix ./modules/udiskie.nix ./modules/mpv.nix + ./modules/ani-cli.nix # temp removed, currently broken on nixpkgs? lmao # ./modules/bambustudio.nix ]; diff --git a/home-manager/modules/ani-cli.nix b/home-manager/modules/ani-cli.nix new file mode 100644 index 0000000..794287f --- /dev/null +++ b/home-manager/modules/ani-cli.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + ani-cli + aria2 + ]; +} diff --git a/hosts/modules/qt.nix b/hosts/modules/qt.nix new file mode 100644 index 0000000..188d40f --- /dev/null +++ b/hosts/modules/qt.nix @@ -0,0 +1,5 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + qt6.qtdeclarative + ]; +} diff --git a/hosts/system-packages.nix b/hosts/system-packages.nix index c0d6bf6..d2a10b4 100644 --- a/hosts/system-packages.nix +++ b/hosts/system-packages.nix @@ -29,6 +29,7 @@ ./modules/rgb.nix ./modules/nano.nix ./modules/searxng.nix + ./modules/qt.nix ]; npm.enable = true; services.udisks2.enable = true; From 72ea5ade11381d853e94ecbc66471295e0bbd246 Mon Sep 17 00:00:00 2001 From: alsaiduq-lab Date: Thu, 25 Sep 2025 17:52:36 -0600 Subject: [PATCH 2/3] refactored --- flake.lock | 49 ++++++- flake.nix | 7 + hosts/hardware-configuration.nix | 42 +----- hosts/modules/env.nix | 10 +- hosts/modules/gtk.nix | 52 +++++++ hosts/modules/i3-xfce.nix | 229 ------------------------------- hosts/modules/i3.nix | 69 ++++++++++ hosts/modules/settings.nix | 25 ++++ hosts/system-packages.nix | 4 +- 9 files changed, 208 insertions(+), 279 deletions(-) mode change 100644 => 120000 hosts/hardware-configuration.nix create mode 100644 hosts/modules/gtk.nix delete mode 100644 hosts/modules/i3-xfce.nix create mode 100644 hosts/modules/i3.nix create mode 100644 hosts/modules/settings.nix diff --git a/flake.lock b/flake.lock index f9ca476..4676669 100644 --- a/flake.lock +++ b/flake.lock @@ -61,11 +61,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1758616426, - "narHash": "sha256-pPzbbpuh44gGHtA/diB5pv8w8qe9w6+TZLWm1qPUjwk=", + "lastModified": 1758653744, + "narHash": "sha256-y0B40QQ//4fpTAUfhZjoDEiUejhb2hXl5LcpNenRpYM=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "3eb646ea6baf5eb45bbd39cd7ad624cda0264554", + "rev": "f97518cc100599186846282457be520fda11f467", "type": "github" }, "original": { @@ -95,6 +95,24 @@ "type": "github" } }, + "hu-tao-cursor": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1758727127, + "narHash": "sha256-FdeiMlPVyu6tANl/EQatvVOEyX8d6rNMD31Emiaz8UQ=", + "ref": "refs/heads/master", + "rev": "d8d1da400e3835dfc211bfa67fb359e06bfff130", + "revCount": 4, + "type": "git", + "url": "ssh://git@github.com/alsaiduq-lab/Hu-Tao-Animated-Cursor" + }, + "original": { + "type": "git", + "url": "ssh://git@github.com/alsaiduq-lab/Hu-Tao-Animated-Cursor" + } + }, "i3-dotfiles": { "flake": false, "locked": { @@ -119,11 +137,11 @@ ] }, "locked": { - "lastModified": 1758420014, - "narHash": "sha256-a7IGWXPRppgXMRpBosBl2Afr5DICt21ogeZL45uVkX0=", + "lastModified": 1758678659, + "narHash": "sha256-Ff5IFCEABf3CStKvf8MqJe7jwrHk2J8swdYTrwOj9dk=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "cd931e08409954b2e3595b1532039f8052dd8198", + "rev": "6418c314274a8ce27078402ab1fbac7c06da7a36", "type": "github" }, "original": { @@ -189,13 +207,30 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1758589230, + "narHash": "sha256-zMTCFGe8aVGTEr2RqUi/QzC1nOIQ0N1HRsbqB4f646k=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d1d883129b193f0b495d75c148c2c3a7d95789a0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "ghostty": "ghostty", "home-manager": "home-manager", + "hu-tao-cursor": "hu-tao-cursor", "i3-dotfiles": "i3-dotfiles", "nix-gaming": "nix-gaming", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "unstable": "unstable" } }, diff --git a/flake.nix b/flake.nix index c45e63f..13a99c2 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,9 @@ url = "git+ssh://git@github.com/alsaiduq-lab/i3-dotfiles"; flake = false; }; + hu-tao-cursor = { + url = "git+ssh://git@github.com/alsaiduq-lab/Hu-Tao-Animated-Cursor"; + }; }; outputs = { @@ -33,6 +36,7 @@ nix-gaming, unstable, ghostty, + hu-tao-cursor, ... } @ inputs: let system = "x86_64-linux"; @@ -85,6 +89,9 @@ 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; + }) ]; }; } diff --git a/hosts/hardware-configuration.nix b/hosts/hardware-configuration.nix deleted file mode 100644 index 36e368b..0000000 --- a/hosts/hardware-configuration.nix +++ /dev/null @@ -1,41 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "uas" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/042fab51-5d9c-454f-bd8f-315af4060a7d"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/5830-C7C5"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/68153c66-e234-49a8-9ec3-7e9af73efd1c"; } - ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp6s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/hardware-configuration.nix b/hosts/hardware-configuration.nix new file mode 120000 index 0000000..4dde6be --- /dev/null +++ b/hosts/hardware-configuration.nix @@ -0,0 +1 @@ +/etc/nixos/hardware-configuration.nix \ No newline at end of file diff --git a/hosts/modules/env.nix b/hosts/modules/env.nix index 4c3a8d6..e651cda 100644 --- a/hosts/modules/env.nix +++ b/hosts/modules/env.nix @@ -1,8 +1,11 @@ { pkgs, lib, + config, ... -}: { +}: let + t = config.theme; +in { environment.shellInit = '' if [ -d "$HOME/.cargo/bin" ]; then export PATH="$PATH:$HOME/.cargo/bin" @@ -13,6 +16,9 @@ EDITOR = "nvim"; VISUAL = "nvim"; TERM = "ghostty"; + BROWSER = "thorium"; + XCURSOR_THEME = t.cursorName; + XCURSOR_SIZE = toString t.cursorSize; CC = "${pkgs.gcc}/bin/gcc"; 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;;"; @@ -54,6 +60,8 @@ environment.pathsToLink = [ "/share/fish" "/bin" + "/share/icons" + "/share/pixmaps" ]; programs.direnv = { diff --git a/hosts/modules/gtk.nix b/hosts/modules/gtk.nix new file mode 100644 index 0000000..7a627c0 --- /dev/null +++ b/hosts/modules/gtk.nix @@ -0,0 +1,52 @@ +{ + 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-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-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} + ''; + }; + + programs.dconf.enable = true; + programs.dconf.profiles.user.databases = [ + { + settings."org/gnome/desktop/interface" = { + gtk-theme = gtkTheme; + icon-theme = iconTheme; + cursor-theme = cursorName; + font-name = fontName; + }; + } + ]; +} diff --git a/hosts/modules/i3-xfce.nix b/hosts/modules/i3-xfce.nix deleted file mode 100644 index c8ae0e4..0000000 --- a/hosts/modules/i3-xfce.nix +++ /dev/null @@ -1,229 +0,0 @@ -{ - pkgs, - i3dotfiles, - ... -}: let - wallpaperDir = "/home/cobray/wallpapers"; - - randomWallpaper = pkgs.writeShellScript "wallpaper.sh" '' - #!${pkgs.runtimeShell} - set -e - BG_DIR="/var/lib/lightdm-background" - BG_LINK="''$BG_DIR/random-wallpaper.png" - LAST_WALLPAPER="''$BG_DIR/.last-wallpaper" - WALLPAPER_DIR="${wallpaperDir}" - - mkdir -p "''$BG_DIR" - rm -f "''$BG_LINK" - mapfile -t WALLPAPERS < <(${pkgs.findutils}/bin/find "''$WALLPAPER_DIR" -type f \( -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" \)) - COUNT=''${#WALLPAPERS[@]} - if [[ "''$COUNT" -eq 0 ]]; then - cp -f "${pkgs.nixos-artwork.wallpapers.simple-dark-gray}/share/backgrounds/nixos/nixos-wallpaper.png" "''$BG_LINK" - echo "${pkgs.nixos-artwork.wallpapers.simple-dark-gray}/share/backgrounds/nixos/nixos-wallpaper.png" > "''$LAST_WALLPAPER" - chown lightdm:lightdm "''$BG_LINK" "''$LAST_WALLPAPER" - exit 0 - fi - RAND=$(${pkgs.coreutils}/bin/shuf -i 0-''$((COUNT - 1)) -n 1) - SELECT=''${WALLPAPERS[''$RAND]} - cp -f "''$SELECT" "''$BG_LINK" - echo "''$SELECT" > "''$LAST_WALLPAPER" - chown lightdm:lightdm "''$BG_LINK" "''$LAST_WALLPAPER" - ''; -in { - services.xserver.enable = true; - services.xserver.xkb = { - layout = "us"; - variant = ""; - }; - - services.xserver.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 - - export GSETTINGS_SCHEMA_DIR="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas" - ${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface gtk-theme "Tokyonight-Dark" - ${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface icon-theme "candy-icons" - ${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface cursor-theme "capitaine-cursors" - cat > $HOME/.config/xsettingsd << EOF - Net/ThemeName "Tokyonight-Dark" - Net/IconThemeName "candy-icons" - Gtk/CursorThemeName "capitaine-cursors" - EOF - killall xsettingsd || true - ${pkgs.xsettingsd}/bin/xsettingsd & - ''; - }; - - services.xserver.desktopManager.xfce = { - enable = true; - noDesktop = true; - enableXfwm = false; - }; - - services.xserver.displayManager.lightdm = { - enable = true; - background = "/var/lib/lightdm-background/random-wallpaper.png"; - greeters.gtk = { - enable = true; - theme = { - package = pkgs.tokyonight-gtk-theme; - name = "Tokyonight-Dark"; - }; - iconTheme = { - package = pkgs.candy-icons; - name = "candy-icons"; - }; - cursorTheme = { - package = pkgs.capitaine-cursors; - name = "capitaine-cursors"; - }; - extraConfig = '' - [greeter] - greeting = Welcome back, Traveller - font-name=Clear Sans 10 - cursor-theme-name=capitaine-cursors - icon-theme-name=candy-icons - ''; - }; - }; - - systemd.tmpfiles.rules = [ - "d /var/lib/lightdm-background 0755 lightdm lightdm - -" - "d ${wallpaperDir} 0755 cobray users - -" - "f /var/log/random-wallpaper.log 0644 root root - -" - ]; - - systemd.services.random-wallpaper = { - description = "Update wallpaper to a random image"; - before = ["display-manager.service"]; - wantedBy = ["display-manager.service"]; - serviceConfig = { - Type = "oneshot"; - ExecStart = "${randomWallpaper}"; - User = "root"; - }; - }; - - systemd.timers.random-wallpaper = { - description = "Daily wallpaper refresh for LightDM"; - wantedBy = ["timers.target"]; - timerConfig = { - OnCalendar = "daily"; - Persistent = true; - }; - }; - - services.displayManager.defaultSession = "xfce+i3"; - services.displayManager.autoLogin = { - enable = true; - user = "cobray"; - }; - - qt = { - enable = true; - platformTheme = "qt5ct"; - }; - - environment.etc = { - "xdg/i3/config" = { - source = "${i3dotfiles}/i3/config"; - mode = "0644"; - }; - "gtk-2.0/gtkrc".text = '' - gtk-theme-name="Tokyonight-Dark" - gtk-icon-theme-name="candy-icons" - gtk-font-name="Clear Sans 10" - gtk-cursor-theme-name="capitaine-cursors" - gtk-cursor-theme-size=24 - ''; - "gtk-3.0/settings.ini".text = '' - [Settings] - gtk-application-prefer-dark-theme=1 - gtk-theme-name=Tokyonight-Dark - gtk-icon-theme-name=candy-icons - gtk-font-name=Clear Sans 10 - gtk-cursor-theme-name=capitaine-cursors - gtk-cursor-theme-size=24 - ''; - "gtk-4.0/settings.ini".text = '' - [Settings] - gtk-application-prefer-dark-theme=1 - gtk-theme-name=Tokyonight-Dark - gtk-icon-theme-name=candy-icons - gtk-font-name=Clear Sans 10 - gtk-cursor-theme-name=capitaine-cursors - gtk-cursor-theme-size=24 - ''; - }; - - environment.systemPackages = with pkgs; [ - dmenu - i3status - i3lock-color - i3blocks - picom - feh - rofi - dunst - polybar - i3-auto-layout - mpv - yt-dlp - flameshot - imagemagick - slop - ghostscript - via - arandr - xclip - xsettingsd - lxappearance - gsettings-desktop-schemas - adwaita-qt - candy-icons - capitaine-cursors - tokyonight-gtk-theme - hicolor-icon-theme - adwaita-icon-theme - kdePackages.breeze-icons - gnome-themes-extra - findutils - coreutils - ]; - - environment.pathsToLink = [ - "/share/icons" - "/share/pixmaps" - ]; - - services.xserver.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 - ''; - } - ]; - - programs.dconf.enable = true; - programs.dconf.profiles.user.databases = [ - { - settings = { - "org/gnome/desktop/interface" = { - icon-theme = "candy-icons"; - gtk-theme = "Tokyonight-Dark"; - cursor-theme = "capitaine-cursors"; - }; - }; - } - ]; -} diff --git a/hosts/modules/i3.nix b/hosts/modules/i3.nix new file mode 100644 index 0000000..d550fde --- /dev/null +++ b/hosts/modules/i3.nix @@ -0,0 +1,69 @@ +{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/settings.nix b/hosts/modules/settings.nix new file mode 100644 index 0000000..c864434 --- /dev/null +++ b/hosts/modules/settings.nix @@ -0,0 +1,25 @@ +{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/system-packages.nix b/hosts/system-packages.nix index d2a10b4..57de6f0 100644 --- a/hosts/system-packages.nix +++ b/hosts/system-packages.nix @@ -1,6 +1,9 @@ {pkgs, ...}: { imports = [ ./cachix.nix + ./modules/settings.nix + ./modules/i3.nix + ./modules/gtk.nix ./modules/audio.nix ./modules/bluetooth.nix ./modules/boot.nix @@ -18,7 +21,6 @@ ./modules/tailscale.nix ./modules/ld.nix ./modules/x11.nix - ./modules/i3-xfce.nix ./modules/ollama.nix ./modules/cups.nix ./modules/rust.nix From 13acac48bd092bc2d4a69ed7c9307a5e8e8119d6 Mon Sep 17 00:00:00 2001 From: alsaiduq-lab Date: Fri, 26 Sep 2025 17:44:22 -0600 Subject: [PATCH 3/3] todos --- flake.lock | 32 ++++++++++++------------ flake.nix | 5 ++++ hosts/hardware-configuration.nix | 42 +++++++++++++++++++++++++++++++- hosts/modules/core.nix | 1 + 4 files changed, 63 insertions(+), 17 deletions(-) mode change 120000 => 100644 hosts/hardware-configuration.nix diff --git a/flake.lock b/flake.lock index 4676669..2946d8b 100644 --- a/flake.lock +++ b/flake.lock @@ -61,11 +61,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1758653744, - "narHash": "sha256-y0B40QQ//4fpTAUfhZjoDEiUejhb2hXl5LcpNenRpYM=", + "lastModified": 1758895124, + "narHash": "sha256-qCQPdEX0F7ved/a2ydjA2vyFBhiKPuDJq9tZPlpEVYQ=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "f97518cc100599186846282457be520fda11f467", + "rev": "7749b46463cfe39501110998d6adbfa121b04adb", "type": "github" }, "original": { @@ -100,11 +100,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1758727127, - "narHash": "sha256-FdeiMlPVyu6tANl/EQatvVOEyX8d6rNMD31Emiaz8UQ=", + "lastModified": 1758768962, + "narHash": "sha256-Ht+nzVFro1TwGnoe2v/vvs/CyP2CFWUyGMdo63OBCzA=", "ref": "refs/heads/master", - "rev": "d8d1da400e3835dfc211bfa67fb359e06bfff130", - "revCount": 4, + "rev": "cac19deaf828c9d28a0813c7dda3b171c047cf0d", + "revCount": 5, "type": "git", "url": "ssh://git@github.com/alsaiduq-lab/Hu-Tao-Animated-Cursor" }, @@ -137,11 +137,11 @@ ] }, "locked": { - "lastModified": 1758678659, - "narHash": "sha256-Ff5IFCEABf3CStKvf8MqJe7jwrHk2J8swdYTrwOj9dk=", + "lastModified": 1758851551, + "narHash": "sha256-7tKDTarLl/WSktFUDBRwLEOE0UV/OV0r3nEMzKXI8jY=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "6418c314274a8ce27078402ab1fbac7c06da7a36", + "rev": "b08fc1a88b61430a48761e5e6d3e977886391a54", "type": "github" }, "original": { @@ -209,11 +209,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1758589230, - "narHash": "sha256-zMTCFGe8aVGTEr2RqUi/QzC1nOIQ0N1HRsbqB4f646k=", + "lastModified": 1758791193, + "narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d1d883129b193f0b495d75c148c2c3a7d95789a0", + "rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01", "type": "github" }, "original": { @@ -251,11 +251,11 @@ }, "unstable": { "locked": { - "lastModified": 1758446476, - "narHash": "sha256-5rdAi7CTvM/kSs6fHe1bREIva5W3TbImsto+dxG4mBo=", + "lastModified": 1758763312, + "narHash": "sha256-puBMviZhYlqOdUUgEmMVJpXqC/ToEqSvkyZ30qQ09xM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a1f79a1770d05af18111fbbe2a3ab2c42c0f6cd0", + "rev": "e57b3b16ad8758fd681511a078f35c416a8cc939", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 13a99c2..99026a1 100644 --- a/flake.nix +++ b/flake.nix @@ -27,6 +27,10 @@ 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"; + # }; }; outputs = { @@ -37,6 +41,7 @@ unstable, ghostty, hu-tao-cursor, + #sops-nix, ... } @ inputs: let system = "x86_64-linux"; diff --git a/hosts/hardware-configuration.nix b/hosts/hardware-configuration.nix deleted file mode 120000 index 4dde6be..0000000 --- a/hosts/hardware-configuration.nix +++ /dev/null @@ -1 +0,0 @@ -/etc/nixos/hardware-configuration.nix \ No newline at end of file diff --git a/hosts/hardware-configuration.nix b/hosts/hardware-configuration.nix new file mode 100644 index 0000000..36e368b --- /dev/null +++ b/hosts/hardware-configuration.nix @@ -0,0 +1,41 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "uas" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/042fab51-5d9c-454f-bd8f-315af4060a7d"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5830-C7C5"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/68153c66-e234-49a8-9ec3-7e9af73efd1c"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp6s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/modules/core.nix b/hosts/modules/core.nix index 4575002..53235b9 100644 --- a/hosts/modules/core.nix +++ b/hosts/modules/core.nix @@ -27,5 +27,6 @@ icu libclang argc + appimage-run ]; }