0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

Merge master into staging-next

This commit is contained in:
github-actions[bot] 2022-07-17 00:02:14 +00:00 committed by GitHub
commit 8df1eb061a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
86 changed files with 1836 additions and 423 deletions

View file

@ -667,6 +667,27 @@ in
# uid. Users and groups with the same name should have equal
# uids and gids. Also, don't use gids above 399!
# For exceptional cases where you really need a gid above 399, leave a
# comment stating why.
#
# Also, avoid the following GID ranges:
#
# 1000 - 29999: user accounts (see ../config/update-users-groups.pl)
# 30000 - 31000: nixbld users (the upper limit is arbitrarily chosen)
# 61184 - 65519: systemd DynamicUser (see systemd.exec(5))
# 65535: the error return sentinel value when uid_t was 16 bits
#
# 100000 - 6653600: subgid allocated for user namespaces
# (see ../config/update-users-groups.pl)
# 4294967294: unauthenticated user in some NFS implementations
# 4294967295: error return sentinel value
#
# References:
# https://www.debian.org/doc/debian-policy/ch-opersys.html#uid-and-gid-classes
onepassword = 31001; # 1Password requires that its GID be larger than 1000
onepassword-cli = 31002; # 1Password requires that its GID be larger than 1000
users = 100;
nixbld = 30000;
nogroup = 65534;

View file

