jaci tweaks rewrite for framework laptop, tweak framework12 config
This commit is contained in:
parent
964e4a63b3
commit
a0ff06bf8c
@ -89,13 +89,14 @@
|
||||
inherit inputs outputs timeZone system;
|
||||
};
|
||||
modules = [
|
||||
stylix.nixosModules.stylix
|
||||
# Setup home manager
|
||||
inputs.home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.jaci = import ./jaci/modules/home-manager/home.nix;
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs outputs;
|
||||
inherit inputs outputs unstablePkgs;
|
||||
};
|
||||
}
|
||||
./jaci/default.nix
|
||||
|
||||
@ -54,10 +54,10 @@
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
sizes = {
|
||||
applications = 12;
|
||||
desktop = 10;
|
||||
popups = 10;
|
||||
terminal = 11;
|
||||
applications = 14;
|
||||
desktop = 12;
|
||||
popups = 12;
|
||||
terminal = 16;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -4,11 +4,12 @@
|
||||
fullName = "Jaci Anderson";
|
||||
email = "jaci.s.anderson@gmail.com";
|
||||
hostName = "meowyxlife";
|
||||
desktop = "kde";
|
||||
desktop = "niri";
|
||||
gaming = true;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.framework-12-13th-gen-intel
|
||||
./desktop-configuration.nix
|
||||
./nixos/hardware-configuration.nix
|
||||
];
|
||||
@ -20,6 +21,51 @@
|
||||
installGaming = gaming;
|
||||
};
|
||||
|
||||
# Stylix theming - auto-generated light theme from wallpaper
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = ./kiki_background.jpg;
|
||||
|
||||
# Auto-generate color scheme from wallpaper
|
||||
polarity = "light";
|
||||
|
||||
# System-wide cursor
|
||||
cursor = {
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 32;
|
||||
};
|
||||
|
||||
# Fonts
|
||||
fonts = {
|
||||
serif = {
|
||||
package = pkgs.lato;
|
||||
name = "Lato";
|
||||
};
|
||||
sansSerif = {
|
||||
package = pkgs.lato;
|
||||
name = "Lato";
|
||||
};
|
||||
monospace = {
|
||||
package = pkgs.maple-mono.NF;
|
||||
name = "Maple Mono NF";
|
||||
};
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-color-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
sizes = {
|
||||
applications = 12;
|
||||
desktop = 10;
|
||||
popups = 10;
|
||||
terminal = 11;
|
||||
};
|
||||
};
|
||||
|
||||
# Disable plymouth styling (use default)
|
||||
targets.plymouth.enable = false;
|
||||
};
|
||||
|
||||
# Limit the number of generations to keep
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
|
||||
|
||||
@ -1,37 +1,47 @@
|
||||
{ config, lib, inputs, outputs, pkgs, timeZone, system, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
timeZone,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
supportedDesktops = [ "kde" ];
|
||||
supportedDesktops = [ "niri" ];
|
||||
supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops;
|
||||
deskCfg = config.deskCfg;
|
||||
in
|
||||
{
|
||||
options.deskCfg = {
|
||||
de = lib.mkOption {
|
||||
default = "kde";
|
||||
type = lib.types.str;
|
||||
description = "Desktop Environment";
|
||||
};
|
||||
userName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Main username for system";
|
||||
};
|
||||
hostName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for system";
|
||||
};
|
||||
installGaming = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Whether to install gaming software or not";
|
||||
};
|
||||
de = lib.mkOption {
|
||||
default = "niri";
|
||||
type = lib.types.str;
|
||||
description = "Desktop Environment";
|
||||
};
|
||||
userName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Main username for system";
|
||||
};
|
||||
hostName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Hostname for system";
|
||||
};
|
||||
installGaming = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Whether to install gaming software or not";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
modules/user/main_user.nix
|
||||
modules/labwc/labwc_conf.nix
|
||||
];
|
||||
imports = [
|
||||
modules/user/main_user.nix
|
||||
modules/niri/niri_conf.nix
|
||||
../shared/modules/system/power_manager.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
config = {
|
||||
assertions = [
|
||||
{
|
||||
assertion = builtins.elem deskCfg.de supportedDesktops;
|
||||
@ -43,52 +53,84 @@ in
|
||||
inputs.nur.overlays.default
|
||||
];
|
||||
|
||||
# Intel graphics acceleration (Framework 12)
|
||||
hardware.graphics.enable = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# Enable flakes feature
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command" "flakes"
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# boot.plymouth.enable = true;
|
||||
boot = {
|
||||
# Enable "Silent Boot"
|
||||
consoleLogLevel = 0;
|
||||
initrd.verbose = false;
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"loglevel=3"
|
||||
"rd.systemd.show_status=false"
|
||||
"rd.udev.log_level=3"
|
||||
"udev.log_priority=3"
|
||||
];
|
||||
# Hide the OS choice for bootloaders.
|
||||
loader.timeout = 0;
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
# Use latest kernel packages
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
networking.hostName = deskCfg.hostName; # Define your hostname.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
networking.hostName = deskCfg.hostName;
|
||||
networking.networkmanager.enable = true;
|
||||
networking.wireless.iwd.enable = true;
|
||||
|
||||
time.timeZone = timeZone;
|
||||
|
||||
main_user = {
|
||||
enable = true;
|
||||
userName = deskCfg.userName;
|
||||
isDesktopUser = true;
|
||||
};
|
||||
|
||||
users.users.${deskCfg.userName} = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "password";
|
||||
description = "main user";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"corectrl"
|
||||
deskCfg.userName
|
||||
"video"
|
||||
"audio"
|
||||
];
|
||||
power_manager = {
|
||||
enable = true;
|
||||
};
|
||||
# main_user = {
|
||||
# enable = true;
|
||||
# userName = deskCfg.userName;
|
||||
# isDesktopUser = true;
|
||||
# };
|
||||
|
||||
labwc = {
|
||||
enable = true;
|
||||
useNonFree = true;
|
||||
installGaming = deskCfg.installGaming;
|
||||
systemPackages = with pkgs; [
|
||||
libreoffice
|
||||
];
|
||||
|
||||
niriwm = {
|
||||
enable = true;
|
||||
useNonFree = true;
|
||||
user = deskCfg.userName;
|
||||
installGaming = deskCfg.installGaming;
|
||||
systemPackages = with pkgs; [
|
||||
libreoffice
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
cryptsetup
|
||||
];
|
||||
|
||||
programs.niri.enable = true;
|
||||
# For electron apps in wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = rec {
|
||||
initial_session = {
|
||||
command = "${pkgs.niri}/bin/niri-session";
|
||||
user = deskCfg.userName;
|
||||
};
|
||||
default_session = initial_session;
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
BIN
jaci/kiki_background.jpg
Normal file
BIN
jaci/kiki_background.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 162 KiB |
417
jaci/linked-dotfiles/niri/config.kdl
Normal file
417
jaci/linked-dotfiles/niri/config.kdl
Normal file
@ -0,0 +1,417 @@
|
||||
//
|
||||
// MISCELLANEOUS
|
||||
//
|
||||
|
||||
// gui startup
|
||||
spawn-at-startup "waybar"
|
||||
spawn-at-startup "keepassxc"
|
||||
// shell startup
|
||||
spawn-sh-at-startup "kanshi"
|
||||
spawn-sh-at-startup "sleep 5 && nm-applet --indicator"
|
||||
spawn-sh-at-startup "sleep 5 && syncthingtray --wait"
|
||||
spawn-sh-at-startup "sleep 5 && swaync"
|
||||
|
||||
screenshot-path null // save screenshots just to clipboard
|
||||
prefer-no-csd // (Client Side Decorations) ask clients to not add their own decorations
|
||||
|
||||
hotkey-overlay {
|
||||
skip-at-startup
|
||||
}
|
||||
|
||||
//
|
||||
// OUTPUTS
|
||||
//
|
||||
output "eDP-1"{
|
||||
scale 1.0
|
||||
variable-refresh-rate
|
||||
transform "normal"
|
||||
}
|
||||
|
||||
workspace "term"
|
||||
workspace "net"
|
||||
workspace "chat"
|
||||
workspace "scratch"
|
||||
|
||||
//
|
||||
// INPUTS
|
||||
//
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
layout "us"
|
||||
}
|
||||
repeat-delay 175
|
||||
repeat-rate 50
|
||||
}
|
||||
|
||||
touchpad {
|
||||
tap
|
||||
dwt
|
||||
dwtp
|
||||
natural-scroll
|
||||
accel-speed 0.2
|
||||
accel-profile "adaptive"
|
||||
}
|
||||
|
||||
mouse {
|
||||
accel-speed 0.2
|
||||
accel-profile "adaptive"
|
||||
}
|
||||
|
||||
trackpoint {
|
||||
accel-speed 0.2
|
||||
accel-profile "adaptive"
|
||||
}
|
||||
|
||||
tablet {
|
||||
map-to-output "eDP-1"
|
||||
}
|
||||
|
||||
touch {
|
||||
map-to-output "eDP-1"
|
||||
}
|
||||
|
||||
disable-power-key-handling
|
||||
warp-mouse-to-focus mode="center-xy"
|
||||
focus-follows-mouse
|
||||
}
|
||||
|
||||
//
|
||||
// LAYOUT
|
||||
//
|
||||
layout {
|
||||
gaps 2
|
||||
|
||||
center-focused-column "on-overflow"
|
||||
always-center-single-column
|
||||
default-column-display "normal"
|
||||
|
||||
tab-indicator {
|
||||
hide-when-single-tab
|
||||
}
|
||||
|
||||
preset-column-widths {
|
||||
proportion 0.33333
|
||||
proportion 0.5
|
||||
proportion 0.66667
|
||||
}
|
||||
|
||||
default-column-width {
|
||||
proportion 0.5;
|
||||
}
|
||||
|
||||
focus-ring {
|
||||
width 0
|
||||
}
|
||||
|
||||
border {
|
||||
active-gradient from="#8ac926" to="#6a994e" angle=45 in="oklch longer hue" relative-to="workspace-view"
|
||||
inactive-gradient from="#606c38" to="#344e41" angle=45 in="oklch longer hue" relative-to="workspace-view"
|
||||
}
|
||||
|
||||
shadow {
|
||||
softness 30
|
||||
spread 5
|
||||
offset x=8 y=8
|
||||
draw-behind-window true
|
||||
color "#00444444"
|
||||
}
|
||||
|
||||
struts {
|
||||
left 10
|
||||
right 10
|
||||
top 10
|
||||
bottom 10
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// WINDOW RULES
|
||||
//
|
||||
|
||||
// All windows - corner radius, opacity
|
||||
window-rule {
|
||||
geometry-corner-radius 14 14 0 14
|
||||
clip-to-geometry true
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match is-active=true
|
||||
opacity 0.99
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match is-floating=true
|
||||
opacity 0.92
|
||||
}
|
||||
|
||||
// Term windows
|
||||
window-rule {
|
||||
match app-id="com.mitchellh.ghostty"
|
||||
|
||||
default-column-width { proportion 0.5; }
|
||||
open-on-workspace "term"
|
||||
}
|
||||
|
||||
// Net windows
|
||||
window-rule {
|
||||
match app-id="firefox"
|
||||
|
||||
default-column-width { proportion 1.0; }
|
||||
open-on-workspace "net"
|
||||
}
|
||||
|
||||
// Chat windows
|
||||
window-rule {
|
||||
match app-id=r#"^com\.discordapp\.Discord$"#
|
||||
match app-id=r#"^org\.signal\.Signal$"#
|
||||
|
||||
default-column-width { proportion 0.8; }
|
||||
block-out-from "screencast"
|
||||
open-on-workspace "chat"
|
||||
}
|
||||
|
||||
// Scratch windows (exclude unlock dialog so it can open on net)
|
||||
window-rule {
|
||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||
exclude app-id=r#"^org\.keepassxc\.KeePassXC$"# title="^Unlock Database - KeePassXC$"
|
||||
|
||||
block-out-from "screencast"
|
||||
open-on-workspace "scratch"
|
||||
}
|
||||
|
||||
// Keepass unlock dialog on Net workspace
|
||||
window-rule {
|
||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"# title="^Unlock Database - KeePassXC$"
|
||||
|
||||
open-floating true
|
||||
open-focused true
|
||||
open-on-workspace "net"
|
||||
}
|
||||
|
||||
// File browser
|
||||
window-rule {
|
||||
match app-id="org.gnome.Nautilus"
|
||||
|
||||
open-floating true
|
||||
open-focused true
|
||||
block-out-from "screencast"
|
||||
}
|
||||
|
||||
// Steam windows
|
||||
window-rule {
|
||||
match app-id="steam" title="Friends List"
|
||||
|
||||
open-floating true
|
||||
open-focused false
|
||||
}
|
||||
|
||||
// Bright border on screen-shared windows
|
||||
window-rule {
|
||||
match is-window-cast-target=true
|
||||
|
||||
focus-ring {
|
||||
active-color "#f38ba8"
|
||||
inactive-color "#7d0d2d"
|
||||
}
|
||||
|
||||
border {
|
||||
inactive-color "#7d0d2d"
|
||||
}
|
||||
|
||||
shadow {
|
||||
color "#7d0d2d70"
|
||||
}
|
||||
|
||||
tab-indicator {
|
||||
active-color "#f38ba8"
|
||||
inactive-color "#7d0d2d"
|
||||
}
|
||||
}
|
||||
|
||||
// Block out notifications from screencasts.
|
||||
layer-rule {
|
||||
match namespace="^notifications$"
|
||||
|
||||
block-out-from "screencast"
|
||||
}
|
||||
|
||||
//
|
||||
// BINDS (QWERTY Layout)
|
||||
//
|
||||
|
||||
binds {
|
||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||
|
||||
// Terminal
|
||||
Mod+Return { spawn "ghostty"; }
|
||||
|
||||
// Application launcher - nwg-drawer
|
||||
Mod+D { spawn "nwg-drawer"; }
|
||||
|
||||
// File manager
|
||||
Mod+T { spawn "nautilus"; }
|
||||
|
||||
// Browser
|
||||
Mod+W { spawn "firefox"; }
|
||||
|
||||
// Close window
|
||||
Mod+Q { close-window; }
|
||||
|
||||
// QWERTY navigation (H=left, J=down, K=up, L=right)
|
||||
Mod+H { focus-column-left; }
|
||||
Mod+J { focus-window-down; }
|
||||
Mod+K { focus-window-up; }
|
||||
Mod+L { focus-column-right; }
|
||||
|
||||
// Arrow keys for focus movement
|
||||
Mod+Left { focus-column-left; }
|
||||
Mod+Down { focus-window-down; }
|
||||
Mod+Up { focus-window-up; }
|
||||
Mod+Right { focus-column-right; }
|
||||
|
||||
// QWERTY window movement
|
||||
Mod+Shift+H { move-column-left; }
|
||||
Mod+Shift+J { move-window-down; }
|
||||
Mod+Shift+K { move-window-up; }
|
||||
Mod+Shift+L { move-column-right; }
|
||||
|
||||
// Arrow keys for window movement
|
||||
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+Home { focus-column-first; }
|
||||
Mod+End { focus-column-last; }
|
||||
Mod+Ctrl+Home { move-column-to-first; }
|
||||
Mod+Ctrl+End { move-column-to-last; }
|
||||
|
||||
// Monitor focus - QWERTY
|
||||
Mod+Ctrl+H { focus-monitor-left; }
|
||||
Mod+Ctrl+J { focus-monitor-down; }
|
||||
Mod+Ctrl+K { focus-monitor-up; }
|
||||
Mod+Ctrl+L { focus-monitor-right; }
|
||||
|
||||
// Monitor focus - Arrow keys
|
||||
Mod+Ctrl+Left { focus-monitor-left; }
|
||||
Mod+Ctrl+Down { focus-monitor-down; }
|
||||
Mod+Ctrl+Up { focus-monitor-up; }
|
||||
Mod+Ctrl+Right { focus-monitor-right; }
|
||||
|
||||
// Move column to monitor - QWERTY
|
||||
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||
|
||||
// Move column to monitor - Arrow keys
|
||||
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||
|
||||
// Workspace navigation
|
||||
Mod+Page_Down { focus-workspace-down; }
|
||||
Mod+Page_Up { focus-workspace-up; }
|
||||
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
|
||||
|
||||
Mod+Shift+Page_Down { move-workspace-down; }
|
||||
Mod+Shift+Page_Up { move-workspace-up; }
|
||||
|
||||
Mod+Minus { focus-workspace "scratch"; }
|
||||
Mod+1 { focus-workspace "term"; }
|
||||
Mod+2 { focus-workspace "net"; }
|
||||
Mod+3 { focus-workspace "chat"; }
|
||||
Mod+4 { focus-workspace 4; }
|
||||
Mod+5 { focus-workspace 5; }
|
||||
Mod+6 { focus-workspace 6; }
|
||||
Mod+7 { focus-workspace 7; }
|
||||
Mod+8 { focus-workspace 8; }
|
||||
Mod+9 { focus-workspace 9; }
|
||||
Mod+Shift+Minus { move-column-to-workspace "scratch"; }
|
||||
Mod+Shift+1 { move-column-to-workspace "term"; }
|
||||
Mod+Shift+2 { move-column-to-workspace "net"; }
|
||||
Mod+Shift+3 { move-column-to-workspace "chat"; }
|
||||
Mod+Shift+4 { move-column-to-workspace 4; }
|
||||
Mod+Shift+5 { move-column-to-workspace 5; }
|
||||
Mod+Shift+6 { move-column-to-workspace 6; }
|
||||
Mod+Shift+7 { move-column-to-workspace 7; }
|
||||
Mod+Shift+8 { move-column-to-workspace 8; }
|
||||
Mod+Shift+9 { move-column-to-workspace 9; }
|
||||
|
||||
Mod+Comma { consume-window-into-column; }
|
||||
Mod+Period { expel-window-from-column; }
|
||||
|
||||
Mod+R { switch-preset-column-width; }
|
||||
Mod+Shift+R { reset-window-height; }
|
||||
// Fullscreen
|
||||
Mod+F { fullscreen-window; }
|
||||
Mod+Shift+F { maximize-column; }
|
||||
|
||||
// Floating toggle
|
||||
Mod+Space { toggle-window-floating; }
|
||||
Mod+Shift+Space { switch-focus-between-floating-and-tiling; }
|
||||
|
||||
Mod+C { center-column; }
|
||||
|
||||
Mod+bracketleft { set-column-width "-10%"; }
|
||||
Mod+bracketright { set-column-width "+10%"; }
|
||||
|
||||
Mod+Shift+bracketleft { set-window-height "-10%"; }
|
||||
Mod+Shift+bracketright { set-window-height "+10%"; }
|
||||
|
||||
//
|
||||
// Utilities
|
||||
//
|
||||
|
||||
// Notifications
|
||||
Mod+Shift+C { spawn-sh "swaync-client --toggle-panel"; }
|
||||
|
||||
// Screenshots
|
||||
Mod+P { screenshot; }
|
||||
Mod+Shift+P { screenshot-screen; }
|
||||
|
||||
// Traditional screenshot keys
|
||||
Print { screenshot; }
|
||||
Ctrl+Print { screenshot-screen; }
|
||||
Alt+Print { screenshot-window; }
|
||||
|
||||
// Volume control (via swayosd)
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "raise"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "lower"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--output-volume" "mute-toggle"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn "swayosd-client" "--input-volume" "mute-toggle"; }
|
||||
|
||||
// Caps Lock indicator (via swayosd)
|
||||
Caps_Lock { spawn "swayosd-client" "--caps-lock"; }
|
||||
|
||||
// Media control
|
||||
XF86AudioPlay { spawn "playerctl" "play-pause"; }
|
||||
XF86AudioPause { spawn "playerctl" "pause"; }
|
||||
XF86AudioNext { spawn "playerctl" "next"; }
|
||||
XF86AudioPrev { spawn "playerctl" "previous"; }
|
||||
XF86AudioStop { spawn "playerctl" "stop"; }
|
||||
|
||||
// Brightness control (via swayosd)
|
||||
XF86MonBrightnessUp { spawn "swayosd-client" "--brightness" "raise"; }
|
||||
XF86MonBrightnessDown { spawn "swayosd-client" "--brightness" "lower"; }
|
||||
|
||||
// Screen rotation
|
||||
Mod+Alt+Up { spawn "niri" "msg" "output" "eDP-1" "transform" "normal"; }
|
||||
Mod+Alt+Right { spawn "niri" "msg" "output" "eDP-1" "transform" "90"; }
|
||||
Mod+Alt+Down { spawn "niri" "msg" "output" "eDP-1" "transform" "180"; }
|
||||
Mod+Alt+Left { spawn "niri" "msg" "output" "eDP-1" "transform" "270"; }
|
||||
|
||||
Mod+Shift+Q { quit; }
|
||||
Mod+Shift+Ctrl+P { power-off-monitors; }
|
||||
|
||||
Mod+Shift+Ctrl+T { toggle-debug-tint; }
|
||||
}
|
||||
|
||||
switch-events {
|
||||
lid-close { spawn "systemctl" "suspend"; }
|
||||
lid-open { spawn "notify-send" "The laptop lid is open!"; }
|
||||
}
|
||||
@ -1,70 +1,145 @@
|
||||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
{ inputs, config, pkgs, lib, unstablePkgs, ... }:
|
||||
let
|
||||
userName = "jaci";
|
||||
fullName = "Jaci Anderson";
|
||||
email = "jaci.s.anderson@gmail.com";
|
||||
in
|
||||
{
|
||||
# nixpkgs.overlays = [
|
||||
# inputs.nur.overlay
|
||||
# ];
|
||||
|
||||
# nixpkgs.config.allowUnfree = true;
|
||||
# inputs.nixpkgs-stable.config.allowUnfree = true;
|
||||
imports = [
|
||||
../../../shared/modules/apps/firefox/firefox.nix
|
||||
../../../shared/modules/home-manager/git-autosync.nix
|
||||
../niri/niri_home.nix
|
||||
./programs.nix
|
||||
];
|
||||
|
||||
|
||||
home.username = userName;
|
||||
home.homeDirectory = "/home/${userName}";
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
firefoxApp.enable = true;
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# Stylix auto-theming - applies to all programs.<name>.enable apps
|
||||
stylix.autoEnable = true;
|
||||
|
||||
# Enable niri home configuration
|
||||
nirihome = {
|
||||
enable = true;
|
||||
homePackages = [ ];
|
||||
};
|
||||
|
||||
# Additional user packages
|
||||
# Note: Programs with Stylix theming are in programs.nix
|
||||
home.packages = with pkgs; [
|
||||
helix
|
||||
|
||||
#
|
||||
# Dev Tools
|
||||
#
|
||||
jq
|
||||
python3
|
||||
unstablePkgs.claude-code
|
||||
unstablePkgs.opencode
|
||||
### LSP's
|
||||
nil
|
||||
nodePackages_latest.bash-language-server
|
||||
vscode-langservers-extracted # provides eslint, markdown, json, css, html lsp
|
||||
python313Packages.python-lsp-server
|
||||
|
||||
#
|
||||
# Gaming
|
||||
#
|
||||
mangohud
|
||||
wine-wayland
|
||||
webcord
|
||||
mumble
|
||||
|
||||
bat
|
||||
#
|
||||
# Unix tools
|
||||
#
|
||||
duf
|
||||
dust
|
||||
fd
|
||||
fzf
|
||||
lsd
|
||||
ripgrep
|
||||
tre-command
|
||||
gtop
|
||||
htop
|
||||
neofetch
|
||||
unzip
|
||||
gnupg
|
||||
pinentry-tty
|
||||
|
||||
#
|
||||
# Photo / Video
|
||||
#
|
||||
imv
|
||||
mpv
|
||||
ffmpeg
|
||||
yt-dlp
|
||||
gimp
|
||||
|
||||
# Install fonts
|
||||
nerd-fonts.hurmit
|
||||
# TODO need to add gohu font
|
||||
#
|
||||
# Other
|
||||
#
|
||||
keepassxc
|
||||
|
||||
#
|
||||
# Style
|
||||
catppuccin-kvantum
|
||||
#
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
libsForQt5.qt5ct
|
||||
# Additional fonts (main fonts managed by Stylix)
|
||||
unstablePkgs.nerd-fonts.hurmit
|
||||
unstablePkgs.nerd-fonts.overpass
|
||||
recursive
|
||||
];
|
||||
|
||||
home.file."${config.xdg.configHome}" = {
|
||||
source = ../../dotfiles;
|
||||
recursive = true;
|
||||
#
|
||||
# Dotfiles
|
||||
#
|
||||
|
||||
# Static symlinks
|
||||
home.file = lib.mkMerge [
|
||||
# Shared dotfiles
|
||||
(let
|
||||
sharedDotfilesPath = ../../../shared/dotfiles;
|
||||
in
|
||||
if builtins.pathExists sharedDotfilesPath then
|
||||
builtins.listToAttrs (map (name: {
|
||||
name = "${config.xdg.configHome}/${name}";
|
||||
value = { source = lib.mkDefault (sharedDotfilesPath + "/${name}"); };
|
||||
}) (builtins.attrNames (builtins.readDir sharedDotfilesPath)))
|
||||
else {})
|
||||
# Add local dotfiles, overriding from local over shared
|
||||
(let
|
||||
localDotfilesPath = ../../dotfiles;
|
||||
in
|
||||
if builtins.pathExists localDotfilesPath && builtins.readDir localDotfilesPath != {} then
|
||||
builtins.listToAttrs (map (name: {
|
||||
name = "${config.xdg.configHome}/${name}";
|
||||
value = { source = localDotfilesPath + "/${name}"; };
|
||||
}) (builtins.attrNames (builtins.readDir localDotfilesPath)))
|
||||
else {})
|
||||
];
|
||||
|
||||
# Active symlinks for live-edited config
|
||||
xdg.configFile = {
|
||||
"niri".source = config.lib.file.mkOutOfStoreSymlink "/home/${userName}/nixos/jaci/linked-dotfiles/niri";
|
||||
};
|
||||
|
||||
# Override Flatpak Steam to disable GPU acceleration (fixes black window on Niri)
|
||||
xdg.desktopEntries."com.valvesoftware.Steam" = {
|
||||
name = "Steam";
|
||||
exec = "flatpak run com.valvesoftware.Steam -cef-disable-gpu %U";
|
||||
icon = "steam";
|
||||
terminal = false;
|
||||
categories = [ "Game" ];
|
||||
mimeType = [ "x-scheme-handler/steam" "x-scheme-handler/steamlink" ];
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "hx";
|
||||
# For electron apps
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
# Git setup
|
||||
@ -73,11 +148,31 @@
|
||||
settings = {
|
||||
user.name = fullName;
|
||||
user.email = email;
|
||||
init.defaultBranch = "main";
|
||||
pull.ff = "only";
|
||||
init = { defaultBranch = "main"; };
|
||||
pull = { ff = "only"; };
|
||||
merge = { conflictStyle = "zdiff3"; };
|
||||
push = { autoSetupRemote = "true"; };
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
bash.enable = true;
|
||||
delta = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
};
|
||||
};
|
||||
|
||||
# enable saving ssh secrets (needed for private repos)
|
||||
services.gnome-keyring.enable = true;
|
||||
services.gnome-keyring.components = [ "ssh" "secrets" ];
|
||||
|
||||
# Zsh setup
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
@ -87,36 +182,79 @@
|
||||
theme = "half-life";
|
||||
};
|
||||
initContent = ''
|
||||
# History
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
setopt SHARE_HISTORY
|
||||
setopt APPEND_HISTORY
|
||||
|
||||
# integrate ssh-agent from gnome keyring
|
||||
export SSH_AUTH_SOCK=/run/user/$UID/gcr/ssh
|
||||
|
||||
eval "$(direnv hook zsh)"
|
||||
|
||||
yt-audio() {
|
||||
nix-shell -p yt-dlp --run "yt-dlp -x $1 --audio-format mp3"
|
||||
}
|
||||
|
||||
# Better Unix Aliases
|
||||
alias ls="lsd"
|
||||
alias l="lsd --almost-all --long"
|
||||
alias llm="lsd --timesort --long"
|
||||
alias lS="lsd --oneline --classic"
|
||||
alias lt="lsd --tree --depth=2"
|
||||
alias grep="rg"
|
||||
alias cat="bat --paging=never"
|
||||
alias rm="rm -i"
|
||||
'';
|
||||
profileExtra = ''
|
||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share
|
||||
'';
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Stylix handles Qt and GTK theming
|
||||
|
||||
#
|
||||
# Theming qt and gnome apps
|
||||
#
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "qtct";
|
||||
style.name = "kvantum";
|
||||
services.wlsunset = {
|
||||
enable = true;
|
||||
sunrise = "07:00";
|
||||
sunset = "17:00";
|
||||
temperature.night = 3500;
|
||||
};
|
||||
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
|
||||
# Enable bluetooth headphone controls
|
||||
services.mpris-proxy.enable = true;
|
||||
|
||||
# SwayOSD - on-screen display for volume, brightness, caps lock
|
||||
services.swayosd = {
|
||||
enable = true;
|
||||
topMargin = 0.9;
|
||||
};
|
||||
|
||||
# SwayNC - notification center (Stylix auto-themes this)
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
positionX = "center";
|
||||
positionY = "top";
|
||||
notification-window-width = 800;
|
||||
};
|
||||
gtk = {
|
||||
enable = true;
|
||||
cursorTheme = {
|
||||
package = pkgs.catppuccin-cursors.latteLavender;
|
||||
name = "Catppuccin-Latte-Lavender-Cursors";
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.catppuccin-papirus-folders;
|
||||
name = "Papirus-Light";
|
||||
};
|
||||
theme = {
|
||||
name = "catppuccin-latte-lavender-compact+rimless";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
accents = [ "lavender" ];
|
||||
size = "compact";
|
||||
tweaks = [ "rimless" ];
|
||||
variant = "latte";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Git autosync for Documents
|
||||
services.git-autosync = {
|
||||
enable = true;
|
||||
repos.documents = {
|
||||
path = "/home/${userName}/Documents";
|
||||
gitName = fullName;
|
||||
gitEmail = email;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
278
jaci/modules/home-manager/programs.nix
Normal file
278
jaci/modules/home-manager/programs.nix
Normal file
@ -0,0 +1,278 @@
|
||||
# Stylix-themed program configurations
|
||||
# All programs here are managed via programs.<name>.enable for Stylix auto-theming
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
#
|
||||
# Terminals
|
||||
#
|
||||
ghostty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Font managed by Stylix, but we can override family here
|
||||
# Stylix sets font-size via stylix.fonts.sizes.terminal
|
||||
font-family = "Maple Mono NF";
|
||||
|
||||
# Ligatures - Maple Mono NF has full ligature support
|
||||
font-feature = [
|
||||
"+calt" # contextual alternates
|
||||
"+liga" # standard ligatures
|
||||
];
|
||||
|
||||
window-padding-x = 4;
|
||||
window-padding-y = 4;
|
||||
|
||||
keybind = [
|
||||
"ctrl+shift+plus=increase_font_size:1"
|
||||
"shift+enter=text:\\n"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
foot = {
|
||||
enable = true;
|
||||
# Stylix handles colors and fonts
|
||||
settings = {
|
||||
main = {
|
||||
pad = "4x4";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#
|
||||
# Editor
|
||||
#
|
||||
helix = {
|
||||
enable = true;
|
||||
# Stylix sets the theme, but we override syntax tokens for minimal highlighting
|
||||
# Philosophy: Only keywords, strings, comments, numbers get color - rest is plain text
|
||||
themes.stylix = {
|
||||
# Inherit Stylix's base theme (UI, palette, etc.)
|
||||
inherits = "stylix";
|
||||
|
||||
# Minimal syntax highlighting - only 4 categories get color
|
||||
# Comments - stand out
|
||||
"comment" = { fg = "yellow"; modifiers = ["italic"]; };
|
||||
|
||||
# Keywords - highlighted and italic
|
||||
"keyword" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
"keyword.control" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
"keyword.directive" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
"keyword.function" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
"keyword.operator" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
"keyword.return" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
"keyword.storage" = { fg = "magenta"; modifiers = ["italic"]; };
|
||||
|
||||
# Strings - highlighted
|
||||
"string" = "green";
|
||||
"string.regexp" = "red";
|
||||
"string.special" = "green";
|
||||
|
||||
# Numbers/constants - highlighted
|
||||
"constant.numeric" = "red";
|
||||
"constant.builtin" = "red";
|
||||
"constant.character.escape" = "red";
|
||||
|
||||
# Functions remain plain text
|
||||
"function" = "text";
|
||||
"function.builtin" = "text";
|
||||
"function.method" = "text";
|
||||
"function.macro" = "text";
|
||||
|
||||
# Variables remain plain text
|
||||
"variable" = "text";
|
||||
"variable.builtin" = "text";
|
||||
"variable.parameter" = "text";
|
||||
"variable.other.member" = "text";
|
||||
|
||||
# Types get subtle highlight
|
||||
"type" = { fg = "cyan"; modifiers = ["italic"]; };
|
||||
"type.builtin" = "cyan";
|
||||
|
||||
# Top-level definitions get accent
|
||||
"function.definition" = { fg = "text"; modifiers = ["bold"]; };
|
||||
"type.definition" = { fg = "text"; modifiers = ["bold"]; };
|
||||
|
||||
# Everything else plain
|
||||
"constructor" = "text";
|
||||
"attribute" = "text";
|
||||
"label" = "text";
|
||||
"namespace" = "text";
|
||||
"tag" = "text";
|
||||
|
||||
# Punctuation slightly dimmed
|
||||
"punctuation" = { fg = "text"; modifiers = ["dim"]; };
|
||||
"punctuation.bracket" = { fg = "text"; modifiers = ["dim"]; };
|
||||
"punctuation.delimiter" = { fg = "text"; modifiers = ["dim"]; };
|
||||
"punctuation.special" = { fg = "text"; modifiers = ["dim"]; };
|
||||
"operator" = { fg = "text"; modifiers = ["dim"]; };
|
||||
|
||||
# Markup
|
||||
"markup.heading" = { fg = "cyan"; modifiers = ["bold"]; };
|
||||
"markup.list" = "magenta";
|
||||
"markup.bold" = { modifiers = ["bold"]; };
|
||||
"markup.italic" = { modifiers = ["italic"]; };
|
||||
"markup.strikethrough" = { modifiers = ["crossed_out"]; };
|
||||
"markup.link.url" = { fg = "blue"; modifiers = ["underlined"]; };
|
||||
"markup.link.text" = "magenta";
|
||||
"markup.quote" = "green";
|
||||
"markup.raw" = "green";
|
||||
};
|
||||
|
||||
settings = {
|
||||
# Standard QWERTY keybindings
|
||||
keys.normal = {
|
||||
# Navigation
|
||||
"S-tab" = "jump_backward";
|
||||
"C-d" = [ "page_cursor_half_down" "align_view_center" ];
|
||||
"C-u" = [ "page_cursor_half_up" "align_view_center" ];
|
||||
|
||||
# Selection
|
||||
C-s = "split_selection_on_newline";
|
||||
C-minus = "merge_selections";
|
||||
C-_ = "merge_consecutive_selections";
|
||||
"C-;" = "flip_selections";
|
||||
"C-:" = "ensure_selections_forward";
|
||||
"C-," = "remove_primary_selection";
|
||||
|
||||
# Misc
|
||||
"C-/" = "toggle_comments";
|
||||
"@" = ":append-output git config get user.email";
|
||||
|
||||
space = {
|
||||
B = ":sh git log -n 5 --format='format:%%h (%%an: %%ar) %%s' --no-patch -L%{cursor_line},+1:%{buffer_name}";
|
||||
x = ":write-buffer-close";
|
||||
X = ":write-quit-all";
|
||||
o = ":config-open";
|
||||
h = "hover";
|
||||
k = "select_references_to_symbol_under_cursor";
|
||||
};
|
||||
|
||||
g = {
|
||||
"/" = "goto_next_buffer";
|
||||
"\\" = "goto_previous_buffer";
|
||||
};
|
||||
|
||||
m.m = [ "select_mode" "match_brackets" "normal_mode" ];
|
||||
};
|
||||
|
||||
keys.select = {
|
||||
"C-d" = [ "page_cursor_half_down" "align_view_center" ];
|
||||
"C-u" = [ "page_cursor_half_up" "align_view_center" ];
|
||||
|
||||
g = {
|
||||
"/" = "goto_next_buffer";
|
||||
"\\" = "goto_previous_buffer";
|
||||
};
|
||||
};
|
||||
|
||||
editor = {
|
||||
auto-format = true;
|
||||
auto-save = true;
|
||||
bufferline = "always";
|
||||
color-modes = true;
|
||||
completion-timeout = 5;
|
||||
cursorcolumn = true;
|
||||
cursorline = true;
|
||||
indent-heuristic = "tree-sitter";
|
||||
line-number = "relative";
|
||||
rulers = [ 120 ];
|
||||
text-width = 120;
|
||||
end-of-line-diagnostics = "hint";
|
||||
|
||||
cursor-shape = {
|
||||
insert = "bar";
|
||||
normal = "block";
|
||||
select = "underline";
|
||||
};
|
||||
|
||||
file-picker.hidden = false;
|
||||
|
||||
indent-guides.render = true;
|
||||
|
||||
inline-diagnostics = {
|
||||
cursor-line = "warning";
|
||||
other-lines = "disable";
|
||||
prefix-len = 5;
|
||||
max-diagnostics = 1;
|
||||
max-wrap = 30;
|
||||
};
|
||||
|
||||
lsp = {
|
||||
display-messages = true;
|
||||
display-inlay-hints = true;
|
||||
};
|
||||
|
||||
soft-wrap = {
|
||||
enable = true;
|
||||
max-wrap = 30;
|
||||
};
|
||||
|
||||
statusline = {
|
||||
left = [ "mode" "file-modification-indicator" "spinner" "version-control" ];
|
||||
center = [ "file-name" ];
|
||||
right = [ "diagnostics" "selections" "register" "position" "file-encoding" ];
|
||||
mode.normal = "Normal";
|
||||
mode.insert = "Insert";
|
||||
mode.select = "Select";
|
||||
};
|
||||
|
||||
whitespace.render = {
|
||||
space = "all";
|
||||
tab = "all";
|
||||
tabpad = "all";
|
||||
newline = "none";
|
||||
nbsp = "none";
|
||||
};
|
||||
|
||||
whitespace.characters = {
|
||||
space = " ";
|
||||
tab = "⇀";
|
||||
tabpad = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
languages = {
|
||||
language = [
|
||||
{
|
||||
name = "markdown";
|
||||
language-servers = [ "marksman" ];
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
language-servers = [ "nil" ];
|
||||
}
|
||||
{
|
||||
name = "python";
|
||||
language-servers = [ "pylsp" ];
|
||||
}
|
||||
];
|
||||
|
||||
language-server.ltex-ls = {
|
||||
command = "ltex-ls";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#
|
||||
# CLI Tools
|
||||
#
|
||||
bat.enable = true;
|
||||
|
||||
fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
btop.enable = true;
|
||||
|
||||
mpv.enable = true;
|
||||
|
||||
#
|
||||
# Launcher
|
||||
#
|
||||
wofi.enable = true;
|
||||
};
|
||||
}
|
||||
@ -1,162 +0,0 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
options.labwc = {
|
||||
enable = lib.mkEnableOption "Enable labwc window manager.";
|
||||
useNonFree = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to enable non-free software in the labwc config";
|
||||
};
|
||||
installGaming = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to install gaming software on the system.";
|
||||
};
|
||||
systemPackages = lib.mkOption {
|
||||
default = [];
|
||||
description = "Add any additional packages desired. Merged with labwc defaults.";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
###
|
||||
## Configuration
|
||||
###
|
||||
config = lib.mkIf config.labwc.enable {
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = config.labwc.useNonFree;
|
||||
# For R2ModMan
|
||||
# nixpkgs.config.permittedInsecurePackages = [
|
||||
# "electron-25.9.0"
|
||||
# ];
|
||||
|
||||
###
|
||||
## XDG portal setup
|
||||
###
|
||||
xdg.portal = {
|
||||
config = {
|
||||
common = {
|
||||
default = [
|
||||
"wlr"
|
||||
];
|
||||
};
|
||||
};
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
wlr.enable = true;
|
||||
enable = true;
|
||||
};
|
||||
xdg.sounds.enable = true;
|
||||
|
||||
###
|
||||
## System Packages
|
||||
###
|
||||
environment.systemPackages = with pkgs; lib.lists.flatten [
|
||||
[
|
||||
bash
|
||||
file-roller # for thunar archive plugin
|
||||
foot
|
||||
git
|
||||
glib
|
||||
grim
|
||||
sway-contrib.grimshot
|
||||
ghostscript
|
||||
labwc
|
||||
libnotify
|
||||
kanshi
|
||||
mako
|
||||
spot
|
||||
networkmanagerapplet
|
||||
nwg-dock
|
||||
nwg-drawer
|
||||
nwg-look
|
||||
pavucontrol
|
||||
slurp
|
||||
swaylock
|
||||
swayidle
|
||||
swww
|
||||
wl-clipboard
|
||||
cliphist
|
||||
waybar
|
||||
wdisplays
|
||||
xdg-utils
|
||||
zsh
|
||||
]
|
||||
config.labwc.systemPackages
|
||||
# (lib.mkIf config.labwc.installGaming [
|
||||
# pkgs.lutris
|
||||
# ])
|
||||
];
|
||||
|
||||
# Thunar config
|
||||
programs.thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [
|
||||
thunar-archive-plugin
|
||||
thunar-volman
|
||||
];
|
||||
};
|
||||
# file-roller added to environment.systemPackages above
|
||||
programs.xfconf.enable = true;
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.steam.enable = config.labwc.installGaming;
|
||||
programs.gamemode.enable = true;
|
||||
|
||||
###
|
||||
## Services
|
||||
###
|
||||
|
||||
# Printing
|
||||
services.flatpak.enable = true;
|
||||
services.printing.enable = true;
|
||||
services.printing.drivers = [ pkgs.brlaser ];
|
||||
|
||||
services.gvfs.enable = true; # thunar functionalities
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
services.dbus.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
###
|
||||
## Misc
|
||||
###
|
||||
# sound.enable = true;
|
||||
# Necessary for home-manager labwc setup
|
||||
security.polkit.enable = true;
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = rec {
|
||||
initial_session = {
|
||||
command = "${pkgs.labwc}/bin/labwc";
|
||||
user = "jaci";
|
||||
};
|
||||
default_session = initial_session;
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
# Enable HIP
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
||||
];
|
||||
hardware.graphics = {
|
||||
# Mesa
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
# Rocm support
|
||||
extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
256
jaci/modules/niri/niri_conf.nix
Normal file
256
jaci/modules/niri/niri_conf.nix
Normal file
@ -0,0 +1,256 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.niriwm = {
|
||||
enable = lib.mkEnableOption "Enable niri window manager.";
|
||||
useNonFree = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to enable non-free software in the niri config";
|
||||
};
|
||||
installGaming = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to install gaming software on the system.";
|
||||
};
|
||||
systemPackages = lib.mkOption {
|
||||
default = [ ];
|
||||
description = "Add any additional packages desired. Merged with niri defaults.";
|
||||
};
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
|
||||
###
|
||||
## Configuration
|
||||
###
|
||||
config = lib.mkIf config.niriwm.enable {
|
||||
|
||||
nixpkgs.config.allowUnfree = config.niriwm.useNonFree;
|
||||
|
||||
###
|
||||
## XDG portal setup
|
||||
###
|
||||
xdg.portal = {
|
||||
config = {
|
||||
common = {
|
||||
default = [
|
||||
"wlr"
|
||||
];
|
||||
};
|
||||
};
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gnome
|
||||
];
|
||||
wlr.enable = true;
|
||||
enable = true;
|
||||
};
|
||||
xdg.sounds.enable = true;
|
||||
|
||||
###
|
||||
## System Packages
|
||||
###
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
lib.lists.flatten [
|
||||
[
|
||||
bash
|
||||
egl-wayland
|
||||
# foot is in programs.nix for Stylix theming
|
||||
git
|
||||
glib # gsettings
|
||||
grim
|
||||
kanshi
|
||||
libnotify
|
||||
lxqt.lxqt-policykit
|
||||
man-pages
|
||||
man-pages-posix
|
||||
nautilus
|
||||
networkmanagerapplet
|
||||
nwg-drawer
|
||||
pavucontrol
|
||||
slurp
|
||||
swaylock
|
||||
swayosd
|
||||
syncthingtray
|
||||
unstable.ghostty
|
||||
unstable.xwayland-satellite
|
||||
# waybar is in programs.nix for Stylix theming
|
||||
wdisplays
|
||||
wl-clipboard
|
||||
# wofi is in programs.nix for Stylix theming
|
||||
xdg-utils
|
||||
zsh
|
||||
]
|
||||
config.niriwm.systemPackages
|
||||
];
|
||||
environment.variables.QT_STYLE_OVERRIDE = "kvantum";
|
||||
environment.sessionVariables = {
|
||||
# use wayland
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
T_QPA_PLATFORM = "wayland";
|
||||
GDK_BACKEND = "wayland";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
# VA-API driver for hardware video acceleration (Intel 13th gen)
|
||||
LIBVA_DRIVER_NAME = "iHD";
|
||||
};
|
||||
|
||||
# adds additional man pages
|
||||
documentation.dev.enable = true;
|
||||
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
reaper_freq = 5;
|
||||
desiredgov = "performance";
|
||||
softrealtime = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.kdeconnect.enable = true;
|
||||
programs.niri.enable = true;
|
||||
programs.regreet.enable = true;
|
||||
programs.xfconf.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
programs.ssh.startAgent = false; # Using GNOME Keyring's gcr-ssh-agent instead
|
||||
programs.steam.enable = config.niriwm.installGaming;
|
||||
|
||||
# For nautilus
|
||||
services.gnome.sushi.enable = true;
|
||||
programs.nautilus-open-any-terminal = {
|
||||
enable = true;
|
||||
terminal = "ghostty";
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
dataDir = "/home/${config.niriwm.user}/.syncthing";
|
||||
openDefaultPorts = true;
|
||||
user = config.niriwm.user;
|
||||
};
|
||||
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true"; # Don't create default ~/Sync folder
|
||||
|
||||
# Set zsh as the default shell system-wide
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
environment.shells = with pkgs; [
|
||||
zsh
|
||||
bash
|
||||
];
|
||||
|
||||
###
|
||||
## Services
|
||||
###
|
||||
services.blueman.enable = true;
|
||||
services.gvfs.enable = true; # file manager mount, trash, etc
|
||||
services.tumbler.enable = true; # thumbnails
|
||||
services.openssh.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
services.usbmuxd.enable = false;
|
||||
|
||||
# For yubioath desktop
|
||||
services.pcscd.enable = true;
|
||||
|
||||
# Printing
|
||||
services.printing = {
|
||||
enable = true;
|
||||
browsing = true;
|
||||
drivers = [ pkgs.brlaser ];
|
||||
};
|
||||
|
||||
# Audio - Modern PipeWire setup for Framework laptop
|
||||
# Disable PulseAudio in favor of PipeWire
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
wireplumber.extraConfig = {
|
||||
"wireplumber.settings" = {
|
||||
bluetooth.autoswitch-to-headset-profile = false;
|
||||
};
|
||||
bluetoothEnhancements = {
|
||||
"monitor.bluez.properties" = {
|
||||
"bluez5.enable-sbc-xq" = true;
|
||||
"bluez5.enable-msbc" = true;
|
||||
"bluez5.enable-hw-volume" = true;
|
||||
# Default roles
|
||||
"bluez5.roles" = [
|
||||
"a2dp_sink"
|
||||
"a2dp_source"
|
||||
"bap_sink"
|
||||
"bap_source"
|
||||
"hfp_hf"
|
||||
"hfp_ag"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###
|
||||
## Misc
|
||||
###
|
||||
# Necessary for home-manager niri setup
|
||||
security.polkit.enable = true;
|
||||
|
||||
# Keyring setup
|
||||
security.pam.services.greetd.enableGnomeKeyring = true;
|
||||
security.pam.services.login.enableGnomeKeyring = true;
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Name = "Jaci-Frame";
|
||||
ControllerMode = "dual";
|
||||
FastConnectable = "true";
|
||||
Experimental = "true";
|
||||
};
|
||||
Policy = {
|
||||
AutoEnable = "true";
|
||||
};
|
||||
LE = {
|
||||
EnableAdvMonInterleaveScan = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#
|
||||
# Hardware scanning support
|
||||
#
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
brscan5.enable = true;
|
||||
};
|
||||
|
||||
#
|
||||
# udev rules
|
||||
#
|
||||
services.udev.extraRules = ''
|
||||
# For ddcutil monitor controls
|
||||
KERNEL=="i2c-[0-9]*", GROUP="i2c", MODE="0660"
|
||||
'';
|
||||
};
|
||||
}
|
||||
64
jaci/modules/niri/niri_home.nix
Normal file
64
jaci/modules/niri/niri_home.nix
Normal file
@ -0,0 +1,64 @@
|
||||
{ inputs, lib, config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../shared/modules/home-manager/waybar.nix
|
||||
];
|
||||
|
||||
options.nirihome = {
|
||||
enable = lib.mkEnableOption "Enable niri home config";
|
||||
homePackages = lib.mkOption {
|
||||
default = [];
|
||||
description = "Add any additional packages desired. Merged with niri defaults.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.nirihome.enable {
|
||||
# Note: We don't use wayland.windowManager.niri in home-manager
|
||||
# because we manage the niri config through dotfiles.
|
||||
# The system-level module enables niri via programs.niri.enable
|
||||
|
||||
# Import systemd variables for niri
|
||||
systemd.user.sessionVariables = {
|
||||
WAYLAND_DISPLAY = "wayland-1";
|
||||
XDG_CURRENT_DESKTOP = "niri";
|
||||
};
|
||||
|
||||
# Cursor is managed by Stylix (stylix.cursor in jaci/default.nix)
|
||||
|
||||
# Waybar with Stylix theming
|
||||
waybarConfig.enable = true;
|
||||
|
||||
home.packages = with pkgs; lib.lists.flatten [
|
||||
[
|
||||
### niri packages
|
||||
swaybg
|
||||
swaylock-effects
|
||||
# Etc
|
||||
gopsuinfo # For system stats in panel
|
||||
wl-clipboard # System clipboard
|
||||
brightnessctl
|
||||
wev
|
||||
wdisplays
|
||||
# Notifs
|
||||
libnotify
|
||||
swaynotificationcenter
|
||||
# Tray Applets
|
||||
networkmanagerapplet
|
||||
pavucontrol
|
||||
syncthingtray
|
||||
tailscale-systray
|
||||
# include portals here for flatpak
|
||||
xdg-desktop-portal-gnome
|
||||
xdg-desktop-portal-gtk
|
||||
]
|
||||
config.nirihome.homePackages
|
||||
];
|
||||
|
||||
programs.cava = {
|
||||
enable = true;
|
||||
settings = {
|
||||
smoothing.noise_reduction = 55;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1,6 +1,10 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# 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.
|
||||
#
|
||||
# NOTE: This file is a template for Framework 12 Intel hardware.
|
||||
# The disk UUIDs below are placeholders and need to be updated after
|
||||
# running nixos-generate-config on the actual hardware.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
@ -8,11 +12,12 @@
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# TODO: Update these UUIDs after running nixos-generate-config on actual hardware
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
@ -21,6 +26,7 @@
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
@ -30,9 +36,7 @@
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp11s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ in
|
||||
settings = {
|
||||
font-family = cfg.fontFamily;
|
||||
|
||||
# Ligatures - Maple Mono NF has full ligature support
|
||||
# Ligatures - Maple Mono NF has full ligature support
|
||||
font-feature = lib.mkIf cfg.enableLigatures [
|
||||
"+calt" # contextual alternates
|
||||
"+liga" # standard ligatures
|
||||
|
||||
@ -103,8 +103,8 @@ in
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon} ";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
|
||||
@ -115,8 +115,8 @@ in
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = "{capacity}% ";
|
||||
format-plugged = "{capacity}% ";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-plugged = "{capacity}% ";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
};
|
||||
|
||||
clock = {
|
||||
@ -127,7 +127,7 @@ in
|
||||
|
||||
cpu = {
|
||||
interval = 5;
|
||||
format = " {usage}%";
|
||||
format = " {usage}%";
|
||||
states = {
|
||||
warning = 70;
|
||||
critical = 90;
|
||||
@ -137,7 +137,7 @@ in
|
||||
|
||||
memory = {
|
||||
interval = 5;
|
||||
format = " {}%";
|
||||
format = " {}%";
|
||||
on-click = "${cfg.terminal} -e 'htop'";
|
||||
states = {
|
||||
warning = 70;
|
||||
@ -147,8 +147,8 @@ in
|
||||
|
||||
network = {
|
||||
interval = 5;
|
||||
format-wifi = "";
|
||||
format-ethernet = " {ifname}: {ipaddr}/{cidr}";
|
||||
format-wifi = "";
|
||||
format-ethernet = " {ifname}: {ipaddr}/{cidr}";
|
||||
format-disconnected = "⚠ Disconnected";
|
||||
tooltip-format = "{essid} - {ifname}:{ipaddr} {bandwidthUpBytes} {bandwidthDownBytes}";
|
||||
on-click = "${cfg.terminal} -e 'nmtui'";
|
||||
@ -224,10 +224,10 @@ in
|
||||
all-outputs = true;
|
||||
format = " {icon} ";
|
||||
format-icons = {
|
||||
term = "";
|
||||
net = "";
|
||||
term = "";
|
||||
net = "";
|
||||
chat = "";
|
||||
scratch = "";
|
||||
scratch = "";
|
||||
"1" = " 1";
|
||||
"2" = " 2";
|
||||
"3" = " 3";
|
||||
@ -247,15 +247,15 @@ in
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = "{volume}% ";
|
||||
format-source-muted = "";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = [ "" "" "" "" "" ];
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [ "" "" "" ];
|
||||
# headphone = [ "" "" "" "" "" ];
|
||||
# hands-free = "";
|
||||
headset = "";
|
||||
# phone = "";
|
||||
# portable = "";
|
||||
# car = "";
|
||||
default = [ "" "" "" ];
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
on-scroll-up = "pactl set-sink-volume @DEFAULT_SINK@ +2%";
|
||||
@ -278,9 +278,9 @@ in
|
||||
"custom/storage" = {
|
||||
format = "{icon} {percentage}%";
|
||||
format-icons = {
|
||||
default = "";
|
||||
warning = "";
|
||||
critical = "";
|
||||
default = "";
|
||||
warning = "";
|
||||
critical = "";
|
||||
};
|
||||
exec = ''usage=$(df / --output=pcent | tail -n1 | tr -d ' %'); if [ $usage -ge 90 ]; then class="critical"; elif [ $usage -ge 75 ]; then class="warning"; else class="default"; fi; echo "{\"percentage\":$usage,\"class\":\"$class\"}"'';
|
||||
return-type = "json";
|
||||
@ -289,7 +289,7 @@ in
|
||||
};
|
||||
|
||||
"custom/launcher" = {
|
||||
format = " ";
|
||||
format = "";
|
||||
on-click = cfg.launcher;
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user