Frame12: remove some gui apps (flatpak), update deprecations, update niri configs
This commit is contained in:
parent
b22d24f619
commit
31df81b867
@ -5,7 +5,6 @@
|
|||||||
email = "n8r@tuta.io";
|
email = "n8r@tuta.io";
|
||||||
hostName = "frame12";
|
hostName = "frame12";
|
||||||
desktop = "niri";
|
desktop = "niri";
|
||||||
gaming = true;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@ -18,7 +17,6 @@
|
|||||||
userName = userName;
|
userName = userName;
|
||||||
hostName = hostName;
|
hostName = hostName;
|
||||||
de = desktop;
|
de = desktop;
|
||||||
installGaming = gaming;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Limit the number of generations to keep
|
# Limit the number of generations to keep
|
||||||
|
|||||||
@ -19,17 +19,11 @@ in
|
|||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Hostname for system";
|
description = "Hostname for system";
|
||||||
};
|
};
|
||||||
installGaming = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether to install gaming software or not";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
modules/user/main_user.nix
|
modules/user/main_user.nix
|
||||||
modules/niri/niri_conf.nix
|
modules/niri/niri_conf.nix
|
||||||
modules/niri/auto-rotation.nix
|
|
||||||
../shared/modules/system/power_manager.nix
|
../shared/modules/system/power_manager.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -112,12 +106,6 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
niri-auto-rotation = {
|
|
||||||
enable = true;
|
|
||||||
user = deskCfg.userName;
|
|
||||||
monitor = "eDP-1";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
cryptsetup
|
cryptsetup
|
||||||
cage
|
cage
|
||||||
|
|||||||
41
frame12/dotfiles/ghostty/config
Normal file
41
frame12/dotfiles/ghostty/config
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
font-size = 11
|
||||||
|
font-family = "Monaspace Xenon Var"
|
||||||
|
font-family-bold = "Monaspace Argon Var"
|
||||||
|
font-family-italic = "Monaspace Radon Var"
|
||||||
|
font-family-bold-italic = "Monaspace Krypton Var"
|
||||||
|
|
||||||
|
font-variation = wght=400
|
||||||
|
font-variation = wdth=100
|
||||||
|
font-variation = slnt=-2
|
||||||
|
|
||||||
|
font-variation-bold = wght=600
|
||||||
|
font-variation-bold = wdth=100
|
||||||
|
|
||||||
|
font-variation-italic = wght=400
|
||||||
|
font-variation-italic = wdth=100
|
||||||
|
font-variation-italic = slnt=-10
|
||||||
|
|
||||||
|
font-variation-bold-italic = wght=700
|
||||||
|
font-variation-bold-italic = wdth=100
|
||||||
|
font-variation-bold-italic = slnt=-3
|
||||||
|
|
||||||
|
# Liguratures
|
||||||
|
font-feature = +ss01, +ss02, +ss03, +ss04, +ss05, +ss06, +ss07, +ss08, +ss09, +ss10
|
||||||
|
# Enables texture healing
|
||||||
|
font-feature = +calt
|
||||||
|
font-feature = +liga
|
||||||
|
|
||||||
|
###
|
||||||
|
# Keybinds
|
||||||
|
###
|
||||||
|
|
||||||
|
keybind = ctrl+shift+plus=increase_font_size:1
|
||||||
|
# keybind = ctrl+minus=decrease_font_size:1
|
||||||
|
|
||||||
|
###
|
||||||
|
# Misc
|
||||||
|
###
|
||||||
|
|
||||||
|
window-padding-x = 4
|
||||||
|
window-padding-y = 4
|
||||||
|
keybind = shift+enter=text:\n
|
||||||
@ -1,13 +1,41 @@
|
|||||||
// Example config for Niri.
|
|
||||||
//
|
//
|
||||||
// See `man 5 niri` for the complete list of options.
|
// MISCELLANEOUS
|
||||||
|
//
|
||||||
|
|
||||||
|
// gui startup
|
||||||
|
spawn-at-startup "waybar"
|
||||||
|
spawn-at-startup "keepassxc"
|
||||||
|
spawn-at-startup "flatpak" "run" "org.signal.Signal"
|
||||||
|
// shell startup
|
||||||
|
spawn-at-startup "swayosd-server" // volume and brightness display
|
||||||
|
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"{
|
output "eDP-1"{
|
||||||
scale 1.0
|
scale 1.0
|
||||||
variable-refresh-rate
|
variable-refresh-rate
|
||||||
transform "normal"
|
transform "normal"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
workspace "net"
|
||||||
|
workspace "term"
|
||||||
|
workspace "scratch"
|
||||||
|
|
||||||
|
//
|
||||||
|
// INPUTS
|
||||||
|
//
|
||||||
input {
|
input {
|
||||||
keyboard {
|
keyboard {
|
||||||
xkb {
|
xkb {
|
||||||
@ -45,21 +73,19 @@ input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
disable-power-key-handling
|
disable-power-key-handling
|
||||||
|
warp-mouse-to-focus mode="center-xy"
|
||||||
|
focus-follows-mouse
|
||||||
}
|
}
|
||||||
|
|
||||||
output "eDP-1" {
|
//
|
||||||
scale 1.0
|
// LAYOUT
|
||||||
transform "normal"
|
//
|
||||||
position x=0 y=0
|
|
||||||
}
|
|
||||||
|
|
||||||
layout {
|
layout {
|
||||||
gaps 16
|
gaps 2
|
||||||
|
|
||||||
center-focused-column "never"
|
|
||||||
|
|
||||||
|
center-focused-column "on-overflow"
|
||||||
always-center-single-column
|
always-center-single-column
|
||||||
default-column-display "tabbed"
|
default-column-display "normal"
|
||||||
|
|
||||||
tab-indicator {
|
tab-indicator {
|
||||||
hide-when-single-tab
|
hide-when-single-tab
|
||||||
@ -76,68 +102,126 @@ layout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
focus-ring {
|
focus-ring {
|
||||||
width 4
|
width 0
|
||||||
active-color "#8aadf4"
|
|
||||||
inactive-color "#494d64"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
border {
|
border {
|
||||||
width 2
|
active-gradient from="#eaa4a8" to="#cbeaa6" angle=45 in="oklch longer hue" relative-to="workspace-view"
|
||||||
active-color "#8aadf4"
|
inactive-gradient from="#886D59" to="#517B65" angle=45 in="oklch longer hue" relative-to="workspace-view"
|
||||||
inactive-color "#494d64"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
shadow {
|
shadow {
|
||||||
softness 30
|
softness 30
|
||||||
spread 5
|
spread 5
|
||||||
offset x=0 y=5
|
offset x=8 y=8
|
||||||
draw-behind-window true
|
draw-behind-window true
|
||||||
color "#00000070"
|
color "#00444444"
|
||||||
}
|
}
|
||||||
|
|
||||||
struts {
|
struts {
|
||||||
left 64
|
left 10
|
||||||
right 64
|
right 10
|
||||||
top 64
|
top 10
|
||||||
bottom 64
|
bottom 10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prefer-no-csd
|
|
||||||
|
|
||||||
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
//
|
||||||
|
// WINDOW RULES
|
||||||
|
//
|
||||||
|
|
||||||
hotkey-overlay {
|
// All windows - corner radius, opacity
|
||||||
skip-at-startup
|
window-rule {
|
||||||
|
geometry-corner-radius 14 14 0 14
|
||||||
|
clip-to-geometry true
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
window-rule {
|
||||||
QT_QPA_PLATFORM "wayland"
|
match is-active=true
|
||||||
DISPLAY ":0"
|
opacity 0.99
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match is-floating=true
|
||||||
|
opacity 0.92
|
||||||
|
}
|
||||||
|
|
||||||
|
// Term windows
|
||||||
window-rule {
|
window-rule {
|
||||||
match app-id="com.mitchellh.ghostty"
|
match app-id="com.mitchellh.ghostty"
|
||||||
|
|
||||||
default-column-width { proportion 0.5; }
|
default-column-width { proportion 0.5; }
|
||||||
|
open-on-workspace "term"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Net windows
|
||||||
window-rule {
|
window-rule {
|
||||||
match app-id="firefox"
|
match app-id="firefox"
|
||||||
default-column-width { proportion 0.75; }
|
|
||||||
|
default-column-width { proportion 1.0; }
|
||||||
|
open-on-workspace "net"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Scratch windows (exclude unlock dialog so it can open on net)
|
||||||
window-rule {
|
window-rule {
|
||||||
match at-startup=true app-id="org.keepassxc.KeePassXC"
|
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||||
open-on-workspace "9"
|
match app-id=r#"^org\.signal\.Signal$"#
|
||||||
|
exclude app-id=r#"^org\.keepassxc\.KeePassXC$"# title="^Unlock Database - KeePassXC$"
|
||||||
|
|
||||||
|
block-out-from "screencast"
|
||||||
|
open-on-workspace "scratch"
|
||||||
}
|
}
|
||||||
|
|
||||||
spawn-at-startup "waybar"
|
// Keepass unlock dialog on Net workspace
|
||||||
spawn-at-startup "swaybg" "-i" "/home/nate/.config/niri/bg.png"
|
window-rule {
|
||||||
spawn-at-startup "nm-applet" "--indicator"
|
match app-id=r#"^org\.keepassxc\.KeePassXC$"# title="^Unlock Database - KeePassXC$"
|
||||||
spawn-at-startup "swaync"
|
|
||||||
spawn-at-startup "keepassxc"
|
open-floating true
|
||||||
spawn-at-startup "sh" "-c" "sleep 5 && syncthingtray --wait"
|
open-focused true
|
||||||
spawn-at-startup "flatpak" "run" "org.signal.Signal"
|
open-on-workspace "net"
|
||||||
|
}
|
||||||
|
|
||||||
|
// File browser
|
||||||
|
window-rule {
|
||||||
|
match app-id="org.gnome.Nautilus"
|
||||||
|
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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
|
||||||
|
//
|
||||||
|
|
||||||
binds {
|
binds {
|
||||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||||
@ -219,19 +303,20 @@ binds {
|
|||||||
Mod+Shift+Page_Down { move-workspace-down; }
|
Mod+Shift+Page_Down { move-workspace-down; }
|
||||||
Mod+Shift+Page_Up { move-workspace-up; }
|
Mod+Shift+Page_Up { move-workspace-up; }
|
||||||
|
|
||||||
Mod+1 { focus-workspace 1; }
|
Mod+Minus { focus-workspace "scratch"; }
|
||||||
Mod+2 { focus-workspace 2; }
|
Mod+1 { focus-workspace "term"; }
|
||||||
Mod+3 { focus-workspace 3; }
|
Mod+2 { focus-workspace "net"; }
|
||||||
|
Mod+3 { focus-workspace "chat"; }
|
||||||
Mod+4 { focus-workspace 4; }
|
Mod+4 { focus-workspace 4; }
|
||||||
Mod+5 { focus-workspace 5; }
|
Mod+5 { focus-workspace 5; }
|
||||||
Mod+6 { focus-workspace 6; }
|
Mod+6 { focus-workspace 6; }
|
||||||
Mod+7 { focus-workspace 7; }
|
Mod+7 { focus-workspace 7; }
|
||||||
Mod+8 { focus-workspace 8; }
|
Mod+8 { focus-workspace 8; }
|
||||||
Mod+9 { focus-workspace 9; }
|
Mod+9 { focus-workspace 9; }
|
||||||
Mod+Minus { focus-workspace "scratch"; }
|
Mod+Shift+Minus { move-column-to-workspace "scratch"; }
|
||||||
Mod+Shift+1 { move-column-to-workspace 1; }
|
Mod+Shift+1 { move-column-to-workspace "term"; }
|
||||||
Mod+Shift+2 { move-column-to-workspace 2; }
|
Mod+Shift+2 { move-column-to-workspace "net"; }
|
||||||
Mod+Shift+3 { move-column-to-workspace 3; }
|
Mod+Shift+3 { move-column-to-workspace "chat"; }
|
||||||
Mod+Shift+4 { move-column-to-workspace 4; }
|
Mod+Shift+4 { move-column-to-workspace 4; }
|
||||||
Mod+Shift+5 { move-column-to-workspace 5; }
|
Mod+Shift+5 { move-column-to-workspace 5; }
|
||||||
Mod+Shift+6 { move-column-to-workspace 6; }
|
Mod+Shift+6 { move-column-to-workspace 6; }
|
||||||
@ -248,8 +333,9 @@ binds {
|
|||||||
Mod+F { fullscreen-window; }
|
Mod+F { fullscreen-window; }
|
||||||
Mod+Shift+F { maximize-column; }
|
Mod+Shift+F { maximize-column; }
|
||||||
|
|
||||||
// Floating toggle - consistent with sway/hyprland (niri doesn't have floating, using maximize instead)
|
// Floating toggle
|
||||||
Mod+Space { maximize-column; }
|
Mod+Space { toggle-window-floating; }
|
||||||
|
Mod+Shift+Space { switch-focus-between-floating-and-tiling; }
|
||||||
|
|
||||||
Mod+C { center-column; }
|
Mod+C { center-column; }
|
||||||
|
|
||||||
@ -259,6 +345,13 @@ binds {
|
|||||||
Mod+Shift+bracketleft { set-window-height "-10%"; }
|
Mod+Shift+bracketleft { set-window-height "-10%"; }
|
||||||
Mod+Shift+bracketright { set-window-height "+10%"; }
|
Mod+Shift+bracketright { set-window-height "+10%"; }
|
||||||
|
|
||||||
|
//
|
||||||
|
// Utilities
|
||||||
|
//
|
||||||
|
|
||||||
|
// Notifications
|
||||||
|
Mod+Shift+C { spawn-sh "swaync-client --toggle-panel"; }
|
||||||
|
|
||||||
// Screenshots - consistent with sway/hyprland
|
// Screenshots - consistent with sway/hyprland
|
||||||
Mod+P { screenshot; }
|
Mod+P { screenshot; }
|
||||||
Mod+Shift+P { screenshot-screen; }
|
Mod+Shift+P { screenshot-screen; }
|
||||||
@ -268,11 +361,14 @@ binds {
|
|||||||
Ctrl+Print { screenshot-screen; }
|
Ctrl+Print { screenshot-screen; }
|
||||||
Alt+Print { screenshot-window; }
|
Alt+Print { screenshot-window; }
|
||||||
|
|
||||||
// Volume control
|
// Volume control (via swayosd)
|
||||||
XF86AudioRaiseVolume { spawn "pactl" "set-sink-volume" "@DEFAULT_SINK@" "+5%"; }
|
XF86AudioRaiseVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "raise"; }
|
||||||
XF86AudioLowerVolume { spawn "pactl" "set-sink-volume" "@DEFAULT_SINK@" "-5%"; }
|
XF86AudioLowerVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "lower"; }
|
||||||
XF86AudioMute { spawn "pactl" "set-sink-mute" "@DEFAULT_SINK@" "toggle"; }
|
XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--output-volume" "mute-toggle"; }
|
||||||
XF86AudioMicMute { spawn "pactl" "set-source-mute" "@DEFAULT_SOURCE@" "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
|
// Media control
|
||||||
XF86AudioPlay { spawn "playerctl" "play-pause"; }
|
XF86AudioPlay { spawn "playerctl" "play-pause"; }
|
||||||
@ -281,9 +377,15 @@ binds {
|
|||||||
XF86AudioPrev { spawn "playerctl" "previous"; }
|
XF86AudioPrev { spawn "playerctl" "previous"; }
|
||||||
XF86AudioStop { spawn "playerctl" "stop"; }
|
XF86AudioStop { spawn "playerctl" "stop"; }
|
||||||
|
|
||||||
// Brightness control
|
// Brightness control (via swayosd)
|
||||||
XF86MonBrightnessUp { spawn "brightnessctl" "set" "+5%"; }
|
XF86MonBrightnessUp { spawn "swayosd-client" "--brightness" "raise"; }
|
||||||
XF86MonBrightnessDown { spawn "brightnessctl" "set" "5%-"; }
|
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+Q { quit; }
|
||||||
Mod+Shift+Ctrl+P { power-off-monitors; }
|
Mod+Shift+Ctrl+P { power-off-monitors; }
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// Global
|
// Global
|
||||||
{
|
{
|
||||||
"layer": "bottom",
|
"layer": "top",
|
||||||
"position": "top",
|
"position": "top",
|
||||||
"margin-top": 3,
|
"margin-top": 3,
|
||||||
"margin-left": 3,
|
"margin-left": 3,
|
||||||
|
|||||||
@ -8,50 +8,32 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../../shared/modules/apps/firefox/firefox.nix
|
../../../shared/modules/apps/firefox/firefox.nix
|
||||||
|
../niri/niri_home.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.username = userName;
|
home.username = userName;
|
||||||
home.homeDirectory = "/home/${userName}";
|
home.homeDirectory = "/home/${userName}";
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
home.stateVersion = "25.05"; # Please read the comment before changing.
|
home.stateVersion = "25.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
|
||||||
# environment.
|
|
||||||
firefoxApp.enable = true;
|
firefoxApp.enable = true;
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
# Niri configuration will go in dotfiles
|
# Enable niri home configuration
|
||||||
# Optional, hint Electron apps to use Wayland:
|
nirihome = {
|
||||||
home.packages = with pkgs; [
|
enable = true;
|
||||||
### ---
|
homePackages = [ ];
|
||||||
### niri packages
|
};
|
||||||
swaybg
|
|
||||||
swaylock-effects
|
|
||||||
wofi
|
|
||||||
wl-clipboard # System clipboard
|
|
||||||
waybar
|
|
||||||
networkmanagerapplet
|
|
||||||
libnotify
|
|
||||||
swaynotificationcenter
|
|
||||||
syncthingtray
|
|
||||||
lynx
|
|
||||||
qutebrowser
|
|
||||||
brightnessctl
|
|
||||||
### ---
|
|
||||||
|
|
||||||
chromium
|
# Additional user packages
|
||||||
|
home.packages = with pkgs; [
|
||||||
#
|
#
|
||||||
# Dev Tools
|
# Dev Tools
|
||||||
#
|
#
|
||||||
helix
|
helix
|
||||||
ghostty
|
ghostty
|
||||||
docker
|
|
||||||
docker-compose
|
|
||||||
jq
|
jq
|
||||||
python310
|
python3
|
||||||
unstable.claude-code
|
unstable.claude-code
|
||||||
unstable.opencode
|
unstable.opencode
|
||||||
nodejs_24
|
nodejs_24
|
||||||
@ -60,22 +42,16 @@
|
|||||||
nodePackages_latest.bash-language-server
|
nodePackages_latest.bash-language-server
|
||||||
openscad-lsp
|
openscad-lsp
|
||||||
vscode-langservers-extracted # provides eslint, markdown, json, css, and html lsp
|
vscode-langservers-extracted # provides eslint, markdown, json, css, and html lsp
|
||||||
# python311Packages.python-lsp-server
|
python313Packages.python-lsp-server
|
||||||
### Misc
|
### Misc
|
||||||
usbutils
|
usbutils
|
||||||
openscad
|
|
||||||
|
|
||||||
#
|
|
||||||
# Gaming
|
|
||||||
#
|
|
||||||
webcord
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Unix tools
|
# Unix tools
|
||||||
#
|
#
|
||||||
bat
|
bat
|
||||||
duf
|
duf
|
||||||
du-dust
|
dust
|
||||||
fd
|
fd
|
||||||
fzf
|
fzf
|
||||||
lsd
|
lsd
|
||||||
@ -85,7 +61,6 @@
|
|||||||
htop
|
htop
|
||||||
neofetch
|
neofetch
|
||||||
unzip
|
unzip
|
||||||
llpp
|
|
||||||
nmap
|
nmap
|
||||||
gnupg
|
gnupg
|
||||||
pinentry-tty
|
pinentry-tty
|
||||||
@ -95,18 +70,9 @@
|
|||||||
#
|
#
|
||||||
imv
|
imv
|
||||||
mpv
|
mpv
|
||||||
gimp
|
|
||||||
ffmpeg
|
ffmpeg
|
||||||
tenacity
|
|
||||||
yt-dlp
|
yt-dlp
|
||||||
|
|
||||||
#
|
|
||||||
# Communication
|
|
||||||
#
|
|
||||||
mumble
|
|
||||||
slack
|
|
||||||
unstable.signal-desktop
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Other
|
# Other
|
||||||
#
|
#
|
||||||
@ -189,9 +155,9 @@
|
|||||||
# Git setup
|
# Git setup
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userEmail = email;
|
settings = {
|
||||||
userName = fullName;
|
user.name = fullName;
|
||||||
extraConfig = {
|
user.email = email;
|
||||||
include = { path = "${config.xdg.configHome}/macchiato.gitconfig"; };
|
include = { path = "${config.xdg.configHome}/macchiato.gitconfig"; };
|
||||||
init = { defaultBranch = "main"; };
|
init = { defaultBranch = "main"; };
|
||||||
pull = { ff = "only"; };
|
pull = { ff = "only"; };
|
||||||
@ -199,7 +165,6 @@
|
|||||||
push = { autoSetupRemote="true"; };
|
push = { autoSetupRemote="true"; };
|
||||||
delta = { features = "Catppuccin Macchiato"; };
|
delta = { features = "Catppuccin Macchiato"; };
|
||||||
};
|
};
|
||||||
delta.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
@ -210,6 +175,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
bash.enable = true; # see note on other shells below
|
bash.enable = true; # see note on other shells below
|
||||||
|
delta = {
|
||||||
|
enable = true;
|
||||||
|
enableGitIntegration = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# enable saving ssh secrets (needed for go mod installing private packages)
|
# enable saving ssh secrets (needed for go mod installing private packages)
|
||||||
@ -221,10 +190,13 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [ "git" "ssh-agent" ];
|
plugins = [ "git" ];
|
||||||
theme = "half-life";
|
theme = "half-life";
|
||||||
};
|
};
|
||||||
initContent = ''
|
initContent = ''
|
||||||
|
# integrate ssh-agent from gnome keyring
|
||||||
|
export SSH_AUTH_SOCK=/run/user/$UID/gcr/ssh
|
||||||
|
|
||||||
eval "$(direnv hook zsh)"
|
eval "$(direnv hook zsh)"
|
||||||
|
|
||||||
yt-audio() {
|
yt-audio() {
|
||||||
@ -287,4 +259,10 @@
|
|||||||
|
|
||||||
# Enable bluetooth headphone controls
|
# Enable bluetooth headphone controls
|
||||||
services.mpris-proxy.enable = true;
|
services.mpris-proxy.enable = true;
|
||||||
|
|
||||||
|
# SwayOSD - on-screen display for volume, brightness, caps lock
|
||||||
|
services.swayosd = {
|
||||||
|
enable = true;
|
||||||
|
topMargin = 0.9;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,142 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.niri-auto-rotation;
|
|
||||||
|
|
||||||
rotationScript = pkgs.writeScriptBin "niri-auto-rotate" ''
|
|
||||||
#!${pkgs.bash}/bin/bash
|
|
||||||
NIRI_CONFIG="$HOME/nixos/frame12/linked-dotfiles/niri/config.kdl"
|
|
||||||
MONITOR="eDP-1"
|
|
||||||
|
|
||||||
# Find the accelerometer device (cros-ec-accel)
|
|
||||||
ACCEL_DEVICE=""
|
|
||||||
for device in /sys/bus/iio/devices/iio:device*; do
|
|
||||||
if [ -f "$device/name" ] && ${pkgs.gnugrep}/bin/grep -q "cros-ec-accel" "$device/name"; then
|
|
||||||
ACCEL_DEVICE="$device"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "$ACCEL_DEVICE" ]; then
|
|
||||||
echo "No accelerometer found!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Using accelerometer: $ACCEL_DEVICE"
|
|
||||||
|
|
||||||
LAST_ORIENTATION=""
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
# Read accelerometer values
|
|
||||||
if [ -f "$ACCEL_DEVICE/in_accel_x_raw" ]; then
|
|
||||||
X=$(${pkgs.coreutils}/bin/cat "$ACCEL_DEVICE/in_accel_x_raw")
|
|
||||||
Y=$(${pkgs.coreutils}/bin/cat "$ACCEL_DEVICE/in_accel_y_raw")
|
|
||||||
Z=$(${pkgs.coreutils}/bin/cat "$ACCEL_DEVICE/in_accel_z_raw")
|
|
||||||
|
|
||||||
# Determine orientation based on accelerometer values
|
|
||||||
# Assuming standard orientation when lid/base orientation
|
|
||||||
ABS_X=''${X#-}
|
|
||||||
ABS_Y=''${Y#-}
|
|
||||||
ABS_Z=''${Z#-}
|
|
||||||
|
|
||||||
ORIENTATION="normal"
|
|
||||||
|
|
||||||
# Simple orientation detection based on which axis has highest absolute value
|
|
||||||
if [ "$ABS_Z" -gt 16000 ]; then
|
|
||||||
# Device is flat
|
|
||||||
if [ "$Z" -lt 0 ]; then
|
|
||||||
ORIENTATION="normal"
|
|
||||||
else
|
|
||||||
ORIENTATION="bottom-up"
|
|
||||||
fi
|
|
||||||
elif [ "$ABS_Y" -gt "$ABS_X" ] && [ "$ABS_Y" -gt 9000 ]; then
|
|
||||||
# Y axis dominant
|
|
||||||
if [ "$Y" -gt 0 ]; then
|
|
||||||
ORIENTATION="normal"
|
|
||||||
else
|
|
||||||
ORIENTATION="bottom-up"
|
|
||||||
fi
|
|
||||||
elif [ "$ABS_X" -gt 9000 ]; then
|
|
||||||
# X axis dominant
|
|
||||||
if [ "$X" -gt 0 ]; then
|
|
||||||
ORIENTATION="right-up"
|
|
||||||
else
|
|
||||||
ORIENTATION="left-up"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Only update if orientation changed
|
|
||||||
if [ "$ORIENTATION" != "$LAST_ORIENTATION" ]; then
|
|
||||||
echo "Orientation changed: $LAST_ORIENTATION -> $ORIENTATION (X=$X, Y=$Y, Z=$Z)"
|
|
||||||
LAST_ORIENTATION="$ORIENTATION"
|
|
||||||
|
|
||||||
case "$ORIENTATION" in
|
|
||||||
"normal")
|
|
||||||
${pkgs.gnused}/bin/sed -i 's/transform ".*"/transform "normal"/' "$NIRI_CONFIG"
|
|
||||||
;;
|
|
||||||
"left-up")
|
|
||||||
${pkgs.gnused}/bin/sed -i 's/transform ".*"/transform "90"/' "$NIRI_CONFIG"
|
|
||||||
;;
|
|
||||||
"right-up")
|
|
||||||
${pkgs.gnused}/bin/sed -i 's/transform ".*"/transform "270"/' "$NIRI_CONFIG"
|
|
||||||
;;
|
|
||||||
"bottom-up")
|
|
||||||
${pkgs.gnused}/bin/sed -i 's/transform ".*"/transform "180"/' "$NIRI_CONFIG"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
${pkgs.coreutils}/bin/sleep 0.5
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.niri-auto-rotation = {
|
|
||||||
enable = lib.mkEnableOption "Enable automatic screen rotation for Niri using accelerometer";
|
|
||||||
|
|
||||||
user = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "User to run the auto-rotation service for";
|
|
||||||
};
|
|
||||||
|
|
||||||
monitor = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "eDP-1";
|
|
||||||
description = "Monitor name to rotate";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
# Enable IIO sensor support
|
|
||||||
hardware.sensor.iio.enable = true;
|
|
||||||
|
|
||||||
# Add custom udev rule for Framework 12 accelerometer
|
|
||||||
services.udev.extraRules = ''
|
|
||||||
# Framework 12 accelerometer fix - ensure cros-ec-accel is recognized
|
|
||||||
SUBSYSTEM=="iio", KERNEL=="iio:device*", ATTR{name}=="cros-ec-accel", ENV{IIO_SENSOR_PROXY_TYPE}="accel"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Install required packages
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
iio-sensor-proxy
|
|
||||||
rotationScript
|
|
||||||
];
|
|
||||||
|
|
||||||
# Create systemd user service for the rotation daemon
|
|
||||||
systemd.user.services.niri-auto-rotate = {
|
|
||||||
description = "Niri automatic screen rotation";
|
|
||||||
after = [ "graphical-session.target" ];
|
|
||||||
partOf = [ "graphical-session.target" ];
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${rotationScript}/bin/niri-auto-rotate";
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = 5;
|
|
||||||
};
|
|
||||||
|
|
||||||
wantedBy = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -52,40 +52,49 @@
|
|||||||
environment.systemPackages = with pkgs; lib.lists.flatten [
|
environment.systemPackages = with pkgs; lib.lists.flatten [
|
||||||
[
|
[
|
||||||
bash
|
bash
|
||||||
ghostty
|
egl-wayland
|
||||||
|
foot
|
||||||
git
|
git
|
||||||
glib # gsettings
|
glib # gsettings
|
||||||
grim
|
grim
|
||||||
|
kanshi
|
||||||
libnotify
|
libnotify
|
||||||
|
lxqt.lxqt-policykit
|
||||||
man-pages
|
man-pages
|
||||||
man-pages-posix
|
man-pages-posix
|
||||||
nautilus
|
nautilus
|
||||||
networkmanagerapplet
|
networkmanagerapplet
|
||||||
pavucontrol
|
pavucontrol
|
||||||
slurp
|
slurp
|
||||||
syncthingtray
|
|
||||||
swaylock
|
swaylock
|
||||||
wl-clipboard
|
swayosd
|
||||||
|
syncthingtray
|
||||||
|
unstable.ghostty
|
||||||
|
unstable.xwayland-satellite
|
||||||
waybar
|
waybar
|
||||||
wdisplays
|
wdisplays
|
||||||
|
wl-clipboard
|
||||||
wofi
|
wofi
|
||||||
xdg-utils
|
xdg-utils
|
||||||
zsh
|
zsh
|
||||||
lxqt.lxqt-policykit
|
|
||||||
unstable.xwayland-satellite
|
|
||||||
# Fonts
|
# Fonts
|
||||||
]
|
]
|
||||||
config.niriwm.systemPackages
|
config.niriwm.systemPackages
|
||||||
];
|
];
|
||||||
environment.variables.QT_STYLE_OVERRIDE = "kvantum";
|
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";
|
||||||
|
};
|
||||||
|
|
||||||
# adds additional man pages
|
# adds additional man pages
|
||||||
documentation.dev.enable = true;
|
documentation.dev.enable = true;
|
||||||
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
gamescopeSession.enable = true;
|
|
||||||
};
|
|
||||||
programs.gamemode = {
|
programs.gamemode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@ -97,7 +106,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.kdeconnect.enable = true;
|
programs.kdeconnect.enable = true;
|
||||||
# programs.kdeconnect.package = pkgs.gnomeExtensions.gsconnect;
|
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
|
||||||
|
|
||||||
# For nautilus
|
# For nautilus
|
||||||
services.gnome.sushi.enable = true;
|
services.gnome.sushi.enable = true;
|
||||||
@ -105,7 +118,6 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
terminal = "ghostty";
|
terminal = "ghostty";
|
||||||
};
|
};
|
||||||
programs.xfconf.enable = true;
|
|
||||||
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -115,8 +127,6 @@
|
|||||||
};
|
};
|
||||||
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true"; # Don't create default ~/Sync folder
|
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true"; # Don't create default ~/Sync folder
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
# Set zsh as the default shell system-wide
|
# Set zsh as the default shell system-wide
|
||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
environment.shells = with pkgs; [ zsh bash ];
|
environment.shells = with pkgs; [ zsh bash ];
|
||||||
@ -124,18 +134,27 @@
|
|||||||
###
|
###
|
||||||
## Services
|
## Services
|
||||||
###
|
###
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
services.gvfs.enable = true; # thunar mount, trash, etc
|
services.gvfs.enable = true; # file manager mount, trash, etc
|
||||||
services.tumbler.enable = true; # thunar thumbnails
|
services.tumbler.enable = true; # thunar thumbnails
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
services.dbus.enable = true;
|
services.dbus.enable = true;
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
services.usbmuxd.enable = false;
|
||||||
|
|
||||||
# For yubioath desktop
|
# For yubioath desktop
|
||||||
services.pcscd.enable = true;
|
services.pcscd.enable = true;
|
||||||
|
|
||||||
|
# Printing
|
||||||
|
services.printing = {
|
||||||
|
enable = true;
|
||||||
|
browsing = true;
|
||||||
|
drivers = [ pkgs.brlaser ];
|
||||||
|
};
|
||||||
|
|
||||||
# Audio - Modern PipeWire setup for Framework laptop
|
# Audio - Modern PipeWire setup for Framework laptop
|
||||||
# Disable PulseAudio in favor of PipeWire
|
# Disable PulseAudio in favor of PipeWire
|
||||||
services.flatpak.enable = true;
|
|
||||||
services.pulseaudio.enable = false;
|
services.pulseaudio.enable = false;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
@ -167,15 +186,43 @@
|
|||||||
# Necessary for home-manager niri setup
|
# Necessary for home-manager niri setup
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
# Keyring setup
|
||||||
|
security.pam.services.greetd.enableGnomeKeyring = true;
|
||||||
|
security.pam.services.login.enableGnomeKeyring = true;
|
||||||
|
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true; # enables support for Bluetooth
|
enable = true;
|
||||||
powerOnBoot = true; # powers up the default Bluetooth controller on boot
|
powerOnBoot = true; # powers up the default Bluetooth controller on boot
|
||||||
settings = {
|
settings = {
|
||||||
General = {
|
General = {
|
||||||
Enable = "Source,Sink,Media,Socket";
|
Name = "Nate-Frame";
|
||||||
Experimental = true;
|
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 betaflight configurator
|
||||||
|
# DFU (Internal bootloader for STM32 and AT32 MCUs)
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
|
||||||
|
# For ddcutil monitor controls
|
||||||
|
KERNEL=="i2c-[0-9]*", GROUP="i2c", MODE="0660"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
64
frame12/modules/niri/niri_home.nix
Normal file
64
frame12/modules/niri/niri_home.nix
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{ inputs, lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.pointerCursor = {
|
||||||
|
gtk.enable = true;
|
||||||
|
x11.enable = true;
|
||||||
|
name = "Bibata-Modern-Classic";
|
||||||
|
package = pkgs.bibata-cursors;
|
||||||
|
size = 32;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; lib.lists.flatten [
|
||||||
|
[
|
||||||
|
### niri packages
|
||||||
|
swaybg
|
||||||
|
swaylock-effects
|
||||||
|
waybar
|
||||||
|
wofi
|
||||||
|
# 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -68,6 +68,8 @@ input {
|
|||||||
accel-profile "adaptive"
|
accel-profile "adaptive"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warp-mouse-to-focus mode="center-xy"
|
||||||
|
focus-follows-mouse
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user