From 5fdf5b5d9d00aef47894924c625b4ac9d3417260 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Wed, 24 Jun 2026 20:27:46 +0200 Subject: [PATCH 01/25] Update flake.lock --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 19a500d..79d7cba 100644 --- a/flake.lock +++ b/flake.lock @@ -197,11 +197,11 @@ ] }, "locked": { - "lastModified": 1781319724, - "narHash": "sha256-ZGuxexEMo4Xv28KJ0dX/m/PHN4oZIOnxHZpNTyrvx4M=", + "lastModified": 1781981105, + "narHash": "sha256-/1nNBbA7PrSQpTc9Qazkhl4kIPg+TNl0CjxS3UQJKlw=", "owner": "nix-community", "repo": "home-manager", - "rev": "8355f0a16b2dbb06a97959a918af5b239bbe05ae", + "rev": "7bfff44b465909f69a442701293bc0badcf476dc", "type": "github" }, "original": { @@ -261,11 +261,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1781168557, - "narHash": "sha256-LOnLQ2tpYF9gqIDDr3+j3DbpJJr/QCH6zPRT2GzEUOE=", + "lastModified": 1782166108, + "narHash": "sha256-/EtnQBcKbsaCAGQ5VRcplrHRkR4ryqyLMpBfkVuG9Xw=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "6358ff76821101c178e3ab4919a62799bfe3652e", + "rev": "875776f0252fcb8618bb948640a0d1f7a5b362be", "type": "github" }, "original": { @@ -338,11 +338,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1781074563, - "narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=", + "lastModified": 1781577229, + "narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca", + "rev": "567a49d1913ce81ac6e9582e3553dd90a955875f", "type": "github" }, "original": { @@ -354,11 +354,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1781216227, - "narHash": "sha256-9mUW6gNwoN2SWc/l0fW4svPNOulXLl8ijqKyeSOGgJE=", + "lastModified": 1782116945, + "narHash": "sha256-G3tw/IXmaH6IQ2upZvhuN9sG8CkuX+BLuJDpE8hz0Ds=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a0374025a863d007d98e3297f6aa46cc3141c2f0", + "rev": "34268251cf5547d39063f2c5ea9a196246f7f3a6", "type": "github" }, "original": { From 2ff0164960f4874ffcd31b82326753a1ea1085fb Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Mon, 9 Feb 2026 23:30:53 +0100 Subject: [PATCH 02/25] Add initial sway configuration Still misses configuration for login screen, lock screen and idle management. --- home/kanshi.nix | 24 +++ home/sway.nix | 240 +++++++++++++++++++++++++++++ hosts/julius-framework/default.nix | 1 + modules/sway.nix | 13 ++ users/julius/home.nix | 2 + 5 files changed, 280 insertions(+) create mode 100644 home/kanshi.nix create mode 100644 home/sway.nix create mode 100644 modules/sway.nix diff --git a/home/kanshi.nix b/home/kanshi.nix new file mode 100644 index 0000000..f7ab682 --- /dev/null +++ b/home/kanshi.nix @@ -0,0 +1,24 @@ +{ + ... +}: let + t27 = "Lenovo Group Limited T27h-30 V5HGY026"; +in { + services.kanshi = { + enable = true; + settings = [ + { output.criteria = "eDP-1"; output.scale = 1.0; } + { output.criteria = t27; } + { profile.name = "mobile"; + profile.outputs = [ + { criteria = "eDP-1"; } + ]; + } + { profile.name = "t27" ; + profile.outputs = [ + { criteria = "eDP-1"; position = "152,1440"; } + { criteria = t27; position = "0,0"; } + ]; + } + ]; + }; +} diff --git a/home/sway.nix b/home/sway.nix new file mode 100644 index 0000000..6b655df --- /dev/null +++ b/home/sway.nix @@ -0,0 +1,240 @@ +{ + pkgs, + lib, + config, + osConfig, + ... +}: let + modifier = "Mod4"; + cfg = config.wayland.windowManager.sway; + + applications = "(D)iscord, Slac(k), (E)lement, (N)extcloud, (M)usic, (B)luetooth, (V)alent"; + i3exit = "(l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown"; + i3exitProgram = "/home/julius/.config/i3/i3exit"; +in { + home.packages = with pkgs; [ + wdisplays + rofi + ydotool + ]; + + wayland.windowManager.sway = { + enable = true; + config = { + modifier = modifier; + terminal = lib.getExe pkgs.sakura; + menu = "${lib.getExe pkgs.rofi} -show drun"; + # rename workspaces + fonts = { + names = [ "FontAwesome5Free" "xft:URWGothic-Book" ]; + size = 11.0; + }; + input = { + "*" = { + xkb_layout = "eu"; + }; + "type:touchpad" = { + tap = "enabled"; + natural_scroll = "enabled"; + }; + }; + output = { + "*" = { + bg = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/wallpapers/simple-dark-gray-2018-08-28/contents/images/nix-wallpaper-simple-dark-gray_bottom.png fill"; + }; + eDP-1 = { + scale = "1"; + }; + }; + startup = [ + { command = (lib.getExe pkgs.dunst); } + { command = (lib.getExe pkgs.networkmanagerapplet); } + { command = (lib.getExe pkgs.solaar); } + { command = "${pkgs.ydotool}/bin/ydotoold"; } + ]; + keybindings = lib.mkOptionDefault { + "${modifier}+Ctrl+${cfg.config.left}" = "move workspace to output left"; + "${modifier}+Ctrl+${cfg.config.down}" = "move workspace to output down"; + "${modifier}+Ctrl+${cfg.config.up}" = "move workspace to output up"; + "${modifier}+Ctrl+${cfg.config.right}" = "move workspace to output right"; + "${modifier}+Ctrl+1" = "move container to workspace number 1; workspace number 1"; + "${modifier}+Ctrl+2" = "move container to workspace number 2; workspace number 2"; + "${modifier}+Ctrl+3" = "move container to workspace number 3; workspace number 3"; + "${modifier}+Ctrl+4" = "move container to workspace number 4; workspace number 4"; + "${modifier}+Ctrl+5" = "move container to workspace number 5; workspace number 5"; + "${modifier}+Ctrl+6" = "move container to workspace number 6; workspace number 6"; + "${modifier}+Ctrl+7" = "move container to workspace number 7; workspace number 7"; + "${modifier}+Ctrl+8" = "move container to workspace number 8; workspace number 8"; + "${modifier}+Ctrl+9" = "move container to workspace number 9; workspace number 9"; + "${modifier}+Ctrl+0" = "move container to workspace number 10; workspace number 10"; + "${modifier}+Shift+p" = "exec rofi-rbw --action copy"; + "XF86MonBrightnessUp" = "exec ${lib.getExe pkgs.brightnessctl} s +10%"; + "${modifier}+Tab" = "exec ${lib.getExe pkgs.rofi} -show window"; + "XF86MonBrightnessDown" = "exec ${lib.getExe pkgs.brightnessctl} s 10%-"; + "XF86AudioRaiseVolume" = "exec ${pkgs.alsa-utils}/bin/amixer -q set Master 5%+ unmute"; + "XF86AudioLowerVolume" = "exec ${pkgs.alsa-utils}/bin/amixer -q set Master 5%- unmute"; + "XF86AudioMute" = "exec ${pkgs.alsa-utils}/bin/amixer -q set Master toggle"; + "XF86AudioMicMute" = "exec ${pkgs.alsa-utils}/bin/amixer -q set Capture toggle"; + "${modifier}+c" = "exec ${pkgs.alsa-utils}/bin/amixer -q set Capture toggle"; + "XF86AudioPlay" = "exec ${lib.getExe pkgs.playerctl} play-pause"; + "${modifier}+ctrl+space" = "exec ${lib.getExe pkgs.playerctl} play-pause"; + "${modifier}+z" = "exec ${lib.getExe pkgs.playerctl} volume 5-"; + "${modifier}+a" = "exec ${lib.getExe pkgs.playerctl} volume 5+"; + "XF86AudioNext" = "exec ${lib.getExe pkgs.playerctl} next"; + "XF86AudioPrev" = "exec ${lib.getExe pkgs.playerctl} previous"; + "${modifier}+F2" = "exec ${lib.getExe pkgs.firefox}"; + "${modifier}+Ctrl+F2" = "exec ${lib.getExe pkgs.rofirefox}"; + "${modifier}+Shift+F2" = "exec ${lib.getExe pkgs.firefox} --private-window"; + "${modifier}+F3" = "exec nemo"; + "${modifier}+F4" = "exec ${lib.getExe pkgs.thunderbird}"; + "${modifier}+Shift+d" = ''mode "${applications}"''; + "${modifier}+Escape" = ''mode "${i3exit}"''; + }; + modes = { + resize = { + "${cfg.config.left}" = "resize shrink width 10 px"; + "${cfg.config.down}" = "resize grow height 10 px"; + "${cfg.config.up}" = "resize shrink height 10 px"; + "${cfg.config.right}" = "resize grow width 10 px"; + "Left" = "resize shrink width 10 px"; + "Down" = "resize grow height 10 px"; + "Up" = "resize shrink height 10 px"; + "Right" = "resize grow width 10 px"; + "Escape" = "mode default"; + "Return" = "mode default"; + }; + "${applications}" = { + "d" = "exec flatpak run com.discordapp.Discord"; + "k" = "exec flatpak run com.slack.Slack"; + "e" = "exec element-desktop --password-store=gnome-libsecret"; + "Shift+e" = "exec element-desktop --password-store=gnome-libsecret --profile=JuliusFreudenberger"; + "n" = "exec nextcloud"; + "m" = "exec flatpak run com.spotify.Client"; + "b" = "exec blueman"; + "v" = "exec valent"; + "Escape" = "mode default"; + "Return" = "mode default"; + }; + "${i3exit}" = { + "l" = "exec ${i3exitProgram} lock, mode default"; + "Shift+l" = "exec ${i3exitProgram} slock, mode default"; + "s" = "exec ${i3exitProgram} suspend, mode default"; + "u" = "exec ${i3exitProgram} switch_user, mode default"; + "e" = "exec ${i3exitProgram} logout, mode default"; + "h" = "exec ${i3exitProgram} hibernate, mode default"; + "r" = "exec ${i3exitProgram} reboot, mode default"; + "Shift+s" = "exec ${i3exitProgram} shutdown, mode default"; + "Escape" = "mode default"; + "Return" = "mode default"; + }; + }; + assigns = { + "6" = [{ app_id = "thunderbird"; }]; + "5" = [{ app_id = "^Element$|^com.slack.Slack$"; }]; + }; + floating.criteria = [ + { title = "MuseScore: Play Panel"; } + { class = "pavucontrol"; } + { class = "System-config-printer.py";} + { class = "Mate-calc"; } + { class = "Blueman-manager"; } + { class = "Nm-connection-editor"; } + { class = "Zotero"; window_role = "Toplevel"; } + ]; + colors = { + background = "#2B2C2B"; + focused = { + background = "#556064"; + border = "#556064"; + childBorder = "#556064"; + text = "#80FFF9"; + indicator = "#FDF6E3"; + }; + focusedInactive = { + background = "#2F3D44"; + border = "#2F3D44"; + childBorder = "#2F3D44"; + text = "#1ABC9C"; + indicator = "#454948"; + }; + unfocused = { + background = "#2F3D44"; + border = "#2F3D44"; + childBorder = "#2F3D44"; + text = "#1ABC9C"; + indicator = "#454948"; + }; + urgent = { + background = "#FDF6E3"; + border = "#CB4B16"; + childBorder = "#CB4B16"; + text = "#1ABC9C"; + indicator = "#268BD2"; + }; + placeholder = { + background = "#0c0c0c"; + border = "#000000"; + childBorder = "#000000"; + text = "#ffffff"; + indicator = "#000000"; + }; + }; + bars = [ + { + mode = "dock"; + hiddenState = "hide"; + position = "bottom"; + workspaceButtons = true; + workspaceNumbers = true; + statusCommand = "${lib.getExe pkgs.i3blocks} -c ~/.config/i3/i3blocks.conf"; + fonts = { + names = [ "xft:URWGothic-Book" ]; + size = 11.0; + }; + extraConfig = '' + icon_theme Arc + ''; + colors = { + background = "#222D31"; + statusline = "#F9FAF9"; + separator = "#454947"; + focusedWorkspace = { + border = "#F9FAF9"; + background = "#16a085"; + text = "#292F34"; + }; + activeWorkspace = { + border = "#595B5B"; + background = "#353836"; + text = "#FDF6E3"; + }; + inactiveWorkspace = { + border = "#595B5B"; + background = "#222D31"; + text = "#EEE8D5"; + }; + urgentWorkspace = { + border = "#16a085"; + background = "#FDF6E3"; + text = "#E5201D"; + }; + bindingMode = { + border = "#16a085"; + background = "#2C2C2C"; + text = "#F9FAF9"; + }; + }; + } + ]; + }; + extraConfig = '' + assign [class = "^discord$"] 5 + ''; + }; + + services.wlsunset = { + enable = true; + latitude = osConfig.location.latitude; + longitude = osConfig.location.longitude; + }; +} diff --git a/hosts/julius-framework/default.nix b/hosts/julius-framework/default.nix index b9f3fc8..c4e26db 100644 --- a/hosts/julius-framework/default.nix +++ b/hosts/julius-framework/default.nix @@ -17,6 +17,7 @@ ../../modules/fonts.nix ../../modules/cli-essentials.nix ../../modules/i3.nix + ../../modules/sway.nix ../../modules/fingerprint.nix ../../modules/logitech.nix ../../modules/connectivity.nix diff --git a/modules/sway.nix b/modules/sway.nix new file mode 100644 index 0000000..2f13a3c --- /dev/null +++ b/modules/sway.nix @@ -0,0 +1,13 @@ +{ + ... +}: { + programs.sway = { + enable = true; + wrapperFeatures = { + base = true; + gtk = true; + }; + }; + xdg.portal.wlr.enable = true; +} + diff --git a/users/julius/home.nix b/users/julius/home.nix index c11a0db..9b83137 100644 --- a/users/julius/home.nix +++ b/users/julius/home.nix @@ -7,6 +7,8 @@ ../../home/neovim ../../home/gtk ../../home/xdg + ../../home/sway.nix + ../../home/kanshi.nix ../../home/direnv ]; From cb17bea00c796edd2e53db5bb627c5eab7348b40 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Fri, 26 Jun 2026 22:03:02 +0200 Subject: [PATCH 03/25] Configure xdg portals for sway --- modules/sway.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/sway.nix b/modules/sway.nix index 2f13a3c..e09199e 100644 --- a/modules/sway.nix +++ b/modules/sway.nix @@ -1,4 +1,5 @@ { + pkgs, ... }: { programs.sway = { @@ -8,6 +9,21 @@ gtk = true; }; }; - xdg.portal.wlr.enable = true; + xdg.portal = { + enable = true; + wlr = { + enable = true; + settings = { + screencast = { + chooser_type = "simple"; + chooser_cmd = "${pkgs.slurp}/bin/slurp -f 'Select: %o' -or"; + }; + }; + }; + extraPortals = with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-gtk + ]; + }; } From 479ccf3fc30044d93be3acb5a2ccb4ea61d09728 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Fri, 26 Jun 2026 22:04:04 +0200 Subject: [PATCH 04/25] Fix path for nixos wallpaper --- home/sway.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/sway.nix b/home/sway.nix index 6b655df..3a2c467 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -40,7 +40,7 @@ in { }; output = { "*" = { - bg = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/wallpapers/simple-dark-gray-2018-08-28/contents/images/nix-wallpaper-simple-dark-gray_bottom.png fill"; + bg = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/wallpapers/simple-dark-gray/contents/images/nix-wallpaper-simple-dark-gray_bottom.png fill"; }; eDP-1 = { scale = "1"; From 89eff861f376af093bfbe910890f75f0815fedad Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Fri, 26 Jun 2026 22:04:42 +0200 Subject: [PATCH 05/25] Enable base and gtk wrapper features for sway --- home/sway.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/home/sway.nix b/home/sway.nix index 3a2c467..1c28784 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -20,6 +20,10 @@ in { wayland.windowManager.sway = { enable = true; + wrapperFeatures = { + base = true; + gtk = true; + }; config = { modifier = modifier; terminal = lib.getExe pkgs.sakura; From 531ae9b443281975e70bc0915d9fdb4ba5081083 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Fri, 26 Jun 2026 22:04:54 +0200 Subject: [PATCH 06/25] Start solaar minimized on startup --- home/sway.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/sway.nix b/home/sway.nix index 1c28784..ec2c28e 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -53,7 +53,7 @@ in { startup = [ { command = (lib.getExe pkgs.dunst); } { command = (lib.getExe pkgs.networkmanagerapplet); } - { command = (lib.getExe pkgs.solaar); } + { command = "${lib.getExe pkgs.solaar} -w hide"; } { command = "${pkgs.ydotool}/bin/ydotoold"; } ]; keybindings = lib.mkOptionDefault { From 716e54dd12bfb78e9453e5c6baf04abfc7d5e3c0 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Fri, 26 Jun 2026 22:07:02 +0200 Subject: [PATCH 07/25] Add custom lightdm-gtk module for default session The upstream module does not allow for setting a default session, although this is possible in lightdm-gtk-greeter for more than two years now. --- modules/boot-login.nix | 4 +- modules/lightdm-gtk.nix | 167 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 modules/lightdm-gtk.nix diff --git a/modules/boot-login.nix b/modules/boot-login.nix index 7ad180a..9be17c6 100644 --- a/modules/boot-login.nix +++ b/modules/boot-login.nix @@ -1,5 +1,6 @@ { pkgs, + lib, ... }: { boot = { @@ -15,7 +16,8 @@ xserver.displayManager = { lightdm = { enable = true; - greeters.gtk = { + greeters.gtk.enable = false; + greeters.gtk-custom = { enable = true; theme = { name = "Adwaita-dark"; diff --git a/modules/lightdm-gtk.nix b/modules/lightdm-gtk.nix new file mode 100644 index 0000000..f697603 --- /dev/null +++ b/modules/lightdm-gtk.nix @@ -0,0 +1,167 @@ +{ + config, + lib, + pkgs, + ... +}: + +with lib; + +let + + dmcfg = config.services.xserver.displayManager; + ldmcfg = dmcfg.lightdm; + xcfg = config.services.xserver; + cfg = ldmcfg.greeters.gtk-custom; + + inherit (pkgs) writeText; + + theme = cfg.theme.package; + icons = cfg.iconTheme.package; + cursors = cfg.cursorTheme.package; + + gtkGreeterConf = writeText "lightdm-gtk-greeter.conf" '' + [greeter] + theme-name = ${cfg.theme.name} + icon-theme-name = ${cfg.iconTheme.name} + cursor-theme-name = ${cfg.cursorTheme.name} + cursor-theme-size = ${toString cfg.cursorTheme.size} + background = ${ldmcfg.background} + ${optionalString (dmcfg.defaultSession != null) "default-session = ${dmcfg.defaultSession}"} + ${optionalString (cfg.clock-format != null) "clock-format = ${cfg.clock-format}"} + ${optionalString (cfg.indicators != null) "indicators = ${concatStringsSep ";" cfg.indicators}"} + ${optionalString (xcfg.dpi != null) "xft-dpi=${toString xcfg.dpi}"} + ${cfg.extraConfig} + ''; + +in +{ + options = { + + services.xserver.displayManager.lightdm.greeters.gtk-custom = { + + enable = mkOption { + type = types.bool; + default = true; + description = '' + Whether to enable lightdm-gtk-greeter as the lightdm greeter. + ''; + }; + + theme = { + + package = mkPackageOption pkgs "gnome-themes-extra" { }; + + name = mkOption { + type = types.str; + default = "Adwaita"; + description = '' + Name of the theme to use for the lightdm-gtk-greeter. + ''; + }; + + }; + + iconTheme = { + + package = mkPackageOption pkgs "adwaita-icon-theme" { }; + + name = mkOption { + type = types.str; + default = "Adwaita"; + description = '' + Name of the icon theme to use for the lightdm-gtk-greeter. + ''; + }; + + }; + + cursorTheme = { + + package = mkPackageOption pkgs "adwaita-icon-theme" { }; + + name = mkOption { + type = types.str; + default = "Adwaita"; + description = '' + Name of the cursor theme to use for the lightdm-gtk-greeter. + ''; + }; + + size = mkOption { + type = types.int; + default = 16; + description = '' + Size of the cursor theme to use for the lightdm-gtk-greeter. + ''; + }; + }; + + clock-format = mkOption { + type = types.nullOr types.str; + default = null; + example = "%F"; + description = '' + Clock format string (as expected by strftime, e.g. "%H:%M") + to use with the lightdm gtk greeter panel. + + If set to null the default clock format is used. + ''; + }; + + indicators = mkOption { + type = types.nullOr (types.listOf types.str); + default = null; + example = [ + "~host" + "~spacer" + "~clock" + "~spacer" + "~session" + "~language" + "~a11y" + "~power" + ]; + description = '' + List of allowed indicator modules to use for the lightdm gtk + greeter panel. + + Built-in indicators include "~a11y", "~language", "~session", + "~power", "~clock", "~host", "~spacer". Unity indicators can be + represented by short name (e.g. "sound", "power"), service file name, + or absolute path. + + If set to null the default indicators are used. + ''; + }; + + extraConfig = mkOption { + type = types.lines; + default = ""; + description = '' + Extra configuration that should be put in the lightdm-gtk-greeter.conf + configuration file. + ''; + }; + + }; + + }; + + config = mkIf (ldmcfg.enable && cfg.enable) { + + services.xserver.displayManager.lightdm.greeter = mkDefault { + package = pkgs.lightdm-gtk-greeter.xgreeters; + name = "lightdm-gtk-greeter"; + }; + + environment.systemPackages = [ + cursors + icons + theme + ]; + + environment.etc."lightdm/lightdm-gtk-greeter.conf".source = gtkGreeterConf; + + }; +} From 0c605d96845116ab4ac0fb6db83d5c0174d16442 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Fri, 26 Jun 2026 22:08:49 +0200 Subject: [PATCH 08/25] Set default session to sway --- hosts/julius-framework/default.nix | 1 + modules/boot-login.nix | 1 + modules/i3.nix | 4 ++-- modules/sway.nix | 3 +++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hosts/julius-framework/default.nix b/hosts/julius-framework/default.nix index c4e26db..d30068d 100644 --- a/hosts/julius-framework/default.nix +++ b/hosts/julius-framework/default.nix @@ -13,6 +13,7 @@ ../../modules/network-client.nix ../../modules/locale.nix ../../modules/timezone-imperatively.nix + ../../modules/lightdm-gtk.nix ../../modules/boot-login.nix ../../modules/fonts.nix ../../modules/cli-essentials.nix diff --git a/modules/boot-login.nix b/modules/boot-login.nix index 9be17c6..6768f8a 100644 --- a/modules/boot-login.nix +++ b/modules/boot-login.nix @@ -13,6 +13,7 @@ }; services = { + displayManager.defaultSession = "sway"; xserver.displayManager = { lightdm = { enable = true; diff --git a/modules/i3.nix b/modules/i3.nix index 7ba88ce..be07464 100644 --- a/modules/i3.nix +++ b/modules/i3.nix @@ -1,7 +1,7 @@ -{pkgs, ...}: { +{pkgs, lib, ...}: { # i3 related options environment.pathsToLink = ["/libexec"]; # links /libexec from derivations to /run/current-system/sw - services.displayManager.defaultSession = "none+i3"; + services.displayManager.defaultSession = lib.mkDefault "none+i3"; services.xserver = { enable = true; diff --git a/modules/sway.nix b/modules/sway.nix index e09199e..8754556 100644 --- a/modules/sway.nix +++ b/modules/sway.nix @@ -1,7 +1,10 @@ { pkgs, + lib, ... }: { + services.displayManager.defaultSession = lib.mkDefault "sway"; + programs.sway = { enable = true; wrapperFeatures = { From f46b9ab1290c38d89fa875d4c91e82ea500fd589 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Fri, 26 Jun 2026 22:09:31 +0200 Subject: [PATCH 09/25] Configure vmVariant for more cores and memory When testing the config in a vm, have more ressources available. Otherwise oom errors can occur. --- flake.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flake.nix b/flake.nix index 3ff514b..2bf22f8 100644 --- a/flake.nix +++ b/flake.nix @@ -105,6 +105,12 @@ home-manager.extraSpecialArgs = inputs // specialArgs; home-manager.users.${username} = import ./users/${username}/home.nix; } + { + virtualisation.vmVariant.virtualisation = { + memorySize = 8192; + cores = 3; + }; + } ]; }; From c2d242301c3cd9bee9117a2d16afcd1f2fbb64aa Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 10:57:14 +0200 Subject: [PATCH 10/25] Add m15 configuration to kanshi --- home/kanshi.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/home/kanshi.nix b/home/kanshi.nix index f7ab682..c42b228 100644 --- a/home/kanshi.nix +++ b/home/kanshi.nix @@ -1,13 +1,15 @@ { ... }: let - t27 = "Lenovo Group Limited T27h-30 V5HGY026"; + t27 = "Lenovo Group Limited T27h-30*"; + m15 = "Lenovo Group Limited M15*"; in { services.kanshi = { enable = true; settings = [ { output.criteria = "eDP-1"; output.scale = 1.0; } { output.criteria = t27; } + { output.criteria = m15; } { profile.name = "mobile"; profile.outputs = [ { criteria = "eDP-1"; } @@ -19,6 +21,12 @@ in { { criteria = t27; position = "0,0"; } ]; } + { profile.name = "m15" ; + profile.outputs = [ + { criteria = "eDP-1"; position = "0,1080"; } + { criteria = m15; position = "168,0"; } + ]; + } ]; }; } From 591f8f4da7c044151f33e8cffddbf24af8c4ee71 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 10:57:40 +0200 Subject: [PATCH 11/25] Use rofi as output chooser for screencast Slurp does not allow for selecting windows. --- modules/sway.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/sway.nix b/modules/sway.nix index 8754556..c659326 100644 --- a/modules/sway.nix +++ b/modules/sway.nix @@ -18,8 +18,8 @@ enable = true; settings = { screencast = { - chooser_type = "simple"; - chooser_cmd = "${pkgs.slurp}/bin/slurp -f 'Select: %o' -or"; + chooser_type = "dmenu"; + chooser_cmd = "${lib.getExe pkgs.rofi} -dmenu -p 'Select a source to share:'"; }; }; }; From 0458bdcced43d279543a19a4db597149df3bdaa2 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 11:05:26 +0200 Subject: [PATCH 12/25] Add focus wrapping in sway This enables cycling through tabbed windows endlessly. --- home/sway.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home/sway.nix b/home/sway.nix index ec2c28e..396e7ac 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -233,6 +233,7 @@ in { }; extraConfig = '' assign [class = "^discord$"] 5 + focus_wrapping yes ''; }; From 3e3dff15f74973c6a4c4e64eac7bd41630af93d3 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 11:17:06 +0200 Subject: [PATCH 13/25] Migrate floating modifiers `class` is an X11 attribute, sway uses `app_id`. --- home/sway.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/home/sway.nix b/home/sway.nix index 396e7ac..60d576f 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -138,12 +138,13 @@ in { }; floating.criteria = [ { title = "MuseScore: Play Panel"; } - { class = "pavucontrol"; } - { class = "System-config-printer.py";} - { class = "Mate-calc"; } - { class = "Blueman-manager"; } - { class = "Nm-connection-editor"; } - { class = "Zotero"; window_role = "Toplevel"; } + { app_id = "org.pulseaudio.pavucontrol"; } + { app_id = "system-config-printer";} + { app_id = "mate-calc"; } + { app_id = ".blueman-manager-wrapped"; } + { app_id = "nm-connection-editor"; } + { app_id = "Zotero"; window_role = "Toplevel"; } + { app_id = "com.nextcloud.desktopclient.nextcloud"; } ]; colors = { background = "#2B2C2B"; From 30207ec5f0a08609f547755721847a7fb719b009 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 12:06:20 +0200 Subject: [PATCH 14/25] Remove dependency on i3exit Configure commands directly in sway. --- home/sway.nix | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/home/sway.nix b/home/sway.nix index 60d576f..c3b6b11 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -9,8 +9,7 @@ cfg = config.wayland.windowManager.sway; applications = "(D)iscord, Slac(k), (E)lement, (N)extcloud, (M)usic, (B)luetooth, (V)alent"; - i3exit = "(l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown"; - i3exitProgram = "/home/julius/.config/i3/i3exit"; + exit = "(l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown"; in { home.packages = with pkgs; [ wdisplays @@ -92,7 +91,7 @@ in { "${modifier}+F3" = "exec nemo"; "${modifier}+F4" = "exec ${lib.getExe pkgs.thunderbird}"; "${modifier}+Shift+d" = ''mode "${applications}"''; - "${modifier}+Escape" = ''mode "${i3exit}"''; + "${modifier}+Escape" = ''mode "${exit}"''; }; modes = { resize = { @@ -119,15 +118,14 @@ in { "Escape" = "mode default"; "Return" = "mode default"; }; - "${i3exit}" = { - "l" = "exec ${i3exitProgram} lock, mode default"; - "Shift+l" = "exec ${i3exitProgram} slock, mode default"; - "s" = "exec ${i3exitProgram} suspend, mode default"; - "u" = "exec ${i3exitProgram} switch_user, mode default"; - "e" = "exec ${i3exitProgram} logout, mode default"; - "h" = "exec ${i3exitProgram} hibernate, mode default"; - "r" = "exec ${i3exitProgram} reboot, mode default"; - "Shift+s" = "exec ${i3exitProgram} shutdown, mode default"; + "${exit}" = { + "l" = "exec ${pkgs.systemd}/bin/loginctl lock-session, mode default"; + "s" = "exec ${pkgs.systemd}/bin/systemctl suspend, mode default"; + "u" = "exec ${pkgs.lightdm}/bin/dm-tool lock, mode default"; + "e" = "exec ${pkgs.sway}/bin/swaymsg exit, mode default"; + "h" = "exec ${pkgs.systemd}/bin/systemctl hibernate, mode default"; + "r" = "exec ${pkgs.systemd}/bin/systemctl reboot, mode default"; + "Shift+s" = "exec ${pkgs.systemd}/bin/systemctl shutdown, mode default"; "Escape" = "mode default"; "Return" = "mode default"; }; From 25139ece89672d2f6aa73912ddaf491ecae0869c Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 12:06:46 +0200 Subject: [PATCH 15/25] Configure swaylock and swayidle --- home/sway.nix | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/home/sway.nix b/home/sway.nix index c3b6b11..e1f8099 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -7,6 +7,7 @@ }: let modifier = "Mod4"; cfg = config.wayland.windowManager.sway; + background = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/wallpapers/simple-dark-gray/contents/images/nix-wallpaper-simple-dark-gray_bottom.png"; applications = "(D)iscord, Slac(k), (E)lement, (N)extcloud, (M)usic, (B)luetooth, (V)alent"; exit = "(l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown"; @@ -43,7 +44,7 @@ in { }; output = { "*" = { - bg = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom}/share/wallpapers/simple-dark-gray/contents/images/nix-wallpaper-simple-dark-gray_bottom.png fill"; + bg = "${background} fill"; }; eDP-1 = { scale = "1"; @@ -236,6 +237,29 @@ in { ''; }; + programs.swaylock = { + enable = true; + settings = { + image = background; + }; + }; + + services.swayidle = let + swaylock = "${lib.getExe pkgs.swaylock} -f"; + switchOutput = "${pkgs.sway}/bin/swaymsg 'output * power'"; + in { + enable = true; + events = { + before-sleep = swaylock; + lock = swaylock; + after-resume = "${switchOutput} on"; + }; + timeouts = [ + { timeout = 300; command = "${switchOutput} off"; } + { timeout = 330; command = swaylock; } + ]; + }; + services.wlsunset = { enable = true; latitude = osConfig.location.latitude; From 74581599cdc010e95bfed102968a5eb7de7d842d Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 12:08:39 +0200 Subject: [PATCH 16/25] Lowercase app_id of Element --- home/sway.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/sway.nix b/home/sway.nix index e1f8099..655717e 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -133,7 +133,7 @@ in { }; assigns = { "6" = [{ app_id = "thunderbird"; }]; - "5" = [{ app_id = "^Element$|^com.slack.Slack$"; }]; + "5" = [{ app_id = "^element$|^com.slack.Slack$"; }]; }; floating.criteria = [ { title = "MuseScore: Play Panel"; } From 81a4822e2d66e765e1bcbd522b6d01567317e0c9 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 12:09:01 +0200 Subject: [PATCH 17/25] Reorder pam swaylock rules This enables entering a password in swaylock without providing fingerprint. --- modules/sway.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/sway.nix b/modules/sway.nix index c659326..7216a62 100644 --- a/modules/sway.nix +++ b/modules/sway.nix @@ -28,5 +28,6 @@ xdg-desktop-portal-gtk ]; }; + security.pam.services.swaylock.rules.auth.unix.order = 11200; } From b6909c162b15e49ae0f4172bd9fcdad2949cfcfd Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 17:11:20 +0200 Subject: [PATCH 18/25] Add screen dimming and switching off displays on idle --- home/sway.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/home/sway.nix b/home/sway.nix index 655717e..6dc7103 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -245,6 +245,8 @@ in { }; services.swayidle = let + dimDuration = 15; + dimScreen = "${lib.getExe pkgs.chayang} -d ${toString dimDuration}"; swaylock = "${lib.getExe pkgs.swaylock} -f"; switchOutput = "${pkgs.sway}/bin/swaymsg 'output * power'"; in { @@ -255,8 +257,7 @@ in { after-resume = "${switchOutput} on"; }; timeouts = [ - { timeout = 300; command = "${switchOutput} off"; } - { timeout = 330; command = swaylock; } + { timeout = 300; command = "${dimScreen} && ${switchOutput} off && ${swaylock}"; resumeCommand = "${switchOutput} on"; } ]; }; From c7fb1dd4ce0ea5270677cd3174ea03614503c986 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 19:14:51 +0200 Subject: [PATCH 19/25] Use same broker as os for sway --- home/sway.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home/sway.nix b/home/sway.nix index 6dc7103..d14002a 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -24,6 +24,7 @@ in { base = true; gtk = true; }; + systemd.dbusImplementation = osConfig.services.dbus.implementation; config = { modifier = modifier; terminal = lib.getExe pkgs.sakura; From ea4841403ab31f4ae4ca839c2bcc1bec0cc7c423 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 19:15:09 +0200 Subject: [PATCH 20/25] Set default sway workspace --- home/sway.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/sway.nix b/home/sway.nix index d14002a..646a92e 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -29,7 +29,7 @@ in { modifier = modifier; terminal = lib.getExe pkgs.sakura; menu = "${lib.getExe pkgs.rofi} -show drun"; - # rename workspaces + defaultWorkspace = "workspace number 1"; fonts = { names = [ "FontAwesome5Free" "xft:URWGothic-Book" ]; size = 11.0; From ddc717a6c0c71b7d68e4204ecc97e9a86d89a383 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 19:15:20 +0200 Subject: [PATCH 21/25] Use correct command for shutdown from sway --- home/sway.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/sway.nix b/home/sway.nix index 646a92e..970e89d 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -127,7 +127,7 @@ in { "e" = "exec ${pkgs.sway}/bin/swaymsg exit, mode default"; "h" = "exec ${pkgs.systemd}/bin/systemctl hibernate, mode default"; "r" = "exec ${pkgs.systemd}/bin/systemctl reboot, mode default"; - "Shift+s" = "exec ${pkgs.systemd}/bin/systemctl shutdown, mode default"; + "Shift+s" = "exec ${pkgs.systemd}/bin/systemctl poweroff, mode default"; "Escape" = "mode default"; "Return" = "mode default"; }; From bb8559f6654234d0d9e54f52b1a341d6fb061702 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sat, 27 Jun 2026 19:15:41 +0200 Subject: [PATCH 22/25] Use greetd and regreet instead of lightdm LightDM brings problems with setting up the session which leads to kanshi, swayidle and such services to not get the correct environment variables like `WAYLAND_DISPLAY`. --- modules/boot-login.nix | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/modules/boot-login.nix b/modules/boot-login.nix index 6768f8a..44dcc50 100644 --- a/modules/boot-login.nix +++ b/modules/boot-login.nix @@ -16,10 +16,10 @@ displayManager.defaultSession = "sway"; xserver.displayManager = { lightdm = { - enable = true; + enable = false; greeters.gtk.enable = false; greeters.gtk-custom = { - enable = true; + enable = false; theme = { name = "Adwaita-dark"; }; @@ -32,4 +32,22 @@ }; }; + services.greetd = { + enable = true; + settings = { + skip_selection = true; + }; + }; + + programs.regreet = { + enable = true; + theme = { + name = "Adwaita-dark"; + }; + iconTheme = { + name = "Arc"; + package = pkgs.arc-icon-theme; + }; + }; + } From d0bc33fbf91ef4c337f65db979a02044f6585aed Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Mon, 29 Jun 2026 22:47:23 +0200 Subject: [PATCH 23/25] Add networkmanager_dmenu keybinding --- home/sway.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home/sway.nix b/home/sway.nix index 970e89d..6f3d42d 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -92,6 +92,7 @@ in { "${modifier}+Shift+F2" = "exec ${lib.getExe pkgs.firefox} --private-window"; "${modifier}+F3" = "exec nemo"; "${modifier}+F4" = "exec ${lib.getExe pkgs.thunderbird}"; + "${modifier}+Ctrl+w" = "exec ${lib.getExe pkgs.networkmanager_dmenu}"; "${modifier}+Shift+d" = ''mode "${applications}"''; "${modifier}+Escape" = ''mode "${exit}"''; }; From cb8bf9a66b8e5d1da890c1168f76a7cb9ad54a6e Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Thu, 2 Jul 2026 19:51:14 +0200 Subject: [PATCH 24/25] Migrate lightdm module to new options The old services.xserver.displayManager are moved out of xserver --- modules/lightdm-gtk.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lightdm-gtk.nix b/modules/lightdm-gtk.nix index f697603..b694a64 100644 --- a/modules/lightdm-gtk.nix +++ b/modules/lightdm-gtk.nix @@ -9,8 +9,8 @@ with lib; let - dmcfg = config.services.xserver.displayManager; - ldmcfg = dmcfg.lightdm; + dmcfg = config.services.displayManager; + ldmcfg = xcfg.displayManager.lightdm; xcfg = config.services.xserver; cfg = ldmcfg.greeters.gtk-custom; From e7d2ace6ef035ef5fcfefe8ddb1634e7bf12c2e7 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Thu, 2 Jul 2026 19:54:23 +0200 Subject: [PATCH 25/25] Update flake.lock --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 79d7cba..60460bf 100644 --- a/flake.lock +++ b/flake.lock @@ -197,11 +197,11 @@ ] }, "locked": { - "lastModified": 1781981105, - "narHash": "sha256-/1nNBbA7PrSQpTc9Qazkhl4kIPg+TNl0CjxS3UQJKlw=", + "lastModified": 1782704057, + "narHash": "sha256-G1I1gd32F7mp9LAe1DaZ4ZL7NX5gyiKwdCMwro1Vrck=", "owner": "nix-community", "repo": "home-manager", - "rev": "7bfff44b465909f69a442701293bc0badcf476dc", + "rev": "868d0a692de703c2de98fab61968e4e310b7c28e", "type": "github" }, "original": { @@ -261,11 +261,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1782166108, - "narHash": "sha256-/EtnQBcKbsaCAGQ5VRcplrHRkR4ryqyLMpBfkVuG9Xw=", + "lastModified": 1782562157, + "narHash": "sha256-a7+T6QSeowynwZ1ZJJbP8T8ntAytvrui8kFGJmIZt2c=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "875776f0252fcb8618bb948640a0d1f7a5b362be", + "rev": "a9cf7546a938c737b079e738de73934a13de9784", "type": "github" }, "original": { @@ -338,11 +338,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1781577229, - "narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=", + "lastModified": 1782723713, + "narHash": "sha256-oPXCU/SSUokcGaJREHibG1CBX3+s/W7orDWQOZDsEeQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "567a49d1913ce81ac6e9582e3553dd90a955875f", + "rev": "b5aa0fbd538984f6e3d201be0005b4463d8b09f8", "type": "github" }, "original": { @@ -354,11 +354,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1782116945, - "narHash": "sha256-G3tw/IXmaH6IQ2upZvhuN9sG8CkuX+BLuJDpE8hz0Ds=", + "lastModified": 1782847225, + "narHash": "sha256-JC9PjqKYG9ve5U8aDOLQipp3+KLANBHUvGdLZlxzdKI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "34268251cf5547d39063f2c5ea9a196246f7f3a6", + "rev": "95ca1e203c0750115fd4a6f17d5a245dfe6b1edd", "type": "github" }, "original": {