Merge branch 'main' of ssh://codeberg.org/dnscio/nix-config

This commit is contained in:
Dennis 2025-11-26 09:40:12 +01:00
commit e71f952507
11 changed files with 178 additions and 24 deletions

View file

@ -33,6 +33,7 @@
nautilus-open-any-terminal nautilus-open-any-terminal
swaynotificationcenter swaynotificationcenter
gimp gimp
wl-clipboard
]; ];
imports = [ imports = [
@ -41,10 +42,11 @@
../modules/zoxide ../modules/zoxide
../modules/direnv ../modules/direnv
../modules/nvim ../modules/nvim
../modules/wezterm ../modules/ghostty
../modules/fish ../modules/fish
../modules/firefox ../modules/firefox
../modules/wm/swaync ../modules/wm/swaync
../modules/wm/cliphist
../modules/wm/awww ../modules/wm/awww
../modules/wm/fuzzel ../modules/wm/fuzzel
../modules/wm/ironbar ../modules/wm/ironbar

View file

@ -151,6 +151,14 @@
enableSSHSupport = true; enableSSHSupport = true;
}; };
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-gnome
];
};
# Services # Services
# Pipewire # Pipewire
@ -198,8 +206,21 @@
# Tailscale # Tailscale
services.tailscale.enable = true; services.tailscale.enable = true;
# Printing
services.printing.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
# Environment & session variables # Environment & session variables
environment.variables.EDITOR = "nvim"; environment.variables = {
EDITOR = "nvim";
SYSTEMD_EDITOR = "nvim";
VISUAL = "nvim";
};
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default

View file

@ -0,0 +1,79 @@
{
programs.ghostty = {
enable = true;
enableFishIntegration = true;
installVimSyntax = true;
systemd.enable = true;
clearDefaultKeybinds = true;
settings = {
theme = "Catppuccin Mocha";
font-size = 15;
font-family = "VictorMono NF SemiBold";
background-opacity = 0.94;
window-padding-x = 12;
window-padding-y = 12;
window-padding-balance = true;
window-inherit-working-directory = true;
window-theme = "ghostty";
copy-on-select = "clipboard";
shell-integration-features = true;
scrollback-limit = 100000;
link-url = true;
link-previews = true;
background = "#0f0b15";
foreground = "#ffffff";
cursor-color = "#d369af";
selection-foreground = "#af85ea";
selection-background = "#572454";
palette = [
"0=#0f0b15"
"1=#f47359"
"2=#29a444"
"3=#b58a52"
"4=#3f95f6"
"5=#d369af"
"6=#4fbaef"
"7=#b8c6d5"
"8=#807c9f"
"9=#ff6a7a"
"10=#00a392"
"11=#df9080"
"12=#029fff"
"13=#af85ea"
"14=#35afbf"
"15=#ffffff"
];
keybind = [
"ctrl+b>s=new_split:auto"
"ctrl+b>minus=new_split:down"
"ctrl+b>v=new_split:right"
"ctrl+b>h=goto_split:left"
"ctrl+b>j=goto_split:down"
"ctrl+b>k=goto_split:up"
"ctrl+b>l=goto_split:right"
"ctrl+b>z=toggle_split_zoom"
"ctrl+b>c=new_tab"
"ctrl+b>x=close_surface"
"ctrl+b>1=goto_tab:1"
"ctrl+b>2=goto_tab:2"
"ctrl+b>3=goto_tab:3"
"ctrl+b>4=goto_tab:4"
"ctrl+b>5=goto_tab:5"
"ctrl+b>6=goto_tab:6"
"ctrl+b>7=goto_tab:7"
"ctrl+b>8=goto_tab:8"
"ctrl+b>9=goto_tab:9"
"ctrl+b>p=toggle_command_palette"
"ctrl+shift+u=scroll_page_lines:-40"
"ctrl+shift+d=scroll_page_lines:40"
"ctrl+plus=increase_font_size:2"
"ctrl+minus=decrease_font_size:2"
"ctrl+0=reset_font_size"
"ctrl+shift+a=select_all"
"ctrl+shift+c=copy_to_clipboard"
"ctrl+shift+v=paste_from_clipboard"
"global:cmd+semicolon=toggle_quick_terminal"
];
};
};
}

