Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@
zsh.enable = true;
# Needs the 32-bit graphics support enabled above.
steam.enable = true;
# Shorter, friendlier front-end for nixos-rebuild (build-tree progress,
# a diff of the generation change); flake points it at this checkout so
# `nh os switch` needs no other arguments.
nh = {
enable = true;
flake = "/etc/nixos";
};
};
# qt5ct/qt6ct (platformTheme) is the standard way to theme Qt apps outside
# a running KDE Plasma session; Kvantum (style) is the engine that actually
Expand Down
10 changes: 5 additions & 5 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Home Manager owns:
| Setting | What it does |
| --- | --- |
| Hyprland and Quickshell files | Installs the user's desktop files |
| Quickshell lock service | Gives every lock request one idempotent service |
| Quickshell lock and launcher services | Gives every lock or launcher request one idempotent service |
| KeePassXC | Starts automatically; can provide the Secret Service API once enabled in its settings |
| Ghostty | Provides the configured terminal |
| hypridle | Locks after 5 minutes and blanks displays 30 seconds later |
Expand Down Expand Up @@ -311,8 +311,8 @@ need a real Wayland compositor and its protocols, while an offscreen Qt process
has no window-system backend. Starting a nested compositor merely to make that
test pass would add infrastructure without reproducing the real login or lock
environment. The native system build already proves that the configured
Quickshell package can be produced; actual bar and lock-screen behavior
remains a hardware acceptance test.
Quickshell package can be produced; actual bar, lock-screen, and launcher
behavior remains a hardware acceptance test.

Another separate job scans the complete Git history for secrets.

Expand Down Expand Up @@ -353,8 +353,8 @@ and full Git history.
| `modules/boot/` | Shared Secure Boot, measured boot, and graphical splash |
| `dotfiles/hypr/` | Hyprland startup and key bindings |
| `dotfiles/quickshell/bar/` | User bar and wallpaper |
| `dotfiles/quickshell/lockscreen/` | Lock screen |
| `dotfiles/quickshell/shared/` | Reused login and lock components |
| `dotfiles/quickshell/lockscreen/` | Lock screen, with its own `shared/` login components |
| `dotfiles/quickshell/launcher/` | App launcher |
| `wallpapers/` | Images installed by the shared system configuration |
| `install.sh` | Destructive installation workflow |
| `tests/` | Non-destructive installer unit tests |
Expand Down
10 changes: 8 additions & 2 deletions dotfiles/hypr/hyprland.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ local fileManager = "dolphin"
------------

-- ASUS TUF VG34VQL1B: 3440x1440, FreeSync Premium up to 165Hz over DisplayPort.
-- Its VA panel has a widely-reported brightness/gamma flicker when VRR is
-- active during normal desktop use (visible on mouse movement, and reported
-- on both Hyprland and KWin, so it is the panel, not the compositor). vrr=2
-- restricts adaptive sync to fullscreen content (games, video) and runs the
-- desktop at a fixed 165Hz, where the flicker is most noticeable. Drop to
-- vrr=0 or to 144Hz if fullscreen content still flickers.
hl.monitor({
output = "",
mode = "3440x1440@165",
position = "auto",
scale = "auto",
vrr = 1,
vrr = 2,
})

-----------
Expand All @@ -30,7 +36,7 @@ hl.config({
---------------

hl.on("hyprland.start", function()
hl.exec_cmd("quickshell")
hl.exec_cmd("quickshell -c bar")
hl.exec_cmd("hyprpolkitagent")
end)

Expand Down
2 changes: 1 addition & 1 deletion dotfiles/quickshell/lockscreen/LockSurface.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import QtQuick
import QtQml
import "../shared"
import "./shared"

Item {
id: root
Expand Down
18 changes: 16 additions & 2 deletions home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
Service = {
Type = "simple";
ExecStart = "${pkgs.quickshell}/bin/quickshell -c launcher";
# The launcher calls Qt.quit() right after launching an app, so it can
# close itself immediately; systemd's default KillMode=control-group
# would then kill that just-launched app too, since it shares this
# service's cgroup. KillMode=process only kills the tracked quickshell
# process, letting whatever it launched keep running.
KillMode = "process";
};
};

Expand Down Expand Up @@ -58,10 +64,18 @@
# Hyprland session and Quickshell shells (bar, lock screen, launcher).
file = {
".config/hypr/hyprland.lua".source = ./dotfiles/hypr/hyprland.lua;
".config/quickshell/shell.qml".source = ./dotfiles/quickshell/bar/shell.qml;
# Quickshell treats a shell.qml at the quickshell/ root as *the* default
# config and stops looking at named subfolders entirely, so the bar has
# to be a named config (-c bar) like lockscreen/launcher, not the root.
".config/quickshell/bar".source = ./dotfiles/quickshell/bar;
# Quickshell also confines each named config's imports to its own root,
# and home-manager can't map a second file/directory nested inside a
# path that's already one whole-directory symlink (fails at build time:
# "Error installing file ... outside $HOME"), so lockscreen's shared/
# components live physically inside dotfiles/quickshell/lockscreen/
# rather than being deployed separately.
".config/quickshell/lockscreen".source = ./dotfiles/quickshell/lockscreen;
".config/quickshell/launcher".source = ./dotfiles/quickshell/launcher;
".config/quickshell/shared".source = ./dotfiles/quickshell/shared;
};
};

Expand Down
2 changes: 1 addition & 1 deletion hosts/igor-desktop/disk-device
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/dev/disk/by-id/CHANGE-ME
/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S7HENL0L304721P_1
21 changes: 14 additions & 7 deletions hosts/igor-desktop/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# Bootstrap-only hardware module.
#
# install.sh replaces this tracked file with the output of
# `nixos-generate-config --no-filesystems` before installing. Commit that
# generated result from igor-desktop after the first successful boot.
{ lib, modulesPath, ... }:
# 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") ];
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];

boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];

nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
10 changes: 9 additions & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@ pre-commit:
commands:
secrets:
run: gitleaks protect --staged --redact
# hosts/*/hardware-configuration.nix is nixos-generate-config's own
# output (its header says not to hand-edit it), so both checks below
# skip it, same as scripts/check.sh does for CI. lefthook's own YAML
# fields aren't shell-evaluated, so this one line can't read
# scripts/generated-nix-files.glob like the statix command below does;
# keep it in sync with that file by hand.
nixfmt:
glob: "*.nix"
exclude:
- "hosts/*/hardware-configuration.nix"
run: nixfmt {staged_files}
stage_fixed: true
# Same invocation scripts/check.sh uses in CI: statix doesn't offer a
# reliable fix for every lint (e.g. repeated-key warnings are report-only),
# so this checks rather than auto-fixes, same as CI does.
statix:
glob: "*.nix"
run: statix check .
run: statix check -i "$(cat scripts/generated-nix-files.glob)" .
22 changes: 18 additions & 4 deletions scripts/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ set -uo pipefail

failures=0

# hosts/*/hardware-configuration.nix is nixos-generate-config's own output
# (its header says not to hand-edit it), so its style is the generator's, not
# this repository's: the checks below that hit it skip it. lefthook.yml reads
# this same file so the exemption can't drift out of sync between CI and the
# local pre-commit hook again.
generated_nix_glob=$(cat scripts/generated-nix-files.glob)

run_check() {
local name=$1
local status
Expand Down Expand Up @@ -50,19 +57,20 @@ check_nix_format() {
then
status=1
fi
done < <(find . -type f -name '*.nix' -print0)
done < <(find . -type f -name '*.nix' -not -path "./$generated_nix_glob" -print0)

rm -f "$formatted"
rmdir "$temp_dir"
return "$status"
}

check_dead_nix() {
deadnix --fail .
# shellcheck disable=SC2086 # deadnix --exclude wants expanded paths, not a glob string
deadnix --fail --exclude $generated_nix_glob -- .
}

check_nix_static_analysis() {
statix check .
statix check -i "$generated_nix_glob" .
}

check_shell() {
Expand Down Expand Up @@ -124,7 +132,13 @@ check_qml() {

while IFS= read -r -d '' file; do
qml_files+=("$file")
done < <(find dotfiles/quickshell -type f -name '*.qml' -print0)
done < <(
# dotfiles/quickshell/greeter/ is shelved, undeployed work kept for a
# later Hyprland+Quickshell greeter; it's not wired into home.nix and its
# imports are stale until it's reinstated, so it's excluded here rather
# than kept passing by coincidence.
find dotfiles/quickshell -type f -name '*.qml' -not -path 'dotfiles/quickshell/greeter/*' -print0
)

# Known Quickshell tooling warnings stay hidden; real failures print the log.
if ! qmllint "${import_arguments[@]}" --import=error \
Expand Down
1 change: 1 addition & 0 deletions scripts/generated-nix-files.glob
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hosts/*/hardware-configuration.nix