fish: remove fileType function
Replaced by types that are more common. This additionally reflects in the manpages, which should have types the reader is familiar with.
This commit is contained in:
parent
490f5fc585
commit
0740c257b1
|
@ -14,35 +14,6 @@ let
|
|||
mapAttrsToList (k: v: "alias ${k}='${v}'") cfg.shellAliases
|
||||
);
|
||||
|
||||
fileType = textGen: types.submodule (
|
||||
{ name, config, ... }: {
|
||||
options = {
|
||||
body = mkOption {
|
||||
default = null;
|
||||
type = types.nullOr types.lines;
|
||||
description = "Body of the file.";
|
||||
};
|
||||
|
||||
source = mkOption {
|
||||
type = types.path;
|
||||
description = ''
|
||||
Path of the source file. The file name must not start
|
||||
with a period.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
source = mkIf (config.body != null) (
|
||||
mkDefault (pkgs.writeTextFile {
|
||||
inherit name;
|
||||
text = textGen name config.body;
|
||||
executable = true;
|
||||
})
|
||||
);
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue