diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-02-03 18:00:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-03 18:00:51 +0000 |
commit | 5a036cc96a94a0c9377f4927abc19004bad80a0b (patch) | |
tree | 5a0ff3e316e47bf1cd9928e41ec8d7226bfb6dc7 /nixos | |
parent | bcb6afc76e742aaa6642e216125b04da408e3a88 (diff) | |
parent | 144fcada81a35097b15aa5dedd1ba87c7a94bfce (diff) | |
download | nixlib-5a036cc96a94a0c9377f4927abc19004bad80a0b.tar nixlib-5a036cc96a94a0c9377f4927abc19004bad80a0b.tar.gz nixlib-5a036cc96a94a0c9377f4927abc19004bad80a0b.tar.bz2 nixlib-5a036cc96a94a0c9377f4927abc19004bad80a0b.tar.lz nixlib-5a036cc96a94a0c9377f4927abc19004bad80a0b.tar.xz nixlib-5a036cc96a94a0c9377f4927abc19004bad80a0b.tar.zst nixlib-5a036cc96a94a0c9377f4927abc19004bad80a0b.zip |
Merge master into staging-next
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/x11/xserver.nix | 4 | ||||
-rw-r--r-- | nixos/modules/system/etc/build-composefs-dump.py | 14 |
2 files changed, 13 insertions, 5 deletions
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 36f25d5547ca..38fb1074fcdf 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -710,9 +710,9 @@ in ''; } # Needed since 1.18; see https://bugs.freedesktop.org/show_bug.cgi?id=89023#c5 - // (let cfgPath = "/X11/xorg.conf.d/10-evdev.conf"; in + // (let cfgPath = "X11/xorg.conf.d/10-evdev.conf"; in { - ${cfgPath}.source = xorg.xf86inputevdev.out + "/share" + cfgPath; + ${cfgPath}.source = xorg.xf86inputevdev.out + "/share/" + cfgPath; }); environment.systemPackages = utils.removePackagesByName diff --git a/nixos/modules/system/etc/build-composefs-dump.py b/nixos/modules/system/etc/build-composefs-dump.py index 923d40008b63..bf4ec791ecf7 100644 --- a/nixos/modules/system/etc/build-composefs-dump.py +++ b/nixos/modules/system/etc/build-composefs-dump.py @@ -58,7 +58,7 @@ class ComposefsPath: ): if path is None: path = attrs["target"] - self.path = "/" + path + self.path = path self.size = size self.filetype = filetype self.mode = mode @@ -83,8 +83,12 @@ class ComposefsPath: return " ".join(line_list) -def eprint(*args, **kwargs) -> None: - print(args, **kwargs, file=sys.stderr) +def eprint(*args: Any, **kwargs: Any) -> None: + print(*args, **kwargs, file=sys.stderr) + + +def normalize_path(path: str) -> str: + return str("/" + os.path.normpath(path).lstrip("/")) def leading_directories(path: str) -> list[str]: @@ -145,6 +149,10 @@ def main() -> None: paths: dict[str, ComposefsPath] = {} for attrs in config: + # Normalize the target path to work around issues in how targets are + # declared in `environment.etc`. + attrs["target"] = normalize_path(attrs["target"]) + target = attrs["target"] source = attrs["source"] mode = attrs["mode"] |