diff options
author | Franck Cuny <franck@fcuny.net> | 2023-01-15 09:47:32 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-01-15 09:47:32 -0800 |
commit | 397831f63ceb4a00ab057e56587f96b091822841 (patch) | |
tree | a2a7c8529877c009a4f37b712d5e8e8700f38c92 | |
parent | ref(modules/prometheus): don't backup the data (diff) | |
download | world-397831f63ceb4a00ab057e56587f96b091822841.tar.gz |
ref(home/sway): auto login and enable systemd integration
When the laptop boots, I already have to enter a passphrase to unlock the disks, I can trust that it's me and can automatically log into the system. Enable systemd integration for sway so that the correct session is started and environment variables are imported properly.
-rw-r--r-- | home/wm/sway/default.nix | 11 | ||||
-rw-r--r-- | hosts/aptos/services.nix | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/home/wm/sway/default.nix b/home/wm/sway/default.nix index 45fd929..ae8316f 100644 --- a/home/wm/sway/default.nix +++ b/home/wm/sway/default.nix @@ -27,6 +27,13 @@ in wayland.windowManager.sway = { enable = true; + # in order to import some variables (e.g. PATH) so that all the + # units that will be started have all the required environment + # variables + extraSessionCommands = "systemctl --user import-environment"; + # this will start sway-session.target and run + # dbus-update-activation-environment + systemdIntegration = true; config = { # FIXME: this should be a variable terminal = "alacritty"; @@ -104,10 +111,6 @@ in # This is for aptos "eDP-1" = { scale = "1.3"; }; }; - startup = [{ - command = '' - exec "systemctl --user import-environment; systemctl --user start sway-session.target"''; - }]; }; }; }; diff --git a/hosts/aptos/services.nix b/hosts/aptos/services.nix index 1886ca7..8d31a81 100644 --- a/hosts/aptos/services.nix +++ b/hosts/aptos/services.nix @@ -2,6 +2,7 @@ let secrets = config.age.secrets; in { + services.getty.autologinUser = "fcuny"; my.services = { # monitors and controls temperature thermald.enable = true; |