diff options
author | sternenseemann <sternenseemann@systemli.org> | 2022-06-01 19:08:57 +0200 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2022-06-01 19:08:57 +0200 |
commit | 38c31bdbe5ed5ac61a01f4e6d432f4ff5efdff2b (patch) | |
tree | c6c9876e388e6e552e8df69adbd53033386f4699 /nixos | |
parent | 56bbe95331f0a45ce2e1983f5a54115bac91f56c (diff) | |
parent | b6aa2dfb848a6000a5b6f8597e06ada840f55e3b (diff) | |
download | nixpkgs-38c31bdbe5ed5ac61a01f4e6d432f4ff5efdff2b.tar nixpkgs-38c31bdbe5ed5ac61a01f4e6d432f4ff5efdff2b.tar.gz nixpkgs-38c31bdbe5ed5ac61a01f4e6d432f4ff5efdff2b.tar.bz2 nixpkgs-38c31bdbe5ed5ac61a01f4e6d432f4ff5efdff2b.tar.lz nixpkgs-38c31bdbe5ed5ac61a01f4e6d432f4ff5efdff2b.tar.xz nixpkgs-38c31bdbe5ed5ac61a01f4e6d432f4ff5efdff2b.tar.zst nixpkgs-38c31bdbe5ed5ac61a01f4e6d432f4ff5efdff2b.zip |
Merge remote-tracking branch 'origin/master' into haskell-updates
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/hardware/new-lg4ff.nix | 28 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/misc/jellyfin.nix | 3 | ||||
-rw-r--r-- | nixos/modules/services/networking/openconnect.nix | 8 | ||||
-rw-r--r-- | nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py | 17 |
5 files changed, 40 insertions, 17 deletions
diff --git a/nixos/modules/hardware/new-lg4ff.nix b/nixos/modules/hardware/new-lg4ff.nix new file mode 100644 index 00000000000..46581e47864 --- /dev/null +++ b/nixos/modules/hardware/new-lg4ff.nix @@ -0,0 +1,28 @@ +{ pkgs, lib, config, ... }: + +with lib; + +let + cfg = config.hardware.new-lg4ff; +in { + options.hardware.new-lg4ff = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + Enables improved Linux module drivers for Logitech driving wheels. + This will replace the existing in-kernel hid-logitech modules. + Works most notably on the Logitech G25, G27, G29 and Driving Force (GT). + ''; + }; + }; + + config = { + boot = { + extraModulePackages = [ pkgs.new-lg4ff ]; + kernelModules = [ "hid-logitech-new" ]; + }; + }; + + meta.maintainers = with lib.maintainers; [ matthiasbenaets ]; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 81b38699970..902fffd60f9 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -66,6 +66,7 @@ ./hardware/network/ath-user-regd.nix ./hardware/network/b43.nix ./hardware/network/intel-2200bg.nix + ./hardware/new-lg4ff.nix ./hardware/nitrokey.nix ./hardware/opengl.nix ./hardware/openrazer.nix diff --git a/nixos/modules/services/misc/jellyfin.nix b/nixos/modules/services/misc/jellyfin.nix index 04cf82f8a46..789b78702e9 100644 --- a/nixos/modules/services/misc/jellyfin.nix +++ b/nixos/modules/services/misc/jellyfin.nix @@ -53,7 +53,10 @@ in User = cfg.user; Group = cfg.group; StateDirectory = "jellyfin"; + StateDirectoryMode = "0700"; CacheDirectory = "jellyfin"; + CacheDirectoryMode = "0700"; + UMask = "0077"; ExecStart = "${cfg.package}/bin/jellyfin --datadir '/var/lib/${StateDirectory}' --cachedir '/var/cache/${CacheDirectory}'"; Restart = "on-failure"; diff --git a/nixos/modules/services/networking/openconnect.nix b/nixos/modules/services/networking/openconnect.nix index de4b505130e..bc873b2198b 100644 --- a/nixos/modules/services/networking/openconnect.nix +++ b/nixos/modules/services/networking/openconnect.nix @@ -9,6 +9,12 @@ let }; interfaceOptions = { options = { + autoStart = mkOption { + default = true; + description = "Whether this VPN connection should be started automatically."; + type = types.bool; + }; + gateway = mkOption { description = "Gateway server to connect to."; example = "gateway.example.com"; @@ -95,7 +101,7 @@ let description = "OpenConnect Interface - ${name}"; requires = [ "network-online.target" ]; after = [ "network.target" "network-online.target" ]; - wantedBy = [ "multi-user.target" ]; + wantedBy = optional icfg.autoStart "multi-user.target"; serviceConfig = { Type = "simple"; diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py index 4bb39811434..aca6a1ca2cc 100644 --- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py +++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py @@ -204,21 +204,6 @@ def get_profiles() -> List[str]: else: return [] -def should_update(v_from: str, v_to: str) -> bool: - # see https://github.com/systemd/systemd/blob/main/src/boot/bootctl.c compare_product function - - len_from = len(v_from) - len_to = len(v_to) - - if len_from < len_to: - return False - - if len_from > len_to: - return True - - return v_from < v_to - - def main() -> None: parser = argparse.ArgumentParser(description='Update NixOS-related systemd-boot files') parser.add_argument('default_config', metavar='DEFAULT-CONFIG', help='The default NixOS config to boot') @@ -276,7 +261,7 @@ def main() -> None: installed_version = installed_match.group(1) available_version = available_match.group(1) - if should_update(installed_version, available_version): + if installed_version < available_version: print("updating systemd-boot from %s to %s" % (installed_version, available_version)) subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "update"]) else: |