nixos-config/modules/regreet/default.nix

107 lines
2.2 KiB
Nix
Raw Normal View History

2024-06-03 12:19:01 +02:00
{
pkgs,
config,
lib,
...
}:
with lib;
let
cfg = config.eboskma.regreet;
2024-06-04 09:42:03 +02:00
regreetWrapperText = lib.concatStringsSep "\n" (
(lib.optional cfg.wayvnc "${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 &")
++ [ "${lib.getExe pkgs.greetd.regreet}" ]
2024-06-03 12:19:01 +02:00
);
2024-06-04 09:42:03 +02:00
regreetWrapper = pkgs.writeShellScriptBin "regreet-wrapper" regreetWrapperText;
2024-06-03 12:19:01 +02:00
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;
theme = {
2025-01-07 20:26:40 +01:00
name = "Colloid-Dark-Compact-Catppuccin";
package = pkgs.colloid-gtk-theme.override {
colorVariants = [ "dark" ];
sizeVariants = [ "compact" ];
tweaks = [
2025-01-07 20:26:40 +01:00
"catppuccin"
"rimless"
];
};
};
iconTheme = {
2025-01-07 20:26:40 +01:00
name = "Colloid-Catppuccin-Dark";
package = pkgs.colloid-icon-theme.override {
schemeVariants = [ "catppuccin" ];
};
};
cursorTheme = {
name = "catppuccin-mocha-dark-cursors";
package = pkgs.catppuccin-cursors.mochaDark;
};
font = {
2025-01-09 14:59:30 +01:00
name = "Cantarell Regular";
size = 16;
2025-01-09 14:59:30 +01:00
package = pkgs.cantarell-fonts;
};
2024-06-03 12:19:01 +02:00
settings = {
background = {
path = cfg.wallpaper;
fit = "Cover";
};
commands = {
reboot = [
"systemctl"
"reboot"
];
poweroff = [
"systemctl"
"poweroff"
];
};
};
2024-06-08 16:02:42 +02:00
cageArgs = [
"-s"
"-m"
"last"
];
2024-06-03 12:19:01 +02:00
};
security.pam.services.greetd.u2fAuth = false;
networking.firewall.allowedTCPPorts = lib.mkIf (cfg.wayvnc && !config.services.tailscale.enable) [
5900
];
environment = {
systemPackages = with pkgs; [
2024-06-08 16:02:42 +02:00
(orchis-theme.override {
tweaks = [
"black"
"compact"
"macos"
];
border-radius = 5;
})
catppuccin-cursors.mochaDark
2024-06-03 12:19:01 +02:00
pantheon.elementary-icon-theme
];
};
};
}