@ -8,19 +8,16 @@ let
in
{
imports = [
(mkRemovedOptionModule [ "programs" "_1password-gui" "gid" ] ''
A preallocated GID will be used instead.
'')
];
options = {
programs._1password-gui = {
enable = mkEnableOption "the 1Password GUI application";
gid = mkOption {
type = types.addCheck types.int (x: x >= 1000);
example = literalExpression "5000";
description = ''
The gid to assign to the onepassword group, which is needed for browser integration.
It must be 1000 or greater.
'';
};
polkitPolicyOwners = mkOption {
type = types.listOf types.str;
default = [ ];
@ -44,7 +41,7 @@ in
in
mkIf cfg.enable {
environment.systemPackages = [ package ];
users.groups.onepassword.gid = cfg.gid;
users.groups.onepassword.gid = config.ids.gids.onepassword;
security.wrappers = {
"1Password-BrowserSupport" = {

View file

@ -8,19 +8,16 @@ let
in
{
imports = [
(mkRemovedOptionModule [ "programs" "_1password" "gid" ] ''
A preallocated GID will be used instead.
'')
];
options = {
programs._1password = {
enable = mkEnableOption "the 1Password CLI tool";
gid = mkOption {
type = types.addCheck types.int (x: x >= 1000);
example = literalExpression "5001";
description = ''
The gid to assign to the onepassword-cli group, which is needed for integration with the 1Password GUI.
It must be 1000 or greater.
'';
};
package = mkPackageOption pkgs "1Password CLI" {
default = [ "_1password" ];
};
@ -29,7 +26,7 @@ in
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
users.groups.onepassword-cli.gid = cfg.gid;
users.groups.onepassword-cli.gid = config.ids.gids.onepassword-cli;
security.wrappers = {
"op" = {

View file

@ -71,10 +71,6 @@ in
package = mkOption {
type = types.package;
default = crioPackage;
defaultText = literalDocBook ''
<literal>pkgs.cri-o</literal> built with
<literal>config.${opt.extraPackages}</literal>.
'';
internal = true;
description = ''
The final CRI-O package (including extra packages).

View file

@ -34,7 +34,8 @@ in
package = mkOption {
type = types.nullOr types.package;
default = config.boot.kernelPackages.prl-tools;
defaultText = literalExpression "config.boot.kernelPackages.prl-tools";
defaultText = "config.boot.kernelPackages.prl-tools";
example = literalExpression "config.boot.kernelPackages.prl-tools";
description = ''
Defines which package to use for prl-tools. Override to change the version.
'';
@ -44,27 +45,6 @@ in
};
config = mkIf config.hardware.parallels.enable {
services.xserver = {
drivers = singleton
{ name = "prlvideo"; modules = [ prl-tools ]; };
screenSection = ''
Option "NoMTRR"
'';
config = ''
Section "InputClass"
Identifier "prlmouse"
MatchIsPointer "on"
MatchTag "prlmouse"
Driver "prlmouse"
EndSection
'';
};
hardware.opengl.package = prl-tools;
hardware.opengl.package32 = pkgs.pkgsi686Linux.linuxPackages.prl-tools.override { libsOnly = true; kernel = null; };
hardware.opengl.setLdLibraryPath = true;
services.udev.packages = [ prl-tools ];
@ -72,37 +52,44 @@ in
boot.extraModulePackages = [ prl-tools ];
boot.kernelModules = [ "prl_tg" "prl_eth" "prl_fs" "prl_fs_freeze" ];
boot.kernelModules = [ "prl_fs" "prl_fs_freeze" "prl_tg" ]
++ optional (pkgs.stdenv.hostPlatform.system == "aarch64-linux") "prl_notifier";
services.timesyncd.enable = false;
systemd.services.prltoolsd = {
description = "Parallels Tools' service";
description = "Parallels Tools Service";
wantedBy = [ "multi-user.target" ];
path = [ prl-tools ];
serviceConfig = {
ExecStart = "${prl-tools}/bin/prltoolsd -f";
PIDFile = "/var/run/prltoolsd.pid";
WorkingDirectory = "${prl-tools}/bin";
};
};
systemd.services.prlfsmountd = mkIf config.hardware.parallels.autoMountShares {
description = "Parallels Shared Folders Daemon";
description = "Parallels Guest File System Sharing Tool";
wantedBy = [ "multi-user.target" ];
path = [ prl-tools ];
serviceConfig = rec {
ExecStart = "${prl-tools}/sbin/prlfsmountd ${PIDFile}";
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /media";
ExecStopPost = "${prl-tools}/sbin/prlfsmountd -u";
PIDFile = "/run/prlfsmountd.pid";
WorkingDirectory = "${prl-tools}/bin";
};
};
systemd.services.prlshprint = {
description = "Parallels Shared Printer Tool";
description = "Parallels Printing Tool";
wantedBy = [ "multi-user.target" ];
bindsTo = [ "cups.service" ];
path = [ prl-tools ];
serviceConfig = {
Type = "forking";
ExecStart = "${prl-tools}/bin/prlshprint";
WorkingDirectory = "${prl-tools}/bin";
};
};
@ -110,43 +97,47 @@ in
prlcc = {
description = "Parallels Control Center";
wantedBy = [ "graphical-session.target" ];
path = [ prl-tools ];
serviceConfig = {
ExecStart = "${prl-tools}/bin/prlcc";
WorkingDirectory = "${prl-tools}/bin";
};
};
prldnd = {
description = "Parallels Control Center";
description = "Parallels Drag And Drop Tool";
wantedBy = [ "graphical-session.target" ];
path = [ prl-tools ];
serviceConfig = {
ExecStart = "${prl-tools}/bin/prldnd";
};
};
prl_wmouse_d = {
description = "Parallels Walking Mouse Daemon";
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${prl-tools}/bin/prl_wmouse_d";
WorkingDirectory = "${prl-tools}/bin";
};
};
prlcp = {
description = "Parallels CopyPaste Tool";
description = "Parallels Copy Paste Tool";
wantedBy = [ "graphical-session.target" ];
path = [ prl-tools ];
serviceConfig = {
ExecStart = "${prl-tools}/bin/prlcp";
Restart = "always";
WorkingDirectory = "${prl-tools}/bin";
};
};
prlsga = {
description = "Parallels Shared Guest Applications Tool";
wantedBy = [ "graphical-session.target" ];
path = [ prl-tools ];
serviceConfig = {
ExecStart = "${prl-tools}/bin/prlsga";
WorkingDirectory = "${prl-tools}/bin";
};
};
prlshprof = {
description = "Parallels Shared Profile Tool";
wantedBy = [ "graphical-session.target" ];
path = [ prl-tools ];
serviceConfig = {
ExecStart = "${prl-tools}/bin/prlshprof";
WorkingDirectory = "${prl-tools}/bin";
};
};
};