replaced types.string with types.str

This commit is contained in:
Leyla Becker 2025-03-13 02:12:04 -05:00
parent 57c50fbe76
commit 86bcb200c8
2 changed files with 10 additions and 10 deletions

View file

@ -2,10 +2,10 @@
folderType = lib.types.submodule ({name, ...}: { folderType = lib.types.submodule ({name, ...}: {
options = { options = {
id = lib.mkOption { id = lib.mkOption {
type = lib.types.string; type = lib.types.str;
}; };
label = lib.mkOption { label = lib.mkOption {
type = lib.types.string; type = lib.types.str;
default = name; default = name;
}; };
}; };
@ -19,11 +19,11 @@ in {
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: { type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
options = { options = {
name = lib.mkOption { name = lib.mkOption {
type = lib.types.string; type = lib.types.str;
default = name; default = name;
}; };
id = lib.mkOption { id = lib.mkOption {
type = lib.types.string; type = lib.types.str;
}; };
folders = lib.mkOption { folders = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule ( type = lib.types.attrsOf (lib.types.submodule (
@ -33,7 +33,7 @@ in {
type = folderType; type = folderType;
}; };
path = lib.mkOption { path = lib.mkOption {
type = lib.types.string; type = lib.types.str;
}; };
type = lib.mkOption { type = lib.mkOption {
type = lib.types.enum ["sendreceive" "sendonly" "receiveonly" "receiveencrypted"]; type = lib.types.enum ["sendreceive" "sendonly" "receiveonly" "receiveencrypted"];
@ -43,25 +43,25 @@ in {
simple = { simple = {
enable = lib.mkEnableOption "should this folder use simple versioning"; enable = lib.mkEnableOption "should this folder use simple versioning";
keep = lib.mkOption { keep = lib.mkOption {
type = lib.types.string; type = lib.types.str;
default = "10"; default = "10";
}; };
}; };
trashcan = { trashcan = {
enable = lib.mkEnableOption "should this folder use trashcan versioning"; enable = lib.mkEnableOption "should this folder use trashcan versioning";
cleanoutDays = lib.mkOption { cleanoutDays = lib.mkOption {
type = lib.types.string; type = lib.types.str;
default = "1000"; default = "1000";
}; };
}; };
staggered = { staggered = {
enable = lib.mkEnableOption "should this folder use staggard versioning"; enable = lib.mkEnableOption "should this folder use staggard versioning";
cleanInterval = lib.mkOption { cleanInterval = lib.mkOption {
type = lib.types.string; type = lib.types.str;
default = "3600"; default = "3600";
}; };
maxAge = lib.mkOption { maxAge = lib.mkOption {
type = lib.types.string; type = lib.types.str;
default = "31536000"; default = "31536000";
}; };
}; };

View file

@ -7,7 +7,7 @@
services.syncthing = { services.syncthing = {
configuration = (import ./configuration-type.nix) input; configuration = (import ./configuration-type.nix) input;
deviceName = lib.mkOption { deviceName = lib.mkOption {
type = lib.types.string; type = lib.types.str;
}; };
}; };
}; };