stability aquired

This commit is contained in:
alisceon 2025-12-04 15:40:58 +01:00
parent 78c1bdeab5
commit c4971ee746
4 changed files with 50 additions and 43 deletions

30
flake.lock generated
View file

@ -67,11 +67,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764613336, "lastModified": 1764776959,
"narHash": "sha256-L979az28t/+SXvYw9qhOno5HLlDwkZOpz6LzCLnjmRM=", "narHash": "sha256-d+5CGloq7Lo1u2SkzhF8oiOdUc6Z5emh22nTXUB9CFA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f3902b5d8767985680875ad86d028371100faeb3", "rev": "e1680d594a9281651cbf7d126941a8c8e2396183",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -83,11 +83,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1764522689, "lastModified": 1764677808,
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=", "narHash": "sha256-H3lC7knbXOBrHI9hITQ7modLuX20mYJVhZORL5ioms0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f", "rev": "1aab89277eb2d87823d5b69bae631a2496cff57a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -99,11 +99,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1764517877, "lastModified": 1764667669,
"narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=", "narHash": "sha256-7WUCZfmqLAssbDqwg9cUDAXrSoXN79eEEq17qhTNM/Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c", "rev": "418468ac9527e799809c900eda37cbff999199b6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -121,11 +121,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764703879, "lastModified": 1764853233,
"narHash": "sha256-JyCREoghKjAMPGpUdtiN5ISKBlGO+QqoJKhAbQTGqDQ=", "narHash": "sha256-bp7B5alQk7nDLtFLKaOHhSPBNVCcwIxMXjcc/VzY0hg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "f3a83106de56c232c51a99a5f498cdbb7509db53", "rev": "5e8ec1167d3a375e2857fbe915b3d8658d3e6472",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -142,11 +142,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764703879, "lastModified": 1764853233,
"narHash": "sha256-JyCREoghKjAMPGpUdtiN5ISKBlGO+QqoJKhAbQTGqDQ=", "narHash": "sha256-bp7B5alQk7nDLtFLKaOHhSPBNVCcwIxMXjcc/VzY0hg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "f3a83106de56c232c51a99a5f498cdbb7509db53", "rev": "5e8ec1167d3a375e2857fbe915b3d8658d3e6472",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -8,7 +8,7 @@
notify = "${pkgs.libnotify}/bin/notify-send"; notify = "${pkgs.libnotify}/bin/notify-send";
# keybinds # keybinds
key_mod = "Mod4"; key_mod = "Alt";
key_left = "Left"; key_left = "Left";
key_right = "Right"; key_right = "Right";
key_up = "Up"; key_up = "Up";
@ -159,22 +159,10 @@
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
wrapperFeatures.gtk = true; # Fixes common issues with GTK 3 apps wrapperFeatures.gtk = true; # Fixes common issues with GTK 3 apps
systemd = {
xdgAutostart = true;
variables = [
"--all"
];
};
extraSessionCommands = ''
export XDG_CURRENT_DESKTOP=GNOME:sway
'';
config = { config = {
modifier = "${key_mod}"; modifier = "${key_mod}";
startup = [ startup = [
{ command = "systemctl --user start libinput-gestures"; } { command = "systemctl --user start libinput-gestures"; }
#{ command = "firefox";}
#{ command = "discord";}
]; ];
bars = [ bars = [
{ command = "${pkgs.waybar}/bin/waybar"; } { command = "${pkgs.waybar}/bin/waybar"; }
@ -194,9 +182,11 @@
}; };
"type:mouse" = { "type:mouse" = {
natural_scroll = "disabled"; natural_scroll = "disabled";
accel_profile = "flat";
}; };
"*" = { "*" = {
xkb_layout = "se"; xkb_layout = "us,se";
xkb_options = "grp:win_space_toggle";
}; };
}; # end input }; # end input
keybindings = { keybindings = {
@ -259,12 +249,15 @@
"${key_mod}+Shift+${key_right}" = "move right"; "${key_mod}+Shift+${key_right}" = "move right";
# System # System
"Mod4+space" = ''exec ${notify} -t 2000 "$(xonsh ~/.nixos_config/util/get_xkb.xonsh)"'';
#Screenshot region #Screenshot region
"${key_mod}+Shift+s" = "exec grimshot savecopy area"; "${key_mod}+Shift+s" = "exec grimshot savecopy area";
"Print" = "exec grimshot savecopy output"; "Print" = "exec grimshot savecopy output";
# media keys
"XF86AudioRaiseVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ +3%'"; "XF86AudioRaiseVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ +3%'";
"XF86AudioLowerVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ -3%'"; "XF86AudioLowerVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ -3%'";
"XF86AudioMute" = "exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle'"; "XF86AudioMute" = "exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle'";
"XF86AudioPlay" = "exec 'playerctl play-pause'";
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 10"; "XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 10";
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 10"; "XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 10";
}; # end keybindings }; # end keybindings
@ -324,21 +317,18 @@
mako = { mako = {
enable = true; enable = true;
settings = { settings = {
"actionable=true" = {
anchor = "top-left";
};
actions = true; actions = true;
anchor = "top-right"; anchor = "top-center";
background-color = color_f_bg; background-color = color_f_bg;
border-color = color_f_bg; border-color = color_f_bg;
border-radius = 0; border-radius = 0;
default-timeout = 0; default-timeout = 10000;
font = "${style_font} ${style_font_sz}"; font = "${style_font} ${style_font_sz}";
height = 100; height = 100;
width = 300; width = 600;
icons = true; icons = true;
ignore-timeout = false; ignore-timeout = false;
layer = "top"; layer = "overlay";
margin = 10; margin = 10;
markup = true; markup = true;
}; #end settings }; #end settings
@ -690,4 +680,8 @@
gesture pinch in 4 ${swaymsg} kill gesture pinch in 4 ${swaymsg} kill
gesture swipe up 4 ${lock} gesture swipe up 4 ${lock}
''; '';
# this right here offends me https://source.chromium.org/chromium/chromium/src/+/main:base/nix/xdg_util.cc;l=179-180
systemd.user.sessionVariables = {
GNOME_DESKTOP_SESSION_ID = "999";
};
} # end file } # end file

View file

@ -9,12 +9,11 @@
wmctrl wmctrl
seahorse seahorse
libsecret libsecret
pkgs.xdg-desktop-portal-gtk gnome-text-editor
nautilus
playerctl
libnotify
]; ];
environment.sessionVariables = rec {
XDG_CURRENT_DESKTOP = "GNOME:sway";
};
# enable Sway window manager # enable Sway window manager
programs = { programs = {
@ -37,6 +36,17 @@
kitty-themes kitty-themes
]; ];
}; # end sway }; # end sway
uwsm = {
enable = true;
waylandCompositors = {
sway = {
prettyName = "Sway";
comment = "Sway compositor managed by UWSM";
binPath = "${pkgs.sway}/bin/sway";
extraArgs = [ "--unsupported-gpu" ];
};
};
}; # end uwsm
light = { light = {
enable = true; enable = true;
}; # end light }; # end light
@ -63,7 +73,7 @@
enable = true; enable = true;
settings = { settings = {
default_session = { default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd 'sway --unsupported-gpu'"; command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd 'uwsm start -- sway-uwsm.desktop'";
user = "greeter"; user = "greeter";
}; # end default_session }; # end default_session
}; # end settings }; # end settings
@ -77,6 +87,7 @@
}; };
}; # end logind }; # end logind
dbus.packages = [ pkgs.seahorse pkgs.gnome-keyring pkgs.gcr ]; dbus.packages = [ pkgs.seahorse pkgs.gnome-keyring pkgs.gcr ];
gnome.gcr-ssh-agent.enable = true;
}; # end services }; # end services
users.users.alisceon.extraGroups = [ "video" "input" ]; users.users.alisceon.extraGroups = [ "video" "input" ];
} }

2
util/get_xkb.xonsh Normal file
View file

@ -0,0 +1,2 @@
import re
print("Layout: " + re.search(r'"xkb_active_layout_name": "(.+?)"', $(swaymsg -t get_inputs)).group(1))