Loading nixos/modules/services/monitoring/cockpit.nix +30 −14 Original line number Diff line number Diff line Loading @@ -15,6 +15,33 @@ let mkPackageOption ; settingsFormat = pkgs.formats.ini { }; pathPkgs = [ cfg.package ] ++ cfg.plugins; resourcesEnv = pkgs.buildEnv { name = "cockpit-plugins"; paths = pathPkgs; pathsToLink = [ "/share/cockpit" ]; }; depsEnv = pkgs.buildEnv { name = "cockpit-plugins-env"; paths = lib.concatMap (p: p.passthru.cockpitPath or [ ]) pathPkgs; pathsToLink = [ "/bin" "/share" "/lib" ]; }; share = pkgs.buildEnv { name = "cockpit-share"; paths = [ resourcesEnv depsEnv ]; pathsToLink = [ "/share" ]; }; in { options = { Loading Loading @@ -100,22 +127,11 @@ in }; # Add plugins in discoverable folder "cockpit/share/cockpit".source = "${ pkgs.buildEnv { name = "cockpit-plugins"; paths = cfg.plugins ++ [ cfg.package ]; pathsToLink = [ "/share/cockpit" ]; } }/share/cockpit"; "cockpit/share".source = "${share}/share"; # Add plugins dependencies "cockpit/bin".source = "${ pkgs.buildEnv { name = "cockpit-path"; paths = lib.concatMap (p: p.passthru.cockpitPath or [ ]) cfg.plugins; pathsToLink = [ "/bin" ]; } }/bin"; "cockpit/bin".source = "${depsEnv}/bin"; "cockpit/lib".source = "${depsEnv}/lib"; }; security.pam.services.cockpit = { Loading pkgs/by-name/co/cockpit/package.nix +11 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ git, glib, glib-networking, gobject-introspection, gnused, gnutls, hostname, Loading Loading @@ -160,9 +161,9 @@ stdenv.mkDerivation (finalAttrs: { --replace-warn '"/usr/share' '"/run/current-system/sw/share' \ --replace-warn '"/lib/systemd' '"/run/current-system/sw/lib/systemd' # replace reference to system python interpreter, used for e.g. sosreport substituteInPlace pkg/lib/python.ts \ --replace-fail /usr/libexec/platform-python ${python3Packages.python.interpreter} # fix polkit agent helper path substituteInPlace src/cockpit/polkit.py \ --replace-fail "/usr/lib/polkit-1/polkit-agent-helper-1" "/run/wrappers/bin/polkit-agent-helper-1" ''; configureFlags = [ Loading Loading @@ -200,10 +201,10 @@ stdenv.mkDerivation (finalAttrs: { for binary in $out/bin/cockpit-bridge $out/libexec/cockpit-askpass; do chmod +x $binary wrapProgram $binary \ --prefix PATH : "/etc/cockpit/bin" \ --prefix PYTHONPATH : ${ lib.makeSearchPath python3Packages.python.sitePackages [ "$out" python3Packages.pygobject3 "/etc/cockpit" ] } \ Loading Loading @@ -271,6 +272,12 @@ stdenv.mkDerivation (finalAttrs: { passthru = { tests = { inherit (nixosTests) cockpit; }; updateScript = nix-update-script { }; cockpitPath = [ glib gobject-introspection python3Packages.python python3Packages.pygobject3 ]; }; meta = { Loading Loading
nixos/modules/services/monitoring/cockpit.nix +30 −14 Original line number Diff line number Diff line Loading @@ -15,6 +15,33 @@ let mkPackageOption ; settingsFormat = pkgs.formats.ini { }; pathPkgs = [ cfg.package ] ++ cfg.plugins; resourcesEnv = pkgs.buildEnv { name = "cockpit-plugins"; paths = pathPkgs; pathsToLink = [ "/share/cockpit" ]; }; depsEnv = pkgs.buildEnv { name = "cockpit-plugins-env"; paths = lib.concatMap (p: p.passthru.cockpitPath or [ ]) pathPkgs; pathsToLink = [ "/bin" "/share" "/lib" ]; }; share = pkgs.buildEnv { name = "cockpit-share"; paths = [ resourcesEnv depsEnv ]; pathsToLink = [ "/share" ]; }; in { options = { Loading Loading @@ -100,22 +127,11 @@ in }; # Add plugins in discoverable folder "cockpit/share/cockpit".source = "${ pkgs.buildEnv { name = "cockpit-plugins"; paths = cfg.plugins ++ [ cfg.package ]; pathsToLink = [ "/share/cockpit" ]; } }/share/cockpit"; "cockpit/share".source = "${share}/share"; # Add plugins dependencies "cockpit/bin".source = "${ pkgs.buildEnv { name = "cockpit-path"; paths = lib.concatMap (p: p.passthru.cockpitPath or [ ]) cfg.plugins; pathsToLink = [ "/bin" ]; } }/bin"; "cockpit/bin".source = "${depsEnv}/bin"; "cockpit/lib".source = "${depsEnv}/lib"; }; security.pam.services.cockpit = { Loading
pkgs/by-name/co/cockpit/package.nix +11 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ git, glib, glib-networking, gobject-introspection, gnused, gnutls, hostname, Loading Loading @@ -160,9 +161,9 @@ stdenv.mkDerivation (finalAttrs: { --replace-warn '"/usr/share' '"/run/current-system/sw/share' \ --replace-warn '"/lib/systemd' '"/run/current-system/sw/lib/systemd' # replace reference to system python interpreter, used for e.g. sosreport substituteInPlace pkg/lib/python.ts \ --replace-fail /usr/libexec/platform-python ${python3Packages.python.interpreter} # fix polkit agent helper path substituteInPlace src/cockpit/polkit.py \ --replace-fail "/usr/lib/polkit-1/polkit-agent-helper-1" "/run/wrappers/bin/polkit-agent-helper-1" ''; configureFlags = [ Loading Loading @@ -200,10 +201,10 @@ stdenv.mkDerivation (finalAttrs: { for binary in $out/bin/cockpit-bridge $out/libexec/cockpit-askpass; do chmod +x $binary wrapProgram $binary \ --prefix PATH : "/etc/cockpit/bin" \ --prefix PYTHONPATH : ${ lib.makeSearchPath python3Packages.python.sitePackages [ "$out" python3Packages.pygobject3 "/etc/cockpit" ] } \ Loading Loading @@ -271,6 +272,12 @@ stdenv.mkDerivation (finalAttrs: { passthru = { tests = { inherit (nixosTests) cockpit; }; updateScript = nix-update-script { }; cockpitPath = [ glib gobject-introspection python3Packages.python python3Packages.pygobject3 ]; }; meta = { Loading