1
0
Fork 0
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:
Daiderd Jordan 2017-01-02 08:21:27 +01:00
parent a85194aa33
commit 6305c0675f
No known key found for this signature in database
GPG key ID: D02435D05B810C96
6 changed files with 5 additions and 60 deletions

View file

@ -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;
};

View file

@ -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;
};

View file

@ -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;
};

View file

@ -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;
};

View file

@ -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;
};

View file

@ -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);
};
}