greetd: Make input and output configurable
This commit is contained in:
parent
fa8900d4d5
commit
51fc7131c1
2 changed files with 56 additions and 5 deletions
|
@ -15,6 +15,8 @@
|
|||
|
||||
microvm.nixosModules.host
|
||||
|
||||
./outline.nix
|
||||
|
||||
../../users/erwin
|
||||
../../users/root
|
||||
];
|
||||
|
@ -52,6 +54,30 @@
|
|||
sway = true;
|
||||
wayvnc = true;
|
||||
wallpaper = ../../wallpapers/river-3840.png;
|
||||
output = {
|
||||
"DP-1" = {
|
||||
bg = "${../../wallpapers/river-3840.png} fill";
|
||||
mode = "3840x2160@60Hz";
|
||||
position = "0 0";
|
||||
};
|
||||
"DP-3" = {
|
||||
bg = "${../../wallpapers/river-3840.png} fill";
|
||||
mode = "3840x2160@60Hz";
|
||||
position = "3840 0";
|
||||
};
|
||||
};
|
||||
input = {
|
||||
"1241:662:USB-HID_Keyboard" = {
|
||||
xkb_layout = "us,us";
|
||||
xkb_variant = "colemak,";
|
||||
xkb_options = "lv3:ralt_switch,eurosign:5,caps:backspace,ctrl:nocaps,grp:sclk_toggle,grp_led:scroll";
|
||||
xkb_numlock = "enabled";
|
||||
};
|
||||
"1133:49257:Logitech_USB_Laser_Mouse" = {
|
||||
natural_scroll = "enabled";
|
||||
pointer_accel = "1";
|
||||
};
|
||||
};
|
||||
};
|
||||
kanata = {
|
||||
enable = false;
|
||||
|
@ -320,11 +346,15 @@
|
|||
};
|
||||
};
|
||||
|
||||
# sops = {
|
||||
# defaultSopsFile = ./secrets.yaml;
|
||||
sops = {
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
|
||||
# secrets = {};
|
||||
# };
|
||||
secrets = {
|
||||
outline-keycloak-secret = {
|
||||
owner = "outline";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
|
|
|
@ -23,6 +23,15 @@ with lib; let
|
|||
'';
|
||||
|
||||
envVars = concatStringsSep " " (builtins.attrNames config.environment.sessionVariables);
|
||||
|
||||
moduleStr = moduleType: name: attrs: ''
|
||||
${moduleType} "${name}" {
|
||||
${builtins.concatStringsSep "\n" (lib.mapAttrsToList (name: value: "${name} ${value}") attrs)}
|
||||
}
|
||||
'';
|
||||
|
||||
inputStr = moduleStr "input";
|
||||
outputStr = moduleStr "output";
|
||||
in
|
||||
{
|
||||
options.eboskma.greetd = {
|
||||
|
@ -30,6 +39,16 @@ in
|
|||
sway = mkEnableOption "sway";
|
||||
steam = mkEnableOption "steam";
|
||||
wayvnc = mkEnableOption "wayvnc";
|
||||
output = mkOption {
|
||||
description = "An attribute set that defines output modules. See the sway-output(5) manpage for options";
|
||||
type = types.attrsOf (types.attrsOf types.str);
|
||||
default = { };
|
||||
};
|
||||
input = mkOption {
|
||||
description = "An attribute set that defines input modules. See the sway-input(5) manpage for options";
|
||||
type = types.attrsOf (types.attrsOf types.str);
|
||||
default = { };
|
||||
};
|
||||
wallpaper = mkOption {
|
||||
description = "Path to an image to use as wallpaper";
|
||||
type = types.path;
|
||||
|
@ -90,7 +109,9 @@ in
|
|||
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -s /etc/greetd/gtkgreet.css -b ${cfg.wallpaper}; swaymsg exit"
|
||||
include /etc/sway/config.d/*
|
||||
''
|
||||
]);
|
||||
]
|
||||
++ (mapAttrsToList inputStr cfg.input)
|
||||
++ (mapAttrsToList outputStr cfg.output));
|
||||
user = "greeter";
|
||||
group = "greeter";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue