diff options
| author | Natasha Moongrave <natasha@256phi.eu> | 2026-04-20 11:34:55 +0200 |
|---|---|---|
| committer | Natasha Moongrave <natasha@256phi.eu> | 2026-04-20 11:34:55 +0200 |
| commit | 8a47c7ebcd39c32e3b566d0ed1b645a82b55f9e3 (patch) | |
| tree | db45b4b7cfc664334a66c8df0ca27623fabf185e | |
| parent | a4bc3ae3780298b2f73379812d0cad03589861cc (diff) | |
Add boilerplate for a niri rice (The Finals theemd)
| -rw-r--r-- | home/rices/finals/README.md | 58 | ||||
| -rw-r--r-- | home/rices/finals/default.nix | 4 | ||||
| -rw-r--r-- | home/rices/finals/fuzzel.nix | 18 | ||||
| -rw-r--r-- | home/rices/finals/home.nix | 23 | ||||
| -rw-r--r-- | home/rices/finals/niri.nix | 31 | ||||
| -rw-r--r-- | home/rices/finals/niri/kdl/binds.kdl | 77 | ||||
| -rw-r--r-- | home/rices/finals/niri/kdl/input.kdl | 21 | ||||
| -rw-r--r-- | home/rices/finals/niri/kdl/style.kdl | 33 | ||||
| -rw-r--r-- | home/rices/finals/notifications.nix | 16 | ||||
| -rw-r--r-- | home/rices/finals/stylix.nix | 9 | ||||
| -rw-r--r-- | home/rices/finals/swayidle.nix | 15 | ||||
| -rw-r--r-- | home/rices/finals/system.nix | 85 | ||||
| -rw-r--r-- | home/rices/finals/terminal.nix | 17 |
13 files changed, 407 insertions, 0 deletions
diff --git a/home/rices/finals/README.md b/home/rices/finals/README.md new file mode 100644 index 0000000..153fd35 --- /dev/null +++ b/home/rices/finals/README.md @@ -0,0 +1,58 @@ +# finals + +NixOS rice built on **Niri** (Wayland compositor). Minimal boilerplate — extend as needed. + +## Stack + +| Component | Choice | +|-----------|--------| +| Compositor | [Niri](https://github.com/YaLTeR/niri) (Wayland) | +| Terminal | Kitty | +| Launcher | Fuzzel | +| Notifications | Dunst | +| Lock Screen | Swaylock + Swayidle | +| Theme Engine | [Stylix](https://github.com/danth/stylix) | + +## Structure + +``` +. +├── default.nix # Entry point — imports system + home +├── system.nix # System-level config (Niri, Pipewire, Stylix, fonts) +├── home.nix # Home Manager config (packages, GPG agent) +├── terminal.nix # Kitty config +├── notifications.nix # Dunst config +├── fuzzel.nix # Launcher config +├── niri.nix # Niri compositor config (KDL generation) +├── stylix.nix # Theme overrides +├── swayidle.nix # Lock screen integration +└── niri/ + └── kdl/ # Niri config modules + ├── binds.kdl # Keybindings + ├── style.kdl # Window styling + └── input.kdl # Keyboard/mouse/touchpad +``` + +## Key Bindings + +| Bind | Action | +|------|--------| +| `Mod+Return` | Kitty | +| `Mod+D` | Fuzzel launcher | +| `Mod+N` | Firefox | +| `Mod+hjkl` | Focus window (vim dirs) | +| `Mod+Shift+hjkl` | Move window | +| `Mod+1-5` | Switch workspace | +| `Mod+Ctrl+1-5` | Move to workspace | +| `Mod+F` | Maximize column | +| `Mod+Ctrl+F` | Fullscreen | +| `Mod+Space` | Overview | + +## Not Yet Included + +- Bar (eww/waybar) +- Browser module +- Custom shaders/animations +- Wallpaper setup +- Per-app window rules +- Screen capture privacy rules diff --git a/home/rices/finals/default.nix b/home/rices/finals/default.nix new file mode 100644 index 0000000..6b7865d --- /dev/null +++ b/home/rices/finals/default.nix @@ -0,0 +1,4 @@ +{ + system = import ./system.nix; + home = import ./home.nix; +} diff --git a/home/rices/finals/fuzzel.nix b/home/rices/finals/fuzzel.nix new file mode 100644 index 0000000..ef84e23 --- /dev/null +++ b/home/rices/finals/fuzzel.nix @@ -0,0 +1,18 @@ +{...}: { + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "kitty"; + lines = 15; + width = 50; + horizontal-pad = 20; + vertical-pad = 12; + }; + border = { + radius = 10; + width = 3; + }; + }; + }; +} diff --git a/home/rices/finals/home.nix b/home/rices/finals/home.nix new file mode 100644 index 0000000..253431a --- /dev/null +++ b/home/rices/finals/home.nix @@ -0,0 +1,23 @@ +{pkgs, ...}: { + imports = [ + ./terminal.nix + ./notifications.nix + ./fuzzel.nix + ./swayidle.nix + ./niri.nix + ./stylix.nix + ]; + + programs.swaylock.enable = true; + services.network-manager-applet.enable = true; + + home.packages = with pkgs; [ + hyprpicker + xwayland-satellite + ]; + + services.gpg-agent = { + enable = true; + enableSshSupport = true; + }; +} diff --git a/home/rices/finals/niri.nix b/home/rices/finals/niri.nix new file mode 100644 index 0000000..b4e012b --- /dev/null +++ b/home/rices/finals/niri.nix @@ -0,0 +1,31 @@ +{ + pkgs, + lib, + ... +}: { + home.packages = with pkgs; [ + swaybg + ]; + + xdg.configFile."niri/live.kdl".text = ""; + + home.file."config" = let + kdlfiles = + lib.mapAttrsToList + (filename: _value: "include \"${./niri/kdl}/${filename}\"") + (lib.filterAttrs (key: value: value == "regular") (builtins.readDir ./niri/kdl)); + startups = + map (it: "spawn-at-startup ${it}") + (map (lib.concatStringsSep " ") + (map (map (word: "\"${word}\"")) + [ + ["touch" ".config/niri/live.kdl"] + ])); + other = [ + "include \"live.kdl\"" + ]; + in { + target = ".config/niri/config.kdl"; + text = lib.concatLines (startups ++ kdlfiles ++ other); + }; +} diff --git a/home/rices/finals/niri/kdl/binds.kdl b/home/rices/finals/niri/kdl/binds.kdl new file mode 100644 index 0000000..171d31c --- /dev/null +++ b/home/rices/finals/niri/kdl/binds.kdl @@ -0,0 +1,77 @@ +binds { + // spawn + Mod+Return repeat=false { spawn "kitty"; } + Mod+D repeat=false { spawn "fuzzel"; } + Mod+N repeat=false { spawn "firefox"; } + + // session + Mod+Ctrl+Shift+E { quit; } + Mod+Shift+Q { close-window; } + Mod+Ctrl+Shift+P { power-off-monitors; } + Mod+Shift+Slash { show-hotkey-overlay; } + + // focus (vim keys) + Mod+H { focus-column-left; } + Mod+J { focus-window-down; } + Mod+K { focus-window-up; } + Mod+L { focus-column-right; } + + // focus (arrow keys) + Mod+Left { focus-column-left; } + Mod+Down { focus-window-down; } + Mod+Up { focus-window-up; } + Mod+Right { focus-column-right; } + + // move windows (vim keys) + Mod+Shift+H { move-column-left; } + Mod+Shift+J { move-window-down; } + Mod+Shift+K { move-window-up; } + Mod+Shift+L { move-column-right; } + + // move windows (arrow keys) + Mod+Shift+Left { move-column-left; } + Mod+Shift+Down { move-window-down; } + Mod+Shift+Up { move-window-up; } + Mod+Shift+Right { move-column-right; } + + Mod+R { switch-preset-column-width; } + Mod+Space { toggle-overview; } + Mod+V { toggle-window-floating; } + + // workspaces + Mod+1 { focus-workspace 1; } + Mod+2 { focus-workspace 2; } + Mod+3 { focus-workspace 3; } + Mod+4 { focus-workspace 4; } + Mod+5 { focus-workspace 5; } + Mod+Ctrl+1 { move-column-to-workspace 1; } + Mod+Ctrl+2 { move-column-to-workspace 2; } + Mod+Ctrl+3 { move-column-to-workspace 3; } + Mod+Ctrl+4 { move-column-to-workspace 4; } + Mod+Ctrl+5 { move-column-to-workspace 5; } + + // monitor controls + Mod+Ctrl+H { focus-monitor-left; } + Mod+Ctrl+L { focus-monitor-right; } + Mod+Shift+Ctrl+H { move-column-to-monitor-left; } + Mod+Shift+Ctrl+L { move-column-to-monitor-right; } + + // column editing + Mod+BracketLeft { consume-or-expel-window-left; } + Mod+BracketRight { consume-or-expel-window-right; } + Mod+C { center-column; } + Mod+Minus { set-column-width "-5%"; } + Mod+Equal { set-column-width "+5%"; } + Mod+F { maximize-column; } + Mod+Ctrl+F { fullscreen-window; } + + // media keys + XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"; } + XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+"; } + XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } + XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } + + // brightness + XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "set" "5%+"; } + XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "set" "5%-"; } +} diff --git a/home/rices/finals/niri/kdl/input.kdl b/home/rices/finals/niri/kdl/input.kdl new file mode 100644 index 0000000..a610dc9 --- /dev/null +++ b/home/rices/finals/niri/kdl/input.kdl @@ -0,0 +1,21 @@ +input { + keyboard { + xkb { + layout "us" + } + + repeat-delay 600 + repeat-rate 25 + track-layout "global" + } + + touchpad { + dwt + dwtp + natural-scroll + } + + mouse { + accel-profile "flat" + } +} diff --git a/home/rices/finals/niri/kdl/style.kdl b/home/rices/finals/niri/kdl/style.kdl new file mode 100644 index 0000000..46ec587 --- /dev/null +++ b/home/rices/finals/niri/kdl/style.kdl @@ -0,0 +1,33 @@ +prefer-no-csd + +cursor { + hide-when-typing + hide-after-inactive-ms 10000 +} + +layout { + gaps 15 + focus-ring { off; } + border { + on + width 3 + } + default-column-width + center-focused-column "never" +} + +window-rule { + geometry-corner-radius 1 + clip-to-geometry true +} + +layer-rule { + match namespace="launcher" + geometry-corner-radius 10 + shadow { + on + offset x=0 y=0 + softness 40 + } + baba-is-float true +} diff --git a/home/rices/finals/notifications.nix b/home/rices/finals/notifications.nix new file mode 100644 index 0000000..4b0e38b --- /dev/null +++ b/home/rices/finals/notifications.nix @@ -0,0 +1,16 @@ +{pkgs, ...}: { + home.packages = [ + pkgs.libnotify + ]; + services.dunst = { + enable = true; + settings = { + global = { + browser = "${pkgs.firefox}/bin/firefox"; + mouse_left_click = "context"; + mouse_middle_click = "close_current"; + frame_width = 2; + }; + }; + }; +} diff --git a/home/rices/finals/stylix.nix b/home/rices/finals/stylix.nix new file mode 100644 index 0000000..97988f3 --- /dev/null +++ b/home/rices/finals/stylix.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + stylix.targets = { + kitty.enable = false; + dunst.enable = false; + }; + gtk = { + enable = true; + }; +} diff --git a/home/rices/finals/swayidle.nix b/home/rices/finals/swayidle.nix new file mode 100644 index 0000000..4de9d52 --- /dev/null +++ b/home/rices/finals/swayidle.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + services.swayidle = { + enable = true; + events = [ + { + event = "before-sleep"; + command = "${pkgs.swaylock}/bin/swaylock -fF"; + } + { + event = "lock"; + command = "swaylock"; + } + ]; + }; +} diff --git a/home/rices/finals/system.nix b/home/rices/finals/system.nix new file mode 100644 index 0000000..bd33688 --- /dev/null +++ b/home/rices/finals/system.nix @@ -0,0 +1,85 @@ +{ + pkgs, + lib, + ... +}: { + # Desktop environment - Niri compositor + programs.niri.enable = true; + services.displayManager.defaultSession = "niri"; + + # Keyboard layout - change to your preference + services.xserver.xkb = { + layout = "us"; + }; + + # Polkit for Niri + security.polkit.enable = true; + systemd.user.services.niri-flake-polkit.enable = false; + systemd.user.services.polkit-gnome-authentication-agent-1 = { + description = "polkit-gnome-authentication-agent-1"; + wantedBy = ["graphical-session.target"]; + wants = ["graphical-session.target"]; + after = ["graphical-session.target"]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + + # Audio - Pipewire + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + environment.systemPackages = with pkgs; [ + playerctl + pulsemixer + ]; + + # XDG portals + xdg.portal.extraPortals = [ + pkgs.xdg-desktop-portal-cosmic + ]; + xdg.portal.config.common.default = [ + "gnome" + ]; + + # Fonts + fonts = { + packages = with pkgs; [ + nerd-fonts.fira-code + noto-fonts-color-emoji + inter + ]; + fontDir.enable = true; + }; + + # Stylix - pick your scheme + stylix = { + enable = true; + polarity = "dark"; + base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml"; + fonts = { + sansSerif = { + package = pkgs.inter; + name = "Inter"; + }; + monospace = { + package = pkgs.nerd-fonts.fira-code; + name = "FiraCode Nerd Font"; + }; + emoji = { + package = pkgs.noto-fonts-color-emoji; + name = "Noto Color Emoji"; + }; + }; + }; + + # Services + services.upower.enable = true; +} diff --git a/home/rices/finals/terminal.nix b/home/rices/finals/terminal.nix new file mode 100644 index 0000000..ab6270e --- /dev/null +++ b/home/rices/finals/terminal.nix @@ -0,0 +1,17 @@ +{...}: { + programs.kitty = { + enable = true; + font.size = 12; + font.name = "FiraCode Nerd Font"; + keybindings = { + "ctrl+shift+n" = "new_os_window_with_cwd"; + }; + settings = { + confirm_os_window_close = 0; + hide_window_decorations = true; + }; + }; + home.sessionVariables = { + TERMINAL = "kitty"; + }; +} |
