From b90170a587feed64cbed5d42ee85e4f5b8d46fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 11 Jun 2023 22:54:11 +0200 Subject: [PATCH] Update to NixOS 23.05 --- flake.nix | 4 +-- modules/audio/default.nix | 8 ------ modules/audio/pipewire-pulse.conf.json | 36 ------------------------ modules/core/services.nix | 2 +- modules/graphical/default.nix | 2 +- modules/paperless/default.nix | 2 +- overlays/overrides.nix | 18 ------------ overlays/signal-desktop.nix | 26 +++++++++++++++++ overlays/waybar.nix | 1 + profiles/base-user/session-variables.nix | 2 +- 10 files changed, 33 insertions(+), 68 deletions(-) create mode 100644 overlays/signal-desktop.nix diff --git a/flake.nix b/flake.nix index a3f03413..73fb06f3 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,7 @@ inputs = { # Track channels with commits tested and built by hydra - nixos.url = "github:nixos/nixpkgs/nixos-22.11"; + nixos.url = "github:nixos/nixpkgs/nixos-23.05"; latest.url = "github:nixos/nixpkgs/nixos-unstable"; flake-compat.url = "github:edolstra/flake-compat"; @@ -19,7 +19,7 @@ digga.inputs.darwin.follows = "darwin"; digga.inputs.flake-compat.follows = "flake-compat"; - home.url = "github:nix-community/home-manager/release-22.11"; + home.url = "github:nix-community/home-manager/release-23.05"; home.inputs.nixpkgs.follows = "nixos"; darwin.url = "github:LnL7/nix-darwin"; diff --git a/modules/audio/default.nix b/modules/audio/default.nix index 9a69301b..c0043319 100644 --- a/modules/audio/default.nix +++ b/modules/audio/default.nix @@ -72,14 +72,6 @@ in { alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - - config.pipewire = { - context.default.clock = { - allowed-rates = [44100 48000 88200 96000]; - rate = 44100; - }; - }; - config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json); }; # Bluetooth configuration using wireplumber diff --git a/modules/audio/pipewire-pulse.conf.json b/modules/audio/pipewire-pulse.conf.json index 97bedaaa..e69de29b 100644 --- a/modules/audio/pipewire-pulse.conf.json +++ b/modules/audio/pipewire-pulse.conf.json @@ -1,36 +0,0 @@ -{ - "context.properties": {}, - "context.spa-libs": { - "audio.convert.*": "audioconvert/libspa-audioconvert", - "support.*": "support/libspa-support" - }, - "context.modules": [ - { - "name": "libpipewire-module-rtkit", - "args": {}, - "flags": ["ifexists", "nofail"] - }, - { - "name": "libpipewire-module-protocol-native" - }, - { - "name": "libpipewire-module-client-node" - }, - { - "name": "libpipewire-module-adapter" - }, - { - "name": "libpipewire-module-metadata" - }, - { - "name": "libpipewire-module-protocol-pulse", - "args": { - "server.address": ["unix:native", "tcp:4713"], - "vm.overrides": { - "pulse.min.quantum": "1024/48000" - } - } - } - ], - "stream.properties": {} -} diff --git a/modules/core/services.nix b/modules/core/services.nix index 2d53dd74..475945e6 100644 --- a/modules/core/services.nix +++ b/modules/core/services.nix @@ -10,7 +10,7 @@ # If you don't want the host to have SSH actually opened up to the net, # set `services.openssh.openFirewall` to false in your config. openFirewall = lib.mkDefault true; - passwordAuthentication = lib.mkDefault false; + settings.PasswordAuthentication = lib.mkDefault false; }; # Service that makes Out of Memory Killer more effective diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index 39f6be5d..46812e92 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -66,7 +66,7 @@ in { services.getty.autologinUser = mkIf cfg.autologin.enable (mkForce "${psCfg.user.name}"); - qt5 = { + qt = { enable = true; platformTheme = "gtk2"; style = "gtk2"; diff --git a/modules/paperless/default.nix b/modules/paperless/default.nix index ed9696d8..168c980e 100644 --- a/modules/paperless/default.nix +++ b/modules/paperless/default.nix @@ -80,7 +80,7 @@ in { home.packages = with pkgs; [ inputs.scan2paperless.legacyPackages.x86_64-linux.scan2paperless sane-backends - python39Packages.img2pdf + python310Packages.img2pdf ]; home.sessionVariables = { SCANNER_DEFAULT_DEVICE = cfg.scannerDefaultDevice; diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 8c400104..69ada37a 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -3,24 +3,6 @@ channels: final: prev: { inherit (channels.latest) - cachix - docker - docker-compose - dhall - discord - element-desktop - rage - nix-index - qutebrowser - alejandra - signal-desktop - starship - deploy-rs - tdesktop - arduino - arduino-cli - steam - firefox ; inherit diff --git a/overlays/signal-desktop.nix b/overlays/signal-desktop.nix new file mode 100644 index 00000000..efdb86f2 --- /dev/null +++ b/overlays/signal-desktop.nix @@ -0,0 +1,26 @@ +final: prev: { + signal-desktop = prev.signal-desktop.overrideAttrs (oldAttrs: rec { + pname = "signal-desktop"; + dir = "Signal"; + version = "6.19.0"; + hash = "sha256-D54A9z5+Y3ns363Zl8IChnykEBhOz8aJCgTCQIjq/fc="; + + src = prev.fetchurl { + url = "https://updates.signal.org/desktop/apt/pool/main/s/${pname}/${pname}_${version}_amd64.deb"; + inherit hash; + }; + + preFixup = '' + gappsWrapperArgs+=( + --prefix LD_LIBRARY_PATH : "${prev.lib.makeLibraryPath [prev.stdenv.cc.cc]}" + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" + --suffix PATH : ${prev.lib.makeBinPath [prev.xdg-utils]} + ) + # Fix the desktop link + substituteInPlace $out/share/applications/${pname}.desktop \ + --replace "/opt/${dir}/${pname}" $out/bin/${pname} + autoPatchelf --no-recurse -- "$out/lib/${dir}/" + patchelf --add-needed ${prev.libpulseaudio}/lib/libpulse.so "$out/lib/${dir}/resources/app.asar.unpacked/node_modules/@signalapp/ringrtc/build/linux/libringrtc-x64.node" + ''; + }); +} diff --git a/overlays/waybar.nix b/overlays/waybar.nix index 075f5d3e..109c27c6 100644 --- a/overlays/waybar.nix +++ b/overlays/waybar.nix @@ -1,5 +1,6 @@ channels: final: prev: { waybar = channels.latest.waybar.overrideAttrs (oldAttrs: rec { inherit (prev.sources.waybar-nvfetcher) version src; + mesonFlags = oldAttrs.mesonFlags ++ ["-Dcava=disabled"]; }); } diff --git a/profiles/base-user/session-variables.nix b/profiles/base-user/session-variables.nix index fb816046..d21a9f80 100644 --- a/profiles/base-user/session-variables.nix +++ b/profiles/base-user/session-variables.nix @@ -85,7 +85,7 @@ VUEDX_TELEMETRY = "off"; # FZF shell history widget default colors - FZF_DEFAULT_OPTS = "--color=bg+:#2d2a2e,bg:#1a181a,spinner:#ef9062,hl:#7accd7 --color=fg:#d3d1d4,header:#7accd7,info:#e5c463,pointer:#ef9062 --color=marker:#ef9062,fg+:#d3d1d4,prompt:#e5c463,hl+:#7accd7"; + FZF_DEFAULT_OPTS = lib.mkForce "--color=bg+:#2d2a2e,bg:#1a181a,spinner:#ef9062,hl:#7accd7 --color=fg:#d3d1d4,header:#7accd7,info:#e5c463,pointer:#ef9062 --color=marker:#ef9062,fg+:#d3d1d4,prompt:#e5c463,hl+:#7accd7"; }; envListNames = lib.attrsets.mapAttrsToList (name: value: name) variables;