From 140ef3ff329459af7e3880cec055cab850a31314 Mon Sep 17 00:00:00 2001 From: Toast <39011842+toast003@users.noreply.github.com> Date: Sun, 11 Feb 2024 20:25:50 +0100 Subject: [PATCH] Add a module for konsole --- modules/apps/default.nix | 7 +++++++ modules/apps/konsole.nix | 35 +++++++++++++++++++++++++++++++++++ modules/default.nix | 1 + 3 files changed, 43 insertions(+) create mode 100644 modules/apps/default.nix create mode 100644 modules/apps/konsole.nix diff --git a/modules/apps/default.nix b/modules/apps/default.nix new file mode 100644 index 00000000..59f5345e --- /dev/null +++ b/modules/apps/default.nix @@ -0,0 +1,7 @@ +{ lib, ... }: + +{ + imports = [ + ./konsole.nix + ]; +} diff --git a/modules/apps/konsole.nix b/modules/apps/konsole.nix new file mode 100644 index 00000000..f4254026 --- /dev/null +++ b/modules/apps/konsole.nix @@ -0,0 +1,35 @@ +{ config, lib, ... }: + +with lib; + +let + cfg = config.programs.konsole; +in + +{ + options.programs.konsole = { + enable = mkEnableOption '' + Enable configuration management for Konsole + ''; + + defaultProfile = mkOption { + type = with types; nullOr str; + default = null; + example = "Catppuccin"; + description = '' + The name of the konsole profile file to use by default + To see what options you have, just take a look at ~/.local/share/konsole/ + ''; + }; + }; + + config = mkIf (config.programs.plasma.enable && cfg.enable) { + programs.plasma.configFile."konsolerc" = mkMerge [ + ( + mkIf (cfg.defaultProfile != null ) { + "Desktop entry"."DefaultProfile" = cfg.defaultProfile; + } + ) + ]; + }; +} \ No newline at end of file diff --git a/modules/default.nix b/modules/default.nix index bdd4393c..c872ce76 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -11,6 +11,7 @@ ./kwin.nix ./startup.nix ./panels.nix + ./apps ]; options.programs.plasma.enable = lib.mkEnableOption ''