From 34332934dd29185dddcc7f5cd78d6e0b26ca0ef8 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Mon, 30 Sep 2024 01:19:48 +0200 Subject: [PATCH] modules/theme: add custom theme module with wallpaper --- flake.nix | 7 ++----- modules/default.nix | 5 +++++ modules/theme/default.nix | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 modules/default.nix create mode 100644 modules/theme/default.nix diff --git a/flake.nix b/flake.nix index fce38f9..943b3de 100644 --- a/flake.nix +++ b/flake.nix @@ -7,13 +7,10 @@ imports = [ ./hosts + ./modules ]; - perSystem = { - config, - pkgs, - ... - }: { + perSystem = {pkgs, ...}: { devShells.default = pkgs.mkShell { packages = [ pkgs.alejandra diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..47af602 --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,5 @@ +{ + flake.nixosModules = { + theme = import ./theme; + }; +} diff --git a/modules/theme/default.nix b/modules/theme/default.nix new file mode 100644 index 0000000..6355a8b --- /dev/null +++ b/modules/theme/default.nix @@ -0,0 +1,15 @@ +{ + lib, + config, + ... +}: { + options.theme = { + wallpaper = lib.mkOption { + description = '' + Location of the wallpaper that will be used throughout the system. + ''; + type = lib.types.path; + example = lib.literalExpression "./wallpaper.png"; + }; + }; +}