forked from mirrors/nixpkgs
Merge pull request #171650 from helsinki-systems/feat/config-systemd-package
treewide: pkgs.systemd -> config.systemd.package
This commit is contained in:
commit
e6fb1e63d1
|
@ -34,7 +34,7 @@ let
|
|||
name = "nixos-generate-config";
|
||||
src = ./nixos-generate-config.pl;
|
||||
perl = "${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl";
|
||||
detectvirt = "${pkgs.systemd}/bin/systemd-detect-virt";
|
||||
detectvirt = "${config.systemd.package}/bin/systemd-detect-virt";
|
||||
btrfs = "${pkgs.btrfs-progs}/bin/btrfs";
|
||||
inherit (config.system.nixos-generate-config) configuration desktopConfiguration;
|
||||
xserverEnabled = config.services.xserver.enable;
|
||||
|
|
|
@ -626,7 +626,7 @@ let
|
|||
session optional ${pkgs.otpw}/lib/security/pam_otpw.so
|
||||
'' +
|
||||
optionalString cfg.startSession ''
|
||||
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
|
||||
session optional ${config.systemd.package}/lib/security/pam_systemd.so
|
||||
'' +
|
||||
optionalString cfg.forwardXAuth ''
|
||||
session optional pam_xauth.so xauthpath=${pkgs.xorg.xauth}/bin/xauth systemuser=99
|
||||
|
@ -1242,7 +1242,7 @@ in
|
|||
mr ${pkgs.gnome3.gnome-keyring}/lib/security/pam_gnome_keyring.so,
|
||||
'' +
|
||||
optionalString (isEnabled (cfg: cfg.startSession)) ''
|
||||
mr ${pkgs.systemd}/lib/security/pam_systemd.so,
|
||||
mr ${config.systemd.package}/lib/security/pam_systemd.so,
|
||||
'' +
|
||||
optionalString (isEnabled (cfg: cfg.enableAppArmor)
|
||||
&& config.security.apparmor.enable) ''
|
||||
|
|
|
@ -109,7 +109,7 @@ in
|
|||
'''
|
||||
# Read from journal
|
||||
pipe {
|
||||
command => "''${pkgs.systemd}/bin/journalctl -f -o json"
|
||||
command => "''${config.systemd.package}/bin/journalctl -f -o json"
|
||||
type => "syslog" codec => json {}
|
||||
}
|
||||
'''
|
||||
|
|
|
@ -135,7 +135,7 @@ in
|
|||
User = "spamd";
|
||||
Group = "spamd";
|
||||
StateDirectory = "spamassassin";
|
||||
ExecStartPost = "+${pkgs.systemd}/bin/systemctl -q --no-block try-reload-or-restart spamd.service";
|
||||
ExecStartPost = "+${config.systemd.package}/bin/systemctl -q --no-block try-reload-or-restart spamd.service";
|
||||
};
|
||||
|
||||
script = ''
|
||||
|
|
|
@ -226,10 +226,10 @@ in
|
|||
ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="${i}", TAG+="systemd", ENV{SYSTEMD_WANTS}+="supplicant-${replaceChars [" "] ["-"] iface}.service", TAG+="SUPPLICANT_ASSIGNED"''))}
|
||||
|
||||
${optionalString (hasAttr "WLAN" cfg) ''
|
||||
ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", TAG!="SUPPLICANT_ASSIGNED", TAG+="systemd", PROGRAM="${pkgs.systemd}/bin/systemd-escape -p %E{INTERFACE}", ENV{SYSTEMD_WANTS}+="supplicant-wlan@$result.service"
|
||||
ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", TAG!="SUPPLICANT_ASSIGNED", TAG+="systemd", PROGRAM="/run/current-system/systemd/bin/systemd-escape -p %E{INTERFACE}", ENV{SYSTEMD_WANTS}+="supplicant-wlan@$result.service"
|
||||
''}
|
||||
${optionalString (hasAttr "LAN" cfg) ''
|
||||
ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}=="lan", TAG!="SUPPLICANT_ASSIGNED", TAG+="systemd", PROGRAM="${pkgs.systemd}/bin/systemd-escape -p %E{INTERFACE}", ENV{SYSTEMD_WANTS}+="supplicant-lan@$result.service"
|
||||
ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}=="lan", TAG!="SUPPLICANT_ASSIGNED", TAG+="systemd", PROGRAM="/run/current-system/systemd/bin/systemd-escape -p %E{INTERFACE}", ENV{SYSTEMD_WANTS}+="supplicant-lan@$result.service"
|
||||
''}
|
||||
'';
|
||||
})];
|
||||
|
|
|
@ -17,7 +17,7 @@ let
|
|||
else "sshg-fw-ipset";
|
||||
in pkgs.writeText "sshguard.conf" ''
|
||||
BACKEND="${pkgs.sshguard}/libexec/${backend}"
|
||||
LOGREADER="LANG=C ${pkgs.systemd}/bin/journalctl ${args}"
|
||||
LOGREADER="LANG=C ${config.systemd.package}/bin/journalctl ${args}"
|
||||
'';
|
||||
|
||||
in {
|
||||
|
|
|
@ -88,7 +88,7 @@ in {
|
|||
account required pam_unix.so
|
||||
session required pam_unix.so
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||
session required ${pkgs.systemd}/lib/security/pam_systemd.so
|
||||
session required ${config.systemd.package}/lib/security/pam_systemd.so
|
||||
'';
|
||||
|
||||
hardware.opengl.enable = mkDefault true;
|
||||
|
|
|
@ -298,7 +298,7 @@ in
|
|||
|
||||
session required pam_succeed_if.so audit quiet_success user = gdm
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
|
||||
session optional ${config.systemd.package}/lib/security/pam_systemd.so
|
||||
session optional pam_keyinit.so force revoke
|
||||
session optional pam_permit.so
|
||||
'';
|
||||
|
|
|
@ -287,7 +287,7 @@ in
|
|||
|
||||
session required pam_succeed_if.so audit quiet_success user = lightdm
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
|
||||
session optional ${config.systemd.package}/lib/security/pam_systemd.so
|
||||
session optional pam_keyinit.so force revoke
|
||||
session optional pam_permit.so
|
||||
'';
|
||||
|
|
|
@ -231,7 +231,7 @@ in
|
|||
|
||||
session required pam_succeed_if.so audit quiet_success user = sddm
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
|
||||
session optional ${config.systemd.package}/lib/security/pam_systemd.so
|
||||
session optional pam_keyinit.so force revoke
|
||||
session optional pam_permit.so
|
||||
'';
|
||||
|
|
|
@ -52,7 +52,7 @@ with lib;
|
|||
'';
|
||||
environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases;
|
||||
|
||||
environment.etc."modprobe.d/systemd.conf".source = "${pkgs.systemd}/lib/modprobe.d/systemd.conf";
|
||||
environment.etc."modprobe.d/systemd.conf".source = "${config.systemd.package}/lib/modprobe.d/systemd.conf";
|
||||
|
||||
environment.systemPackages = [ pkgs.kmod ];
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ in {
|
|||
nixos-rebuild = "${config.system.build.nixos-rebuild}/bin/nixos-rebuild";
|
||||
date = "${pkgs.coreutils}/bin/date";
|
||||
readlink = "${pkgs.coreutils}/bin/readlink";
|
||||
shutdown = "${pkgs.systemd}/bin/shutdown";
|
||||
shutdown = "${config.systemd.package}/bin/shutdown";
|
||||
upgradeFlag = optional (cfg.channel == null) "--upgrade";
|
||||
in if cfg.allowReboot then ''
|
||||
${nixos-rebuild} boot ${toString (cfg.flags ++ upgradeFlag)}
|
||||
|
|
|
@ -11,7 +11,7 @@ let
|
|||
echo "attempting to fetch configuration from EC2 user data..."
|
||||
|
||||
export HOME=/root
|
||||
export PATH=${pkgs.lib.makeBinPath [ config.nix.package pkgs.systemd pkgs.gnugrep pkgs.git pkgs.gnutar pkgs.gzip pkgs.gnused pkgs.xz config.system.build.nixos-rebuild]}:$PATH
|
||||
export PATH=${pkgs.lib.makeBinPath [ config.nix.package config.systemd.package pkgs.gnugrep pkgs.git pkgs.gnutar pkgs.gzip pkgs.gnused pkgs.xz config.system.build.nixos-rebuild]}:$PATH
|
||||
export NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
|
||||
|
||||
userData=/etc/ec2-metadata/user-data
|
||||
|
|
|
@ -46,7 +46,7 @@ in {
|
|||
RemainAfterExit = true;
|
||||
};
|
||||
restartIfChanged = false;
|
||||
path = [ pkgs.jq pkgs.gnused pkgs.gnugrep pkgs.systemd config.nix.package config.system.build.nixos-rebuild ];
|
||||
path = [ pkgs.jq pkgs.gnused pkgs.gnugrep config.systemd.package config.nix.package config.system.build.nixos-rebuild ];
|
||||
environment = {
|
||||
HOME = "/root";
|
||||
NIX_PATH = concatStringsSep ":" [
|
||||
|
|
Loading…
Reference in a new issue