about summary refs log tree commit diff
path: root/home/modules
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2022-01-08 21:48:22 +0900
committersefidel <contact@sefidel.net>2022-01-08 21:48:22 +0900
commit8e82f138c8c9529f3c8a94017aaab27cc5ae6391 (patch)
treec1fba71b643a091ca1357d73ecda2838e93fd9d8 /home/modules
parent2daa3dcd4321c00e69549cafdf12685d36dc7259 (diff)
downloadnixrc-8e82f138c8c9529f3c8a94017aaab27cc5ae6391.tar.gz
nixrc-8e82f138c8c9529f3c8a94017aaab27cc5ae6391.zip
home/misc: change neotheme module structure
Diffstat (limited to 'home/modules')
-rw-r--r--home/modules/misc/neotheme/default.nix90
-rw-r--r--home/modules/profiles/base/config/foot.nix2
-rw-r--r--home/modules/profiles/base/config/sway.nix2
-rw-r--r--home/modules/profiles/base/config/waybar-style.nix2
-rw-r--r--home/modules/profiles/base/default.nix50
5 files changed, 71 insertions, 75 deletions
diff --git a/home/modules/misc/neotheme/default.nix b/home/modules/misc/neotheme/default.nix
index df69251..5a5e375 100644
--- a/home/modules/misc/neotheme/default.nix
+++ b/home/modules/misc/neotheme/default.nix
@@ -5,58 +5,56 @@ let cfg = config.neotheme;
 in
 {
   options.neotheme = {
-    wallpaper = mkOption {
+    name = mkOption {
       type = types.str;
       default = "";
-      description = "path for wallpaper image file";
-      example = "/weird/dir/wallpaper.png";
+      description = "palette name";
+      example = "My Amazing Theme";
     };
 
-    palette = {
-      identifier = mkOption {
-        type = types.str;
-        default = "";
-        description = "palette identifier";
-        example = "mytheme";
-      };
-
-      name = mkOption {
-        type = types.str;
-        default = "";
-        description = "palette name";
-        example = "My Amazing Theme";
-      };
+    identifier = mkOption {
+      type = types.str;
+      default = "";
+      description = "palette identifier";
+      example = "mytheme";
+    };
 
-      colors =
-        let
-          mkColorOption = name: {
-            inherit name;
-            value = mkOption {
-              type = types.strMatching "[a-fA-F0-9]{6}";
-              description = "color ${name}.";
-            };
+    colors =
+      let
+        mkColorOption = name: {
+          inherit name;
+          value = mkOption {
+            type = types.strMatching "[a-fA-F0-9]{6}";
+            description = "color ${name}.";
           };
-        in
-        listToAttrs (map mkColorOption [
-          "background"
-          "foreground"
-          "color0"
-          "color1"
-          "color2"
-          "color3"
-          "color4"
-          "color5"
-          "color6"
-          "color7"
-          "bright0"
-          "bright1"
-          "bright2"
-          "bright3"
-          "bright4"
-          "bright5"
-          "bright6"
-          "bright7"
-        ]);
+        };
+      in
+      listToAttrs (map mkColorOption [
+        "background"
+        "foreground"
+        "color0"
+        "color1"
+        "color2"
+        "color3"
+        "color4"
+        "color5"
+        "color6"
+        "color7"
+        "bright0"
+        "bright1"
+        "bright2"
+        "bright3"
+        "bright4"
+        "bright5"
+        "bright6"
+        "bright7"
+      ]);
+
+    wallpaper = mkOption {
+      type = types.str;
+      default = "";
+      description = "path for wallpaper image file";
+      example = "/weird/dir/wallpaper.png";
     };
   };
 }
diff --git a/home/modules/profiles/base/config/foot.nix b/home/modules/profiles/base/config/foot.nix
index ddb4566..08a38e7 100644
--- a/home/modules/profiles/base/config/foot.nix
+++ b/home/modules/profiles/base/config/foot.nix
@@ -1,6 +1,6 @@
 { neotheme }:
 
-with neotheme.palette.colors;
+with neotheme.colors;
 
 {
   main = {
diff --git a/home/modules/profiles/base/config/sway.nix b/home/modules/profiles/base/config/sway.nix
index 0bb0179..00dae28 100644
--- a/home/modules/profiles/base/config/sway.nix
+++ b/home/modules/profiles/base/config/sway.nix
@@ -1,6 +1,6 @@
 { pkgs, neotheme }:
 
-with neotheme.palette.colors;
+with neotheme.colors;
 
 ''
   exec autotiling
diff --git a/home/modules/profiles/base/config/waybar-style.nix b/home/modules/profiles/base/config/waybar-style.nix
index c47ea23..f3c51cc 100644
--- a/home/modules/profiles/base/config/waybar-style.nix
+++ b/home/modules/profiles/base/config/waybar-style.nix
@@ -1,6 +1,6 @@
 { neotheme }:
 
-with neotheme.palette.colors;
+with neotheme.colors;
 
 ''
   * {
diff --git a/home/modules/profiles/base/default.nix b/home/modules/profiles/base/default.nix
index 1cce73d..b9fcde2 100644
--- a/home/modules/profiles/base/default.nix
+++ b/home/modules/profiles/base/default.nix
@@ -28,33 +28,31 @@ in
     home.file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/Vanilla-DMZ-AA";
 
     neotheme = {
-      wallpaper = "${wallpapers}/nixos/nix-glow-fg-d4ae80.png";
-
-      palette = {
-        identifier = "nightlamp-iceberg";
-        name = "Nightlamp Theme - Iceberg Variant";
-
-        colors = {
-          background = "18191f";
-          foreground = "cbc0ab";
-          color0 = "222329";
-          color1 = "b17f81";
-          color2 = "8aa387";
-          color3 = "d4ae80";
-          color4 = "84a0c6";
-          color5 = "a093c7";
-          color6 = "7aacaa";
-          color7 = "d0d0c7";
-          bright0 = "36373d";
-          bright1 = "c59395";
-          bright2 = "9eb79b";
-          bright3 = "e8c294";
-          bright4 = "a2bee4";
-          bright5 = "beb1e5";
-          bright6 = "8ec0be";
-          bright7 = "e4e4db";
-        };
+      name = "Nightlamp Theme - Iceberg Variant";
+      identifier = "nightlamp-iceberg";
+
+      colors = {
+        background = "18191f";
+        foreground = "cbc0ab";
+        color0 = "222329";
+        color1 = "b17f81";
+        color2 = "8aa387";
+        color3 = "d4ae80";
+        color4 = "84a0c6";
+        color5 = "a093c7";
+        color6 = "7aacaa";
+        color7 = "d0d0c7";
+        bright0 = "36373d";
+        bright1 = "c59395";
+        bright2 = "9eb79b";
+        bright3 = "e8c294";
+        bright4 = "a2bee4";
+        bright5 = "beb1e5";
+        bright6 = "8ec0be";
+        bright7 = "e4e4db";
       };
+
+      wallpaper = "${wallpapers}/nixos/nix-glow-fg-d4ae80.png";
     };
 
     home.keyboard.layout = "us";