Add asusctl settings

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-05-25 21:18:28 +01:00
parent 62671b894c
commit b631d466ff
18 changed files with 71 additions and 35 deletions

View File

@@ -17,7 +17,7 @@ in
environment.persistence."/persist"."${home}/.config/theme" = { };
home-manager.users.${user} = {
imports = [ ./options.nix ];
imports = [ (import ./options.nix { inherit user home; }) ];
theme.enable = true;

View File

@@ -1,3 +1,7 @@
{
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{
config,
inputs,
@@ -94,17 +98,11 @@ in
{
options = {
source = mkOption {
type = nullOr path;
type = path;
description = "Path of the source file or directory.";
default = null;
};
text = mkOption {
type = nullOr str;
description = "Text of the file.";
default = null;
};
target = mkOption {
type = str;
defaultText = literalExpression "name";
@@ -497,8 +495,8 @@ in
};
templates = builtins.mapAttrs (name: template: {
input_path = template.source or (pkgs.writeText name template.text);
output_path = template.target;
input_path = template.source;
output_path = "${home}/${template.target}";
}) cfg.template;
}
);