From 6987a2215fae77296631bda22ef4c2a6391d7e73 Mon Sep 17 00:00:00 2001
From: Gabriel Arazas <foodogsquared@foodogsquared.one>
Date: Fri, 2 Aug 2024 11:55:21 +0800
Subject: [PATCH] modules: fix state.paths typing

---
 modules/home-manager/_private/state/paths.nix | 4 ++--
 modules/home-manager/_private/suites/dev.nix  | 2 +-
 modules/nixos/_private/state/paths.nix        | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/home-manager/_private/state/paths.nix b/modules/home-manager/_private/state/paths.nix
index 46a616f6..0bcafcde 100644
--- a/modules/home-manager/_private/state/paths.nix
+++ b/modules/home-manager/_private/state/paths.nix
@@ -6,7 +6,7 @@
       pathsSubmodule = { lib, ... }: {
         options = {
           paths = lib.mkOption {
-            type = with lib.types; attrsOf (listOf path);
+            type = with lib.types; attrsOf (listOf str);
             default = { };
             description = ''
               Set of paths to hold as a single source of truth for path-related
@@ -22,6 +22,6 @@
         };
       };
   in lib.mkOption {
-    type = lib.type.submodule pathsSubmodule;
+    type = lib.types.submodule pathsSubmodule;
   };
 }
diff --git a/modules/home-manager/_private/suites/dev.nix b/modules/home-manager/_private/suites/dev.nix
index a5ddf748..8fb4006c 100644
--- a/modules/home-manager/_private/suites/dev.nix
+++ b/modules/home-manager/_private/suites/dev.nix
@@ -108,7 +108,7 @@ in {
           changeDirWidgetCommand = "${fd} --type directory --unrestricted";
           defaultCommand = "${fd} --type file --hidden";
           defaultOptions = let
-            skipDirectories' = lib.concatStringsSep "," config.state.ignoreDirectories;
+            skipDirectories' = lib.concatStringsSep "," config.state.paths.ignoreDirectories;
           in [
             "--walker-skip=${skipDirectories'}"
           ];
diff --git a/modules/nixos/_private/state/paths.nix b/modules/nixos/_private/state/paths.nix
index b16a5738..7661e667 100644
--- a/modules/nixos/_private/state/paths.nix
+++ b/modules/nixos/_private/state/paths.nix
@@ -6,7 +6,7 @@
       directoriesSubmodule = { lib, ... }: {
         options = {
           paths = lib.mkOption {
-            type = with lib.types; attrsOf (listOf path);
+            type = with lib.types; attrsOf (listOf str);
             description = ''
               A set of directories to share its value to various parts of the
               system.