aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-09-19 16:59:42 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-09-19 16:59:42 +0200
commit0b12d44c06dccbfedaae89cb00f782d7c89fc814 (patch)
tree914258a15b689afcd266bd9fdb7225911daa3f0c /nixos
parent105abdd52cfb3795a867ab5d80f314950b86eadd (diff)
parent6ff8b675e0c2730e54f95d232a93e5b01813f389 (diff)
Merge master into staging-next
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/config/xdg/icons.nix17
-rw-r--r--nixos/modules/programs/environment.nix1
-rw-r--r--nixos/modules/services/networking/jormungandr.nix6
-rw-r--r--nixos/modules/system/activation/switch-to-configuration.pl19
4 files changed, 31 insertions, 12 deletions
diff --git a/nixos/modules/config/xdg/icons.nix b/nixos/modules/config/xdg/icons.nix
index cc82b9e94f9..4677ce090b0 100644
--- a/nixos/modules/config/xdg/icons.nix
+++ b/nixos/modules/config/xdg/icons.nix
@@ -19,9 +19,20 @@ with lib;
"/share/pixmaps"
];
- environment.profileRelativeSessionVariables = {
- XCURSOR_PATH = [ "/share/icons" ];
- };
+ # libXcursor looks for cursors in XCURSOR_PATH
+ # it mostly follows the spec for icons
+ # See: https://www.x.org/releases/current/doc/man/man3/Xcursor.3.xhtml Themes
+
+ # These are preferred so they come first in the list
+ environment.sessionVariables.XCURSOR_PATH = [
+ "$HOME/.icons"
+ "$HOME/.local/share/icons"
+ ];
+
+ environment.profileRelativeSessionVariables.XCURSOR_PATH = [
+ "/share/icons"
+ "/share/pixmaps"
+ ];
};
}
diff --git a/nixos/modules/programs/environment.nix b/nixos/modules/programs/environment.nix
index 4bbc750fd52..fcffb213498 100644
--- a/nixos/modules/programs/environment.nix
+++ b/nixos/modules/programs/environment.nix
@@ -20,7 +20,6 @@ in
{ NIXPKGS_CONFIG = "/etc/nix/nixpkgs-config.nix";
PAGER = mkDefault "less -R";
EDITOR = mkDefault "nano";
- XCURSOR_PATH = [ "$HOME/.icons" ];
XDG_CONFIG_DIRS = [ "/etc/xdg" ]; # needs to be before profile-relative paths to allow changes through environment.etc
GTK_DATA_PREFIX = "${config.system.path}"; # needed for gtk2 apps to find themes
GTK_EXE_PREFIX = "${config.system.path}";
diff --git a/nixos/modules/services/networking/jormungandr.nix b/nixos/modules/services/networking/jormungandr.nix
index 85e804d6cf2..152cceb4bf9 100644
--- a/nixos/modules/services/networking/jormungandr.nix
+++ b/nixos/modules/services/networking/jormungandr.nix
@@ -14,8 +14,10 @@ let
storage = dataDir;
p2p = {
public_address = "/ip4/127.0.0.1/tcp/8299";
- messages = "high";
- blocks = "high";
+ topics_of_interest = {
+ messages = "high";
+ blocks = "high";
+ };
};
rest = {
listen = "127.0.0.1:8607";
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl
index 8ff00fa11dc..641cf9faadc 100644
--- a/nixos/modules/system/activation/switch-to-configuration.pl
+++ b/nixos/modules/system/activation/switch-to-configuration.pl
@@ -10,6 +10,9 @@ use Cwd 'abs_path';
my $out = "@out@";
+# FIXME: maybe we should use /proc/1/exe to get the current systemd.
+my $curSystemd = abs_path("/run/current-system/sw/bin");
+
# To be robust against interruption, record what units need to be started etc.
my $startListFile = "/run/systemd/start-list";
my $restartListFile = "/run/systemd/restart-list";
@@ -267,7 +270,7 @@ while (my ($unit, $state) = each %{$activePrev}) {
sub pathToUnitName {
my ($path) = @_;
# Use current version of systemctl binary before daemon is reexeced.
- open my $cmd, "-|", "/run/current-system/sw/bin/systemd-escape", "--suffix=mount", "-p", $path
+ open my $cmd, "-|", "$curSystemd/systemd-escape", "--suffix=mount", "-p", $path
or die "Unable to escape $path!\n";
my $escaped = join "", <$cmd>;
chomp $escaped;
@@ -370,7 +373,7 @@ if (scalar (keys %unitsToStop) > 0) {
print STDERR "stopping the following units: ", join(", ", @unitsToStopFiltered), "\n"
if scalar @unitsToStopFiltered;
# Use current version of systemctl binary before daemon is reexeced.
- system("/run/current-system/sw/bin/systemctl", "stop", "--", sort(keys %unitsToStop)); # FIXME: ignore errors?
+ system("$curSystemd/systemctl", "stop", "--", sort(keys %unitsToStop)); # FIXME: ignore errors?
}
print STDERR "NOT restarting the following changed units: ", join(", ", sort(keys %unitsToSkip)), "\n"
@@ -382,10 +385,12 @@ my $res = 0;
print STDERR "activating the configuration...\n";
system("$out/activate", "$out") == 0 or $res = 2;
-# Restart systemd if necessary.
+# Restart systemd if necessary. Note that this is done using the
+# current version of systemd, just in case the new one has trouble
+# communicating with the running pid 1.
if ($restartSystemd) {
print STDERR "restarting systemd...\n";
- system("@systemd@/bin/systemctl", "daemon-reexec") == 0 or $res = 2;
+ system("$curSystemd/systemctl", "daemon-reexec") == 0 or $res = 2;
}
# Forget about previously failed services.
@@ -401,8 +406,10 @@ while (my $f = <$listActiveUsers>) {
my ($uid, $name) = ($+{uid}, $+{user});
print STDERR "reloading user units for $name...\n";
- system("@su@", "-s", "@shell@", "-l", $name, "-c", "XDG_RUNTIME_DIR=/run/user/$uid @systemd@/bin/systemctl --user daemon-reload");
- system("@su@", "-s", "@shell@", "-l", $name, "-c", "XDG_RUNTIME_DIR=/run/user/$uid @systemd@/bin/systemctl --user start nixos-activation.service");
+ system("@su@", "-s", "@shell@", "-l", $name, "-c",
+ "export XDG_RUNTIME_DIR=/run/user/$uid; " .
+ "$curSystemd/systemctl --user daemon-reexec; " .
+ "@systemd@/bin/systemctl --user start nixos-activation.service");
}
close $listActiveUsers;