Configure greetd for autologin
This commit is contained in:
parent
4876d25d6c
commit
d7c428481b
1 changed files with 103 additions and 92 deletions
|
@ -29,7 +29,25 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.chvp.graphical.sway.enable {
|
config = lib.mkIf config.chvp.graphical.sway.enable {
|
||||||
services.dbus.packages = with pkgs; [ dconf ];
|
services = {
|
||||||
|
dbus.packages = with pkgs; [ dconf ];
|
||||||
|
greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings =
|
||||||
|
let
|
||||||
|
wrapped-command = pkgs.writeShellScript "sway-run" "systemd-run sway $@";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
default_session = {
|
||||||
|
command = "${pkgs.greetd.greetd}/bin/agreety --cmd ${wrapped-command}";
|
||||||
|
};
|
||||||
|
initial_session = {
|
||||||
|
command = "${wrapped-command}";
|
||||||
|
user = "charlotte";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
security.pam.services.swaylock = { };
|
security.pam.services.swaylock = { };
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -42,100 +60,93 @@ in
|
||||||
wf-recorder
|
wf-recorder
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
];
|
];
|
||||||
programs = {
|
programs.i3status-rust = {
|
||||||
zsh.loginExtra = ''
|
enable = true;
|
||||||
if [[ -z "$DISPLAY" ]] && [[ $(tty) = "/dev/tty1" ]]; then
|
bars.default = {
|
||||||
exec sway
|
settings = {
|
||||||
fi
|
icons.icons = "awesome6";
|
||||||
'';
|
theme = {
|
||||||
i3status-rust = {
|
theme = "gruvbox-light";
|
||||||
enable = true;
|
overrides = {
|
||||||
bars.default = {
|
idle_bg = "#ffffff";
|
||||||
settings = {
|
idle_fg = "#000000";
|
||||||
icons.icons = "awesome6";
|
info_bg = "#6aaeff";
|
||||||
theme = {
|
info_fg = "#000000";
|
||||||
theme = "gruvbox-light";
|
good_bg = "#5ada88";
|
||||||
overrides = {
|
good_fg = "#000000";
|
||||||
idle_bg = "#ffffff";
|
warning_bg = "#f5df23";
|
||||||
idle_fg = "#000000";
|
warning_fg = "#000000";
|
||||||
info_bg = "#6aaeff";
|
critical_bg = "#ff8892";
|
||||||
info_fg = "#000000";
|
critical_fg = "#000000";
|
||||||
good_bg = "#5ada88";
|
separator = "";
|
||||||
good_fg = "#000000";
|
|
||||||
warning_bg = "#f5df23";
|
|
||||||
warning_fg = "#000000";
|
|
||||||
critical_bg = "#ff8892";
|
|
||||||
critical_fg = "#000000";
|
|
||||||
separator = "";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
blocks = [
|
|
||||||
{
|
|
||||||
block = "net";
|
|
||||||
device = "wlp2s0";
|
|
||||||
format = " $icon $ssid ";
|
|
||||||
missing_format = "";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
block = "net";
|
|
||||||
device = "wlp0s20f3";
|
|
||||||
format = " $icon $ssid ";
|
|
||||||
missing_format = "";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
block = "net";
|
|
||||||
device = "enp0s31f6";
|
|
||||||
format = " $icon $ip ";
|
|
||||||
missing_format = "";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
block = "net";
|
|
||||||
device = "enp0s13f0u2u2";
|
|
||||||
format = " $icon $ip ";
|
|
||||||
missing_format = "";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
block = "battery";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
block = "backlight";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
block = "music";
|
|
||||||
player = "firefox";
|
|
||||||
format = " $icon $combo.str(w:40) $play $next |";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
block = "sound";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
block = "custom";
|
|
||||||
command = "${mic-status}";
|
|
||||||
interval = 1;
|
|
||||||
click = [{
|
|
||||||
button = "left";
|
|
||||||
cmd = "${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
|
||||||
update = true;
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
block = "custom";
|
|
||||||
json = true;
|
|
||||||
command = "${mail-status}";
|
|
||||||
interval = 1;
|
|
||||||
click = [{
|
|
||||||
button = "left";
|
|
||||||
cmd = "mbsync -a && emacsclient --eval \"(mu4e-update-index)\"";
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
block = "time";
|
|
||||||
interval = 1;
|
|
||||||
format = " $icon $timestamp.datetime(f:'%a %d/%m %H:%M') ";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
blocks = [
|
||||||
|
{
|
||||||
|
block = "net";
|
||||||
|
device = "wlp2s0";
|
||||||
|
format = " $icon $ssid ";
|
||||||
|
missing_format = "";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "net";
|
||||||
|
device = "wlp0s20f3";
|
||||||
|
format = " $icon $ssid ";
|
||||||
|
missing_format = "";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "net";
|
||||||
|
device = "enp0s31f6";
|
||||||
|
format = " $icon $ip ";
|
||||||
|
missing_format = "";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "net";
|
||||||
|
device = "enp0s13f0u2u2";
|
||||||
|
format = " $icon $ip ";
|
||||||
|
missing_format = "";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "battery";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "backlight";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "music";
|
||||||
|
player = "firefox";
|
||||||
|
format = " $icon $combo.str(w:40) $play $next |";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "sound";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "custom";
|
||||||
|
command = "${mic-status}";
|
||||||
|
interval = 1;
|
||||||
|
click = [{
|
||||||
|
button = "left";
|
||||||
|
cmd = "${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||||
|
update = true;
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "custom";
|
||||||
|
json = true;
|
||||||
|
command = "${mail-status}";
|
||||||
|
interval = 1;
|
||||||
|
click = [{
|
||||||
|
button = "left";
|
||||||
|
cmd = "mbsync -a && emacsclient --eval \"(mu4e-update-index)\"";
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "time";
|
||||||
|
interval = 1;
|
||||||
|
format = " $icon $timestamp.datetime(f:'%a %d/%m %H:%M') ";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue