diff --git a/modules/files.nix b/modules/files.nix index af52b58c..c869df1d 100644 --- a/modules/files.nix +++ b/modules/files.nix @@ -28,7 +28,7 @@ in home.file = mkOption { description = "Attribute set of files to link into the user home."; default = {}; - type = fileType "home.file" "HOME" homeDirectory; + type = fileType "home.file" "{env}`HOME`" homeDirectory; }; home-files = mkOption { diff --git a/modules/lib/file-type.nix b/modules/lib/file-type.nix index a67f6bb0..ce84209d 100644 --- a/modules/lib/file-type.nix +++ b/modules/lib/file-type.nix @@ -32,7 +32,7 @@ in in removePrefix (homeDirectory + "/") absPath; defaultText = literalExpression "name"; - description = '' + description = lib.mdDoc '' Path to target file relative to ${basePathDesc}. ''; }; diff --git a/modules/misc/xdg.nix b/modules/misc/xdg.nix index 3d2a72a0..23cbe72a 100644 --- a/modules/misc/xdg.nix +++ b/modules/misc/xdg.nix @@ -34,8 +34,7 @@ in { }; configFile = mkOption { - type = fileType "xdg.configFile" "xdg.configHome" - cfg.configHome; + type = fileType "xdg.configFile" "{var}`xdg.configHome`" cfg.configHome; default = { }; description = '' Attribute set of files to link into the user's XDG diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix index b57cfe06..a0519140 100644 --- a/modules/programs/neovim.nix +++ b/modules/programs/neovim.nix @@ -44,7 +44,7 @@ let # passing actual "${xdg.configHome}/nvim" as basePath was a bit tricky # due to how fileType.target is implemented type = fileType "programs.neovim.plugins._.runtime" - "xdg.configHome/nvim" "nvim"; + "{var}`xdg.configHome/nvim`" "nvim"; example = literalExpression '' { "ftplugin/c.vim".text = "setlocal omnifunc=v:lua.vim.lsp.omnifunc"; } ''; diff --git a/modules/systemd.nix b/modules/systemd.nix index 68929ed1..4762c18d 100644 --- a/modules/systemd.nix +++ b/modules/systemd.nix @@ -59,13 +59,10 @@ let unitDescription = type: '' Definition of systemd per-user ${type} units. Attributes are merged recursively. - + Note that the attributes follow the capitalization and naming used by systemd. More details can be found in - - systemd.${type} - 5 - . + {manpage}`systemd.${type}(5)`. ''; unitExample = type: @@ -109,56 +106,56 @@ in { services = mkOption { default = { }; type = unitType "service"; - description = unitDescription "service"; + description = lib.mdDoc (unitDescription "service"); example = unitExample "Service"; }; slices = mkOption { default = { }; type = unitType "slice"; - description = unitDescription "slice"; + description = lib.mdDoc (unitDescription "slice"); example = unitExample "Slice"; }; sockets = mkOption { default = { }; type = unitType "socket"; - description = unitDescription "socket"; + description = lib.mdDoc (unitDescription "socket"); example = unitExample "Socket"; }; targets = mkOption { default = { }; type = unitType "target"; - description = unitDescription "target"; + description = lib.mdDoc (unitDescription "target"); example = unitExample "Target"; }; timers = mkOption { default = { }; type = unitType "timer"; - description = unitDescription "timer"; + description = lib.mdDoc (unitDescription "timer"); example = unitExample "Timer"; }; paths = mkOption { default = { }; type = unitType "path"; - description = unitDescription "path"; + description = lib.mdDoc (unitDescription "path"); example = unitExample "Path"; }; mounts = mkOption { default = { }; type = unitType "mount"; - description = unitDescription "mount"; + description = lib.mdDoc (unitDescription "mount"); example = unitExample "Mount"; }; automounts = mkOption { default = { }; type = unitType "automount"; - description = unitDescription "automount"; + description = lib.mdDoc (unitDescription "automount"); example = unitExample "Automount"; };