remove desktop/niri

it's all in dms anyway
This commit is contained in:
2026-05-11 17:48:21 +03:00
parent 7a1b8ad404
commit c9fac8f849
12 changed files with 2 additions and 1758 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ in {
./cosmic
# ./dms
# ./gnome
./niri
./plasma
# ./niri
# ./plasma
]
++ (with inputs; [
dms.homeModules.dank-material-shell.default
-203
View File
@@ -1,203 +0,0 @@
{
config,
inputs,
lib,
osConfig,
perSystem,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption mkForce getExe;
inherit (osConfig.networking) hostName;
cfg = config.desktop.niri;
ifLaptop = mkIf (hostName != "dunamis");
commonArgs = rec {
inherit config inputs lib osConfig perSystem pkgs;
baseMenu = getExe perSystem.vicinae.default;
clipboard = baseMenu + " vicinae://extensions/vicinae/clipboard/history";
launcher = baseMenu + " toggle";
lockscreen = getExe pkgs.gtklock;
};
in {
imports = with inputs; [
# vicinae.homeManagerModules.default
# walker.homeManagerModules.default
];
options = {
desktop.niri.enable =
mkEnableOption "enable niri desktop";
};
config = mkIf cfg.enable {
stylix.targets = {
waybar.enable = false;
wpaperd.enable = true;
qt.enable = false;
};
stylix.iconTheme = {
enable = true;
light = "Papirus-Light";
dark = "Papirus-Dark";
package = let
inherit (lib.strings) hasPrefix;
inherit (osConfig.module.stylix) theme;
color =
if (hasPrefix "rose-pine" theme)
then "indigo"
else if (hasPrefix "nord" theme)
then "nordic"
else if (hasPrefix "oxocarbon" theme)
then "green"
else if (hasPrefix "s" theme)
then "teal"
else null;
in
pkgs.papirus-icon-theme.override {inherit color;};
};
dconf.settings = {
"org/gnome/desktop/wm/preferences" = {
button-layout = "icon:close";
};
"org/gnome/desktop/interface" = {
icon-theme = config.gtk.iconTheme.name;
color-scheme =
if config.stylix.polarity == "dark"
then lib.mkDefault "prefer-dark"
else lib.mkDefault "prefer-light";
};
};
qt = {
enable = true;
platformTheme.name = "gtk3";
};
# programs.walker = import ./programs/walker commonArgs;
programs.waybar = import ./programs/waybar commonArgs;
services = import ./services commonArgs;
home.packages = with pkgs;
[
# gui libadwaita apps
celluloid # mpv gui in libadwaita
gnome-text-editor
helvum # pipewire patchbay in rust
junction # app chooser
loupe # image viewer and editor in rust
nautilus # file manager
papers # pdf reader in rust
pwvucontrol # pipewire gui in rust
wdisplays # wlroots display configurator
]
++ [
# misc utils
(ifLaptop brightnessctl)
dconf
libnotify
playerctl
wl-clipboard-rs # wl-clipboard in rust
xfce.xfconf
];
xdg = {
configFile = {
# niri = import ./niri.nix commonArgs;
"mimeapps.list".force = true;
};
mime.enable = true;
mimeApps = {
enable = true;
defaultApplications = let
file_manager = ["org.gnome.Nautilus.desktop"];
image_viewer = ["org.gnome.Loupe.desktop"];
pdf_reader = ["org.gnome.Papers.desktop"];
video_player = ["io.github.celluloid_player.Celluloid.desktop"];
web_browser = ["re.sonny.Junction.desktop"];
in {
"application/pdf" = pdf_reader;
"image/jpeg" = image_viewer;
"image/png" = image_viewer;
"inode/directory" = file_manager;
"text/html" = web_browser;
"video/mp4" = video_player;
"video/mpeg" = video_player;
"video/x-matroska" = video_player;
"video/x-mpeg" = video_player;
"x-scheme-handler/about" = web_browser;
"x-scheme-handler/http" = web_browser;
"x-scheme-handler/https" = web_browser;
"x-scheme-handler/unknown" = web_browser;
};
};
};
systemd.user = {
# settings.Manager.DefaultEnvironment = {
# DISPLAY = ":123";
# };
targets.tray.Unit.Description = "Home Manager System Tray"; # workaround for udiskie
services = let
mkGraphicalService = config: lib.attrsets.recursiveUpdate graphicalService config;
graphicalService = {
Install.WantedBy = ["niri.service"];
Unit = {
Requisite = ["graphical-session.target"];
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
};
Service = {
Restart = "on-failure";
TimeoutStopSec = 10;
RestartSec = 1;
};
};
in
lib.mkMerge [
{
copyq = mkGraphicalService {Service.Environment = mkForce "QT_QPA_PLATFORM=wayland";};
network-manager-applet = mkGraphicalService {};
udiskie = mkGraphicalService {};
# walker = mkGraphicalService {};
waybar = mkGraphicalService {};
wpaperd =
mkGraphicalService {}
// {
Service.TimeoutStopSec = mkForce "1";
Service.Restart = mkForce "always";
};
xfce4-notifyd = mkGraphicalService {
Service.ExecStart = pkgs.xfce.xfce4-notifyd + "/lib/xfce4/notifyd/xfce4-notifyd";
};
# xwayland-satellite = mkGraphicalService {
# Service = {
# Type = "simple";
# ExecStart = getExe pkgs.xwayland-satellite + " :123";
# };
# };
# gnome-polkit-agent = mkGraphicalService {
# Service = {
# Type = "simple";
# ExecStart = pkgs.polkit_gnome + "/libexec/polkit-gnome-authentication-agent-1";
# };
# };
}
(lib.mkIf (hostName == "morphius") {
lisgd = mkGraphicalService {
Service = {
# Group = "input";
Type = "simple";
ExecStart =
"${pkgs.lisgd}/bin/lisgd"
+ " -d /dev/input/by-path/pci-0000:00:15.1-platform-i2c_designware.1-event"
+ ''-g "1,DU,TL,*,P,niri msg action toggle-overview"''
+ " -g \"3,UD,T,*,P,niri msg action focus-workspace-up\""
+ " -g \"3,DU,B,*,P,niri msg action focus-workspace-down\""
+ " -g \"3,LR,L,*,P,niri msg action focus-column-left\""
+ " -g \"3,RL,R,*,P,niri msg action focus-column-right\"";
};
};
})
];
};
};
}
-386
View File
@@ -1,386 +0,0 @@
{
config,
lib,
osConfig,
perSystem,
# pkgs,
clipboard,
launcher,
lockscreen,
...
}: let
inherit (config.lib.stylix) colors;
inherit (config.stylix) cursor;
inherit (osConfig.networking) hostName;
keyboard =
if hostName == "eldrid"
then "chromeos"
else "platform";
xdgPics =
config.xdg.userDirs.pictures;
in {
target = "niri/config.kdl";
text = let
arrows = {
left = "Left";
down = "Down";
up = "Up";
right = "Right";
};
homerow-arrows = {
left = "n";
down = "e";
up = "i";
right = "o";
};
letters = {
first = "Q";
second = "W";
third = "F";
fourth = "P";
fifth = "B";
sixth = "J";
seventh = "L";
eighth = "U";
ninth = "Y";
};
numbers = {
first = "1";
second = "2";
third = "3";
fourth = "4";
fifth = "5";
sixth = "6";
seventh = "7";
eighth = "8";
ninth = "9";
};
genArrowNavigation = keys: ''
Mod+${keys.left} { focus-column-left; }
Mod+${keys.down} { focus-window-or-workspace-down; }
Mod+${keys.up} { focus-window-or-workspace-up; }
Mod+${keys.right} { focus-column-right; }
Mod+Ctrl+${keys.left} { move-column-left; }
Mod+Ctrl+${keys.down} { move-window-down-or-to-workspace-down; }
Mod+Ctrl+${keys.up} { move-window-up-or-to-workspace-up; }
Mod+Ctrl+${keys.right} { move-column-right; }
Mod+Shift+${keys.left} { focus-monitor-left; }
Mod+Shift+${keys.down} { focus-monitor-down; }
Mod+Shift+${keys.up} { focus-monitor-up; }
Mod+Shift+${keys.right} { focus-monitor-right; }
Mod+Shift+Ctrl+${keys.left} { move-column-to-monitor-left; }
Mod+Shift+Ctrl+${keys.down} { move-column-to-monitor-down; }
Mod+Shift+Ctrl+${keys.up} { move-column-to-monitor-up; }
Mod+Shift+Ctrl+${keys.right} { move-column-to-monitor-right; }
'';
genWorkspacesNavigation = keys: ''
Mod+${keys.first} { focus-workspace 1; }
Mod+${keys.second} { focus-workspace 2; }
Mod+${keys.third} { focus-workspace 3; }
Mod+${keys.fourth} { focus-workspace 4; }
Mod+${keys.fifth} { focus-workspace 5; }
Mod+${keys.sixth} { focus-workspace 6; }
Mod+${keys.seventh} { focus-workspace 7; }
Mod+${keys.eighth} { focus-workspace 8; }
Mod+${keys.ninth} { focus-workspace 9; }
Mod+Ctrl+Shift+${keys.first} { move-column-to-workspace 1; }
Mod+Ctrl+Shift+${keys.second} { move-column-to-workspace 2; }
Mod+Ctrl+Shift+${keys.third} { move-column-to-workspace 3; }
Mod+Ctrl+Shift+${keys.fourth} { move-column-to-workspace 4; }
Mod+Ctrl+Shift+${keys.fifth} { move-column-to-workspace 5; }
Mod+Ctrl+Shift+${keys.sixth} { move-column-to-workspace 6; }
Mod+Ctrl+Shift+${keys.seventh} { move-column-to-workspace 7; }
Mod+Ctrl+Shift+${keys.eighth} { move-column-to-workspace 8; }
Mod+Ctrl+Shift+${keys.ninth} { move-column-to-workspace 9; }
'';
in ''
environment {
CLUTTER_BACKEND "wayland"
GDK_BACKEND "wayland"
MOZ_ENABLE_WAYLAND "1"
MOZ_WEBRENDER "1"
QT_QPA_PLATFORM "wayland"
SDL_VIDEODRIVER "wayland"
XDG_SESSION_TYPE "wayland"
}
input {
keyboard {
xkb {
layout "us,ua"
variant "colemak_dh_ortho,"
}
repeat-delay 200
repeat-rate 50
track-layout "window"
}
touchpad {
tap
natural-scroll
accel-speed 0.2
accel-profile "flat"
}
mouse {
accel-speed 0.0
accel-profile "flat"
}
touch {
map-to-output "eDP-1"
}
warp-mouse-to-focus
workspace-auto-back-and-forth
}
cursor {
xcursor-theme "${cursor.name}"
xcursor-size ${toString cursor.size}
}
hotkey-overlay {
skip-at-startup
}
xwayland-satellite {
path "${lib.getExe perSystem.xwst.xwayland-satellite}"
}
clipboard {
disable-primary
}
prefer-no-csd
screenshot-path "${xdgPics}/screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png"
animations {
off
slowdown 0.5
}
layout {
gaps 3
// background-color "#${colors.base02}"
background-color "transparent"
center-focused-column "never" // "on-overflow"
default-column-width { proportion 1.0; }
preset-column-widths {
proportion 0.33333
proportion 0.66667
}
struts {
left 36
right 36
}
tab-indicator {
active-color "#${colors.base04}"
inactive-color "#${colors.base03}"
corner-radius 6
gap 3
gaps-between-tabs 3
// length total-proportion=0.3
place-within-column
position "left"
width 6
}
focus-ring {
off
width 1
active-color "#${colors.base03}"
inactive-color "#${colors.base02}"
urgent-color "#${colors.base08}"
}
border {
// off
width 1
active-color "#${colors.base03}"
inactive-color "#${colors.base02}"
urgent-color "#${colors.base08}"
}
}
window-rule {
geometry-corner-radius 12
clip-to-geometry true
}
window-rule {
match is-window-cast-target=true
focus-ring {
width 3
active-color "#${colors.base0F}"
inactive-color "#${colors.base03}"
}
border {
width 3
active-color "#${colors.base0F}"
inactive-color "#${colors.base03}"
}
}
layer-rule {
match namespace="^wpaperd.*$"
place-within-backdrop true
}
overview {
workspace-shadow {
off
}
}
layer-rule {
match namespace="waybar"
match at-startup=true
opacity 0.99 // fixes the black fill
}
window-rule {
match title="Картинка в картинці"
match title="Picture-in-Picture"
open-floating true
}
window-rule {
match app-id="org.wezfurlong.wezterm"
match app-id="com.mitchellh.ghostty"
default-column-width { proportion 1.0; }
draw-border-with-background false
}
window-rule {
match app-id="re.sonny.Junction"
match app-id="com.github.hluk.copyq"
match title=r"^.* - Choose User Profile$"
open-floating true
open-focused true
}
window-rule {
match app-id="com.mitchellh.ghostty"
draw-border-with-background false
}
window-rule {
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
match app-id=r#"^org\.gnome\.World\.Secrets$"#
match app-id=r#"^Bitwarden$"#
match app-id="io.github.kukuruzka165.materialgram"
match app-id="org.telegram.desktop"
match app-id="org.signal.Signal"
match app-id="WebCord"
// block-out-from "screen-capture"
block-out-from "screencast"
}
binds {
Mod+Shift+Slash { show-hotkey-overlay; }
Mod+Tab { focus-workspace-previous; }
Mod+C { center-column; }
Mod+M { maximize-column; }
Mod+H { set-column-width "50%"; }
Mod+T { set-column-width "33%"; }
Mod+Shift+T { set-column-width "67%"; }
Mod+V { toggle-column-tabbed-display; }
Mod+G { switch-focus-between-floating-and-tiling; }
Mod+X { spawn "pkill" "-SIGUSR1" "waybar"; } // hide/show waybar
Mod+Ctrl+Comma { consume-or-expel-window-left; }
Mod+Ctrl+Period { consume-or-expel-window-right; }
Mod+Ctrl+Q { close-window; }
Mod+Ctrl+M { fullscreen-window; }
Mod+Ctrl+G { toggle-window-floating; }
Mod+Shift+M { maximize-window-to-edges; }
Mod+Ctrl+Shift+M { toggle-windowed-fullscreen; }
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
Mod+Comma { set-column-width "-10%"; }
Mod+Period { set-column-width "+10%"; }
Mod+Shift+Comma { set-window-height "-10%"; }
Mod+Shift+Period { set-window-height "+10%"; }
Mod+Space { switch-layout "next"; }
Mod+Ctrl+Space repeat=false { toggle-overview; }
Mod+Return repeat=false { spawn "sh" "-c" "$TERMINAL"; }
Mod+BackSpace repeat=false { spawn "sh" "-c" "${launcher}"; }
Mod+D repeat=false { spawn "sh" "-c" "${launcher}"; }
Mod+Ctrl+L repeat=false { spawn "${lockscreen}"; }
Mod+Ctrl+V repeat=false { spawn "sh" "-c" "${clipboard}"; }
// Mod+Shift+W repeat=false { spawn "walker" "-m" "windows"; }
Mod+Ctrl+Shift+BracketLeft { quit; }
Mod+Ctrl+Shift+BracketRight { power-off-monitors; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Shift+Print { screenshot-window; }
// Caps_Lock { spawn "swayosd-client" "--caps-lock"; }
// XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%+"; }
// XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%-"; }
// XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
// XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
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"; }
Shift+XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--input-volume" "mute-toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "swayosd-client" "--input-volume" "mute-toggle"; }
XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; }
XF86AudioPause allow-when-locked=true { spawn "playerctl" "pause"; }
XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; }
XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; }
XF86ScreenSaver allow-when-locked=true { spawn "${lockscreen}"; }
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-"; }
Alt+XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+" "-d" "${keyboard}::kbd_backlight"; }
Alt+XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-" "-d" "${keyboard}::kbd_backlight"; }
XF86KbdBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+" "-d" "${keyboard}::kbd_backlight"; }
XF86KbdBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-" "-d" "${keyboard}::kbd_backlight"; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Ctrl+Home { move-column-to-first; }
Mod+Ctrl+End { move-column-to-last; }
Mod+Next { focus-workspace-down; }
Mod+Prior { focus-workspace-up; }
Mod+Ctrl+Next { move-column-to-workspace-down; }
Mod+Ctrl+Prior { move-column-to-workspace-up; }
Mod+Shift+Next { move-workspace-down; }
Mod+Shift+Prior { move-workspace-up; }
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
Mod+Shift+WheelScrollDown { focus-column-right; }
Mod+Shift+WheelScrollUp { focus-column-left; }
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
${genArrowNavigation arrows}
${genArrowNavigation homerow-arrows}
${genWorkspacesNavigation letters}
${genWorkspacesNavigation numbers}
}
'';
}
@@ -1,23 +0,0 @@
{
config,
lib,
}: {
enable = true;
settings = {
main = {
terminal = "$TERMINAL -e";
fields = "filename,name,generic,keywords,categories,exec";
dpi-aware = false;
width = 20;
horizontal-pad = 12;
vertical-pad = 12;
show-actions = true;
match-mode = "fuzzy";
icon-theme = config.dconf.settings."org/gnome/desktop/interface".icon-theme;
};
border = lib.mkDefault {
width = 3;
radius = 12;
};
};
}
@@ -1,305 +0,0 @@
{
config,
pkgs,
...
}: {
enable = true;
package = pkgs.walker;
runAsService = true;
config = {
activation_mode.labels = "neiotsra";
as_window = false;
disabled = [
"bookmarks"
"clipboard"
"custom_commands"
"translation"
"websearch"
];
builtins = {
applications = {
actions.enabled = true;
context_aware = true;
name = "applications";
placeholder = "Applications";
prioritize_new = true;
refresh = true;
show_generic = true;
show_icon_when_single = true;
show_sub_when_single = true;
weight = 10;
};
calc = {
icon = "accessories-calculator";
min_chars = 4;
name = "calc";
placeholder = "Calculator";
weight = 5;
};
clipboard = {
image_height = 300;
max_entries = 10;
name = "clipboard";
placeholder = "Clipboard";
switcher_only = true;
weight = 5;
};
commands = {
icon = "utilities-terminal";
name = "commands";
placeholder = "Commands";
switcher_only = true;
weight = 8;
};
custom_commands = {
icon = "utilities-terminal";
name = "custom_commands";
placeholder = "Custom Commands";
weight = 5;
};
dmenu = {
name = "dmenu";
placeholder = "Dmenu";
switcher_only = true;
weight = 5;
};
emojis = {
history = true;
name = "emojis";
placeholder = "Emojis";
switcher_only = true;
typeahead = true;
weight = 5;
};
finder = {
concurrency = 8;
icon = "folder";
ignore_gitignore = true;
name = "finder";
placeholder = "Finder";
refresh = true;
switcher_only = true;
weight = 5;
};
runner = {
generic_entry = false;
history = true;
icon = "utilities-terminal";
name = "runner";
placeholder = "Runner";
refresh = true;
typeahead = true;
weight = 5;
};
ssh = {
history = true;
icon = "preferences-system-network";
name = "ssh";
placeholder = "SSH";
refresh = true;
switcher_only = true;
weight = 5;
};
switcher = {
name = "switcher";
placeholder = "Switcher";
prefix = "/";
weight = 5;
};
websearch = {
icon = "applications-internet";
name = "websearch";
placeholder = "Websearch";
weight = 5;
};
windows = {
icon = "view-restore";
name = "windows";
placeholder = "Windows";
weight = 10;
};
};
disable_click_to_close = false;
force_keyboard_focus = true;
list = {
max_entries = 50;
show_initial_entries = true;
single_click = true;
};
search = {
delay = 0;
force_keyboard_focus = true;
history = true;
placeholder = "Search...";
};
};
theme = {
layout = {
ui = {
anchors = {
bottom = false;
left = false;
right = false;
top = false;
};
window = {
h_align = "center";
v_align = "center";
box = {
h_align = "center";
v_align = "center";
orientation = "vertical";
search = {
h_align = "top";
margins = {
start = 3;
top = 3;
end = 3;
bottom = 3;
};
};
scroll = {
overlay_scrolling = true;
list = {
margins = {
bottom = 3;
top = 0;
start = 3;
end = 3;
};
item = {
icon.theme = "${config.gtk.iconTheme.name}";
spacing = 3;
activation_label = {
x_align = 0.5;
y_align = 0.5;
width = 32;
};
text = {
h_align = "start";
h_expand = true;
revert = true;
wrap = true;
};
};
};
};
};
};
};
};
style = let
inherit (config.lib.stylix) colors;
in ''
@define-color base00 #${colors.base00};
@define-color base01 #${colors.base01};
@define-color base02 #${colors.base02};
@define-color base03 #${colors.base03};
@define-color base04 #${colors.base04};
@define-color base05 #${colors.base05};
@define-color base06 #${colors.base06};
@define-color base07 #${colors.base07};
@define-color base08 #${colors.base08};
@define-color base09 #${colors.base09};
@define-color base0A #${colors.base0A};
@define-color base0B #${colors.base0B};
@define-color base0C #${colors.base0C};
@define-color base0D #${colors.base0D};
@define-color base0E #${colors.base0E};
@define-color base0F #${colors.base0F};
#window,
#box,
#search,
#password,
#input,
#typeahead,
#spinner,
#list,
child,
scrollbar,
slider,
#item,
#text,
#label,
#sub,
#activationlabel {
all: unset;
}
#window {
background: @base00;
color: @base05;
border-radius: 12px;
border: 1px solid @base0D;
}
#box {
background: @base00;
}
#search {
background: @base01;
border-radius: 9px;
padding: 8px;
}
#password,
#input,
#typeahead {
background: none;
box-shadow: none;
border-radius: 6px;
}
#input > *:first-child,
#typeahead > *:first-child {
margin-right: 3px;
border-radius: 0px;
}
#typeahead {
color: @base05;
}
#input placeholder {
opacity: 0.5;
}
#list {
padding: 3px;
border-radius: 9px;
background: @base01;
}
child {
box-shadow: none;
}
child:selected,
child:hover {
box-shadow: none;
border-radius: 6px;
background: @base02;
}
#item {
padding: 4px;
}
#sub {
font-size: smaller;
opacity: 0.5;
}
#activationlabel {
opacity: 0.5;
}
.activation #activationlabel {
opacity: 1;
color: @base05;
}
'';
};
}
@@ -1,406 +0,0 @@
{
config,
lib,
osConfig,
pkgs,
launcher,
...
}: let
ifLaptop = lib.mkIf (osConfig.networking.hostName != "dunamis");
in {
enable = true;
systemd = {
enable = true;
target = "graphical-session.target";
};
settings.bottom = {
position = "bottom";
height = 34;
spacing = 0;
margin-left = 36 + 3;
margin-right = 36 + 3;
margin-bottom = 3;
modules-left = [
# "custom/launcher"
"niri/language"
"niri/workspaces"
# "wlr/taskbar"
];
modules-center = [
"clock"
];
modules-right = [
"privacy"
"network"
"cpu"
"memory"
"wireplumber"
"wireplumber#source"
(ifLaptop "group/laptop")
"tray"
"idle_inhibitor"
"custom/notification"
];
"niri/workspaces" = {
format = "{index}";
};
"niri/language" = {
format = "{short}";
# format-en = "🇺🇸";
# format-uk = "🇺🇦";
};
clock = {
format = "{:%R}";
interval = 1;
tooltip = true;
tooltip-format = "{:%B %d, %A}";
};
"custom/launcher" = {
format = "";
on-click = launcher;
tooltip = false;
};
"wlr/taskbar" = {
format = "{icon}";
icon-size = 16;
icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}";
tooltip-format = "{title}";
on-click = "activate";
};
"group/laptop" = {
orientation = "inherit";
modules = [
"backlight"
"battery"
"power-profiles-daemon"
];
};
backlight = {
format = "{percent}% {icon}";
format-icons = [
"󰃚"
"󰃛"
"󰃜"
"󰃝"
"󰃞"
"󰃟"
"󰃠"
];
};
idle_inhibitor = {
tooltip = false;
format = "{icon}";
format-icons = {
activated = "󰅶";
deactivated = "󰾪";
};
};
tray = {
icon-size = 16;
spacing = 6;
};
battery = {
states = {
good = 95;
warning = 30;
critical = 15;
};
format = "{capacity}% {icon}";
format-full = "{capacity}% 󱟢";
format-charging = "{capacity}% 󰂄";
format-plugged = "{capacity}% 󰚥";
format-alt = "{icon} {time}";
format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
};
memory = {
format = "{used:0.1f}G ";
tooltip-format = ''
RAM: {used:0.1f}G/{total:0.1f}G ({percentage}%)
Swap: {swapUsed:0.1f}G/{swapTotal:0.1f}G ({swapPercentage}%)'';
};
network = {
format = "{bandwidthDownBits} 󰇚 | {bandwidthUpBits} 󰕒";
interval = 3;
tooltip = false;
};
cpu = {
format = "{usage}% 󰍛";
interval = 3;
};
power-profiles-daemon = {
format = "{icon}";
tooltip = true;
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
format-icons = {
default = "󱡮";
performance = "󱡮";
balanced = "";
power-saver = "";
};
};
wireplumber = {
format = "{volume}% {icon}";
format-muted = "󰖁";
format-icons = ["󰕿" "󰖀" "󰕾"];
on-click = lib.getExe pkgs.pwvucontrol;
on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle";
scroll-step = 3;
};
"wireplumber#source" = {
node-type = "Audio/Source";
format = "{volume}% 󰍬";
format-muted = "󰍭";
on-click-right = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
scroll-step = 3;
};
"custom/notification" = {
tooltip = false;
format = "{icon}";
format-icons = {
notification = "󱅫";
none = "󰂚";
dnd-notification = "󰂛";
dnd-none = "󰂛";
};
return-type = "json";
exec =
pkgs.writeShellApplication {
name = "xfce-notifyd-waybar";
runtimeInputs = with pkgs; [sqlite xfce.xfconf coreutils];
text =
# bash
''
is_dnd=$(xfconf-query -c xfce4-notifyd -p /do-not-disturb)
notifications_count=$(sqlite3 ~/.cache/xfce4/notifyd/log.sqlite "SELECT count(*) FROM notifications WHERE NOT is_read")
if [[ "$notifications_count" -ne 0 ]]; then
icon="notification"
else
icon="none"
fi
if [[ "$is_dnd" == "true" ]]; then
icon="dnd-$icon"
fi
printf '{"text": "%s", "alt": "%s"}' "$notifications_count" "$icon"
'';
}
+ "/bin/xfce-notifyd-waybar";
on-click = "xfconf-query -c xfce4-notifyd -p /do-not-disturb -T";
on-click-right = lib.getExe pkgs.xfce.xfce4-notifyd;
escape = true;
signal = 1;
};
"privacy" = {
icon-spacing = 0;
icon-size = 16;
transition-duration = 250;
screenshare = {
type = "screenshare";
tooltip = true;
tooltip-icon-size = 24;
};
audio-in = {
type = "audio-in";
tooltip = true;
tooltip-icon-size = 24;
};
};
};
# TODO: figure out magic waybar css styling (does it pick up `~/.config/gtk-3.0/gtk.css` ?)
style = let
colors = config.lib.stylix.colors.withHashtag;
in
# css
''
@define-color base00 ${colors.base00}; @define-color base08 ${colors.base08};
@define-color base01 ${colors.base01}; @define-color base09 ${colors.base09};
@define-color base02 ${colors.base02}; @define-color base0A ${colors.base0A};
@define-color base03 ${colors.base03}; @define-color base0B ${colors.base0B};
@define-color base04 ${colors.base04}; @define-color base0C ${colors.base0C};
@define-color base05 ${colors.base05}; @define-color base0D ${colors.base0D};
@define-color base06 ${colors.base06}; @define-color base0E ${colors.base0E};
@define-color base07 ${colors.base07}; @define-color base0F ${colors.base0F};
* {
font-family: Symbols Nerd Font, FontAwesome, ${config.stylix.fonts.sansSerif.name};
font-size: 16px;
font-weight: 500;
}
.modules-left,
.modules-center,
.modules-right,
window#waybar {
background-color: @base00;
color: @base05;
border-radius: 12px;
}
window#waybar {
border: 1px solid @base01;
}
.modules-left,
.modules-center,
.modules-right {
margin: 1px;
padding-left: 3px;
} /* for leftmost modules */
button {
border-radius: 6px;
box-shadow: inset 0 -3px transparent;
}
button:hover {
background: inherit;
box-shadow: inset 0 -3px transparent;
}
label:focus {
background-color: #000000;
}
tooltip label {
color: @base05;
}
tooltip {
background: @base01;
border: 1px solid @base0D;
border-radius: 16px;
padding: 2em;
}
window#bottom.modules-center {
background-color: transparent
}
#backlight,
#battery,
#clock,
#cpu,
#custom-launcher,
#custom-notification,
#idle_inhibitor,
#language,
#memory,
#network,
#power-profiles-daemon,
#privacy,
#privacy-item,
#taskbar button,
#taskbar,
#tray,
#wireplumber,
#workspaces button,
#workspaces {
all: unset;
border-radius: 9px;
background-color: @base01;
margin: 3px 3px 3px 0;
padding: 0 0.42em;
}
#clock {
background-color: @base00;
}
#backlight,
#battery,
#custom-launcher,
#custom-notification,
#idle_inhibitor,
#power-profiles-daemon,
#wireplumber {
padding: 0 0.5em;
}
#battery.critical:not(.charging) {
background-color: @base09;
color: @base00;
}
#custom-launcher,
#custom-notification,
#idle_inhibitor,
#language,
#power-profiles-daemon {
padding: 0;
min-width: 1.7em;
}
#power-profiles-daemon.performance {
background-color: @base0D;
color: @base00;
}
#power-profiles-daemon.power-saver {
background-color: @base0A;
color: @base00;
}
#privacy,
#taskbar,
#workspaces {
padding: 0;
}
#privacy-item,
#taskbar button,
#workspaces button {
border-radius: 6px;
min-width: 1.35em;
padding: 0;
}
#privacy-item.audio-in {
background-color: @base0E;
color: @base00;
margin: 3px;
}
#privacy-item.screenshare {
background-color: @base0C;
color: @base00;
margin-right: 0;
}
#taskbar button {
padding: 0 0.4em;
margin: 3px 3px 3px 0;
}
#taskbar button.active,
#workspaces button.active {
background-color: @base02;
}
#taskbar button.active:hover,
#taskbar button:hover,
#workspaces button:hover,
#workspaces button.active:hover {
background-color: @base0D;
color: @base00;
}
#taskbar.empty {
background-color: transparent;
}
#tray>.needs-attention {
-gtk-icon-effect: highlight;
background-color: @base08;
}
#tray>.passive {
-gtk-icon-effect: dim;
}
#taskbar,
#workspaces {
padding-left: 3px;
}
'';
}
@@ -1,59 +0,0 @@
{
config,
lib,
lockscreen,
osConfig,
pkgs,
...
}:
lib.attrsets.recursiveUpdate {
blueman-applet.enable = osConfig.services.blueman.enable;
copyq.enable = true;
gammastep.enable = true;
gnome-keyring.enable = true;
hypridle.enable = true;
kanshi = import ./kanshi;
network-manager-applet.enable = true;
playerctld.enable = true;
# swaync = import ./swaync;
swayosd.enable = true;
udiskie.enable = true;
# vicinae = import ./vicinae;
wpaperd.enable = true;
}
{
gammastep = {
provider = "manual";
latitude = 49.6;
longitude = 36.1;
tray = true;
temperature = {
day = 6500;
night = 3000;
};
};
gnome-keyring.components = ["secrets"];
hypridle.settings = {
general = {
before_sleep_cmd = "loginctl lock-session";
lock_cmd = "pidof ${lockscreen} || ${lockscreen}";
# unlock_cmd = "loginctl unlock-session";
};
listener = [
{
timeout = 600;
on-timeout = "pidof ${lockscreen} || ${lockscreen}";
}
{
timeout = 601;
on-timeout = lib.getExe pkgs.niri + " msg action power-off-monitors";
}
];
};
swayosd.topMargin = 0.8;
udiskie = {
automount = false;
notify = true;
tray = "auto";
};
}
@@ -1,139 +0,0 @@
{
enable = true;
settings = let
main = "Philips Consumer Electronics Company 27M2N5500 UK02418033254";
second = "Samsung Electric Company S24R65x H4TMA03291";
builtin = {
eldrid = "Chimei Innolux Corporation 0x1406 Unknown";
sarien = "LG Display 0x068B Unknown";
kled = "BOE 0x095F Unknown";
# morphius =;
};
in [
{
output = {
criteria = main;
position = "0,0";
scale = 4.0 / 3.0;
adaptiveSync = true;
};
}
{
output = {
criteria = second;
mode = "1920x1080@74.973";
adaptiveSync = true;
};
}
{
output = {
criteria = builtin.eldrid;
position = "0,0";
scale = 1.2;
# adaptiveSync = true;
};
}
{
output = {
criteria = builtin.sarien;
position = "0,0";
scale = 1.25;
# adaptiveSync = true;
};
}
{
output = {
criteria = builtin.kled;
position = "0,0";
scale = 4.0 / 3.0;
# adaptiveSync = true;
};
}
{
profile = {
name = "dunamis";
outputs = [{criteria = main;}];
};
}
{
profile = {
name = "dunamis-twomon";
outputs = [
{criteria = main;}
{
criteria = second;
position = "1920,180";
scale = 1.2;
# transform = "90";
adaptiveSync = true;
}
];
};
}
{
profile = {
name = "eldrid-docked";
outputs = [
{
criteria = main;
position = "0,0";
scale = 4.0 / 3.0;
}
{
criteria = builtin.eldrid;
position = "1920,0";
}
];
};
}
{
profile = {
name = "eldrid-undocked";
outputs = [
{
criteria = builtin.eldrid;
position = "0,0";
}
];
};
}
{
profile = {
name = "sarien-docked";
outputs = [
{
criteria = main;
position = "0,0";
scale = 4.0 / 3.0;
}
{
criteria = builtin.sarien;
position = "1920,0";
}
];
};
}
{
profile = {
name = "kled";
outputs = [
{
criteria = builtin.kled;
position = "0,0";
}
];
};
}
{
profile = {
name = "sarien-undocked";
outputs = [
{
criteria = builtin.sarien;
position = "0,0";
}
];
};
}
];
}
@@ -1,178 +0,0 @@
{
enable = true;
settings = {
cssPriority = "user";
image-visibility = "when-available";
keyboard-shortcut = true;
relative-timestamps = true;
timeout = 5;
timeout-low = 5;
timeout-critical = 0;
script-fail-notify = true;
transition-time = 200;
# Layer settings
layer-shell = true;
layer = "overlay";
control-center-layer = "overlay";
# Notification settings
positionX = "left";
positionY = "top";
notification-2fa-action = true;
notification-inline-replies = false;
notification-icon-size = 48;
notification-body-image-height = 100;
notification-body-image-width = 200;
notification-window-width = 400;
# Control center settings
control-center-positionX = "left";
control-center-positionY = "top";
control-center-width = 500;
control-center-exclusive-zone = true;
fit-to-screen = true;
hide-on-action = true;
hide-on-clear = false;
# Widget settings
widgets = [
"title"
"dnd"
"notifications"
"mpris"
];
widget-config = {
title = {
text = "Notifications";
clear-all-button = true;
button-text = "Clear All";
};
dnd = {
text = "Do Not Disturb";
};
mpris = {
image-size = 96;
image-radius = 12;
blur = true;
};
};
};
# TODO: disable stylix, redo everything
style = ''
* {
all: unset;
}
progress,
progressbar,
trough {
border-radius: 16px;
}
.app-icon,
.image {
-gtk-icon-effect: none;
padding-right: 0.5rem;
}
.notification-action {
border-radius: 9px;
margin: 3px;
}
.close-button {
margin: 12px;
border-radius: 6px;
}
.notification-group.collapsed
.notification-row:not(:last-child)
.notification-action,
.notification-group.collapsed
.notification-row:not(:last-child)
.notification-default-action {
opacity: 0;
}
.trough {
margin: 4px;
border-radius: 7px;
}
.notification,
.notification.low,
.notification.normal,
.notification.critical,
.control-center {
border-radius: 12px;
margin: 6px;
}
.floating-notifications,
.notification-content {
padding: 0.5rem;
margin: 3px;
border-radius: 9px;
}
.control-center-list {
background: transparent;
}
.widget-title {
margin: 0.5rem;
}
.widget-title > label {
font-weight: bold;
}
.widget-title > button {
border-radius: 9px;
padding: 0.5rem;
}
.widget-dnd {
margin: 0.5rem;
}
.widget-dnd > label {
font-weight: bold;
}
.widget-dnd > switch {
border-radius: 9px;
}
.widget-dnd > switch slider {
margin: 3px;
border-radius: 6px;
padding: 0px;
}
.widget-mpris .widget-mpris-player {
border-radius: 12px;
margin: 0.5rem;
padding: 0.5rem;
}
.widget-mpris .widget-mpris-player .widget-mpris-album-art {
border-radius: 9px;
}
.widget-mpris .widget-mpris-player .widget-mpris-title {
font-weight: bold;
}
.widget-mpris .widget-mpris-player .widget-mpris-subtitle {
font-weight: normal;
}
.widget-mpris .widget-mpris-player > box > button {
border-radius: 6px;
padding: 3px;
}
'';
}
@@ -1,4 +0,0 @@
{
enable = true;
autoStart = true;
}
-1
View File
@@ -4,7 +4,6 @@
./cosmic
./dms
./gnome
# ./niri
# ./plasma
];
}
-52
View File
@@ -1,52 +0,0 @@
{
config,
inputs,
lib,
perSystem,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.desktop.niri;
in {
options = {
desktop.niri.enable =
mkEnableOption "enable niri desktop";
};
config = lib.mkMerge [
(mkIf cfg.enable {
module.desktop.displayManager = "greetd";
module.gnome-keyring.enable = true;
module.pipewire.enable = true;
# nixpkgs.overlays = [inputs.niri.overlays.default];
programs.niri.enable = true; # wayland compositor in rust
programs.niri.package = perSystem.niri-flake.niri-unstable;
environment.variables = {
NIXOS_OZONE_WL = "1";
};
security = {
pam.services.gtklock = {};
soteria.enable = true; # polkit agent in rust
};
services = {
blueman.enable = config.hardware.bluetooth.enable;
gvfs.enable = true;
};
xdg.portal = {
enable = true;
extraPortals = with pkgs; [xdg-desktop-portal-gnome xdg-desktop-portal-gtk];
config.niri.default = ["gnome" "gtk"];
};
})
(mkIf (cfg.enable
&& config.services.displayManager.autoLogin.enable) {
services.greetd.settings.initial_session = {
command = "niri-session";
user = config.services.displayManager.autoLogin.user;
};
})
];
}