From 4712e535f9a9f670eb564cded3e5fdcecfd02d62 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 2 May 2022 01:23:18 +0200 Subject: [PATCH 1/8] sway: fix cursor not scaling correctly --- modules/sway/config/config.d/theme.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/sway/config/config.d/theme.conf b/modules/sway/config/config.d/theme.conf index 27ae794a..eb4427aa 100644 --- a/modules/sway/config/config.d/theme.conf +++ b/modules/sway/config/config.d/theme.conf @@ -11,3 +11,6 @@ exec_always import-gtk-settings \ gtk-theme:gtk-theme-name \ icon-theme:gtk-icon-theme-name \ cursor-theme:gtk-cursor-theme-name + +# Workaround to fix cursor scaling, see https://github.com/swaywm/sway/issues/4112 +seat seat0 xcursor_theme Adwaita From a772a91d7b9f4a60fff50ec7f48149297b44562e Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 2 May 2022 01:23:41 +0200 Subject: [PATCH 2/8] zsh: precmd() don't echo trailing newline --- modules/terminal-life/zsh/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/terminal-life/zsh/default.nix b/modules/terminal-life/zsh/default.nix index 2541fdd0..91bb422c 100644 --- a/modules/terminal-life/zsh/default.nix +++ b/modules/terminal-life/zsh/default.nix @@ -86,7 +86,7 @@ in precmd () { DIR_NAME=$(pwd | sed "s|^$HOME|~|g") - echo -e "\e]2;$DIR_NAME\e\\" + echo -e -n "\e]2;$DIR_NAME\e\\" } # If a command is not found, show me where it is From 077ab8b4f4974f41d71aeb3b81ff8a20b910feff Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 2 May 2022 01:22:49 +0200 Subject: [PATCH 3/8] Fix ISO target path for publishing --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1c979c5a..527c0853 100644 --- a/.drone.yml +++ b/.drone.yml @@ -140,7 +140,7 @@ steps: from_secret: ssh_port key: from_secret: ssh_key - target: /var/www/pub.solar + target: /srv/os source: - /var/nix/iso-cache/*.iso strip_components: 3 @@ -158,6 +158,6 @@ volumes: --- kind: signature -hmac: 0c0731948a73c30cff44c3dbbf4d1a131680b8777d9986ca04699b9f5c82bab2 +hmac: 7aa9b1eadc2638d7c0b6da2eea92cce650232a8c44ce9ab4a2b0e563f7432693 ... From 159ae86722bc706ff42d4d3e4b0f49ede2f253de Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Mon, 2 May 2022 20:19:04 +0200 Subject: [PATCH 4/8] Start sway as a systemd user process again After login on TTY1 sway was started by calling exec sway See also b84d88fc92c6710cff8e294315eb23ceb7ecf40e Co-authored-by: Hendrik Sokolowski --- modules/sway/config/config.d/custom-keybindings.conf | 2 +- modules/sway/default.nix | 1 + modules/terminal-life/zsh/default.nix | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/sway/config/config.d/custom-keybindings.conf b/modules/sway/config/config.d/custom-keybindings.conf index 5faddece..d5887e3e 100644 --- a/modules/sway/config/config.d/custom-keybindings.conf +++ b/modules/sway/config/config.d/custom-keybindings.conf @@ -37,7 +37,7 @@ set $mode_system (l)ock, (e)xit, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutd bindsym $mod+0 mode "$mode_system" mode "$mode_system" { bindsym l exec swaylock-bg, mode "default" - bindsym e exec swaymsg exit, mode "default" + bindsym e exec systemctl --user stop graphical-session.target, mode "default" bindsym s exec systemctl suspend, mode "default" bindsym h exec systemctl hibernate, mode "default" bindsym r exec systemctl reboot, mode "default" diff --git a/modules/sway/default.nix b/modules/sway/default.nix index 83f407e4..35013dd2 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -86,6 +86,7 @@ in #programs.waybar.systemd.enable = true; systemd.user.services.mako = import ./mako.service.nix pkgs; + systemd.user.services.sway = import ./sway.service.nix pkgs; systemd.user.services.swayidle = import ./swayidle.service.nix pkgs; systemd.user.services.xsettingsd = import ./xsettingsd.service.nix pkgs; systemd.user.services.waybar = import ./waybar.service.nix pkgs; diff --git a/modules/terminal-life/zsh/default.nix b/modules/terminal-life/zsh/default.nix index 91bb422c..5cc81ca8 100644 --- a/modules/terminal-life/zsh/default.nix +++ b/modules/terminal-life/zsh/default.nix @@ -19,7 +19,7 @@ in }; loginExtra = '' - [ "$(tty)" = "/dev/tty1" ] && exec sway + [ "$(tty)" = "/dev/tty1" ] && exec ${pkgs.sway-service}/bin/sway-service ''; shellAliases = { From 07577283e3c7e1a4712d769e25c42359bed7110c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Tue, 3 May 2022 11:43:36 +0200 Subject: [PATCH 5/8] Remove fake comment from gitmessage This was part of a botched copy paste and should not be in the actual gitmessage, since the real change list will come from git itself. --- profiles/base-user/.config/git/gitmessage.nix | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/profiles/base-user/.config/git/gitmessage.nix b/profiles/base-user/.config/git/gitmessage.nix index 7f4b1c64..69d2ca72 100644 --- a/profiles/base-user/.config/git/gitmessage.nix +++ b/profiles/base-user/.config/git/gitmessage.nix @@ -4,29 +4,20 @@ let xdg = config.home-manager.users."${user.name}".xdg; in '' -# Title: Summary, imperative, start upper case, don't end with a period -# No more than 50 chars. #### 50 chars is here: # -# + # Title: Summary, imperative, start upper case, don't end with a period + # No more than 50 chars. #### 50 chars is here: # + # -# ^ Remember ending with an extra blank line -# Body: Explain *what* and *why* (not *how*). Include issue number. -# Wrap at 72 chars. ################################## which is here: # -# + # ^ Remember ending with an extra blank line + # Body: Explain *what* and *why* (not *how*). Include issue number. + # Wrap at 72 chars. ################################## which is here: # + # -# ^ Remember ending with an extra blank line -# At the end: Include Co-authored-by for all contributors. -# -Co-authored-by: ${user.fullName} <${user.email}> + # ^ Remember ending with an extra blank line + # At the end: Include Co-authored-by for all contributors. + # + Co-authored-by: ${user.fullName} <${user.email}> -# Please enter the commit message for your changes. Lines starting -# with '#' will be ignored, and an empty message aborts the commit. -# -# On branch master -# Your branch is up to date with 'origin/main'. -# -# Changes to be committed: -# new file: installation.md -# '' From af12b9eabda8931c717902136b74b309d575fff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Tue, 3 May 2022 11:48:00 +0200 Subject: [PATCH 6/8] Remove gitmessage indentation From f4a2cc34bb3b913717fd6402b986219fde453ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Tue, 3 May 2022 12:43:32 +0200 Subject: [PATCH 7/8] Comment Co-Authored-by --- profiles/base-user/.config/git/gitmessage.nix | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/profiles/base-user/.config/git/gitmessage.nix b/profiles/base-user/.config/git/gitmessage.nix index 69d2ca72..0d80f469 100644 --- a/profiles/base-user/.config/git/gitmessage.nix +++ b/profiles/base-user/.config/git/gitmessage.nix @@ -4,20 +4,19 @@ let xdg = config.home-manager.users."${user.name}".xdg; in '' - # Title: Summary, imperative, start upper case, don't end with a period - # No more than 50 chars. #### 50 chars is here: # - # +# Title: Summary, imperative, start upper case, don't end with a period +# No more than 50 chars. #### 50 chars is here: # +# - # ^ Remember ending with an extra blank line - # Body: Explain *what* and *why* (not *how*). Include issue number. - # Wrap at 72 chars. ################################## which is here: # - # +# ^ Remember ending with an extra blank line +# Body: Explain *what* and *why* (not *how*). Include issue number. +# Wrap at 72 chars. ################################## which is here: # +# - # ^ Remember ending with an extra blank line - # At the end: Include Co-authored-by for all contributors. - # - Co-authored-by: ${user.fullName} <${user.email}> - +# ^ Remember ending with an extra blank line +# At the end: Include Co-authored-by for all contributors. +# +# Co-authored-by: Example Name '' From 3ce121ce60ac150b68413173814f273a9972acdf Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Tue, 3 May 2022 19:11:25 +0200 Subject: [PATCH 8/8] Introduce option to enable autologin This option allows to disable autologin which is enabled by default. --- modules/graphical/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index d38b4d1a..0bb9781c 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -26,6 +26,11 @@ in default = { }; }; }; + autologin.enable = mkOption { + type = types.bool; + default = true; + description = "Feature flag enabling autologin after boot."; + }; wayland.software-renderer.enable = mkOption { type = types.bool; default = false; @@ -54,7 +59,7 @@ in }; }; - services.getty.autologinUser = mkForce "${psCfg.user.name}"; + services.getty.autologinUser = mkIf cfg.autologin.enable "${psCfg.user.name}"; qt5 = { enable = true;