View file

@ -0,0 +1,9 @@
{ ... }:
{
services.cliphist = {
enable = true;
allowImages = true;
systemdTargets = [ "graphical-session.target" ];
};
}

View file

@ -1,6 +1,23 @@
{ pkgs, ... }: { config, pkgs, ... }:
{ {
xdg.configFile."fuzzel/bin" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/fuzzel/scripts";
};
xdg.desktopEntries = {
fuzzel-ssh = {
type = "Application";
name = "SSH";
exec = "${config.home.homeDirectory}/.config/fuzzel/bin/fuzzel-ssh.sh";
};
fuzzel-cliphist = {
type = "Application";
name = "Clipboard History";
exec = "${config.home.homeDirectory}/.config/fuzzel/bin/fuzzel-cliphist.sh";
};
};
programs.fuzzel = { programs.fuzzel = {
enable = true; enable = true;
settings = { settings = {
@ -17,11 +34,11 @@
vertical-pad = 20; vertical-pad = 20;
inner-pad = 25; inner-pad = 25;
image-size-ratio = 1; image-size-ratio = 1;
prompt = "Open: ";
}; };
colors = { colors = {
background = "0f0b15f5"; background = "0f0b15f5";
text = "ffffffff"; text = "ffffffff";
message = "bf8a9fff";
prompt = "807c9fff"; prompt = "807c9fff";
input = "ffffffff"; input = "ffffffff";
match = "c57fafff"; match = "c57fafff";

View file

@ -0,0 +1,3 @@
#!/bin/sh
cliphist list | fuzzel --dmenu --prompt "Copy: " | cliphist decode | awk '{$1=$1};1' | head -c -1 | wl-copy

View file

@ -0,0 +1,8 @@
#!/bin/sh
fish_executable="/run/current-system/sw/bin/fish"
selected=$(cat ~/.ssh/config | grep "Host " | cut -d " " -f 2 | sort | tail -n +2 | fuzzel --dmenu --prompt "Connect to: ")
if [ "$selected" != "" ]; then
ghostty -e "$fish_executable" -c "ssh $selected"
fi

View file

@ -1,6 +1,25 @@
{ {
services.displayManager = { services.displayManager = {
enable = true; enable = true;
ly.enable = true; ly = {
enable = true;
settings = {
animation = "doom";
animation_timeout_sec = 30;
asterisk = "0x2022";
bigclock = "en";
default_input = "password";
doom_fire_height = 1;
doom_top_color = "0x00c57faf";
doom_middle_color = "0x00d369af";
doom_bottom_color = "0x00572454";
session_log = ".local/share/ly-session.log";
vi_mode = true;
vi_default_mode = "insert";
bg = "0x000f0b15";
border_fg = "0x00807c9f";
box-title = "dnsc-machine";
};
};
}; };
} }

View file

@ -185,6 +185,7 @@ layout {
// STARTUP // STARTUP
spawn-at-startup "swaync" spawn-at-startup "swaync"
spawn-at-startup "swww-daemon" spawn-at-startup "swww-daemon"
spawn-at-startup "ironbar"
spawn-sh-at-startup "~/.config/awww/bin/random-bg.sh ~/Pictures/Wallpapers/safe/dark" spawn-sh-at-startup "~/.config/awww/bin/random-bg.sh ~/Pictures/Wallpapers/safe/dark"
hotkey-overlay { hotkey-overlay {
@ -245,16 +246,6 @@ window-rule {
// open-on-workspace "chat" // open-on-workspace "chat"
// } // }
// Work around WezTerm's initial configure bug
// by setting an empty default-column-width.
// window-rule {
// // This regular expression is intentionally made as specific as possible,
// // since this is the default config, and we want no false positives.
// // You can get away with just app-id="wezterm" if you want.
// match app-id=r#"^org\.wezfurlong\.wezterm$"#
// default-column-width {}
// }
// Open the Firefox picture-in-picture player as floating by default. // Open the Firefox picture-in-picture player as floating by default.
window-rule { window-rule {
// This app-id regular expression will work for both: // This app-id regular expression will work for both:
@ -304,11 +295,12 @@ binds {
Mod+Shift+Slash { show-hotkey-overlay; } Mod+Shift+Slash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker. // Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+Return hotkey-overlay-title="Open a terminal" { spawn "wezterm"; } Mod+T hotkey-overlay-title="Open a terminal" { spawn "ghostty +new-window"; }
Mod+Space hotkey-overlay-title="Launcher" { spawn "fuzzel"; } Mod+Space hotkey-overlay-title="Launcher" { spawn "fuzzel"; }
Mod+B hotkey-overlay-title="Browser" { spawn "firefox"; } Mod+B hotkey-overlay-title="Browser" { spawn "firefox"; }
Mod+M hotkey-overlay-title="System Monitor" { spawn-sh "wezterm start -- btop"; } Mod+M hotkey-overlay-title="System Monitor" { spawn-sh "ghostty -e btop"; }
Mod+N hotkey-overlay-title="File Manager" { spawn "nautilus"; } Mod+N hotkey-overlay-title="File Manager" { spawn "nautilus"; }
Mod+V hotkey-overlay-title="Clipboard" { spawn-sh "~/.config/fuzzel/bin/fuzzel-cliphist.sh"; }
Mod+Alt+L hotkey-overlay-title="Lock the Screen: hyprlock" { spawn "hyprlock"; } Mod+Alt+L hotkey-overlay-title="Lock the Screen: hyprlock" { spawn "hyprlock"; }
// Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc.
@ -506,8 +498,8 @@ binds {
Mod+Shift+Equal { set-window-height "+10%"; } Mod+Shift+Equal { set-window-height "+10%"; }
// Move the focused window between the floating and the tiling layout. // Move the focused window between the floating and the tiling layout.
Mod+V { toggle-window-floating; } Mod+Shift+S { toggle-window-floating; }
Mod+Shift+V { switch-focus-between-floating-and-tiling; } // Mod+Shift+V { switch-focus-between-floating-and-tiling; }
// Toggle tabbed column display mode. // Toggle tabbed column display mode.
// Windows in this column will appear as vertical tabs, // Windows in this column will appear as vertical tabs,

View file

@ -10,7 +10,5 @@
services.polkit-gnome.enable = true; services.polkit-gnome.enable = true;
# WM Utilities (split out if they need additional config) # WM Utilities (split out if they need additional config)
# TODO configure ironbar
programs.hyprlock.enable = true; programs.hyprlock.enable = true;
# TODO: Install idle manager
} }

View file

@ -32,6 +32,10 @@
@define-color silver #b8c6d5; @define-color silver #b8c6d5;
@define-color silver_bright #ffffff; @define-color silver_bright #ffffff;
* {
font-family: "VictorMono NF SemiBold";
}
notificationwindow, blankwindow, blankwindow { notificationwindow, blankwindow, blankwindow {
background: transparent; background: transparent;
} }
@ -438,14 +442,16 @@ notificationwindow, blankwindow, blankwindow {
.widget-buttons-grid flowboxchild > button { .widget-buttons-grid flowboxchild > button {
padding: 12px 0; padding: 12px 0;
margin: 8px; margin: 8px;
background-color: @magenta_subtle_bg_darker; background-color: @magenta;
color: @magenta_brighter; color: @fg;
opacity: 1; opacity: 1;
} }
.widget-buttons-grid flowboxchild > button:hover { .widget-buttons-grid flowboxchild > button:hover {
padding: 12px 0; padding: 12px 0;
background-color: @magenta_subtle_bg; background-color: @magenta;
box-shadow: inset 0px 0px 15px 3px rgba(0,0,0,0.8);
transition: none;
color: @fg; color: @fg;
} }