Loading lib/types.nix +10 −2 Original line number Diff line number Diff line Loading @@ -368,13 +368,21 @@ rec { emptyValue = { value = {}; }; }; # derivation is a reserved keyword. # A package is a top-level store path (/nix/store/hash-name). This includes: # - derivations # - more generally, attribute sets with an `outPath` or `__toString` attribute # pointing to a store path, e.g. flake inputs # - strings with context, e.g. "${pkgs.foo}" or (toString pkgs.foo) # - hardcoded store path literals (/nix/store/hash-foo) or strings without context # ("/nix/store/hash-foo"). These get a context added to them using builtins.storePath. package = mkOptionType { name = "package"; check = x: isDerivation x || isStorePath x; merge = loc: defs: let res = mergeOneOption loc defs; in if isDerivation res then res else toDerivation res; in if builtins.isPath res || (builtins.isString res && ! builtins.hasContext res) then toDerivation res else res; }; shellPackage = package // { Loading nixos/doc/manual/development/option-types.section.md +2 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,8 @@ merging is handled. `types.package` : A derivation or a store path. : A top-level store path. This can be an attribute set pointing to a store path, like a derivation or a flake input. `types.anything` Loading nixos/doc/manual/from_md/development/option-types.section.xml +3 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,9 @@ </term> <listitem> <para> A derivation or a store path. A top-level store path. This can be an attribute set pointing to a store path, like a derivation or a flake input. </para> </listitem> </varlistentry> Loading nixos/modules/services/continuous-integration/github-runner.nix +8 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,14 @@ in Repository to add the runner to. Changing this option triggers a new runner registration. IMPORTANT: If your token is org-wide (not per repository), you need to provide a github org link, not a single repository, so do it like this <literal>https://github.com/nixos</literal>, not like this <literal>https://github.com/nixos/nixpkgs</literal>. Otherwise, you are going to get a <literal>404 NotFound</literal> from <literal>POST https://api.github.com/actions/runner-registration</literal> in the configure script. ''; example = "https://github.com/nixos/nixpkgs"; }; Loading nixos/modules/services/networking/tox-node.nix +1 −6 Original line number Diff line number Diff line Loading @@ -8,12 +8,7 @@ let homeDir = "/var/lib/tox-node"; configFile = let # fetchurl should be switched to getting this file from tox-node.src once # the dpkg directory is in a release src = pkgs.fetchurl { url = "https://raw.githubusercontent.com/tox-rs/tox-node/master/dpkg/config.yml"; sha256 = "1431wzpzm786mcvyzk1rp7ar418n45dr75hdggxvlm7pkpam31xa"; }; src = "${pkg.src}/dpkg/config.yml"; confJSON = pkgs.writeText "config.json" ( builtins.toJSON { log-type = cfg.logType; Loading Loading
lib/types.nix +10 −2 Original line number Diff line number Diff line Loading @@ -368,13 +368,21 @@ rec { emptyValue = { value = {}; }; }; # derivation is a reserved keyword. # A package is a top-level store path (/nix/store/hash-name). This includes: # - derivations # - more generally, attribute sets with an `outPath` or `__toString` attribute # pointing to a store path, e.g. flake inputs # - strings with context, e.g. "${pkgs.foo}" or (toString pkgs.foo) # - hardcoded store path literals (/nix/store/hash-foo) or strings without context # ("/nix/store/hash-foo"). These get a context added to them using builtins.storePath. package = mkOptionType { name = "package"; check = x: isDerivation x || isStorePath x; merge = loc: defs: let res = mergeOneOption loc defs; in if isDerivation res then res else toDerivation res; in if builtins.isPath res || (builtins.isString res && ! builtins.hasContext res) then toDerivation res else res; }; shellPackage = package // { Loading
nixos/doc/manual/development/option-types.section.md +2 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,8 @@ merging is handled. `types.package` : A derivation or a store path. : A top-level store path. This can be an attribute set pointing to a store path, like a derivation or a flake input. `types.anything` Loading
nixos/doc/manual/from_md/development/option-types.section.xml +3 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,9 @@ </term> <listitem> <para> A derivation or a store path. A top-level store path. This can be an attribute set pointing to a store path, like a derivation or a flake input. </para> </listitem> </varlistentry> Loading
nixos/modules/services/continuous-integration/github-runner.nix +8 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,14 @@ in Repository to add the runner to. Changing this option triggers a new runner registration. IMPORTANT: If your token is org-wide (not per repository), you need to provide a github org link, not a single repository, so do it like this <literal>https://github.com/nixos</literal>, not like this <literal>https://github.com/nixos/nixpkgs</literal>. Otherwise, you are going to get a <literal>404 NotFound</literal> from <literal>POST https://api.github.com/actions/runner-registration</literal> in the configure script. ''; example = "https://github.com/nixos/nixpkgs"; }; Loading
nixos/modules/services/networking/tox-node.nix +1 −6 Original line number Diff line number Diff line Loading @@ -8,12 +8,7 @@ let homeDir = "/var/lib/tox-node"; configFile = let # fetchurl should be switched to getting this file from tox-node.src once # the dpkg directory is in a release src = pkgs.fetchurl { url = "https://raw.githubusercontent.com/tox-rs/tox-node/master/dpkg/config.yml"; sha256 = "1431wzpzm786mcvyzk1rp7ar418n45dr75hdggxvlm7pkpam31xa"; }; src = "${pkg.src}/dpkg/config.yml"; confJSON = pkgs.writeText "config.json" ( builtins.toJSON { log-type = cfg.logType; Loading