84 lines
1.8 KiB
Nix
84 lines
1.8 KiB
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib;
|
|
let
|
|
cfg = config.eboskma.regreet;
|
|
|
|
regreetWrapperText = lib.concatStringsSep "\n" (
|
|
(lib.optional cfg.wayvnc "${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 &")
|
|
++ [ "${lib.getExe pkgs.greetd.regreet}" ]
|
|
);
|
|
|
|
regreetWrapper = pkgs.writeShellScriptBin "regreet-wrapper" regreetWrapperText;
|
|
in
|
|
{
|
|
options.eboskma.regreet = {
|
|
enable = mkEnableOption "regreet";
|
|
wayvnc = mkEnableOption "wayvnc";
|
|
wallpaper = mkOption {
|
|
description = "Path to an image to use as wallpaper";
|
|
type = types.path;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
programs.regreet = {
|
|
enable = true;
|
|
package = regreetWrapper;
|
|
settings = {
|
|
background = {
|
|
path = cfg.wallpaper;
|
|
fit = "Cover";
|
|
};
|
|
|
|
GTK = {
|
|
application_prefer_dark_theme = true;
|
|
theme_name = "Orchis-Dark";
|
|
cursor_theme = "Catppuccin-Mocha-Dark-Cursors";
|
|
icon_theme_name = "elementary";
|
|
font_name = "Monaspace Neon 16";
|
|
};
|
|
|
|
commands = {
|
|
reboot = [
|
|
"systemctl"
|
|
"reboot"
|
|
];
|
|
poweroff = [
|
|
"systemctl"
|
|
"poweroff"
|
|
];
|
|
};
|
|
};
|
|
cageArgs = [
|
|
"-s"
|
|
"-m"
|
|
"last"
|
|
];
|
|
};
|
|
security.pam.services.greetd.u2fAuth = false;
|
|
|
|
networking.firewall.allowedTCPPorts = lib.mkIf (cfg.wayvnc && !config.services.tailscale.enable) [
|
|
5900
|
|
];
|
|
|
|
environment = {
|
|
systemPackages = with pkgs; [
|
|
(orchis-theme.override {
|
|
tweaks = [
|
|
"black"
|
|
"compact"
|
|
"macos"
|
|
];
|
|
border-radius = 5;
|
|
})
|
|
catppuccin-cursors.mochaDark
|
|
pantheon.elementary-icon-theme
|
|
];
|
|
};
|
|
};
|
|
}
|