mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 16:16:50 +01:00
refactor: desktop legacy module
This commit is contained in:
parent
5f56c011ab
commit
d463f4d1af
31 changed files with 630 additions and 577 deletions
|
|
@ -42,6 +42,7 @@ with lib; let
|
||||||
inputs.niri.nixosModules.niri
|
inputs.niri.nixosModules.niri
|
||||||
../modules/base
|
../modules/base
|
||||||
../modules/programs
|
../modules/programs
|
||||||
|
../modules/desktop
|
||||||
(mkSystemImports hostname)
|
(mkSystemImports hostname)
|
||||||
{nixpkgs.config.allowUnfree = true;}
|
{nixpkgs.config.allowUnfree = true;}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
3
hosts/desktop/configuration.nix
Normal file
3
hosts/desktop/configuration.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
fireproof.desktop.enable = true;
|
||||||
|
}
|
||||||
3
hosts/laptop/configuration copy.nix
Normal file
3
hosts/laptop/configuration copy.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
fireproof.desktop.enable = true;
|
||||||
|
}
|
||||||
3
hosts/work/configuration.nix
Normal file
3
hosts/work/configuration.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
fireproof.desktop.enable = true;
|
||||||
|
}
|
||||||
2
justfile
2
justfile
|
|
@ -36,7 +36,7 @@ switch hostname=`hostname -s` target='':
|
||||||
#!/usr/bin/env -S bash -e
|
#!/usr/bin/env -S bash -e
|
||||||
target="{{ target }}"
|
target="{{ target }}"
|
||||||
if [ -z "$target" ]; then
|
if [ -z "$target" ]; then
|
||||||
sudo {{ nixcmd }} run nixpkgs#nixos-rebuild -- switch --fast --flake .#{{ hostname }} {{ nix_output_monitor }}
|
sudo {{ nixcmd }} run nixpkgs#nixos-rebuild -- switch --show-trace --fast --flake .#{{ hostname }}
|
||||||
else
|
else
|
||||||
{{ nixcmd }} run nixpkgs#nixos-rebuild -- switch \
|
{{ nixcmd }} run nixpkgs#nixos-rebuild -- switch \
|
||||||
--flake .#{{ hostname }} \
|
--flake .#{{ hostname }} \
|
||||||
|
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
./theme.nix
|
|
||||||
./background.nix
|
|
||||||
./bar.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.user.services.niri-flake-polkit.enable = false;
|
|
||||||
|
|
||||||
fireproof.home-manager = {
|
|
||||||
imports = [
|
|
||||||
inputs.dankMaterialShell.homeModules.dankMaterialShell.default
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.dankMaterialShell = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
enableDynamicTheming = false;
|
|
||||||
enableClipboard = false;
|
|
||||||
enableVPN = false;
|
|
||||||
enableCalendarEvents = false;
|
|
||||||
|
|
||||||
default.settings = {
|
|
||||||
# General Settings
|
|
||||||
weatherCoordinates = "56.1496278,10.2134046";
|
|
||||||
|
|
||||||
# Lock Screen
|
|
||||||
loginctlLockIntegration = true;
|
|
||||||
fadeToLockEnabled = true;
|
|
||||||
fadeToLockGracePeriod = 5;
|
|
||||||
|
|
||||||
acMonitorTimeout = 1800;
|
|
||||||
acLockTimeout = 600;
|
|
||||||
acSuspendTimeout = 0;
|
|
||||||
batteryMonitorTimeout = 600;
|
|
||||||
batteryLockTimeout = 300;
|
|
||||||
batterySuspendTimeout = 1800;
|
|
||||||
|
|
||||||
# Power Menu
|
|
||||||
powerMenuActions = [
|
|
||||||
"reboot"
|
|
||||||
"logout"
|
|
||||||
"poweroff"
|
|
||||||
"lock"
|
|
||||||
"suspend"
|
|
||||||
];
|
|
||||||
powerMenuDefaultAction = "lock";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services = {
|
|
||||||
# A hack to always serve fresh settings from default-settings.json
|
|
||||||
dms-clean-settings = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Delete DankMaterialShell settings before dms starts";
|
|
||||||
Before = ["dms.service"];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = "${pkgs.coreutils}/bin/rm -f %h/.config/DankMaterialShell/settings.json";
|
|
||||||
};
|
|
||||||
Install.WantedBy = ["dms.service"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
{username, ...}: {
|
|
||||||
fireproof.home-manager = {
|
|
||||||
home.file.".config/DankMaterialShell/colors.json".text = builtins.toJSON {
|
|
||||||
name = "custom";
|
|
||||||
primary = "#CF6A4C";
|
|
||||||
primaryText = "#F2F0E5";
|
|
||||||
primaryContainer = "#403E3C";
|
|
||||||
secondary = "#CE5D97";
|
|
||||||
surface = "#343331";
|
|
||||||
surfaceText = "#DAD8CE";
|
|
||||||
surfaceVariant = "#1C1B1A";
|
|
||||||
surfaceVariantText = "#B7B5AC";
|
|
||||||
surfaceTint = "#CF6A4C";
|
|
||||||
background = "#100F0F";
|
|
||||||
backgroundText = "#F2F0E5";
|
|
||||||
outline = "#878580";
|
|
||||||
surfaceContainer = "#1C1B1A";
|
|
||||||
surfaceContainerHigh = "#282726";
|
|
||||||
surfaceContainerHighest = "#403E3C";
|
|
||||||
error = "#D14D41";
|
|
||||||
warning = "#D0A215";
|
|
||||||
info = "#4385BE";
|
|
||||||
matugen_type = "scheme-expressive";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.dankMaterialShell.default.settings = {
|
|
||||||
# Color theme
|
|
||||||
currentThemeName = "custom";
|
|
||||||
customThemeFile = "/home/${username}/.config/DankMaterialShell/colors.json";
|
|
||||||
widgetBackgroundColor = "sth";
|
|
||||||
widgetColorMode = "default";
|
|
||||||
|
|
||||||
# General
|
|
||||||
cornerRadius = 8;
|
|
||||||
|
|
||||||
# Font
|
|
||||||
fontFamily = "Inter Variable";
|
|
||||||
monoFontFamily = "Hack Nerd Font Mono";
|
|
||||||
fontWeight = 400;
|
|
||||||
fontScale = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
fonts.enableDefaultPackages = true;
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
nerd-fonts.hack
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
default_session = {
|
|
||||||
command = "${pkgs.tuigreet}/bin/tuigreet --user-menu";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nautilus
|
|
||||||
gnome-photos
|
|
||||||
];
|
|
||||||
|
|
||||||
services.gvfs.enable = true;
|
|
||||||
programs = {
|
|
||||||
dconf.enable = true;
|
|
||||||
nautilus-open-any-terminal.enable = true;
|
|
||||||
seahorse.enable = true;
|
|
||||||
evince.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.gnome.sushi.enable = true;
|
|
||||||
|
|
||||||
fireproof.home-manager = {
|
|
||||||
home.pointerCursor = {
|
|
||||||
gtk.enable = true;
|
|
||||||
name = "Adwaita";
|
|
||||||
package = pkgs.adwaita-icon-theme;
|
|
||||||
size = 24;
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk = {
|
|
||||||
enable = true;
|
|
||||||
theme = {
|
|
||||||
name = "adw-gtk3-dark";
|
|
||||||
package = pkgs.adw-gtk3;
|
|
||||||
};
|
|
||||||
iconTheme = {
|
|
||||||
name = "Qogir-dark";
|
|
||||||
package = pkgs.qogir-icon-theme;
|
|
||||||
};
|
|
||||||
|
|
||||||
gtk3.extraConfig = {gtk-application-prefer-dark-theme = true;};
|
|
||||||
gtk3.extraCss = builtins.readFile ./theme.css;
|
|
||||||
|
|
||||||
gtk4.extraConfig = {gtk-application-prefer-dark-theme = true;};
|
|
||||||
gtk4.extraCss = builtins.readFile ./theme.css;
|
|
||||||
};
|
|
||||||
dconf = {
|
|
||||||
enable = true;
|
|
||||||
settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,326 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
primaryMonitorName = (builtins.head config.monitors).name or "";
|
|
||||||
in {
|
|
||||||
# TODO: Move these to a separate module
|
|
||||||
programs.xwayland.enable = true;
|
|
||||||
|
|
||||||
fireproof.home-manager.programs.waybar = {
|
|
||||||
enable = true;
|
|
||||||
systemd.enable = true;
|
|
||||||
systemd.target = "niri.target";
|
|
||||||
settings = {
|
|
||||||
bar = {
|
|
||||||
layer = "top";
|
|
||||||
position = "top";
|
|
||||||
modules-left = ["clock" "niri/workspaces"];
|
|
||||||
modules-center = ["niri/window"];
|
|
||||||
modules-right = ["backlight" "battery" "pulseaudio" "tray"];
|
|
||||||
|
|
||||||
pulseaudio = {
|
|
||||||
format = "{volume}% {icon}";
|
|
||||||
format-muted = " ";
|
|
||||||
format-icons = {
|
|
||||||
default = [" " " " " "];
|
|
||||||
headphone = " ";
|
|
||||||
};
|
|
||||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
style = ''
|
|
||||||
* {
|
|
||||||
font-family: Hack Nerd Font Mono;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
window#waybar, #clock, #pulseaudio, #battery, #backlight, #tray {
|
|
||||||
background: #1C1B1A;
|
|
||||||
color: #DAD8CE;
|
|
||||||
border-bottom: 2px solid #CF6A4C;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.focused {
|
|
||||||
background: #CF6A4C;
|
|
||||||
color: #1C1B1A;
|
|
||||||
box-shadow: 0 0 0 #CF6A4C;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Default */
|
|
||||||
button {
|
|
||||||
/* Use box-shadow instead of border so the text isn't offset */
|
|
||||||
box-shadow: inset 0 -3px transparent;
|
|
||||||
/* Avoid rounded borders under each button name */
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
|
||||||
button:hover {
|
|
||||||
background: inherit;
|
|
||||||
box-shadow: inset 0 -3px #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* you can set a style on hover for any module like this */
|
|
||||||
#pulseaudio:hover {
|
|
||||||
background-color: #a37800;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button {
|
|
||||||
padding: 0 5px;
|
|
||||||
background-color: transparent;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button:hover {
|
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.urgent {
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window,
|
|
||||||
#workspaces {
|
|
||||||
margin: 0 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#tray > .passive {
|
|
||||||
-gtk-icon-effect: dim;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray > .needs-attention {
|
|
||||||
-gtk-icon-effect: highlight;
|
|
||||||
background-color: #eb4d4b;
|
|
||||||
}'';
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
|
||||||
config.common.default = "gnome";
|
|
||||||
xdgOpenUsePortal = true;
|
|
||||||
};
|
|
||||||
programs.niri = {
|
|
||||||
enable = true;
|
|
||||||
package = inputs.niri.packages."${pkgs.system}".niri-unstable;
|
|
||||||
};
|
|
||||||
fireproof.home-manager.programs.niri.settings = {
|
|
||||||
prefer-no-csd = true;
|
|
||||||
clipboard.disable-primary = true;
|
|
||||||
spawn-at-startup = [
|
|
||||||
{command = ["systemctl" "--user" "start" "hypridle"];}
|
|
||||||
{command = ["systemctl" "--user" "start" "hyprpaper"];}
|
|
||||||
{command = ["systemctl" "--user" "start" "mako"];}
|
|
||||||
{command = ["systemctl" "--user" "start" "waybar"];}
|
|
||||||
];
|
|
||||||
xwayland-satellite = {
|
|
||||||
enable = true;
|
|
||||||
path = lib.getExe inputs.niri.packages."${pkgs.system}".xwayland-satellite-unstable;
|
|
||||||
};
|
|
||||||
environment = {
|
|
||||||
NIXOS_OZONE_WL = "1";
|
|
||||||
GDK_BACKEND = "wayland"; # Attempt to fix screen recording issue
|
|
||||||
};
|
|
||||||
layout = {
|
|
||||||
gaps = 10;
|
|
||||||
focus-ring.enable = false;
|
|
||||||
insert-hint.display.color = "#CF6A4C";
|
|
||||||
border = {
|
|
||||||
enable = true;
|
|
||||||
width = 2;
|
|
||||||
active.color = "#CF6A4C";
|
|
||||||
inactive.color = "#343331";
|
|
||||||
};
|
|
||||||
tab-indicator = {
|
|
||||||
hide-when-single-tab = true;
|
|
||||||
place-within-column = true;
|
|
||||||
gap = 2;
|
|
||||||
position = "top";
|
|
||||||
corner-radius = 8;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
input = {
|
|
||||||
focus-follows-mouse = {
|
|
||||||
enable = true;
|
|
||||||
max-scroll-amount = "0%";
|
|
||||||
};
|
|
||||||
mouse.accel-profile = "flat";
|
|
||||||
keyboard.xkb.layout = "eu";
|
|
||||||
};
|
|
||||||
window-rules = [
|
|
||||||
{
|
|
||||||
clip-to-geometry = true;
|
|
||||||
geometry-corner-radius = {
|
|
||||||
top-left = 8.0;
|
|
||||||
top-right = 8.0;
|
|
||||||
bottom-left = 8.0;
|
|
||||||
bottom-right = 8.0;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
workspaces = lib.mkIf (primaryMonitorName != "") {
|
|
||||||
"01" = {
|
|
||||||
open-on-output = primaryMonitorName;
|
|
||||||
};
|
|
||||||
"02" = {
|
|
||||||
open-on-output = primaryMonitorName;
|
|
||||||
};
|
|
||||||
"03" = {
|
|
||||||
open-on-output = primaryMonitorName;
|
|
||||||
};
|
|
||||||
"04" = {
|
|
||||||
open-on-output = primaryMonitorName;
|
|
||||||
};
|
|
||||||
"05" = {
|
|
||||||
open-on-output = primaryMonitorName;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
binds = {
|
|
||||||
"XF86AudioRaiseVolume" = {
|
|
||||||
allow-when-locked = true;
|
|
||||||
action.spawn = ["dms" "ipc" "audio" "increment" "3"];
|
|
||||||
};
|
|
||||||
"XF86AudioLowerVolume" = {
|
|
||||||
allow-when-locked = true;
|
|
||||||
action.spawn = ["dms" "ipc" "audio" "decrement" "3"];
|
|
||||||
};
|
|
||||||
"XF86AudioMute" = {
|
|
||||||
allow-when-locked = true;
|
|
||||||
action.spawn = ["dms" "ipc" "audio" "mute"];
|
|
||||||
};
|
|
||||||
"XF86AudioMicMute" = {
|
|
||||||
allow-when-locked = true;
|
|
||||||
action.spawn = ["dms" "ipc" "audio" "micmute"];
|
|
||||||
};
|
|
||||||
"XF86MonBrightnessUp" = {
|
|
||||||
allow-when-locked = true;
|
|
||||||
action.spawn = ["dms" "ipc" "brightness" "increment" "5"];
|
|
||||||
};
|
|
||||||
"XF86MonBrightnessDown" = {
|
|
||||||
allow-when-locked = true;
|
|
||||||
action.spawn = ["dms" "ipc" "brightness" "decrement" "5"];
|
|
||||||
};
|
|
||||||
"Mod+N" = {
|
|
||||||
action.spawn = ["dms" "ipc" "notifications" "toggle"];
|
|
||||||
hotkey-overlay.title = "Toggle Notification Center";
|
|
||||||
};
|
|
||||||
"Mod+V" = {
|
|
||||||
action.spawn = ["dms" "ipc" "clipboard" "toggle"];
|
|
||||||
hotkey-overlay.title = "Toggle Clipboard Manager";
|
|
||||||
};
|
|
||||||
"Mod+Space" = {
|
|
||||||
action.spawn = ["dms" "ipc" "spotlight" "toggle"];
|
|
||||||
hotkey-overlay.title = "Toggle Application Launcher";
|
|
||||||
};
|
|
||||||
"Mod+P" = {
|
|
||||||
action.spawn = ["dms" "ipc" "powermenu" "toggle"];
|
|
||||||
hotkey-overlay.title = "Toggle Power Menu";
|
|
||||||
};
|
|
||||||
|
|
||||||
"Mod+Left".action.focus-column-or-monitor-left = {};
|
|
||||||
"Mod+Down".action.focus-window-or-monitor-down = {};
|
|
||||||
"Mod+Up".action.focus-window-or-monitor-up = {};
|
|
||||||
"Mod+Right".action.focus-column-or-monitor-right = {};
|
|
||||||
"Mod+H".action.focus-column-or-monitor-left = {};
|
|
||||||
"Mod+J".action.focus-window-or-monitor-down = {};
|
|
||||||
"Mod+K".action.focus-window-or-monitor-up = {};
|
|
||||||
"Mod+L".action.focus-column-or-monitor-right = {};
|
|
||||||
|
|
||||||
"Mod+Shift+Left".action.move-column-left-or-to-monitor-left = {};
|
|
||||||
"Mod+Shift+Down".action.move-window-down = {};
|
|
||||||
"Mod+Shift+Up".action.move-window-up = {};
|
|
||||||
"Mod+Shift+Right".action.move-column-right-or-to-monitor-right = {};
|
|
||||||
"Mod+Shift+H".action.move-column-left-or-to-monitor-left = {};
|
|
||||||
"Mod+Shift+J".action.move-window-down = {};
|
|
||||||
"Mod+Shift+K".action.move-window-up = {};
|
|
||||||
"Mod+Shift+L".action.move-column-right-or-to-monitor-right = {};
|
|
||||||
|
|
||||||
"Mod+Home".action.focus-column-first = {};
|
|
||||||
"Mod+End".action.focus-column-last = {};
|
|
||||||
"Mod+Shift+Home".action.move-column-to-first = {};
|
|
||||||
"Mod+Shift+End".action.move-column-to-last = {};
|
|
||||||
|
|
||||||
"Mod+Ctrl+Left".action.focus-monitor-left = {};
|
|
||||||
"Mod+Ctrl+Down".action.focus-monitor-down = {};
|
|
||||||
"Mod+Ctrl+Up".action.focus-monitor-up = {};
|
|
||||||
"Mod+Ctrl+Right".action.focus-monitor-right = {};
|
|
||||||
"Mod+Ctrl+H".action.focus-monitor-left = {};
|
|
||||||
"Mod+Ctrl+J".action.focus-monitor-down = {};
|
|
||||||
"Mod+Ctrl+K".action.focus-monitor-up = {};
|
|
||||||
"Mod+Ctrl+L".action.focus-monitor-right = {};
|
|
||||||
|
|
||||||
"Mod+F".action.maximize-column = {};
|
|
||||||
"Mod+Shift+F".action.fullscreen-window = {};
|
|
||||||
"Mod+M".action.toggle-column-tabbed-display = {};
|
|
||||||
"Mod+A".action.toggle-overview = {};
|
|
||||||
"Mod+S".action.toggle-window-floating = {};
|
|
||||||
"Mod+C".action.switch-preset-column-width = {};
|
|
||||||
|
|
||||||
"Mod+Z".action.set-column-width = "-5%";
|
|
||||||
"Mod+X".action.set-column-width = "+5%";
|
|
||||||
"Mod+Ctrl+X".action.expand-column-to-available-width = {};
|
|
||||||
"Mod+Shift+Z".action.set-window-height = "-5%";
|
|
||||||
"Mod+Shift+X".action.set-window-height = "+5%";
|
|
||||||
|
|
||||||
"Mod+Shift+WheelScrollDown".action.focus-workspace-down = {};
|
|
||||||
"Mod+Shift+WheelScrollUp".action.focus-workspace-up = {};
|
|
||||||
"Mod+WheelScrollDown".action.focus-column-right = {};
|
|
||||||
"Mod+WheelScrollUp".action.focus-column-left = {};
|
|
||||||
|
|
||||||
"Mod+WheelScrollRight".action.focus-column-right = {};
|
|
||||||
"Mod+WheelScrollLeft".action.focus-column-left = {};
|
|
||||||
"Mod+Shift+WheelScrollRight".action.move-column-right = {};
|
|
||||||
"Mod+Shift+WheelScrollLeft".action.move-column-left = {};
|
|
||||||
|
|
||||||
"Mod+q".action.focus-workspace = "01";
|
|
||||||
"Mod+w".action.focus-workspace = "02";
|
|
||||||
"Mod+e".action.focus-workspace = "03";
|
|
||||||
"Mod+r".action.focus-workspace = "04";
|
|
||||||
"Mod+t".action.focus-workspace = "05";
|
|
||||||
"Mod+Shift+q".action.move-column-to-workspace = "01";
|
|
||||||
"Mod+Shift+w".action.move-column-to-workspace = "02";
|
|
||||||
"Mod+Shift+e".action.move-column-to-workspace = "03";
|
|
||||||
"Mod+Shift+r".action.move-column-to-workspace = "04";
|
|
||||||
"Mod+Shift+t".action.move-column-to-workspace = "05";
|
|
||||||
|
|
||||||
"Mod+Comma".action.consume-or-expel-window-left = {};
|
|
||||||
"Mod+Period".action.consume-or-expel-window-right = {};
|
|
||||||
|
|
||||||
"Print".action.screenshot = {};
|
|
||||||
"Ctrl+Print".action.screenshot-screen = {};
|
|
||||||
"Alt+Print".action.screenshot-window = {};
|
|
||||||
|
|
||||||
"Mod+Slash".action.show-hotkey-overlay = {};
|
|
||||||
|
|
||||||
"Mod+Return".action.spawn = ["ghostty"];
|
|
||||||
"Mod+Backspace".action.close-window = {};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = lib.mkIf (config.monitors != []) (
|
|
||||||
lib.listToAttrs (map (monitor: {
|
|
||||||
inherit (monitor) name;
|
|
||||||
value = {
|
|
||||||
inherit (monitor) position;
|
|
||||||
mode = {
|
|
||||||
inherit (monitor.resolution) width height;
|
|
||||||
refresh = monitor.refreshRateNiri or null;
|
|
||||||
};
|
|
||||||
focus-at-startup = monitor.name == primaryMonitorName;
|
|
||||||
transform.rotation =
|
|
||||||
if (monitor.transform != null)
|
|
||||||
then monitor.transform * 90
|
|
||||||
else 0;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
config.monitors)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
_: {
|
|
||||||
qt = {
|
|
||||||
enable = true;
|
|
||||||
platformTheme = "gnome";
|
|
||||||
style = "adwaita-dark";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
{
|
|
||||||
pkgsUnstable,
|
|
||||||
username,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
age.secrets.llm-api-key = {
|
|
||||||
rekeyFile = ../../secrets/llm-api-key.env.age;
|
|
||||||
mode = "0600";
|
|
||||||
owner = username;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgsUnstable; [
|
|
||||||
aider-chat
|
|
||||||
];
|
|
||||||
fireproof.home-manager = {
|
|
||||||
home.file.".aider.conf.yml".text = ''
|
|
||||||
# Aider configuration file
|
|
||||||
# This file is used to configure the Aider chat client
|
|
||||||
# It is a YAML file
|
|
||||||
sonnet: true
|
|
||||||
env-file: ${config.age.secrets.llm-api-key.path}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -9,7 +9,6 @@
|
||||||
./dev/docker.nix
|
./dev/docker.nix
|
||||||
./dev/tilt.nix
|
./dev/tilt.nix
|
||||||
./dev/postgres.nix
|
./dev/postgres.nix
|
||||||
./dev/aider.nix
|
|
||||||
./dev/clickhouse.nix
|
./dev/clickhouse.nix
|
||||||
./dev/playwright.nix
|
./dev/playwright.nix
|
||||||
./dev/nats.nix
|
./dev/nats.nix
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,5 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware/monitors.nix
|
|
||||||
./hardware/audio.nix
|
|
||||||
./desktop/fonts.nix
|
|
||||||
./desktop/greetd.nix
|
|
||||||
./desktop/niri.nix
|
|
||||||
./desktop/gtk/default.nix
|
|
||||||
./desktop/qt.nix
|
|
||||||
./desktop/dms/default.nix
|
|
||||||
./desktop/screenshot.nix
|
|
||||||
./apps/spotify.nix
|
./apps/spotify.nix
|
||||||
./apps/firefox.nix
|
./apps/firefox.nix
|
||||||
./apps/chromium.nix
|
./apps/chromium.nix
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
_: {
|
{ lib, config, ... }: {
|
||||||
config = {
|
config = lib.mkIf config.fireproof.desktop.enable {
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
26
modules/desktop/default.nix
Normal file
26
modules/desktop/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
options.fireproof.desktop = {
|
||||||
|
enable = lib.mkEnableOption "Enable desktop environment with niri, greetd, and all desktop features";
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./monitors.nix
|
||||||
|
./audio.nix
|
||||||
|
./fonts.nix
|
||||||
|
./greetd.nix
|
||||||
|
./niri.nix
|
||||||
|
./qt.nix
|
||||||
|
./screenshot.nix
|
||||||
|
./gtk/default.nix
|
||||||
|
./dms/default.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
config = lib.mkIf config.fireproof.desktop.enable {
|
||||||
|
# All desktop-related configuration is handled by the individual modules
|
||||||
|
# which check for fireproof.desktop.enable
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
background = pkgs.stdenvNoCC.mkDerivation {
|
background = pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
|
@ -34,24 +35,26 @@
|
||||||
geometryPng
|
geometryPng
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
fireproof.home-manager = {
|
config = lib.mkIf config.fireproof.desktop.enable {
|
||||||
# Use hyprpaper as we can't currently set wallpapers through DMS
|
fireproof.home-manager = {
|
||||||
services.hyprpaper = {
|
# Use hyprpaper as we can't currently set wallpapers through DMS
|
||||||
enable = true;
|
services.hyprpaper = {
|
||||||
settings = {
|
enable = true;
|
||||||
preload = pngs;
|
settings = {
|
||||||
wallpaper = [",${builtins.head pngs}"];
|
preload = pngs;
|
||||||
|
wallpaper = [",${builtins.head pngs}"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
programs.dankMaterialShell.default.settings = {
|
programs.dankMaterialShell.default.settings = {
|
||||||
# Disables wallpaper management in DMS to avoid conflicts with Hyprpaper
|
# Disables wallpaper management in DMS to avoid conflicts with Hyprpaper
|
||||||
screenPreferences.wallpaper = [];
|
screenPreferences.wallpaper = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.dankMaterialShell.default.session = {
|
programs.dankMaterialShell.default.session = {
|
||||||
# Attempt to set a default wallpaper on first run
|
# Attempt to set a default wallpaper on first run
|
||||||
wallpaperPath = unknownPng;
|
wallpaperPath = unknownPng;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 410 B |
|
Before Width: | Height: | Size: 282 KiB After Width: | Height: | Size: 282 KiB |
|
|
@ -1,4 +1,8 @@
|
||||||
{config, ...}: let
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
commonBarSettings = {
|
commonBarSettings = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
position = 0;
|
position = 0;
|
||||||
|
|
@ -74,18 +78,20 @@
|
||||||
}
|
}
|
||||||
// commonBarSettings;
|
// commonBarSettings;
|
||||||
in {
|
in {
|
||||||
fireproof.home-manager = {
|
config = lib.mkIf config.fireproof.desktop.enable {
|
||||||
programs.dankMaterialShell.default.settings = {
|
fireproof.home-manager = {
|
||||||
launcherLogoMode = "os";
|
programs.dankMaterialShell.default.settings = {
|
||||||
launcherLogoContrast = 1;
|
launcherLogoMode = "os";
|
||||||
launcherLogoSizeOffset = 3;
|
launcherLogoContrast = 1;
|
||||||
|
launcherLogoSizeOffset = 3;
|
||||||
|
|
||||||
centeringMode = "geometric";
|
centeringMode = "geometric";
|
||||||
|
|
||||||
runningAppsCurrentWorkspace = true;
|
runningAppsCurrentWorkspace = true;
|
||||||
runningAppsGroupByApp = true;
|
runningAppsGroupByApp = true;
|
||||||
|
|
||||||
barConfigs = [primaryBar secondaryBar];
|
barConfigs = [primaryBar secondaryBar];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
74
modules/desktop/dms/default.nix
Normal file
74
modules/desktop/dms/default.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./theme.nix
|
||||||
|
./background.nix
|
||||||
|
./bar.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
config = lib.mkIf config.fireproof.desktop.enable {
|
||||||
|
systemd.user.services.niri-flake-polkit.enable = false;
|
||||||
|
|
||||||
|
fireproof.home-manager = {
|
||||||
|
imports = [
|
||||||
|
inputs.dankMaterialShell.homeModules.dankMaterialShell.default
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.dankMaterialShell = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
enableDynamicTheming = false;
|
||||||
|
enableClipboard = false;
|
||||||
|
enableVPN = false;
|
||||||
|
enableCalendarEvents = false;
|
||||||
|
|
||||||
|
default.settings = {
|
||||||
|
# General Settings
|
||||||
|
weatherCoordinates = "56.1496278,10.2134046";
|
||||||
|
|
||||||
|
# Lock Screen
|
||||||
|
loginctlLockIntegration = true;
|
||||||
|
fadeToLockEnabled = true;
|
||||||
|
fadeToLockGracePeriod = 5;
|
||||||
|
|
||||||
|
acMonitorTimeout = 1800;
|
||||||
|
acLockTimeout = 600;
|
||||||
|
acSuspendTimeout = 0;
|
||||||
|
batteryMonitorTimeout = 600;
|
||||||
|
batteryLockTimeout = 300;
|
||||||
|
batterySuspendTimeout = 1800;
|
||||||
|
|
||||||
|
# Power Menu
|
||||||
|
powerMenuActions = [
|
||||||
|
"reboot"
|
||||||
|
"logout"
|
||||||
|
"poweroff"
|
||||||
|
"lock"
|
||||||
|
"suspend"
|
||||||
|
];
|
||||||
|
powerMenuDefaultAction = "lock";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services = {
|
||||||
|
# A hack to always serve fresh settings from default-settings.json
|
||||||
|
dms-clean-settings = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Delete DankMaterialShell settings before dms starts";
|
||||||
|
Before = ["dms.service"];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.coreutils}/bin/rm -f %h/.config/DankMaterialShell/settings.json";
|
||||||
|
};
|
||||||
|
Install.WantedBy = ["dms.service"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
50
modules/desktop/dms/theme.nix
Normal file
50
modules/desktop/dms/theme.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config = lib.mkIf config.fireproof.desktop.enable {
|
||||||
|
fireproof.home-manager = {
|
||||||
|
home.file.".config/DankMaterialShell/colors.json".text = builtins.toJSON {
|
||||||
|
name = "custom";
|
||||||
|
primary = "#CF6A4C";
|
||||||
|
primaryText = "#F2F0E5";
|
||||||
|
primaryContainer = "#403E3C";
|
||||||
|
secondary = "#CE5D97";
|
||||||
|
surface = "#343331";
|
||||||
|
surfaceText = "#DAD8CE";
|
||||||
|
surfaceVariant = "#1C1B1A";
|
||||||
|
surfaceVariantText = "#B7B5AC";
|
||||||
|
surfaceTint = "#CF6A4C";
|
||||||
|
background = "#100F0F";
|
||||||
|
backgroundText = "#F2F0E5";
|
||||||
|
outline = "#878580";
|
||||||
|
surfaceContainer = "#1C1B1A";
|
||||||
|
surfaceContainerHigh = "#282726";
|
||||||
|
surfaceContainerHighest = "#403E3C";
|
||||||
|
error = "#D14D41";
|
||||||
|
warning = "#D0A215";
|
||||||
|
info = "#4385BE";
|
||||||
|
matugen_type = "scheme-expressive";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.dankMaterialShell.default.settings = {
|
||||||
|
# Color theme
|
||||||
|
currentThemeName = "custom";
|
||||||
|
customThemeFile = "/home/${username}/.config/DankMaterialShell/colors.json";
|
||||||
|
widgetBackgroundColor = "sth";
|
||||||
|
widgetColorMode = "default";
|
||||||
|
|
||||||
|
# General
|
||||||
|
cornerRadius = 8;
|
||||||
|
|
||||||
|
# Font
|
||||||
|
fontFamily = "Inter Variable";
|
||||||
|
monoFontFamily = "Hack Nerd Font Mono";
|
||||||
|
fontWeight = 400;
|
||||||
|
fontScale = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
modules/desktop/fonts.nix
Normal file
13
modules/desktop/fonts.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config = lib.mkIf config.fireproof.desktop.enable {
|
||||||
|
fonts.enableDefaultPackages = true;
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
nerd-fonts.hack
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
17
modules/desktop/greetd.nix
Normal file
17
modules/desktop/greetd.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config = lib.mkIf config.fireproof.desktop.enable {
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command = "${pkgs.tuigreet}/bin/tuigreet --user-menu";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
54
modules/desktop/gtk/default.nix
Normal file
54
modules/desktop/gtk/default.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config = lib.mkIf config.fireproof.desktop.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nautilus
|
||||||
|
gnome-photos
|
||||||
|
];
|
||||||
|
|
||||||
|
services.gvfs.enable = true;
|
||||||
|
programs = {
|
||||||
|
dconf.enable = true;
|
||||||
|
nautilus-open-any-terminal.enable = true;
|
||||||
|
seahorse.enable = true;
|
||||||
|
evince.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.gnome.sushi.enable = true;
|
||||||
|
|
||||||
|
fireproof.home-manager = {
|
||||||
|
home.pointerCursor = {
|
||||||
|
gtk.enable = true;
|
||||||
|
name = "Adwaita";
|
||||||
|
package = pkgs.adwaita-icon-theme;
|
||||||
|
size = 24;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "adw-gtk3-dark";
|
||||||
|
package = pkgs.adw-gtk3;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Qogir-dark";
|
||||||
|
package = pkgs.qogir-icon-theme;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk3.extraConfig = {gtk-application-prefer-dark-theme = true;};
|
||||||
|
gtk3.extraCss = builtins.readFile ./theme.css;
|
||||||
|
|
||||||
|
gtk4.extraConfig = {gtk-application-prefer-dark-theme = true;};
|
||||||
|
gtk4.extraCss = builtins.readFile ./theme.css;
|
||||||
|
};
|
||||||
|
dconf = {
|
||||||
|
enable = true;
|
||||||
|
settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
328
modules/desktop/niri.nix
Normal file
328
modules/desktop/niri.nix
Normal file
|
|
@ -0,0 +1,328 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
primaryMonitorName = (builtins.head config.monitors).name or "";
|
||||||
|
in {
|
||||||
|
config = lib.mkIf config.fireproof.desktop.enable {
|
||||||
|
# TODO: Move these to a separate module
|
||||||
|
programs.xwayland.enable = true;
|
||||||
|
|
||||||
|
fireproof.home-manager.programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
systemd.enable = true;
|
||||||
|
systemd.target = "niri.target";
|
||||||
|
settings = {
|
||||||
|
bar = {
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
modules-left = ["clock" "niri/workspaces"];
|
||||||
|
modules-center = ["niri/window"];
|
||||||
|
modules-right = ["backlight" "battery" "pulseaudio" "tray"];
|
||||||
|
|
||||||
|
pulseaudio = {
|
||||||
|
format = "{volume}% {icon}";
|
||||||
|
format-muted = " ";
|
||||||
|
format-icons = {
|
||||||
|
default = [" " " " " "];
|
||||||
|
headphone = " ";
|
||||||
|
};
|
||||||
|
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: Hack Nerd Font Mono;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
window#waybar, #clock, #pulseaudio, #battery, #backlight, #tray {
|
||||||
|
background: #1C1B1A;
|
||||||
|
color: #DAD8CE;
|
||||||
|
border-bottom: 2px solid #CF6A4C;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
background: #CF6A4C;
|
||||||
|
color: #1C1B1A;
|
||||||
|
box-shadow: 0 0 0 #CF6A4C;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Default */
|
||||||
|
button {
|
||||||
|
/* Use box-shadow instead of border so the text isn't offset */
|
||||||
|
box-shadow: inset 0 -3px transparent;
|
||||||
|
/* Avoid rounded borders under each button name */
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||||
|
button:hover {
|
||||||
|
background: inherit;
|
||||||
|
box-shadow: inset 0 -3px #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* you can set a style on hover for any module like this */
|
||||||
|
#pulseaudio:hover {
|
||||||
|
background-color: #a37800;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 5px;
|
||||||
|
background-color: transparent;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window,
|
||||||
|
#workspaces {
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#tray > .passive {
|
||||||
|
-gtk-icon-effect: dim;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .needs-attention {
|
||||||
|
-gtk-icon-effect: highlight;
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}'';
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||||
|
config.common.default = "gnome";
|
||||||
|
xdgOpenUsePortal = true;
|
||||||
|
};
|
||||||
|
programs.niri = {
|
||||||
|
enable = true;
|
||||||
|
package = inputs.niri.packages."${pkgs.system}".niri-unstable;
|
||||||
|
};
|
||||||
|
fireproof.home-manager.programs.niri.settings = {
|
||||||
|
prefer-no-csd = true;
|
||||||
|
clipboard.disable-primary = true;
|
||||||
|
spawn-at-startup = [
|
||||||
|
{command = ["systemctl" "--user" "start" "hypridle"];}
|
||||||
|
{command = ["systemctl" "--user" "start" "hyprpaper"];}
|
||||||
|
{command = ["systemctl" "--user" "start" "mako"];}
|
||||||
|
{command = ["systemctl" "--user" "start" "waybar"];}
|
||||||
|
];
|
||||||
|
xwayland-satellite = {
|
||||||
|
enable = true;
|
||||||
|
path = lib.getExe inputs.niri.packages."${pkgs.system}".xwayland-satellite-unstable;
|
||||||
|
};
|
||||||
|
environment = {
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
GDK_BACKEND = "wayland"; # Attempt to fix screen recording issue
|
||||||
|
};
|
||||||
|
layout = {
|
||||||
|
gaps = 10;
|
||||||
|
focus-ring.enable = false;
|
||||||
|
insert-hint.display.color = "#CF6A4C";
|
||||||
|
border = {
|
||||||
|
enable = true;
|
||||||
|
width = 2;
|
||||||
|
active.color = "#CF6A4C";
|
||||||
|
inactive.color = "#343331";
|
||||||
|
};
|
||||||
|
tab-indicator = {
|
||||||
|
hide-when-single-tab = true;
|
||||||
|
place-within-column = true;
|
||||||
|
gap = 2;
|
||||||
|
position = "top";
|
||||||
|
corner-radius = 8;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
input = {
|
||||||
|
focus-follows-mouse = {
|
||||||
|
enable = true;
|
||||||
|
max-scroll-amount = "0%";
|
||||||
|
};
|
||||||
|
mouse.accel-profile = "flat";
|
||||||
|
keyboard.xkb.layout = "eu";
|
||||||
|
};
|
||||||
|
window-rules = [
|
||||||
|
{
|
||||||
|
clip-to-geometry = true;
|
||||||
|
geometry-corner-radius = {
|
||||||
|
top-left = 8.0;
|
||||||
|
top-right = 8.0;
|
||||||
|
bottom-left = 8.0;
|
||||||
|
bottom-right = 8.0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
workspaces = lib.mkIf (primaryMonitorName != "") {
|
||||||
|
"01" = {
|
||||||
|
open-on-output = primaryMonitorName;
|
||||||
|
};
|
||||||
|
"02" = {
|
||||||
|
open-on-output = primaryMonitorName;
|
||||||
|
};
|
||||||
|
"03" = {
|
||||||
|
open-on-output = primaryMonitorName;
|
||||||
|
};
|
||||||
|
"04" = {
|
||||||
|
open-on-output = primaryMonitorName;
|
||||||
|
};
|
||||||
|
"05" = {
|
||||||
|
open-on-output = primaryMonitorName;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
binds = {
|
||||||
|
"XF86AudioRaiseVolume" = {
|
||||||
|
allow-when-locked = true;
|
||||||
|
action.spawn = ["dms" "ipc" "audio" "increment" "3"];
|
||||||
|
};
|
||||||
|
"XF86AudioLowerVolume" = {
|
||||||
|
allow-when-locked = true;
|
||||||
|
action.spawn = ["dms" "ipc" "audio" "decrement" "3"];
|
||||||
|
};
|
||||||
|
"XF86AudioMute" = {
|
||||||
|
allow-when-locked = true;
|
||||||
|
action.spawn = ["dms" "ipc" "audio" "mute"];
|
||||||
|
};
|
||||||
|
"XF86AudioMicMute" = {
|
||||||
|
allow-when-locked = true;
|
||||||
|
action.spawn = ["dms" "ipc" "audio" "micmute"];
|
||||||
|
};
|
||||||
|
"XF86MonBrightnessUp" = {
|
||||||
|
allow-when-locked = true;
|
||||||
|
action.spawn = ["dms" "ipc" "brightness" "increment" "5"];
|
||||||
|
};
|
||||||
|
"XF86MonBrightnessDown" = {
|
||||||
|
allow-when-locked = true;
|
||||||
|
action.spawn = ["dms" "ipc" "brightness" "decrement" "5"];
|
||||||
|
};
|
||||||
|
"Mod+N" = {
|
||||||
|
action.spawn = ["dms" "ipc" "notifications" "toggle"];
|
||||||
|
hotkey-overlay.title = "Toggle Notification Center";
|
||||||
|
};
|
||||||
|
"Mod+V" = {
|
||||||
|
action.spawn = ["dms" "ipc" "clipboard" "toggle"];
|
||||||
|
hotkey-overlay.title = "Toggle Clipboard Manager";
|
||||||
|
};
|
||||||
|
"Mod+Space" = {
|
||||||
|
action.spawn = ["dms" "ipc" "spotlight" "toggle"];
|
||||||
|
hotkey-overlay.title = "Toggle Application Launcher";
|
||||||
|
};
|
||||||
|
"Mod+P" = {
|
||||||
|
action.spawn = ["dms" "ipc" "powermenu" "toggle"];
|
||||||
|
hotkey-overlay.title = "Toggle Power Menu";
|
||||||
|
};
|
||||||
|
|
||||||
|
"Mod+Left".action.focus-column-or-monitor-left = {};
|
||||||
|
"Mod+Down".action.focus-window-or-monitor-down = {};
|
||||||
|
"Mod+Up".action.focus-window-or-monitor-up = {};
|
||||||
|
"Mod+Right".action.focus-column-or-monitor-right = {};
|
||||||
|
"Mod+H".action.focus-column-or-monitor-left = {};
|
||||||
|
"Mod+J".action.focus-window-or-monitor-down = {};
|
||||||
|
"Mod+K".action.focus-window-or-monitor-up = {};
|
||||||
|
"Mod+L".action.focus-column-or-monitor-right = {};
|
||||||
|
|
||||||
|
"Mod+Shift+Left".action.move-column-left-or-to-monitor-left = {};
|
||||||
|
"Mod+Shift+Down".action.move-window-down = {};
|
||||||
|
"Mod+Shift+Up".action.move-window-up = {};
|
||||||
|
"Mod+Shift+Right".action.move-column-right-or-to-monitor-right = {};
|
||||||
|
"Mod+Shift+H".action.move-column-left-or-to-monitor-left = {};
|
||||||
|
"Mod+Shift+J".action.move-window-down = {};
|
||||||
|
"Mod+Shift+K".action.move-window-up = {};
|
||||||
|
"Mod+Shift+L".action.move-column-right-or-to-monitor-right = {};
|
||||||
|
|
||||||
|
"Mod+Home".action.focus-column-first = {};
|
||||||
|
"Mod+End".action.focus-column-last = {};
|
||||||
|
"Mod+Shift+Home".action.move-column-to-first = {};
|
||||||
|
"Mod+Shift+End".action.move-column-to-last = {};
|
||||||
|
|
||||||
|
"Mod+Ctrl+Left".action.focus-monitor-left = {};
|
||||||
|
"Mod+Ctrl+Down".action.focus-monitor-down = {};
|
||||||
|
"Mod+Ctrl+Up".action.focus-monitor-up = {};
|
||||||
|
"Mod+Ctrl+Right".action.focus-monitor-right = {};
|
||||||
|
"Mod+Ctrl+H".action.focus-monitor-left = {};
|
||||||
|
"Mod+Ctrl+J".action.focus-monitor-down = {};
|
||||||
|
"Mod+Ctrl+K".action.focus-monitor-up = {};
|
||||||
|
"Mod+Ctrl+L".action.focus-monitor-right = {};
|
||||||
|
|
||||||
|
"Mod+F".action.maximize-column = {};
|
||||||
|
"Mod+Shift+F".action.fullscreen-window = {};
|
||||||
|
"Mod+M".action.toggle-column-tabbed-display = {};
|
||||||
|
"Mod+A".action.toggle-overview = {};
|
||||||
|
"Mod+S".action.toggle-window-floating = {};
|
||||||
|
"Mod+C".action.switch-preset-column-width = {};
|
||||||
|
|
||||||
|
"Mod+Z".action.set-column-width = "-5%";
|
||||||
|
"Mod+X".action.set-column-width = "+5%";
|
||||||
|
"Mod+Ctrl+X".action.expand-column-to-available-width = {};
|
||||||
|
"Mod+Shift+Z".action.set-window-height = "-5%";
|
||||||
|
"Mod+Shift+X".action.set-window-height = "+5%";
|
||||||
|
|
||||||
|
"Mod+Shift+WheelScrollDown".action.focus-workspace-down = {};
|
||||||
|
"Mod+Shift+WheelScrollUp".action.focus-workspace-up = {};
|
||||||
|
"Mod+WheelScrollDown".action.focus-column-right = {};
|
||||||
|
"Mod+WheelScrollUp".action.focus-column-left = {};
|
||||||
|
|
||||||
|
"Mod+WheelScrollRight".action.focus-column-right = {};
|
||||||
|
"Mod+WheelScrollLeft".action.focus-column-left = {};
|
||||||
|
"Mod+Shift+WheelScrollRight".action.move-column-right = {};
|
||||||
|
"Mod+Shift+WheelScrollLeft".action.move-column-left = {};
|
||||||
|
|
||||||
|
"Mod+q".action.focus-workspace = "01";
|
||||||
|
"Mod+w".action.focus-workspace = "02";
|
||||||
|
"Mod+e".action.focus-workspace = "03";
|
||||||
|
"Mod+r".action.focus-workspace = "04";
|
||||||
|
"Mod+t".action.focus-workspace = "05";
|
||||||
|
"Mod+Shift+q".action.move-column-to-workspace = "01";
|
||||||
|
"Mod+Shift+w".action.move-column-to-workspace = "02";
|
||||||
|
"Mod+Shift+e".action.move-column-to-workspace = "03";
|
||||||
|
"Mod+Shift+r".action.move-column-to-workspace = "04";
|
||||||
|
"Mod+Shift+t".action.move-column-to-workspace = "05";
|
||||||
|
|
||||||
|
"Mod+Comma".action.consume-or-expel-window-left = {};
|
||||||
|
"Mod+Period".action.consume-or-expel-window-right = {};
|
||||||
|
|
||||||
|
"Print".action.screenshot = {};
|
||||||
|
"Ctrl+Print".action.screenshot-screen = {};
|
||||||
|
"Alt+Print".action.screenshot-window = {};
|
||||||
|
|
||||||
|
"Mod+Slash".action.show-hotkey-overlay = {};
|
||||||
|
|
||||||
|
"Mod+Return".action.spawn = ["ghostty"];
|
||||||
|
"Mod+Backspace".action.close-window = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = lib.mkIf (config.monitors != []) (
|
||||||
|
lib.listToAttrs (map (monitor: {
|
||||||
|
inherit (monitor) name;
|
||||||
|
value = {
|
||||||
|
inherit (monitor) position;
|
||||||
|
mode = {
|
||||||
|
inherit (monitor.resolution) width height;
|
||||||
|
refresh = monitor.refreshRateNiri or null;
|
||||||
|
};
|
||||||
|
focus-at-startup = monitor.name == primaryMonitorName;
|
||||||
|
transform.rotation =
|
||||||
|
if (monitor.transform != null)
|
||||||
|
then monitor.transform * 90
|
||||||
|
else 0;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
config.monitors)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
modules/desktop/qt.nix
Normal file
13
modules/desktop/qt.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config = lib.mkIf config.fireproof.desktop.enable {
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme = "gnome";
|
||||||
|
style = "adwaita-dark";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
screenshotPkg = pkgs.writeShellScriptBin "screenshot" ''
|
screenshotPkg = pkgs.writeShellScriptBin "screenshot" ''
|
||||||
|
|
@ -8,7 +9,9 @@
|
||||||
${lib.getExe pkgs.grim} -t ppm -g "$AREA" - | ${lib.getExe pkgs.satty} -f - --initial-tool=arrow --early-exit --copy-command=${pkgs.wl-clipboard}/bin/wl-copy --action-on-enter="save-to-clipboard" --disable-notifications
|
${lib.getExe pkgs.grim} -t ppm -g "$AREA" - | ${lib.getExe pkgs.satty} -f - --initial-tool=arrow --early-exit --copy-command=${pkgs.wl-clipboard}/bin/wl-copy --action-on-enter="save-to-clipboard" --disable-notifications
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = [
|
config = lib.mkIf config.fireproof.desktop.enable {
|
||||||
screenshotPkg
|
environment.systemPackages = [
|
||||||
];
|
screenshotPkg
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue