diff options
author | stuebinm | 2024-12-05 01:07:52 +0100 |
---|---|---|
committer | stuebinm | 2024-12-05 01:07:52 +0100 |
commit | 203aa6daede832cf6a56ef56950e04284df38035 (patch) | |
tree | 01236f62bfef7c0726e94f90fc030e269da729a3 | |
parent | 5d1d5f16ac89e3abea5a21fcb1ad4cc973f8b424 (diff) |
NixOS 24.11
-rw-r--r-- | chaski/configuration.nix | 1 | ||||
-rw-r--r-- | common/desktop.nix | 8 | ||||
-rw-r--r-- | flora/services/akkoma.nix | 20 | ||||
-rw-r--r-- | home/home.nix | 2 | ||||
-rw-r--r-- | home/packages-minimal.nix | 7 | ||||
-rw-r--r-- | npins/sources.json | 28 | ||||
-rw-r--r-- | pkgs/hikari.nix | 3 | ||||
-rw-r--r-- | pkgs/overlay.nix | 9 | ||||
-rw-r--r-- | pkgs/wlroots_0_15.nix | 114 |
9 files changed, 160 insertions, 32 deletions
diff --git a/chaski/configuration.nix b/chaski/configuration.nix index 6339d32..0271e0f 100644 --- a/chaski/configuration.nix +++ b/chaski/configuration.nix @@ -19,7 +19,6 @@ # This will automatically import SSH keys as age keys sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; - environment.noXlibs = true; services.nginx.enable = true; services.nginx.package = pkgs.nginx.override { gd = null; }; diff --git a/common/desktop.nix b/common/desktop.nix index 4c07183..d3812b2 100644 --- a/common/desktop.nix +++ b/common/desktop.nix @@ -72,7 +72,7 @@ #boot.kernelParams = [ "console=tty1" ]; - hardware.opengl.enable = true; + hardware.graphics.enable = true; programs.xwayland.enable = false; programs.wireshark.enable = true; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ]; @@ -83,15 +83,11 @@ fonts.enableDefaultPackages = true; fonts.packages = with pkgs; [ noto-fonts - noto-fonts-cjk + noto-fonts-cjk-sans noto-fonts-cjk-serif noto-fonts-emoji ]; - # Enable sound. - sound.enable = true; - # hardware.pulseaudio.enable = true; - xdg.portal.wlr.enable = true; services.pipewire = { diff --git a/flora/services/akkoma.nix b/flora/services/akkoma.nix index 13c69fc..db00bbe 100644 --- a/flora/services/akkoma.nix +++ b/flora/services/akkoma.nix @@ -97,6 +97,8 @@ in ":mrf".policies = map mkAtom [ "Pleroma.Web.ActivityPub.MRF.SimplePolicy" ]; + ":http".pool_timeout = 30000; + "Pleroma.Upload" = { filters = map mkAtom [ "Pleroma.Upload.Filter.Exiftool.StripMetadata" @@ -154,7 +156,7 @@ in services.postgresql = { enable = true; - package = pkgs.postgresql_12; + package = pkgs.postgresql_16; ensureDatabases = [ "pleroma" ]; ensureUsers = [ { @@ -162,6 +164,22 @@ in ensureDBOwnership = true; } ]; + settings = { + max_connections = 20; + shared_buffers = "256MB"; + effective_cache_size = "768MB"; + maintenance_work_mem = "64MB"; + checkpoint_completion_target = 0.9; + wal_buffers = "7864kB"; + default_statistics_target = 100; + random_page_cost = 1.1; + effective_io_concurrency = 200; + work_mem = "6553kB"; + huge_pages = "off"; + min_wal_size = "2GB"; + max_wal_size = "8GB"; + }; + # give pleroma access. must be done with lib.mkForce, for some reason authentication = pkgs.lib.mkForce '' # Generated file; do not edit! diff --git a/home/home.nix b/home/home.nix index 0452e0f..fa29a20 100644 --- a/home/home.nix +++ b/home/home.nix @@ -268,7 +268,7 @@ macro 3 ${mkMpv "three"} macro 4 ${mkMpv "four"} macro 5 ${mkMpv "five"} - macro f set browser "${pkgs.xdg_utils}/bin/xdg-open %u >/dev/null 2>&1 &" ; open-in-browser ; set browser "${config.programs.newsboat.browser} %u" + macro f set browser "${pkgs.xdg-utils}/bin/xdg-open %u >/dev/null 2>&1 &" ; open-in-browser ; set browser "${config.programs.newsboat.browser} %u" macro d set browser "kitty @launch --type tab fish -c 'fetchpdf %u'" ; open-in-browser ; set browser "${config.programs.newsboat.browser} %u" bind-key j down diff --git a/home/packages-minimal.nix b/home/packages-minimal.nix index f2294ec..b1121ac 100644 --- a/home/packages-minimal.nix +++ b/home/packages-minimal.nix @@ -4,11 +4,6 @@ home.packages = with pkgs; [ emacs-all-the-icons-fonts - # flake-enabled version of nix - (pkgs.writeScriptBin "nif" '' - #!/usr/bin/env bash - exec ${pkgs.nixFlakes}/bin/nix --experimental-features "nix-command flakes" "$@" - '') lynx pandoc # general cli utils @@ -17,7 +12,7 @@ ripgrep shellcheck graphviz zip unzip acpi sfz viu glow yt-dlp weechat hexyl bottom lm_sensors - usbutils libidn bsd-finger + usbutils libidn bsd-finger cyme # nix tools nixpkgs-review nix-top nix-diff nix-tree # git diff --git a/npins/sources.json b/npins/sources.json index a5eef92..f123ecd 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -77,10 +77,10 @@ "owner": "nix-community", "repo": "home-manager" }, - "branch": "release-24.05", - "revision": "2f23fa308a7c067e52dfcc30a0758f47043ec176", - "url": "https://github.com/nix-community/home-manager/archive/2f23fa308a7c067e52dfcc30a0758f47043ec176.tar.gz", - "hash": "00wp0s9b5nm5rsbwpc1wzfrkyxxmqjwsc1kcibjdbfkh69arcpsn" + "branch": "release-24.11", + "revision": "62d536255879be574ebfe9b87c4ac194febf47c5", + "url": "https://github.com/nix-community/home-manager/archive/62d536255879be574ebfe9b87c4ac194febf47c5.tar.gz", + "hash": "0v9bsc6r2626kap2m12zxw47m4p2kpr4pjldr7wvgqq48vwd72cm" }, "isabelle-utils": { "type": "Git", @@ -115,6 +115,18 @@ "url": null, "hash": "07lms2jl79nalzspw19c18h8ph6i8vlbawn2v2av42h2723qq397" }, + "nixos-mailserver": { + "type": "Git", + "repository": { + "type": "GitLab", + "repo_path": "simple-nixos-mailserver/nixos-mailserver", + "server": "https://gitlab.com/" + }, + "branch": "master", + "revision": "af7d3bf5daeba3fc28089b015c0dd43f06b176f2", + "url": "https://gitlab.com/api/v4/projects/simple-nixos-mailserver%2Fnixos-mailserver/repository/archive.tar.gz?sha=af7d3bf5daeba3fc28089b015c0dd43f06b176f2", + "hash": "1j0r52ij5pw8b8wc5xz1bmm5idwkmsnwpla6smz8gypcjls860ma" + }, "nixpkgs": { "type": "Git", "repository": { @@ -122,10 +134,10 @@ "owner": "NixOS", "repo": "nixpkgs" }, - "branch": "nixos-24.05", - "revision": "7e1ca67996afd8233d9033edd26e442836cc2ad6", - "url": "https://github.com/NixOS/nixpkgs/archive/7e1ca67996afd8233d9033edd26e442836cc2ad6.tar.gz", - "hash": "03pdf5wrpxwmr37p3xn45vm6cz1m7bzvif2v8xhqpmm09m40zb7j" + "branch": "nixos-24.11", + "revision": "b681065d0919f7eb5309a93cea2cfa84dec9aa88", + "url": "https://github.com/NixOS/nixpkgs/archive/b681065d0919f7eb5309a93cea2cfa84dec9aa88.tar.gz", + "hash": "1sd5hq0jw3g9la4w4q63rnrzd6nihi3kqpszldb0n8ws523pbbks" }, "nixpkgs-unstable": { "type": "Git", diff --git a/pkgs/hikari.nix b/pkgs/hikari.nix index 2adebe9..6506590 100644 --- a/pkgs/hikari.nix +++ b/pkgs/hikari.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchzip , pkg-config, bmake , cairo, glib, libevdev, libinput, libxkbcommon, linux-pam, pango, pixman -, libucl, wayland, wayland-protocols, wlroots, mesa +, libucl, wayland, wayland-protocols, wayland-scanner, wlroots, mesa , features ? { gammacontrol = true; layershell = true; @@ -34,6 +34,7 @@ stdenv.mkDerivation rec { mesa # for libEGL wayland wayland-protocols + wayland-scanner wlroots ]; diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix index 3f6c6a7..f500431 100644 --- a/pkgs/overlay.nix +++ b/pkgs/overlay.nix @@ -245,14 +245,7 @@ in hikari = self.callPackage ./hikari.nix { wlroots = self.wlroots_0_15; }; - wlroots_0_15 = (self.wlroots_0_16.overrideAttrs rec { - version = "0.15.1"; - src = self.fetchFromGitLab { - domain = "gitlab.freedesktop.org"; - owner = "wlroots"; - repo = "wlroots"; - rev = version; - hash = "sha256-MFR38UuB/wW7J9ODDUOfgTzKLse0SSMIRYTpEaEdRwM="; + wlroots_0_15 = self.callPackage ./wlroots_0_15.nix {}; }; }); diff --git a/pkgs/wlroots_0_15.nix b/pkgs/wlroots_0_15.nix new file mode 100644 index 0000000..93095f8 --- /dev/null +++ b/pkgs/wlroots_0_15.nix @@ -0,0 +1,114 @@ +{ lib +, stdenv +, fetchFromGitLab +, meson +, ninja +, pkg-config +, wayland-scanner +, libGL +, wayland +, wayland-protocols +, libinput +, libxkbcommon +, pixman +, libcap +, mesa +, xorg +, libpng +, ffmpeg_4 +, ffmpeg +, hwdata +, seatd +, vulkan-loader +, glslang +, libliftoff +, libdisplay-info +, nixosTests + +, enableXWayland ? true +, xwayland ? null +}: + +let + version = "0.15.2"; +in +stdenv.mkDerivation { + + pname = "wlroots"; + inherit version; + + inherit enableXWayland; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "wlroots"; + repo = "wlroots"; + rev = version; + hash = "sha256-MFR38UuB/wW7J9ODDUOfgTzKLse0SSMIRYTpEaEdRwM="; + }; + + postPatch = '' + substituteInPlace backend/drm/meson.build \ + --replace /usr/share/hwdata/ ${hwdata}/share/hwdata/ + ''; + + # $out for the library and $examples for the example programs (in examples): + outputs = [ "out" "examples" ]; + + strictDeps = true; + depsBuildBuild = [ pkg-config ]; + + nativeBuildInputs = [ meson ninja pkg-config wayland-scanner glslang ]; + + buildInputs = [ + libGL + libcap + libinput + libpng + libxkbcommon + mesa + pixman + seatd + vulkan-loader + wayland + wayland-protocols + xorg.libX11 + xorg.xcbutilerrors + xorg.xcbutilimage + xorg.xcbutilrenderutil + xorg.xcbutilwm + ffmpeg_4 + ] + ++ lib.optional enableXWayland xwayland; + + mesonFlags = + lib.optional (!enableXWayland) "-Dxwayland=disabled" + ; + + postFixup = '' + # Install ALL example programs to $examples: + # screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle + # screenshot output-layout multi-pointer rotation tablet touch pointer + # simple + mkdir -p $examples/bin + cd ./examples + for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do + cp "$binary" "$examples/bin/wlroots-$binary" + done + ''; + + # Test via TinyWL (the "minimum viable product" Wayland compositor based on wlroots): + passthru.tests.tinywl = nixosTests.tinywl; + + meta = { + description = "A modular Wayland compositor library"; + longDescription = '' + Pluggable, composable, unopinionated modules for building a Wayland + compositor; or about 50,000 lines of code you were going to write anyway. + ''; + changelog = "https://gitlab.freedesktop.org/wlroots/wlroots/-/tags/${version}"; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ primeos synthetica rewine ]; + }; + } |