Loading .github/workflows/pr.yml +5 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,11 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: retries: 3 # The default for this includes code 422, which happens regularly for us when comparing commits: # 422 - Server Error: Sorry, this diff is taking too long to generate. # Listing all other values from here to effectively remove 422: # https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14 retry-exempt-status-codes: 400,401,403,404 script: | require('./ci/github-script/prepare.js')({ github, Loading maintainers/maintainer-list.nix +0 −6 Original line number Diff line number Diff line Loading @@ -5239,12 +5239,6 @@ githubId = 3077118; name = "David McFarland"; }; coroa = { email = "jonas@chaoflow.net"; github = "coroa"; githubId = 2552981; name = "Jonas Hörsch"; }; costrouc = { email = "chris.ostrouchov@gmail.com"; github = "costrouc"; Loading maintainers/scripts/remove-old-aliases.py +4 −4 Original line number Diff line number Diff line Loading @@ -98,8 +98,8 @@ def get_date_lists( date_too_complex_list.append(f"{lineno:>5} {line}") elif "= with " in line: date_too_complex_list.append(f"{lineno:>5} {line}") elif "lib.warnOnInstantiate" in line or "warning" in line: if 'lib.warnOnInstantiate "' in line: elif "warnAlias" in line or "warning" in line: if 'warnAlias "' in line: date_older_warning_list.append(line) else: date_too_complex_list.append(f"{lineno:>5} {line}") Loading Loading @@ -140,7 +140,7 @@ def convert(lines: list[str], convert_to: str) -> list[tuple[str, str]]: before_equal, after_equal = ( x.strip() for x in line.split("=", maxsplit=2) ) if after_equal.startswith("lib.warnOnInstantiate"): if after_equal.startswith("warnAlias"): after_equal = after_equal.split("\"", maxsplit=3)[2].strip() except ValueError as err: print(err, line, "\n") Loading @@ -162,7 +162,7 @@ def convert(lines: list[str], convert_to: str) -> list[tuple[str, str]]: converted_lines[line] = converted elif convert_to == "warnings": converted = ( f"{indent}{alias} = lib.warnOnInstantiate \"'{alias_unquoted}' has been" f"{indent}{alias} = warnAlias \"'{alias_unquoted}' has been" f" renamed to/replaced by '{replacement}'\" {replacement};" f" # Converted to warning {datetime.today().strftime('%Y-%m-%d')}" ) Loading nixos/modules/security/apparmor.nix +4 −6 Original line number Diff line number Diff line { options, config, lib, pkgs, Loading @@ -10,11 +11,6 @@ let cfg = config.security.apparmor; enabledPolicies = lib.filterAttrs (n: p: p.state != "disable") cfg.policies; buildPolicyPath = n: p: lib.defaultTo (pkgs.writeText n p.profile) p.path; # Accessing submodule options when not defined results in an error thunk rather than a regular option object # We can emulate the behavior of `<option>.isDefined` by attempting to evaluate it instead # This is required because getting isDefined on a submodule is not possible in global module asserts. submoduleOptionIsDefined = value: (builtins.tryEval value).success; in { Loading Loading @@ -130,7 +126,9 @@ in # which does not recurse into sub-directories. } { assertion = lib.xor (policyCfg.path != null) (submoduleOptionIsDefined policyCfg.profile); assertion = lib.xor (policyCfg.path != null) options.security.apparmor.policies.valueMeta.attrs.${policyName}.configuration.options.profile.isDefined; message = "`security.apparmor.policies.\"${policyName}\"` must define exactly one of either path or profile."; } ]) cfg.policies Loading nixos/modules/services/torrent/transmission.nix +29 −10 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ let optionalString optional mkDefault mkOptionDefault versionOlder escapeShellArgs optionalAttrs mkMerge Loading Loading @@ -176,17 +178,12 @@ in }; umask = mkOption { type = types.either types.int types.str; default = if cfg.package == pkgs.transmission_3 then 18 else "022"; defaultText = literalExpression "if cfg.package == pkgs.transmission_3 then 18 else \"022\""; default = "022"; description = '' Sets transmission's file mode creation mask. See the {manpage}`umask(2)` manpage for more information. Users who want their saved torrents to be world-writable may want to set this value to 0/`"000"`. Keep in mind, that if you are using Transmission 3, this has to be passed as a base 10 integer, whereas Transmission 4 takes an octal number in a string instead. ''; }; utp-enabled = mkOption { Loading Loading @@ -222,9 +219,18 @@ in }; }; package = mkPackageOption pkgs "transmission" { default = "transmission_3"; package = mkPackageOption pkgs "transmission" { default = "transmission_4"; example = "pkgs.transmission_4"; } // { defaultText = '' if lib.versionAtLeast config.system.stateVersion "25.11" then pkgs.transmission_4 else «error message» ''; }; downloadDirPermissions = mkOption { Loading Loading @@ -331,6 +337,19 @@ in }; config = mkIf cfg.enable { services.transmission.package = mkIf (versionOlder config.system.stateVersion "25.11") ( mkOptionDefault (throw '' `services.transmission.package` previously defaulted to `pkgs.transmission_3`, which has been removed in favour of `pkgs.transmission_4`. Please set `services.transmission.package` to `pkgs.transmission_4` explicitly. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details) '') ); # Note that using systemd.tmpfiles would not work here # because it would fail when creating a directory # with a different owner than its parent directory, by saying: Loading Loading
.github/workflows/pr.yml +5 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,11 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: retries: 3 # The default for this includes code 422, which happens regularly for us when comparing commits: # 422 - Server Error: Sorry, this diff is taking too long to generate. # Listing all other values from here to effectively remove 422: # https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14 retry-exempt-status-codes: 400,401,403,404 script: | require('./ci/github-script/prepare.js')({ github, Loading
maintainers/maintainer-list.nix +0 −6 Original line number Diff line number Diff line Loading @@ -5239,12 +5239,6 @@ githubId = 3077118; name = "David McFarland"; }; coroa = { email = "jonas@chaoflow.net"; github = "coroa"; githubId = 2552981; name = "Jonas Hörsch"; }; costrouc = { email = "chris.ostrouchov@gmail.com"; github = "costrouc"; Loading
maintainers/scripts/remove-old-aliases.py +4 −4 Original line number Diff line number Diff line Loading @@ -98,8 +98,8 @@ def get_date_lists( date_too_complex_list.append(f"{lineno:>5} {line}") elif "= with " in line: date_too_complex_list.append(f"{lineno:>5} {line}") elif "lib.warnOnInstantiate" in line or "warning" in line: if 'lib.warnOnInstantiate "' in line: elif "warnAlias" in line or "warning" in line: if 'warnAlias "' in line: date_older_warning_list.append(line) else: date_too_complex_list.append(f"{lineno:>5} {line}") Loading Loading @@ -140,7 +140,7 @@ def convert(lines: list[str], convert_to: str) -> list[tuple[str, str]]: before_equal, after_equal = ( x.strip() for x in line.split("=", maxsplit=2) ) if after_equal.startswith("lib.warnOnInstantiate"): if after_equal.startswith("warnAlias"): after_equal = after_equal.split("\"", maxsplit=3)[2].strip() except ValueError as err: print(err, line, "\n") Loading @@ -162,7 +162,7 @@ def convert(lines: list[str], convert_to: str) -> list[tuple[str, str]]: converted_lines[line] = converted elif convert_to == "warnings": converted = ( f"{indent}{alias} = lib.warnOnInstantiate \"'{alias_unquoted}' has been" f"{indent}{alias} = warnAlias \"'{alias_unquoted}' has been" f" renamed to/replaced by '{replacement}'\" {replacement};" f" # Converted to warning {datetime.today().strftime('%Y-%m-%d')}" ) Loading
nixos/modules/security/apparmor.nix +4 −6 Original line number Diff line number Diff line { options, config, lib, pkgs, Loading @@ -10,11 +11,6 @@ let cfg = config.security.apparmor; enabledPolicies = lib.filterAttrs (n: p: p.state != "disable") cfg.policies; buildPolicyPath = n: p: lib.defaultTo (pkgs.writeText n p.profile) p.path; # Accessing submodule options when not defined results in an error thunk rather than a regular option object # We can emulate the behavior of `<option>.isDefined` by attempting to evaluate it instead # This is required because getting isDefined on a submodule is not possible in global module asserts. submoduleOptionIsDefined = value: (builtins.tryEval value).success; in { Loading Loading @@ -130,7 +126,9 @@ in # which does not recurse into sub-directories. } { assertion = lib.xor (policyCfg.path != null) (submoduleOptionIsDefined policyCfg.profile); assertion = lib.xor (policyCfg.path != null) options.security.apparmor.policies.valueMeta.attrs.${policyName}.configuration.options.profile.isDefined; message = "`security.apparmor.policies.\"${policyName}\"` must define exactly one of either path or profile."; } ]) cfg.policies Loading
nixos/modules/services/torrent/transmission.nix +29 −10 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ let optionalString optional mkDefault mkOptionDefault versionOlder escapeShellArgs optionalAttrs mkMerge Loading Loading @@ -176,17 +178,12 @@ in }; umask = mkOption { type = types.either types.int types.str; default = if cfg.package == pkgs.transmission_3 then 18 else "022"; defaultText = literalExpression "if cfg.package == pkgs.transmission_3 then 18 else \"022\""; default = "022"; description = '' Sets transmission's file mode creation mask. See the {manpage}`umask(2)` manpage for more information. Users who want their saved torrents to be world-writable may want to set this value to 0/`"000"`. Keep in mind, that if you are using Transmission 3, this has to be passed as a base 10 integer, whereas Transmission 4 takes an octal number in a string instead. ''; }; utp-enabled = mkOption { Loading Loading @@ -222,9 +219,18 @@ in }; }; package = mkPackageOption pkgs "transmission" { default = "transmission_3"; package = mkPackageOption pkgs "transmission" { default = "transmission_4"; example = "pkgs.transmission_4"; } // { defaultText = '' if lib.versionAtLeast config.system.stateVersion "25.11" then pkgs.transmission_4 else «error message» ''; }; downloadDirPermissions = mkOption { Loading Loading @@ -331,6 +337,19 @@ in }; config = mkIf cfg.enable { services.transmission.package = mkIf (versionOlder config.system.stateVersion "25.11") ( mkOptionDefault (throw '' `services.transmission.package` previously defaulted to `pkgs.transmission_3`, which has been removed in favour of `pkgs.transmission_4`. Please set `services.transmission.package` to `pkgs.transmission_4` explicitly. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details) '') ); # Note that using systemd.tmpfiles would not work here # because it would fail when creating a directory # with a different owner than its parent directory, by saying: Loading