replace unl0kr with buffyboard

i still need to wire it to gocryptfs
This commit is contained in:
2024-10-05 04:40:56 +00:00
parent 4cead8eef2
commit e60076bdb9
4 changed files with 91 additions and 1 deletions

View File

@@ -31,6 +31,11 @@
sane.programs.sysadminUtils.enableFor.system = lib.mkDefault true;
sane.programs.consoleUtils.enableFor.user.colin = lib.mkDefault true;
sane.services.buffyboard.enable = true;
sane.services.buffyboard.settings.theme.default = "pmos-light";
# sane.services.buffyboard.settings.quirks.fbdev_force_refresh = true;
sane.services.buffyboard.extraFlags = [ "--verbose" ];
# time.timeZone = "America/Los_Angeles";
time.timeZone = "Etc/UTC"; # DST is too confusing for me => use a stable timezone

View File

@@ -169,7 +169,7 @@ in
"switchboard" # network/bluetooth/sound control panel
"syshud" # volume notifier
"systemctl" # used by sway config
"unl0kr" # greeter
# "unl0kr" # greeter
# "waybar"
"wdisplays" # like xrandr
"wireplumber" # used by sway config

View File

@@ -0,0 +1,84 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sane.services.buffyboard;
ini = pkgs.formats.ini { };
in
{
options.sane.services.buffyboard = with lib; {
enable = mkEnableOption "buffyboard framebuffer keyboard";
package = mkPackageOption pkgs "buffyboard" {};
extraFlags = mkOption {
type = types.listOf types.str;
default = [];
description = ''
Extra CLI arguments to pass to buffyboard.
'';
example = [
"--geometry=1920x1080@640,0"
"--dpi=192"
"--rotate=2"
"--verbose"
];
};
settings = mkOption {
type = types.submodule {
freeformType = ini.type;
options.theme.default = mkOption {
type = types.either types.str (types.enum [
"adwaita-light"
"adwaita-dark"
"breezy-light"
"breezy-dark"
"nord-light"
"nord-dark"
"pmos-light"
"pmos-dark"
]);
default = "breezy-dark";
description = ''
Selects the default theme on boot. Can be changed at runtime to the alternative theme.
'';
};
options.input.pointer = mkOption {
type = types.bool;
default = true;
description = ''
Enable or disable the use of a hardware mouse or other pointing device.
'';
};
options.input.touchscreen = mkOption {
type = types.bool;
default = true;
description = ''
Enable or disable the use of the touchscreen.
'';
};
options.quirks.fbdev_force_refresh = mkOption {
type = types.bool;
default = false;
description = ''
If true and using the framebuffer backend, this triggers a display refresh after every draw operation.
This has a negative performance impact.
'';
};
};
default = {};
};
};
config = lib.mkIf cfg.enable {
systemd.services.buffyboard = {
# we need only a single buffyboard instance and it can input to any tty
wantedBy = [ "getty.target" ];
before = [ "getty.target" ];
serviceConfig.Type = "simple";
serviceConfig.ExecStart = "${lib.getExe cfg.package} ${lib.escapeShellArgs cfg.extraFlags}";
serviceConfig.Restart = "on-failure";
serviceConfig.RestartSec = "2s";
# TODO: sandboxing
};
environment.etc."buffyboard.conf".source = ini.generate "buffyboard.conf" cfg.settings;
};
}

View File

@@ -1,6 +1,7 @@
{ ... }:
{
imports = [
./buffyboard.nix
./dropbear.nix
./clightning.nix
./dyn-dns.nix