mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-04-15 00:36:44 +00:00
move write-text submodule
This commit is contained in:
parent
a85194aa33
commit
6305c0675f
6 changed files with 5 additions and 60 deletions
|
@ -22,7 +22,7 @@ let
|
|||
--add-flags -f --add-flags /etc/tmux.conf
|
||||
'';
|
||||
|
||||
text = import ../system/write-text.nix {
|
||||
text = import ../lib/write-text.nix {
|
||||
inherit lib;
|
||||
mkTextDerivation = name: text: pkgs.writeText "tmux-options-${name}" text;
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@ let
|
|||
vimrcConfig.vam.pluginDictionaries = cfg.plugins;
|
||||
};
|
||||
|
||||
text = import ../system/write-text.nix {
|
||||
text = import ../lib/write-text.nix {
|
||||
inherit lib;
|
||||
mkTextDerivation = name: text: pkgs.writeText "vim-options-${name}" text;
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@ let
|
|||
|
||||
cfg = config.system;
|
||||
|
||||
script = import ./write-text.nix {
|
||||
script = import ../lib/write-text.nix {
|
||||
inherit lib;
|
||||
mkTextDerivation = name: text: pkgs.writeScript "activate-${name}" text;
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@ with lib;
|
|||
|
||||
let
|
||||
|
||||
text = import ./write-text.nix {
|
||||
text = import ../lib/write-text.nix {
|
||||
inherit lib;
|
||||
mkTextDerivation = name: text: pkgs.writeText "etc-${name}" text;
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@ let
|
|||
|
||||
cfg = config.system;
|
||||
|
||||
text = import ../system/write-text.nix {
|
||||
text = import ../lib/write-text.nix {
|
||||
inherit lib;
|
||||
mkTextDerivation = pkgs.writeText;
|
||||
};
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
{ lib, mkTextDerivation }:
|
||||
|
||||
{ config, name, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
sourceDrv = mkTextDerivation name config.text;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether this file should be generated.
|
||||
This option allows specific files to be disabled.
|
||||
'';
|
||||
};
|
||||
|
||||
text = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Text of the file.
|
||||
'';
|
||||
};
|
||||
|
||||
target = mkOption {
|
||||
type = types.str;
|
||||
default = name;
|
||||
description = ''
|
||||
Name of symlink. Defaults to the attribute name.
|
||||
'';
|
||||
};
|
||||
|
||||
source = mkOption {
|
||||
type = types.path;
|
||||
description = ''
|
||||
Path of the source file.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
source = mkIf (config.text != "") (mkDefault sourceDrv);
|
||||
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue