diff --git a/.gitignore b/.gitignore index 737564c..8f17107 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ nix-pad.qcow2 result +ports.registry diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e3aff30 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "plasma-manager"] + path = plasma-manager + url = https://github.com/nix-community/plasma-manager diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index aea534b..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,59 +0,0 @@ -# CLAUDE.md - -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. - -## Overview - -NixOS dotfiles using Flakes + Home Manager for a single user (`jashton`) across multiple hosts (`thinkpad`, `desktop`, `framework`). Pinned to `nixos-26.05`. - -## Common Commands - -```bash -# Rebuild and switch the current system (thinkpad) -sudo nixos-rebuild switch --flake ~/.dotfiles#thinkpad - -# Check the flake for errors without applying -nix flake check - -# Update flake inputs (e.g. nixpkgs, home-manager) -nix flake update - -# Open the flake entrypoint in nvim -enix # alias: nvim ~/.dotfiles/flake.nix - -# Open the home-manager user config in nvim -ehome # alias: nvim ~/.dotfiles/home/jashton.nix - -# List registered ports -ports # alias: cat ~/.dotfiles/ports.registry -``` - -## Architecture - -The repo is structured as a standard Nix Flakes configuration. `flake.nix` defines `nixosConfigurations` for each host and wires in Home Manager as a NixOS module. Each host's Home Manager is pointed at a single shared user config (`home/jashton.nix`). - -``` -flake.nix # Entrypoint; defines per-host nixosConfigurations -hosts//default.nix # Host-specific config (imports hardware.nix + system/) -hosts//hardware.nix # nixos-generate-config output (don't manually edit) -system/ # Shared NixOS system config (all hosts) - default.nix # Aggregates: packages, core, network, security, services, virtualisation - packages.nix # System-level packages + allowUnfree - core/ # Zsh, fonts, nix settings, locale, boot, audio, power - security/ # Users, sudo, polkit, TPM2, systemd hardening - services/ # Display manager (GDM), Xserver, i3 WM, picom, printing, Bluetooth - network/ # Pi-hole config - virtualisation/ # VM/container support -home/jashton.nix # Home Manager user config; shared across all hosts - home/programs/ # Per-program HM config: alacritty, git, nvim - home/desktop/ # Desktop environment: i3, polybar, rofi, dunst, gnome dconf -``` - -## Key Design Decisions - -- **Dual desktop environment**: Both GNOME (GDM display manager) and i3 (window manager via Xserver) are configured and co-exist. GNOME extensions are declared via `dconf.settings` in `home/desktop/gnome.nix`. -- **Shell scripts as Nix packages**: Custom scripts (`find-open-port`, `lock-screen`, `power-menu`, `weather-cache`) are defined inline in `home/jashton.nix` using `pkgs.writeShellScriptBin` so they are on `$PATH` without a separate scripts directory. -- **Port registry**: `ports.registry` is a plain-text file tracking assigned dev ports 8000–8999. The `find-open-port` script appends to it; don't assign ports manually without checking it first. -- **Zsh configured at system level**: `programs.zsh` (aliases, Oh My Zsh, history) lives in `system/core/env.nix`. The `~/.zshrc` written by Home Manager is intentionally a stub to suppress the zsh-newuser-install prompt. -- **Host hardware files**: `hosts/thinkpad/hardware.nix` is auto-generated by `nixos-generate-config`. Edits here (e.g. Howdy IR camera path `/dev/video66`) are intentional overrides — don't regenerate and overwrite. -- **`stateVersion`**: Both `system.stateVersion` and `home.stateVersion` are set to `"26.05"`. Do not change these. diff --git a/flake.lock b/flake.lock index f476033..ce4f8e4 100644 --- a/flake.lock +++ b/flake.lock @@ -1,58 +1,42 @@ { "nodes": { - "dms": { + "danksearch": { "inputs": { - "flake-compat": "flake-compat", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1784341117, - "narHash": "sha256-7VjoVZu+8PC41ZDQ3umi/EXsU3sCLNyRfxZrfJKHy+E=", + "lastModified": 1784433272, + "narHash": "sha256-5Gz3pC/rcn8LLwzLZZhrpPMqY+PDdUzoFtXV3uWoitg=", "owner": "AvengeMedia", - "repo": "DankMaterialShell", - "rev": "74896fb87cb9e4bb866dbabcfd754e3e649ad0c7", + "repo": "danksearch", + "rev": "4b4905e2ef3454230fb648d2139f3139b742b0eb", "type": "github" }, "original": { "owner": "AvengeMedia", - "ref": "stable", - "repo": "DankMaterialShell", + "repo": "danksearch", "type": "github" } }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { + "dms-plugin-registry": { "inputs": { - "systems": "systems" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "lastModified": 1784857968, + "narHash": "sha256-83haLQzxrk6sCX76iQlloHWQ+TD0RKsK+LdVTMikNwk=", + "owner": "AvengeMedia", + "repo": "dms-plugin-registry", + "rev": "78d478f34ad6790faea447c37d16bab63e1d3570", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "AvengeMedia", + "repo": "dms-plugin-registry", "type": "github" } }, @@ -63,11 +47,11 @@ ] }, "locked": { - "lastModified": 1783740085, - "narHash": "sha256-qajyHfZY29G2oEQk+uHxmsJcRoBUBXP9maTpFlwP/dI=", + "lastModified": 1784350909, + "narHash": "sha256-ZWyzLbS1yKUTeFJLmdVuWNnHttL333/ldJbEE+KzCrM=", "owner": "nix-community", "repo": "home-manager", - "rev": "3cd22efe6471dc7365c822bd9ad73a21e55f38fb", + "rev": "4ce190229c73d44536caa7072f6308fb2d8feeb3", "type": "github" }, "original": { @@ -77,26 +61,6 @@ "type": "github" } }, - "linger": { - "inputs": { - "flake-utils": [ - "flake-utils" - ] - }, - "locked": { - "lastModified": 1670283645, - "narHash": "sha256-SuC/SuQ8RUaM6RthNAkNTSnlpRXJxEmuym2OyPLLpWk=", - "owner": "mindsbackyard", - "repo": "linger-flake", - "rev": "9f8632c0621dc562dd42e9eacfdb6dae82aebf8b", - "type": "github" - }, - "original": { - "owner": "mindsbackyard", - "repo": "linger-flake", - "type": "github" - } - }, "niri": { "inputs": { "niri-stable": "niri-stable", @@ -185,13 +149,29 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs-unstable": { "locked": { - "lastModified": 1784280462, - "narHash": "sha256-DtoqIqM7VkR6NxAkcLpMwmi02USwWb3JdmNGLyhthc0=", + "lastModified": 1784796856, + "narHash": "sha256-wWFrV5/Qbm+lyt5x20E/bSbfJiGKMo4RCxZV8cl/WZI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "293d6abedf0478e681a4dfcfcb35b30fc796a32f", + "rev": "e2587caef70cea85dd97d7daab492899902dbf5d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1784856561, + "narHash": "sha256-J+Bx1Z6Oeoj2FgnBhRMKyUhhtDoOpTgXYaVLZpDjW4A=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "597283ad8aa0b331c788e97c4c262d58877074ef", "type": "github" }, "original": { @@ -203,27 +183,12 @@ }, "root": { "inputs": { - "dms": "dms", - "flake-utils": "flake-utils", + "danksearch": "danksearch", + "dms-plugin-registry": "dms-plugin-registry", "home-manager": "home-manager", - "linger": "linger", "niri": "niri", - "nixpkgs": "nixpkgs_2" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "nixpkgs": "nixpkgs_2", + "nixpkgs-unstable": "nixpkgs-unstable" } }, "xwayland-satellite-stable": { diff --git a/flake.nix b/flake.nix index 54e4c5c..c49a7b5 100644 --- a/flake.nix +++ b/flake.nix @@ -2,73 +2,54 @@ description = "System Configuration."; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; - flake-utils.url = "github:numtide/flake-utils"; - - linger = { - url = "github:mindsbackyard/linger-flake"; - inputs.flake-utils.follows = "flake-utils"; - }; - - niri.url = "github:sodiboo/niri-flake"; - - dms = { - url = "github:AvengeMedia/DankMaterialShell/stable"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager/release-26.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + + niri.url = "github:sodiboo/niri-flake"; + + dms-plugin-registry = { + url = "github:AvengeMedia/dms-plugin-registry"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + danksearch = { + url = "github:AvengeMedia/danksearch"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = inputs@{ self, nixpkgs, flake-utils, home-manager, niri, dms, ... }: { + outputs = { nixpkgs, home-manager, niri, dms-plugin-registry, danksearch, ... }@inputs: { nixosConfigurations = { thinkpad = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - + modules = [ ./hosts/thinkpad/default.nix - niri.nixosModules.niri - home-manager.nixosModules.home-manager { + niri.nixosModules.niri + dms-plugin-registry.nixosModules.default + + home-manager.nixosModules.home-manager + { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit inputs; }; - home-manager.users.jashton = import ./home/jashton.nix; + + home-manager.users.jashton = { + imports = [ + ./home/jashton.nix + danksearch.homeModules.default + ]; + }; } ]; }; - desktop = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - - modules = [ - ./hosts/desktop/default.nix - - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.jashton = import ./home/jashton.nix; - } - ]; - }; - - framework = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - - modules = [ - ./hosts/framework/default.nix - - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.jashton = import ./home/jashton.nix; - } - ]; - }; }; }; } diff --git a/home/desktop/assets/astronaut.jpg b/home/desktop/assets/astronaut.jpg new file mode 100644 index 0000000..1b4a9dc Binary files /dev/null and b/home/desktop/assets/astronaut.jpg differ diff --git a/home/desktop/assets/astronaut2.jpg b/home/desktop/assets/astronaut2.jpg new file mode 100644 index 0000000..5f64ebb Binary files /dev/null and b/home/desktop/assets/astronaut2.jpg differ diff --git a/home/desktop/assets/flower.jpg b/home/desktop/assets/flower.jpg new file mode 100644 index 0000000..99157cf Binary files /dev/null and b/home/desktop/assets/flower.jpg differ diff --git a/home/desktop/assets/gengar.jpg b/home/desktop/assets/gengar.jpg new file mode 100644 index 0000000..1743a9b Binary files /dev/null and b/home/desktop/assets/gengar.jpg differ diff --git a/home/desktop/assets/landscape.png b/home/desktop/assets/landscape.png new file mode 100644 index 0000000..cda9101 Binary files /dev/null and b/home/desktop/assets/landscape.png differ diff --git a/home/desktop/assets/skeleton.png b/home/desktop/assets/skeleton.png new file mode 100644 index 0000000..284a53c Binary files /dev/null and b/home/desktop/assets/skeleton.png differ diff --git a/home/desktop/assets/space1.jpg b/home/desktop/assets/space1.jpg new file mode 100644 index 0000000..8b7ea4d Binary files /dev/null and b/home/desktop/assets/space1.jpg differ diff --git a/home/desktop/assets/space10.jpg b/home/desktop/assets/space10.jpg new file mode 100644 index 0000000..2988181 Binary files /dev/null and b/home/desktop/assets/space10.jpg differ diff --git a/home/desktop/assets/space11.jpg b/home/desktop/assets/space11.jpg new file mode 100644 index 0000000..d945c1b Binary files /dev/null and b/home/desktop/assets/space11.jpg differ diff --git a/home/desktop/assets/space12.png b/home/desktop/assets/space12.png new file mode 100644 index 0000000..46c8b6f Binary files /dev/null and b/home/desktop/assets/space12.png differ diff --git a/home/desktop/assets/space2.jpg b/home/desktop/assets/space2.jpg new file mode 100644 index 0000000..821051f Binary files /dev/null and b/home/desktop/assets/space2.jpg differ diff --git a/home/desktop/assets/space3.jpg b/home/desktop/assets/space3.jpg new file mode 100644 index 0000000..6e8cbd5 Binary files /dev/null and b/home/desktop/assets/space3.jpg differ diff --git a/home/desktop/assets/space4.jpg b/home/desktop/assets/space4.jpg new file mode 100644 index 0000000..899bc24 Binary files /dev/null and b/home/desktop/assets/space4.jpg differ diff --git a/home/desktop/assets/space5.jpg b/home/desktop/assets/space5.jpg new file mode 100644 index 0000000..67a95d4 Binary files /dev/null and b/home/desktop/assets/space5.jpg differ diff --git a/home/desktop/assets/space6.jpg b/home/desktop/assets/space6.jpg new file mode 100644 index 0000000..69bbaa2 Binary files /dev/null and b/home/desktop/assets/space6.jpg differ diff --git a/home/desktop/assets/space7.jpg b/home/desktop/assets/space7.jpg new file mode 100644 index 0000000..cc4d6a0 Binary files /dev/null and b/home/desktop/assets/space7.jpg differ diff --git a/home/desktop/assets/space8.jpg b/home/desktop/assets/space8.jpg new file mode 100644 index 0000000..d04c7c1 Binary files /dev/null and b/home/desktop/assets/space8.jpg differ diff --git a/home/desktop/assets/space9.jpg b/home/desktop/assets/space9.jpg new file mode 100644 index 0000000..427be66 Binary files /dev/null and b/home/desktop/assets/space9.jpg differ diff --git a/home/desktop/assets/spirited-away.jpg b/home/desktop/assets/spirited-away.jpg new file mode 100644 index 0000000..e6a88ea Binary files /dev/null and b/home/desktop/assets/spirited-away.jpg differ diff --git a/home/desktop/assets/streets.jpg b/home/desktop/assets/streets.jpg new file mode 100644 index 0000000..e523669 Binary files /dev/null and b/home/desktop/assets/streets.jpg differ diff --git a/home/desktop/assets/synthwave1.jpeg b/home/desktop/assets/synthwave1.jpeg new file mode 100644 index 0000000..5d8de22 Binary files /dev/null and b/home/desktop/assets/synthwave1.jpeg differ diff --git a/home/desktop/assets/synthwave1.jpg b/home/desktop/assets/synthwave1.jpg new file mode 100644 index 0000000..f6ee603 Binary files /dev/null and b/home/desktop/assets/synthwave1.jpg differ diff --git a/home/desktop/assets/synthwave2.jpg b/home/desktop/assets/synthwave2.jpg new file mode 100644 index 0000000..29ab6c3 Binary files /dev/null and b/home/desktop/assets/synthwave2.jpg differ diff --git a/home/desktop/assets/synthwave2.png b/home/desktop/assets/synthwave2.png new file mode 100644 index 0000000..18e98d8 Binary files /dev/null and b/home/desktop/assets/synthwave2.png differ diff --git a/home/desktop/assets/synthwave5.jpg b/home/desktop/assets/synthwave5.jpg new file mode 100644 index 0000000..391ec97 Binary files /dev/null and b/home/desktop/assets/synthwave5.jpg differ diff --git a/home/desktop/assets/synthwave6.jpg b/home/desktop/assets/synthwave6.jpg new file mode 100644 index 0000000..419871f Binary files /dev/null and b/home/desktop/assets/synthwave6.jpg differ diff --git a/home/desktop/assets/synthwave7.jpg b/home/desktop/assets/synthwave7.jpg new file mode 100644 index 0000000..21d525e Binary files /dev/null and b/home/desktop/assets/synthwave7.jpg differ diff --git a/home/desktop/default.nix b/home/desktop/default.nix index 37f9179..f8be4ac 100644 --- a/home/desktop/default.nix +++ b/home/desktop/default.nix @@ -1,7 +1,8 @@ -{ config, dms, pkgs, ... }: +{ config, pkgs, inputs, ... }: { imports = [ + #./kde.nix ./niri.nix #./dunst.nix #./gnome.nix diff --git a/home/desktop/dunst.nix b/home/desktop/dunst.nix deleted file mode 100644 index 96c8bfc..0000000 --- a/home/desktop/dunst.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - services.dunst = { - enable = true; - settings = { - global = { - width = 300; - height = 300; - offset = "14x50"; - origin = "top-right"; - transparency = 10; - font = "Hack Nerd Font Mono 12"; - - # Geometry and base borders - frame_width = 2; - separator_color = "#2c2137"; # Midnight Violet - }; - - urgency_low = { - background = "#1e1f21"; # Carbon Black - foreground = "#7e6790"; # Vintage Lavender 2 (Subtle text for low priority) - frame_color = "#2c2137"; # Midnight Violet (Darkest accent) - timeout = 5; - }; - - urgency_normal = { - background = "#1e1f21"; # Carbon Black - foreground = "#8d739c"; # Vintage Lavender 1 (Primary readable text) - frame_color = "#4f3963"; # Vintage Grape (Your primary accent) - timeout = 10; - }; - - urgency_critical = { - # Flipping the background to Midnight Violet to make it pop slightly - background = "#2c2137"; - foreground = "#8d739c"; # Vintage Lavender 1 - frame_color = "#847397"; # Vintage Lavender 3 (Brightest accent for critical) - timeout = 0; # Stays on screen until explicitly dismissed - }; - }; - }; -} diff --git a/home/desktop/gnome.nix b/home/desktop/gnome.nix deleted file mode 100644 index bb7bc16..0000000 --- a/home/desktop/gnome.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - gtk = { - enable = true; - theme = { - name = "Adwaita-dark"; - package = pkgs.gnome-themes-extra; - }; - }; - - dconf.settings = { - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; - accent-color = "purple"; - }; - - "org/gnome/shell" = { - enabled-extensions = [ - pkgs.gnomeExtensions.blur-my-shell.extensionUuid - pkgs.gnomeExtensions.caffeine.extensionUuid - pkgs.gnomeExtensions.clipboard-indicator.extensionUuid - pkgs.gnomeExtensions.dash-to-panel.extensionUuid - pkgs.gnomeExtensions.gjs-osk.extensionUuid - pkgs.gnomeExtensions.gsconnect.extensionUuid - pkgs.gnomeExtensions.just-perfection.extensionUuid - pkgs.gnomeExtensions.removable-drive-menu.extensionUuid - ]; - }; - }; - - qt = { - enable = true; - platformTheme.name = "adwaita"; - style.name = "adwaita-dark"; - }; -} diff --git a/home/desktop/i3.nix b/home/desktop/i3.nix deleted file mode 100644 index d22027d..0000000 --- a/home/desktop/i3.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, pkgs, ... }: - -{ - xsession.windowManager.i3 = { - enable = true; - config = null; - extraConfig = (builtins.readFile ./i3/config) + '' - exec --no-startup-id ${pkgs.feh}/bin/feh --bg-fill ${./assets/samuraii.jpg} - exec --no-startup-id ${pkgs.picom}/bin/picom --backend glx --vsync - ''; - }; -} diff --git a/home/desktop/i3/config b/home/desktop/i3/config deleted file mode 100644 index b972571..0000000 --- a/home/desktop/i3/config +++ /dev/null @@ -1,295 +0,0 @@ -# Set modifier key as Alt -set $mod Mod4 - -# Set purple theming & fonts -set $base #08090B -set $accent #8D739C -set $hover #4F3963 - -font pango: Lato 15 - -# Start i3 -exec --no-startup-id dex --autostart --environment i3 -exec --no-startup-id bash -c "pkill -x polybar; sleep 0.5; polybar main &" -exec --no-startup-id nm-applet - -exec alacritty - -# Lock screen with i3lock-color -bindsym $mod+q exec ~/.config/i3scripts/lock - -# Default gaps between windows -gaps outer 10 -gaps inner 5 - -# Adjust floating windows -floating_modifier $mod -tiling_drag modifier titlebar - -bindsym $mod+Return exec alacritty -bindsym $mod+x kill -bindsym $mod+d exec "rofi -show drun -show-icons" - -# Restart i3 in place -bindsym $mod+Shift+c restart - -# Adapt i3 to external monitors. -bindsym $mod+Shift+r exec --no-startup-id autorandr --change - -# Exit i3 & logout -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" - -# --------------------- WORKSPACES ------------------------- # -# Define workspaces -set $ws1 "1:%{T3}%{T-}" -set $ws2 "2:%{T3}󰏬%{T-}" -set $ws3 "3:%{T3}%{T-}" -set $ws4 "4:%{T3}%{T-}" -set $ws5 "5:%{T3}󰈙%{T-}" -set $ws6 "6:%{T3}%{T-}" -set $ws7 "7:%{T3}󰇮%{T-}" -set $ws8 "8:%{T3}󰎆%{T-}" -set $ws9 "9:%{T3}󰭹%{T-}" -set $ws10 "10:%{T3}󰈹%{T-}" - -# switch to workspace -bindsym $mod+1 workspace number $ws1 -bindsym $mod+2 workspace number $ws2 -bindsym $mod+3 workspace number $ws3 -bindsym $mod+4 workspace number $ws4 -bindsym $mod+5 workspace number $ws5 -bindsym $mod+6 workspace number $ws6 -bindsym $mod+7 workspace number $ws7 -bindsym $mod+8 workspace number $ws8 -bindsym $mod+9 workspace number $ws9 -bindsym $mod+0 workspace number $ws10 - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace number $ws1 -bindsym $mod+Shift+2 move container to workspace number $ws2 -bindsym $mod+Shift+3 move container to workspace number $ws3 -bindsym $mod+Shift+4 move container to workspace number $ws4 -bindsym $mod+Shift+5 move container to workspace number $ws5 -bindsym $mod+Shift+6 move container to workspace number $ws6 -bindsym $mod+Shift+7 move container to workspace number $ws7 -bindsym $mod+Shift+8 move container to workspace number $ws8 -bindsym $mod+Shift+9 move container to workspace number $ws9 -bindsym $mod+Shift+0 move container to workspace number $ws10 - -# ------------------------ STARTUP APPS ---------------------- # - -# ------------------------ WINDOWS --------------------------- # -# change focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right - -# move focused window -bindsym $mod+Shift+h move left -bindsym $mod+Shift+j move down -bindsym $mod+Shift+k move up -bindsym $mod+Shift+l move right - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split - -bindsym $mod+v layout splitv -bindsym $mod+b layout splith - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# Window color customization: -# class border backgr. text indicator child_border -client.focused $base $base $base $base $accent -client.focused_inactive $base $base $hover $base $accent -client.unfocused $accent $accent $base $base $accent -client.urgent #2f343a #900000 $hover $base #900000 -client.placeholder #000000 #0c0c0c $hover $base #0c0c0c -client.background #635380 - -default_border pixel 4 - -# ------------------------- FUNCTION KEY BINDING ---------------------------- # -# Volume control -# ------------------------- FUNCTION KEY BINDING ---------------------------- # -# Volume control (using native PulseAudio commands) -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle - -# Brightness control (using brightnessctl) -bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set 5%+ -bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%- - -# Screenshot -bindsym XF86AudioRecord exec flameshot gui -#bindsym XF86Search workspace number $ws10 - -# Audio control -#bindsym XF86AudioPlay exec playerctl play -bindsym XF86AudioPause exec playerctl pause -bindsym XF86AudioNext exec playerctl next -bindsym XF86AudioPrev exec playerctl previous - -# --------------------- MODES ----------------------# -set $mode_gaps Gaps: (o)uter, (i)nner, (h)orizontal, (v)ertical, (t)op, (r)ight, (b)ottom, (l)eft -set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) -set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) -set $mode_gaps_horiz Horizontal Gaps: +|-|0 (local), Shift + +|-|0 (global) -set $mode_gaps_verti Vertical Gaps: +|-|0 (local), Shift + +|-|0 (global) -set $mode_gaps_top Top Gaps: +|-|0 (local), Shift + +|-|0 (global) -set $mode_gaps_right Right Gaps: +|-|0 (local), Shift + +|-|0 (global) -set $mode_gaps_bottom Bottom Gaps: +|-|0 (local), Shift + +|-|0 (global) -set $mode_gaps_left Left Gaps: +|-|0 (local), Shift + +|-|0 (global) -bindsym $mod+Shift+g mode "$mode_gaps" - -mode "$mode_gaps" { - bindsym o mode "$mode_gaps_outer" - bindsym i mode "$mode_gaps_inner" - bindsym h mode "$mode_gaps_horiz" - bindsym v mode "$mode_gaps_verti" - bindsym t mode "$mode_gaps_top" - bindsym r mode "$mode_gaps_right" - bindsym b mode "$mode_gaps_bottom" - bindsym l mode "$mode_gaps_left" - bindsym Return mode "$mode_gaps" - bindsym Escape mode "default" -} - -mode "$mode_gaps_outer" { - bindsym plus gaps outer current plus 5 - bindsym minus gaps outer current minus 5 - bindsym 0 gaps outer current set 0 - - bindsym Shift+plus gaps outer all plus 5 - bindsym Shift+minus gaps outer all minus 5 - bindsym Shift+0 gaps outer all set 0 - - bindsym Return mode "$mode_gaps" - bindsym Escape mode "default" -} -mode "$mode_gaps_inner" { - bindsym plus gaps inner current plus 5 - bindsym minus gaps inner current minus 5 - bindsym 0 gaps inner current set 0 - - bindsym Shift+plus gaps inner all plus 5 - bindsym Shift+minus gaps inner all minus 5 - bindsym Shift+0 gaps inner all set 0 - - bindsym Return mode "$mode_gaps" - bindsym Escape mode "default" -} -mode "$mode_gaps_horiz" { - bindsym plus gaps horizontal current plus 5 - bindsym minus gaps horizontal current minus 5 - bindsym 0 gaps horizontal current set 0 - - bindsym Shift+plus gaps horizontal all plus 5 - bindsym Shift+minus gaps horizontal all minus 5 - bindsym Shift+0 gaps horizontal all set 0 - - bindsym Return mode "$mode_gaps" - bindsym Escape mode "default" -} -mode "$mode_gaps_verti" { - bindsym plus gaps vertical current plus 5 - bindsym minus gaps vertical current minus 5 - bindsym 0 gaps vertical current set 0 - - bindsym Shift+plus gaps vertical all plus 5 - bindsym Shift+minus gaps vertical all minus 5 - bindsym Shift+0 gaps vertical all set 0 - - bindsym Return mode "$mode_gaps" - bindsym Escape mode "default" -} -mode "$mode_gaps_top" { - bindsym plus gaps top current plus 5 - bindsym minus gaps top current minus 5 - bindsym 0 gaps top current set 0 - - bindsym Shift+plus gaps top all plus 5 - bindsym Shift+minus gaps top all minus 5 - bindsym Shift+0 gaps top all set 0 - - bindsym Return mode "$mode_gaps" - bindsym Escape mode "default" -} -mode "$mode_gaps_right" { - bindsym plus gaps right current plus 5 - bindsym minus gaps right current minus 5 - bindsym 0 gaps right current set 0 - - bindsym Shift+plus gaps right all plus 5 - bindsym Shift+minus gaps right all minus 5 - bindsym Shift+0 gaps right all set 0 - - bindsym Return mode "$mode_gaps" - bindsym Escape mode "default" -} -mode "$mode_gaps_bottom" { - bindsym plus gaps bottom current plus 5 - bindsym minus gaps bottom current minus 5 - bindsym 0 gaps bottom current set 0 - - bindsym Shift+plus gaps bottom all plus 5 - bindsym Shift+minus gaps bottom all minus 5 - bindsym Shift+0 gaps bottom all set 0 - - bindsym Return mode "$mode_gaps" - bindsym Escape mode "default" -} -mode "$mode_gaps_left" { - bindsym plus gaps left current plus 5 - bindsym minus gaps left current minus 5 - bindsym 0 gaps left current set 0 - - bindsym Shift+plus gaps left all plus 5 - bindsym Shift+minus gaps left all minus 5 - bindsym Shift+0 gaps left all set 0 - - bindsym Return mode "$mode_gaps" - bindsym Escape mode "default" -} - -# Resize mode -mode "resize" { - bindsym h resize shrink width 10 px or 10 ppt - bindsym k resize grow height 10 px or 10 ppt - bindsym j resize shrink height 10 px or 10 ppt - bindsym l resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape or $mod+r - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" -} - -bindsym $mod+r mode "resize" - -# Creating ability to lock, logout, suspend, hibernate, reboot, and shutdown. -set $mode_system System (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown -mode "$mode_system" { - bindsym l exec --no-startup-id lock-screen, mode "default" - bindsym e exec --no-startup-id i3exit logout, mode "default" - bindsym s exec --no-startup-id i3exit suspend, mode "default" - bindsym h exec --no-startup-id i3exit hibernate, mode "default" - bindsym r exec --no-startup-id i3exit reboot, mode "default" - bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default" - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+Shift+Escape mode "$mode_system" diff --git a/home/desktop/niri.nix b/home/desktop/niri.nix index 64ff26b..3e6f7e2 100644 --- a/home/desktop/niri.nix +++ b/home/desktop/niri.nix @@ -1,50 +1,109 @@ { config, lib, pkgs, inputs, ... }: +let + launch-lisgd = pkgs.writeShellScriptBin "launch-lisgd" '' + # Search for the capacitive touch layer and extract its event number. + # UPDATE 'Touchscreen' below to match the unique word you found in step 1. + TOUCH_EVENT=$(grep -i -E 'name=".*Finger.*"' -A 5 /proc/bus/input/devices | grep -o 'event[0-9]\+' | head -n 1) + + if [ -n "$TOUCH_EVENT" ]; then + # Start lisgd locked exclusively to the finger digitizer + ${pkgs.lisgd}/bin/lisgd -t 30 -m 150 -r 45 -d "/dev/input/$TOUCH_EVENT" \ + -g "3,LR,*,*,P,niri msg action focus-column-left && sleep 0.4" \ + -g "3,RL,*,*,P,niri msg action focus-column-right && sleep 0.4" \ + -g "3,UD,*,*,P,niri msg action focus-workspace-up && sleep 0.4" \ + -g "3,DU,*,*,P,niri msg action focus-workspace-down && sleep 0.4" \ + -g "4,DU,*,*,P,dms ipc spotlight toggle && sleep 0.4" + fi + ''; +in + { - imports = [ - inputs.dms.homeModules.dank-material-shell - ]; - - - programs.dank-material-shell = { - enable = true; - systemd.enable = true; - }; - - #systemd.user.services.niri-flake-polkit.enable = false; - # 2. Enable & Configure Niri programs.niri = { - # Declarative KDL configuration for Niri settings = { # Autostart DMS if you prefer launching it directly from Niri instead of systemd - # spawn-at-startup = [ { command = [ "dms" ]; } ]; + spawn-at-startup = [ + { command = [ "dms" "run" ]; } + { command = [ "${launch-lisgd}/bin/launch-lisgd" ]; } # Spawns the daemon + ]; - # Core keybindings - binds = { - "Mod+Return".action.spawn = "alacritty"; # Or your preferred terminal - "Mod+X".action.close-window = []; - "Mod+Shift+E".action.quit = []; - - # Focus / Column movement - "Mod+H".action.focus-column-left = []; - "Mod+L".action.focus-column-right = []; - "Mod+J".action.focus-window-or-workspace-down = []; - "Mod+K".action.focus-window-or-workspace-up = []; - - # DMS Launcher integration (if you want a hotkey bound directly) - "Mod+Space".action.spawn = [ "dms" "ipc" "call" "launcher" "toggle" ]; + input = { + keyboard.xkb.layout = "us"; + touchpad = { + tap = true; + natural-scroll = true; + }; }; - # Window & Layer Rules (e.g. enable background blur for DMS components) -# layer-rules = [ -# { -# geometry-corner-radius = 12; -# background-effect = { -# blur = true; -# }; -# } -# ]; + layout = { + gaps = 8; + center-focused-column = "never"; + default-column-width.proportion = 0.985; + border.enable = false; + #tab-indicator.corner-radius = 18.0; + focus-ring = { + + enable = false; + width = 2; + }; + }; + + prefer-no-csd = true; + window-rules = [ + { # All windows + geometry-corner-radius = { + bottom-left = 25.0; + bottom-right = 0.0; + top-right = 0.0; + top-left = 25.0; + }; + + + draw-border-with-background = true; + clip-to-geometry = true; + } + ]; + + # Vim Keybindings & Built-in Features + binds = with config.lib.niri.actions; { + # Launchers & Session Control + "Mod+Return".action.spawn = [ "alacritty" ]; + "Mod+Space".action.spawn = [ "dms" "ipc" "spotlight" "toggle" ]; + "Mod+X".action.close-window = []; + "Mod+F".action.fullscreen-window = []; + "Mod+Shift+E".action.quit = []; + "Mod+Shift+P".action.toggle-overview = []; + + # Vim Focus Movement + "Mod+H".action.focus-column-left = []; + "Mod+J".action.focus-window-down = []; + "Mod+K".action.focus-window-up = []; + "Mod+L".action.focus-column-right = []; + + # Workspace Navigation + "Mod+N".action.focus-workspace-down = []; + "Mod+U".action.focus-workspace-up = []; + + # Vim Window Reordering + "Mod+Shift+H".action.move-column-left = []; + "Mod+Shift+L".action.move-column-right = []; + "Mod+Shift+J".action.move-column-to-workspace-down = []; + "Mod+Shift+K".action.move-column-to-workspace-up = []; + + # Volume & Brightness Media Controls + "XF86AudioRaiseVolume".action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05+" ]; + "XF86AudioLowerVolume".action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05-" ]; + "XF86AudioMute".action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle" ]; + "XF86MonBrightnessUp".action.spawn = [ "dms" "ipc" "call" "brightness" "increment" "5" "" ]; + "XF86MonBrightnessDown".action.spawn = [ "dms" "ipc" "call" "brightness" "decrement" "5" "" ]; + + # Screenshots + "Print".action.screenshot = []; + "Ctrl+Print".action.screenshot-screen = []; + }; }; }; } + + diff --git a/home/desktop/polybar.nix b/home/desktop/polybar.nix deleted file mode 100644 index 26842fa..0000000 --- a/home/desktop/polybar.nix +++ /dev/null @@ -1,138 +0,0 @@ -{ config, pkgs, ... }: - -{ - services.polybar = { - enable = true; - script = "polybar main &"; - - package = pkgs.polybar.override { - i3Support = true; - pulseSupport = true; - }; - - config = { - "colors" = { - background = "#08090b"; - foreground = "#8d739c"; - bg-alt1 = "#1e1f21"; - bg-alt2 = "#2c2137"; - accent = "#4f3963"; - text-light = "#847397"; - }; - - "bar/main" = { - width = "100%"; - height = "24pt"; - background = "\${colors.background}"; - foreground = "\${colors.foreground}"; - - # This gives you the gap between the screen edge and your blocks - padding-left = 0; - padding-right = 0; - - # The physical empty space between each pill - module-margin = 1; - - # True Center Alignment! - modules-left = "i3 weather"; - modules-center = "date"; - modules-right = "spotify pulseaudio wlan battery"; - - font-0 = "Hack Nerd Font Mono:size=12;3"; - font-1 = "Noto Color Emoji:scale=12;3"; - font-2 = "Hack Nerd Font Mono:size=16;3"; - }; - - # --- NATIVE INTERNAL MODULES --- # - - "module/i3" = { - type = "internal/i3"; - format = ""; - strip-wsnumbers = true; - - # Adding padding creates the "pill" width - label-focused = "%name%"; - label-focused-background = "\${colors.bg-alt2}"; - label-focused-foreground = "\${colors.text-light}"; - label-focused-padding = 1; - - label-unfocused = "%name%"; - label-unfocused-background = "\${colors.background}"; - label-unfocused-padding = 1; - }; - - "module/date" = { - type = "internal/date"; - interval = 1; - date = "%a, %b %d"; - time = "%I:%M %p"; - label = " %date% %time% "; - label-background = "\${colors.accent}"; - label-foreground = "#08090b"; - }; - - "module/pulseaudio" = { - type = "internal/pulseaudio"; - format-volume = ""; - label-volume = "  %percentage%% "; - label-volume-background = "\${colors.bg-alt2}"; - label-volume-foreground = "\${colors.text-light}"; - - label-muted = "  Muted "; - label-muted-background = "\${colors.bg-alt2}"; - label-muted-foreground = "#4f3963"; - }; - - "module/wlan" = { - type = "internal/network"; - # Polybar automatically detects your wireless interface - interface-type = "wireless"; - interval = 3; - - # Action Tag: Left-click launches Alacritty with NetworkManager TUI - format-connected = ""; - label-connected = "%{A1:alacritty -e nmtui:} %{T3}%{T-} %essid% %{A}"; - label-connected-background = "\${colors.bg-alt1}"; - label-connected-padding = 1; - - format-disconnected = ""; - label-disconnected = "%{A1:alacritty -e nmtui:} %{T3}󰖪%{T-} Offline %{A}"; - label-disconnected-background = "\${colors.bg-alt1}"; - label-disconnected-foreground = "#900000"; # Red alert when down - label-disconnected-padding = 1; - }; - - "module/battery" = { - type = "internal/battery"; - full-at = 99; - low-at = 10; - battery = "BAT0"; - adapter = "AC"; - - format-charging = ""; - label-charging = "%{A1:power-menu:} ⚡ %percentage%% %{A1}"; - label-charging-background = "\${colors.bg-alt1}"; - - format-notcharging = ""; - label-notcharging = "%{A1:power-menu:} ⏸️ %percentage%% %{A}"; - label-notcharging-background = "\${colors.bg-alt1}"; - - format-discharging = ""; - label-discharging = "%{A1:power-menu:}  %percentage%% %{A1}"; - label-discharging-background = "\${colors.bg-alt1}"; - }; - - # --- CUSTOM SCRIPT MODULES --- # - - "module/weather" = { - type = "custom/script"; - # Call the script we just built in home.packages - exec = "weather-cache"; - interval = 3600; - label = " %output% "; - format-background = "\${colors.bg-alt1}"; - }; - - }; - }; -} diff --git a/home/desktop/rofi.nix b/home/desktop/rofi.nix deleted file mode 100644 index 7907a1f..0000000 --- a/home/desktop/rofi.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ config, pkgs, ... }: - -{ - programs.rofi = { - enable = true; - - # Optional: ensure it uses your configured terminal - terminal = "${pkgs.alacritty}/bin/alacritty"; - font = "Hack Nerd Font Mono 12"; - - theme = let - # Pulls in the mkLiteral function specifically for Rofi - inherit (config.lib.formats.rasi) mkLiteral; - in { - "*" = { - # Your Vintage Lavender Palette - bg0 = mkLiteral "#08090b"; # Black - bg1 = mkLiteral "#1e1f21"; # Carbon Black - bg2 = mkLiteral "#2c2137"; # Midnight Violet - fg0 = mkLiteral "#8d739c"; # Vintage Lavender 1 - fg1 = mkLiteral "#847397"; # Vintage Lavender 3 - accent = mkLiteral "#4f3963"; # Vintage Grape - - background-color = mkLiteral "transparent"; - text-color = mkLiteral "@fg0"; - margin = mkLiteral "0px"; - padding = mkLiteral "0px"; - spacing = mkLiteral "0px"; - }; - - "window" = { - background-color = mkLiteral "@bg0"; - border = mkLiteral "2px"; - border-color = mkLiteral "@accent"; - border-radius = mkLiteral "6px"; - width = mkLiteral "600px"; - }; - - "inputbar" = { - padding = mkLiteral "12px"; - background-color = mkLiteral "@bg1"; - border = mkLiteral "0px 0px 2px 0px"; - border-color = mkLiteral "@accent"; - }; - - "entry" = { - padding = mkLiteral "0px 12px"; - vertical-align = mkLiteral "0.5"; - }; - - "prompt" = { - vertical-align = mkLiteral "0.5"; - text-color = mkLiteral "@accent"; - }; - - "listview" = { - padding = mkLiteral "8px"; - lines = 8; - columns = 1; - fixed-height = mkLiteral "false"; - }; - - "element" = { - padding = mkLiteral "8px"; - spacing = mkLiteral "8px"; - border-radius = mkLiteral "4px"; - }; - - "element-text, element-icon" = { - vertical-align = mkLiteral "0.5"; - background-color = mkLiteral "inherit"; - text-color = mkLiteral "inherit"; - }; - - "element selected" = { - background-color = mkLiteral "@bg2"; - text-color = mkLiteral "@fg0"; - border = mkLiteral "1px"; - border-color = mkLiteral "@accent"; - }; - }; - }; -} diff --git a/home/jashton.nix b/home/jashton.nix index 1419c81..b031696 100644 --- a/home/jashton.nix +++ b/home/jashton.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, inputs, ... }: +{ config, lib, pkgs, ... }: { imports = [ @@ -12,6 +12,13 @@ # Zsh is configured globally at the NixOS system level. # This file exists solely to prevent the zsh-newuser-install prompt. ''; + + home.sessionVariables = { + NIXOS_OZONE_WL = "1"; # Forces Electron/Chromium apps to use Wayland natively + GTK_IM_MODULE = "wayland"; # Forces GTK apps to use Wayland text-input protocols + QT_IM_MODULE = "wayland"; # Forces Qt apps to use Wayland text-input protocols + TEXT_INPUT_PRESENT = "1"; # Explicitly signals virtual keyboard capability to the shell + }; home.packages = with pkgs; [ aider-chat @@ -28,6 +35,7 @@ libreoffice mc scrot + steam spotify vlc yt-dlp diff --git a/home/programs/alacritty.nix b/home/programs/alacritty.nix index 5a5f084..f425b5e 100644 --- a/home/programs/alacritty.nix +++ b/home/programs/alacritty.nix @@ -7,8 +7,8 @@ settings = { window = { - padding = { x = 10; y = 10; }; - opacity = .9; + padding = { x = 20; y = 20; }; + opacity = .85; }; font = { diff --git a/ports.registry b/ports.registry deleted file mode 100644 index fe3f108..0000000 --- a/ports.registry +++ /dev/null @@ -1 +0,0 @@ -pi-hole : 8775 diff --git a/system/core/boot.nix b/system/core/boot.nix index a050c63..ed3cb44 100644 --- a/system/core/boot.nix +++ b/system/core/boot.nix @@ -4,5 +4,6 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.kernelPackages = pkgs.linuxPackages; + system.nixos.label = "niri-v.1.1"; environment.pathsToLink = [ "/libexec" ]; } diff --git a/system/core/power.nix b/system/core/power.nix index a73989b..6456eb3 100644 --- a/system/core/power.nix +++ b/system/core/power.nix @@ -6,7 +6,7 @@ services.power-profiles-daemon.enable = false; services.tlp = { - enable = true; + enable = false; settings = { USB_AUTOSUSPEND = 0; diff --git a/system/packages.nix b/system/packages.nix index bf9a54a..a4d7574 100644 --- a/system/packages.nix +++ b/system/packages.nix @@ -13,16 +13,11 @@ firefox git github-cli - gnomeExtensions.blur-my-shell - gnomeExtensions.caffeine - gnomeExtensions.clipboard-indicator - gnomeExtensions.dash-to-panel - gnomeExtensions.gjs-osk - gnomeExtensions.gsconnect - gnomeExtensions.just-perfection - gnomeExtensions.removable-drive-menu - gnome-keyring - gnome-network-displays + (google-chrome.override { + commandLineArgs = [ + "--disable-pinch" + ]; + }) google-chrome libnotify mypy @@ -30,13 +25,13 @@ nitrogen pasystray picom - polkit_gnome pulseaudioFull rnote tldr tmux unrar unzip + upower v4l-utils vim wget @@ -74,21 +69,18 @@ exit 0 fi + echo "Append to default commit message? Hit enter to skip." + read -r msg_to_append + ${pkgs.git}/bin/git add -A ${pkgs.git}/bin/git commit -m "nixos: gen $GEN @ $(hostname) — $TIMESTAMP +$VER -$VER" +$msg_to_append" ${pkgs.git}/bin/git push '') ]; programs.firefox.enable = true; programs.thunar.enable = true; - - - # Optional: Binary cache for pre-built Niri binaries to save build time - nix.settings = { - substituters = [ "https://niri.cachix.org" ]; - trusted-public-keys = [ "niri.cachix.org-1:W3MxdgwBhbNEJHBLAjjkd24hwyLrxVwurqi23v4YBoxs=" ]; - }; } diff --git a/system/security/default.nix b/system/security/default.nix index 7921311..9979d01 100644 --- a/system/security/default.nix +++ b/system/security/default.nix @@ -8,6 +8,7 @@ ]; security = { + pam.services.swaylock = {}; polkit.enable = true; rtkit.enable = true; diff --git a/system/security/users.nix b/system/security/users.nix index d69740d..c9f4f8f 100644 --- a/system/security/users.nix +++ b/system/security/users.nix @@ -6,7 +6,7 @@ isNormalUser = true; description = "Josh Ashton"; group = "jashton"; - extraGroups = [ "networkmanager" "wheel" "tss" "video" ]; + extraGroups = [ "networkmanager" "wheel" "tss" "video" "audio" "input" ]; shell = pkgs.zsh; }; diff --git a/system/services/default.nix b/system/services/default.nix index b63864f..217f792 100644 --- a/system/services/default.nix +++ b/system/services/default.nix @@ -1,49 +1,47 @@ -{ config, pkgs, ... }: +{ config, pkgs, inputs, ... }: +let + # Instantiate the unstable package set for your system architecture + unstable = import inputs.nixpkgs-unstable { + system = pkgs.system; + config.allowUnfree = true; + }; +in { - xdg.portal = { + programs.niri = { enable = true; - config.common = { - # Direct camera and permission requests strictly to GNOME - "org.freedesktop.impl.portal.Camera" = "gnome"; - "org.freedesktop.impl.portal.Access" = "gnome"; - - # Keeps your existing layout working - "org.freedesktop.impl.portal.Screenshot" = "gnome"; - "org.freedesktop.impl.portal.ScreenCast" = "gnome"; + # Tell the Niri module to use the unstable package directly from the niri-flake + package = inputs.niri.packages.${pkgs.system}.niri-unstable; + }; + + programs.dsearch.enable = true; + + programs.dms-shell = { + enable = true; + enableSystemMonitoring = true; + enableVPN = true; + enableDynamicTheming = true; + enableAudioWavelength = true; + enableCalendarEvents = true; + + systemd = { + enable = false; + restartIfChanged = true; + }; + + quickshell.package = unstable.quickshell; + + plugins = { + developerUtilities.enable = true; + batteryPlus.enable = true; + mediaDownloader.enable = true; + dankBatteryAlerts.enable = true; + dmsThemeSync.enable = true; + dmsPass.enable = true; }; }; services = { - displayManager.gdm.enable = true; - desktopManager.gnome.enable = true; - gnome = { - core-apps.enable = true; - core-developer-tools.enable = true; - games.enable = true; - }; - - xserver = { - enable = true; - - xkb = { - variant = ""; - layout = "us"; - }; - - windowManager.i3 = { - enable = true; - extraPackages = with pkgs; [ - brightnessctl - dmenu - i3lock-color - playerctl - rofi - xautolock - ]; - }; - }; - libinput = { enable = true; }; @@ -52,6 +50,7 @@ enable = false; }; + upower.enable = true; printing.enable = true; gvfs.enable = true; gnome.gnome-keyring.enable = true; diff --git a/system/services/settings.json b/system/services/settings.json new file mode 100644 index 0000000..51b4010 --- /dev/null +++ b/system/services/settings.json @@ -0,0 +1,626 @@ +{ + "currentThemeName": "custom", + "currentThemeCategory": "registry", + "customThemeFile": "/home/jashton/.config/DankMaterialShell/themes/amoledBlack/theme.json", + "registryThemeVariants": { + "amoledBlack": { + "dark": { + "flavor": "black", + "accent": "white" + } + } + }, + "matugenScheme": "scheme-vibrant", + "runUserMatugenTemplates": true, + "matugenTargetMonitor": "", + "popupTransparency": 1, + "dockTransparency": 1, + "widgetBackgroundColor": "sch", + "widgetColorMode": "colorful", + "controlCenterTileColorMode": "primary", + "buttonColorMode": "primary", + "cornerRadius": 30, + "niriLayoutGapsOverride": -1, + "niriLayoutRadiusOverride": -1, + "niriLayoutBorderSize": -1, + "hyprlandLayoutGapsOverride": -1, + "hyprlandLayoutRadiusOverride": -1, + "hyprlandLayoutBorderSize": -1, + "mangoLayoutGapsOverride": -1, + "mangoLayoutRadiusOverride": -1, + "mangoLayoutBorderSize": -1, + "use24HourClock": false, + "showSeconds": false, + "padHours12Hour": true, + "useFahrenheit": true, + "windSpeedUnit": "kmh", + "nightModeEnabled": false, + "animationSpeed": 4, + "customAnimationDuration": 65, + "syncComponentAnimationSpeeds": true, + "popoutAnimationSpeed": 1, + "popoutCustomAnimationDuration": 150, + "modalAnimationSpeed": 1, + "modalCustomAnimationDuration": 150, + "enableRippleEffects": true, + "blurEnabled": false, + "blurForegroundLayers": true, + "blurLayerOutlineOpacity": 0.12, + "blurBorderColor": "outline", + "blurBorderCustomColor": "#ffffff", + "blurBorderOpacity": 0.35, + "wallpaperFillMode": "Fill", + "blurredWallpaperLayer": false, + "blurWallpaperOnOverview": true, + "showLauncherButton": true, + "showWorkspaceSwitcher": true, + "showFocusedWindow": true, + "showWeather": true, + "showMusic": true, + "showClipboard": true, + "showCpuUsage": true, + "showMemUsage": true, + "showCpuTemp": true, + "showGpuTemp": true, + "selectedGpuIndex": 0, + "enabledGpuPciIds": [], + "showSystemTray": true, + "systemTrayIconTintMode": "primary", + "systemTrayIconTintSaturation": 50, + "systemTrayIconTintStrength": 135, + "showClock": true, + "showNotificationButton": true, + "showBattery": true, + "showControlCenterButton": true, + "showCapsLockIndicator": true, + "controlCenterShowNetworkIcon": true, + "controlCenterShowBluetoothIcon": true, + "controlCenterShowAudioIcon": true, + "controlCenterShowAudioPercent": false, + "controlCenterShowVpnIcon": true, + "controlCenterShowBrightnessIcon": false, + "controlCenterShowBrightnessPercent": false, + "controlCenterShowMicIcon": false, + "controlCenterShowMicPercent": true, + "controlCenterShowBatteryIcon": false, + "controlCenterShowPrinterIcon": false, + "controlCenterShowScreenSharingIcon": true, + "showPrivacyButton": true, + "privacyShowMicIcon": false, + "privacyShowCameraIcon": false, + "privacyShowScreenShareIcon": false, + "controlCenterWidgets": [ + { + "id": "volumeSlider", + "enabled": true, + "width": 50 + }, + { + "id": "brightnessSlider", + "enabled": true, + "width": 50 + }, + { + "id": "wifi", + "enabled": true, + "width": 50 + }, + { + "id": "bluetooth", + "enabled": true, + "width": 50 + }, + { + "id": "audioOutput", + "enabled": true, + "width": 50 + }, + { + "id": "audioInput", + "enabled": true, + "width": 50 + }, + { + "id": "nightMode", + "enabled": true, + "width": 50 + }, + { + "id": "darkMode", + "enabled": true, + "width": 50 + } + ], + "showWorkspaceIndex": false, + "showWorkspaceName": false, + "showWorkspacePadding": false, + "workspaceScrolling": false, + "showWorkspaceApps": false, + "workspaceDragReorder": true, + "maxWorkspaceIcons": 3, + "workspaceAppIconSizeOffset": 0, + "groupWorkspaceApps": true, + "workspaceFollowFocus": false, + "showOccupiedWorkspacesOnly": true, + "reverseScrolling": false, + "dwlShowAllTags": false, + "workspaceColorMode": "default", + "workspaceOccupiedColorMode": "none", + "workspaceUnfocusedColorMode": "default", + "workspaceUrgentColorMode": "default", + "workspaceFocusedBorderEnabled": false, + "workspaceFocusedBorderColor": "secondary", + "workspaceFocusedBorderThickness": 2, + "workspaceNameIcons": {}, + "waveProgressEnabled": true, + "scrollTitleEnabled": true, + "audioVisualizerEnabled": true, + "audioScrollMode": "volume", + "audioWheelScrollAmount": 5, + "clockCompactMode": false, + "focusedWindowCompactMode": false, + "runningAppsCompactMode": true, + "barMaxVisibleApps": 0, + "barMaxVisibleRunningApps": 0, + "barShowOverflowBadge": true, + "appsDockHideIndicators": false, + "appsDockColorizeActive": false, + "appsDockActiveColorMode": "primary", + "appsDockEnlargeOnHover": false, + "appsDockEnlargePercentage": 125, + "appsDockIconSizePercentage": 100, + "keyboardLayoutNameCompactMode": false, + "runningAppsCurrentWorkspace": true, + "runningAppsGroupByApp": false, + "runningAppsCurrentMonitor": false, + "appIdSubstitutions": [], + "centeringMode": "index", + "clockDateFormat": "", + "lockDateFormat": "", + "greeterRememberLastSession": true, + "greeterRememberLastUser": true, + "greeterEnableFprint": false, + "greeterEnableU2f": false, + "greeterWallpaperPath": "", + "mediaSize": 1, + "appLauncherViewMode": "list", + "spotlightModalViewMode": "list", + "browserPickerViewMode": "grid", + "browserUsageHistory": {}, + "appPickerViewMode": "grid", + "filePickerUsageHistory": {}, + "sortAppsAlphabetically": true, + "appLauncherGridColumns": 8, + "spotlightCloseNiriOverview": true, + "spotlightSectionViewModes": {}, + "appDrawerSectionViewModes": { + "apps": "grid" + }, + "niriOverviewOverlayEnabled": true, + "dankLauncherV2Size": "large", + "dankLauncherV2BorderEnabled": false, + "dankLauncherV2BorderThickness": 2, + "dankLauncherV2BorderColor": "secondary", + "dankLauncherV2ShowFooter": true, + "dankLauncherV2UnloadOnClose": false, + "useAutoLocation": false, + "weatherEnabled": true, + "networkPreference": "auto", + "iconTheme": "System Default", + "cursorSettings": { + "theme": "System Default", + "size": 24, + "niri": { + "hideWhenTyping": false, + "hideAfterInactiveMs": 0 + }, + "hyprland": { + "hideOnKeyPress": false, + "hideOnTouch": false, + "inactiveTimeout": 0 + }, + "dwl": { + "cursorHideTimeout": 0 + } + }, + "launcherLogoMode": "os", + "launcherLogoCustomPath": "", + "launcherLogoColorOverride": "primary", + "launcherLogoColorInvertOnMode": false, + "launcherLogoBrightness": 0.5, + "launcherLogoContrast": 1, + "launcherLogoSizeOffset": 12, + "fontFamily": "Inter Variable", + "monoFontFamily": "Hack Nerd Font Mono", + "fontWeight": 400, + "fontScale": 1, + "notepadUseMonospace": true, + "notepadFontFamily": "", + "notepadFontSize": 14, + "notepadShowLineNumbers": false, + "notepadTransparencyOverride": -1, + "notepadLastCustomTransparency": 0.7, + "soundsEnabled": true, + "useSystemSoundTheme": false, + "soundNewNotification": true, + "soundVolumeChanged": true, + "soundPluggedIn": true, + "acMonitorTimeout": 0, + "acLockTimeout": 0, + "acSuspendTimeout": 0, + "acSuspendBehavior": 0, + "acProfileName": "", + "batteryMonitorTimeout": 0, + "batteryLockTimeout": 0, + "batterySuspendTimeout": 0, + "batterySuspendBehavior": 0, + "batteryProfileName": "", + "batteryChargeLimit": 100, + "lockBeforeSuspend": true, + "loginctlLockIntegration": true, + "fadeToLockEnabled": true, + "fadeToLockGracePeriod": 5, + "fadeToDpmsEnabled": true, + "fadeToDpmsGracePeriod": 5, + "launchPrefix": "", + "brightnessDevicePins": {}, + "wifiNetworkPins": {}, + "bluetoothDevicePins": {}, + "audioInputDevicePins": {}, + "audioOutputDevicePins": {}, + "gtkThemingEnabled": false, + "qtThemingEnabled": false, + "syncModeWithPortal": true, + "terminalsAlwaysDark": false, + "muxType": "tmux", + "muxUseCustomCommand": false, + "muxCustomCommand": "", + "muxSessionFilter": "", + "runDmsMatugenTemplates": true, + "matugenTemplateGtk": true, + "matugenTemplateNiri": true, + "matugenTemplateHyprland": true, + "matugenTemplateMangowc": true, + "matugenTemplateQt5ct": true, + "matugenTemplateQt6ct": true, + "matugenTemplateFirefox": true, + "matugenTemplatePywalfox": true, + "matugenTemplateZenBrowser": true, + "matugenTemplateVesktop": true, + "matugenTemplateEquibop": true, + "matugenTemplateGhostty": true, + "matugenTemplateKitty": true, + "matugenTemplateFoot": true, + "matugenTemplateAlacritty": true, + "matugenTemplateNeovim": false, + "matugenTemplateWezterm": true, + "matugenTemplateDgop": true, + "matugenTemplateKcolorscheme": true, + "matugenTemplateVscode": true, + "matugenTemplateEmacs": true, + "matugenTemplateZed": true, + "showDock": false, + "dockAutoHide": true, + "dockSmartAutoHide": false, + "dockGroupByApp": false, + "dockOpenOnOverview": false, + "dockPosition": 0, + "dockSpacing": 4, + "dockBottomGap": 0, + "dockMargin": 0, + "dockIconSize": 40, + "dockIndicatorStyle": "circle", + "dockBorderEnabled": false, + "dockBorderColor": "surfaceText", + "dockBorderOpacity": 1, + "dockBorderThickness": 1, + "dockIsolateDisplays": false, + "dockLauncherEnabled": false, + "dockLauncherLogoMode": "apps", + "dockLauncherLogoCustomPath": "", + "dockLauncherLogoColorOverride": "", + "dockLauncherLogoSizeOffset": 0, + "dockLauncherLogoBrightness": 0.5, + "dockLauncherLogoContrast": 1, + "dockMaxVisibleApps": 0, + "dockMaxVisibleRunningApps": 0, + "dockShowOverflowBadge": true, + "notificationOverlayEnabled": true, + "notificationPopupShadowEnabled": true, + "notificationPopupPrivacyMode": true, + "modalDarkenBackground": true, + "lockScreenShowPowerActions": true, + "lockScreenShowSystemIcons": true, + "lockScreenShowTime": true, + "lockScreenShowDate": true, + "lockScreenShowProfileImage": true, + "lockScreenShowPasswordField": true, + "lockScreenShowMediaPlayer": true, + "lockScreenPowerOffMonitorsOnLock": false, + "lockAtStartup": false, + "enableFprint": true, + "maxFprintTries": 15, + "enableU2f": false, + "u2fMode": "or", + "lockScreenActiveMonitor": "all", + "lockScreenInactiveColor": "#000000", + "lockScreenNotificationMode": 2, + "hideBrightnessSlider": false, + "notificationTimeoutLow": 5000, + "notificationTimeoutNormal": 5000, + "notificationTimeoutCritical": 0, + "notificationCompactMode": true, + "notificationPopupPosition": 2, + "notificationAnimationSpeed": 1, + "notificationCustomAnimationDuration": 400, + "notificationHistoryEnabled": true, + "notificationHistoryMaxCount": 200, + "notificationHistoryMaxAgeDays": 30, + "notificationHistorySaveLow": true, + "notificationHistorySaveNormal": true, + "notificationHistorySaveCritical": true, + "notificationRules": [], + "osdAlwaysShowValue": false, + "osdPosition": 6, + "osdVolumeEnabled": true, + "osdMediaVolumeEnabled": true, + "osdMediaPlaybackEnabled": true, + "osdBrightnessEnabled": true, + "osdIdleInhibitorEnabled": true, + "osdMicMuteEnabled": true, + "osdCapsLockEnabled": true, + "osdPowerProfileEnabled": true, + "osdAudioOutputEnabled": true, + "powerActionConfirm": true, + "powerActionHoldDuration": 0.5, + "powerMenuActions": [ + "reboot", + "logout", + "poweroff", + "lock", + "suspend", + "restart" + ], + "powerMenuDefaultAction": "logout", + "powerMenuGridLayout": false, + "customPowerActionLock": "", + "customPowerActionLogout": "", + "customPowerActionSuspend": "", + "customPowerActionHibernate": "", + "customPowerActionReboot": "", + "customPowerActionPowerOff": "", + "updaterHideWidget": false, + "updaterUseCustomCommand": false, + "updaterCustomCommand": "", + "updaterTerminalAdditionalParams": "", + "displayNameMode": "system", + "screenPreferences": {}, + "showOnLastDisplay": {}, + "niriOutputSettings": {}, + "hyprlandOutputSettings": {}, + "displayProfiles": {}, + "activeDisplayProfile": {}, + "displayProfileAutoSelect": false, + "displayShowDisconnected": false, + "displaySnapToEdge": true, + "barConfigs": [ + { + "id": "default", + "name": "Main Bar", + "enabled": true, + "position": 2, + "screenPreferences": [ + "all" + ], + "showOnLastDisplay": true, + "leftWidgets": [ + { + "id": "powerMenuButton", + "enabled": true + }, + { + "id": "privacyIndicator", + "enabled": true + }, + { + "id": "separator", + "enabled": true + }, + { + "id": "clock", + "enabled": true + }, + { + "id": "weather", + "enabled": true + }, + { + "id": "separator", + "enabled": true + }, + { + "id": "controlCenterButton", + "enabled": true, + "showNetworkIcon": true, + "showBluetoothIcon": true, + "showAudioIcon": true, + "showAudioPercent": false, + "showVpnIcon": true, + "showBrightnessIcon": false, + "showBrightnessPercent": false, + "showMicIcon": false, + "showMicPercent": true, + "showBatteryIcon": false, + "showPrinterIcon": false, + "showScreenSharingIcon": true + }, + { + "id": "notificationButton", + "enabled": true + }, + { + "id": "clipboard", + "enabled": true + } + ], + "centerWidgets": [ + { + "id": "workspaceSwitcher", + "enabled": true + } + ], + "rightWidgets": [ + { + "id": "music", + "enabled": true + }, + { + "id": "clipboard", + "enabled": true + }, + { + "id": "notepadButton", + "enabled": true + }, + { + "id": "spacer", + "enabled": true, + "size": 5 + }, + { + "id": "separator", + "enabled": true + }, + { + "id": "spacer", + "enabled": true, + "size": 5 + }, + { + "id": "launcherButton", + "enabled": true + } + ], + "spacing": 0, + "innerPadding": 15, + "bottomGap": 0, + "transparency": 0.77, + "widgetTransparency": 1, + "squareCorners": true, + "noBackground": true, + "maximizeWidgetIcons": false, + "maximizeWidgetText": false, + "removeWidgetPadding": false, + "widgetPadding": 4, + "gothCornersEnabled": true, + "gothCornerRadiusOverride": false, + "gothCornerRadiusValue": 12, + "borderEnabled": false, + "borderColor": "surfaceText", + "borderOpacity": 1, + "borderThickness": 1, + "widgetOutlineEnabled": false, + "widgetOutlineColor": "primary", + "widgetOutlineOpacity": 1, + "widgetOutlineThickness": 1, + "fontScale": 1, + "iconScale": 1, + "autoHide": false, + "autoHideDelay": 250, + "showOnWindowsOpen": false, + "openOnOverview": false, + "visible": true, + "popupGapsAuto": true, + "popupGapsManual": 4, + "maximizeDetection": true, + "scrollEnabled": true, + "scrollXBehavior": "column", + "scrollYBehavior": "workspace", + "shadowIntensity": 0, + "shadowOpacity": 60, + "shadowColorMode": "text", + "shadowCustomColor": "#000000", + "clickThrough": false + } + ], + "desktopClockEnabled": false, + "desktopClockStyle": "analog", + "desktopClockTransparency": 0.8, + "desktopClockColorMode": "primary", + "desktopClockCustomColor": { + "r": 1, + "g": 1, + "b": 1, + "a": 1, + "hsvHue": -1, + "hsvSaturation": 0, + "hsvValue": 1, + "hslHue": -1, + "hslSaturation": 0, + "hslLightness": 1, + "valid": true + }, + "desktopClockShowDate": true, + "desktopClockShowAnalogNumbers": false, + "desktopClockShowAnalogSeconds": true, + "desktopClockX": -1, + "desktopClockY": -1, + "desktopClockWidth": 280, + "desktopClockHeight": 180, + "desktopClockDisplayPreferences": [ + "all" + ], + "systemMonitorEnabled": false, + "systemMonitorShowHeader": true, + "systemMonitorTransparency": 0.8, + "systemMonitorColorMode": "primary", + "systemMonitorCustomColor": { + "r": 1, + "g": 1, + "b": 1, + "a": 1, + "hsvHue": -1, + "hsvSaturation": 0, + "hsvValue": 1, + "hslHue": -1, + "hslSaturation": 0, + "hslLightness": 1, + "valid": true + }, + "systemMonitorShowCpu": true, + "systemMonitorShowCpuGraph": true, + "systemMonitorShowCpuTemp": true, + "systemMonitorShowGpuTemp": false, + "systemMonitorGpuPciId": "", + "systemMonitorShowMemory": true, + "systemMonitorShowMemoryGraph": true, + "systemMonitorShowNetwork": true, + "systemMonitorShowNetworkGraph": true, + "systemMonitorShowDisk": true, + "systemMonitorShowTopProcesses": false, + "systemMonitorTopProcessCount": 3, + "systemMonitorTopProcessSortBy": "cpu", + "systemMonitorGraphInterval": 60, + "systemMonitorLayoutMode": "auto", + "systemMonitorX": -1, + "systemMonitorY": -1, + "systemMonitorWidth": 320, + "systemMonitorHeight": 480, + "systemMonitorDisplayPreferences": [ + "all" + ], + "systemMonitorVariants": [], + "desktopWidgetPositions": {}, + "desktopWidgetGridSettings": {}, + "desktopWidgetInstances": [], + "desktopWidgetGroups": [], + "builtInPluginSettings": { + "dms_settings_search": { + "trigger": "?" + } + }, + "clipboardEnterToPaste": false, + "launcherPluginVisibility": {}, + "launcherPluginOrder": [], + "configVersion": 5 +} \ No newline at end of file diff --git a/todo.md b/todo.md deleted file mode 100644 index 183d6bb..0000000 --- a/todo.md +++ /dev/null @@ -1,11 +0,0 @@ -# TODO - -- [x] `tlp` power management -- [x] `tlp` power management widget in polybar -- [ ] notification management and styling -- [ ] login & lockscreen manager -- [ ] lsp in neovim -- [ ] gemini in terminal -- [ ] adaptive workspace icon indicators based on open application (rather than hard coded icons) -- [ ] calendar/clock/timer/alarm/pomodoro widget -- [ ] handwritten note taking application with on-device (or personal cloud) text conversion