diff --git a/machines/mimir/configuration.nix b/machines/mimir/configuration.nix index db8a926..299e15a 100644 --- a/machines/mimir/configuration.nix +++ b/machines/mimir/configuration.nix @@ -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 diff --git a/modules/greetd/default.nix b/modules/greetd/default.nix index 4279065..58c41a1 100644 --- a/modules/greetd/default.nix +++ b/modules/greetd/default.nix @@ -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"; };