diff options
-rw-r--r-- | abbenay/configuration.nix | 3 | ||||
-rw-r--r-- | common/common.nix | 4 | ||||
-rw-r--r-- | home/packages-minimal.nix | 2 | ||||
-rw-r--r-- | home/packages.nix | 8 | ||||
-rw-r--r-- | inputs.nix | 5 | ||||
-rw-r--r-- | modules/bookwyrm.nix | 20 | ||||
-rw-r--r-- | modules/mollysocket.nix | 10 | ||||
-rw-r--r-- | npins/sources.json | 55 | ||||
-rw-r--r-- | pkgs/hikari.nix | 66 | ||||
-rw-r--r-- | pkgs/nomsring/nomsring.cabal | 2 | ||||
-rw-r--r-- | pkgs/overlay.nix | 17 |
11 files changed, 135 insertions, 57 deletions
diff --git a/abbenay/configuration.nix b/abbenay/configuration.nix index 99f8a97..e367c71 100644 --- a/abbenay/configuration.nix +++ b/abbenay/configuration.nix @@ -7,7 +7,8 @@ ]; services.avahi.enable = true; - services.avahi.nssmdns = true; + services.avahi.nssmdns4 = true; + services.avahi.nssmdns6 = true; services.openssh.enable = true; users.users.stuebinm.openssh.authorizedKeys.keys = [ diff --git a/common/common.nix b/common/common.nix index 51eb334..02fec64 100644 --- a/common/common.nix +++ b/common/common.nix @@ -32,8 +32,8 @@ # we don't actually use the x server, but the console / tty keyboard # settings will be derived from this - services.xserver.layout = "de"; - services.xserver.xkbOptions = "caps:escape"; + services.xserver.xkb.layout = "de"; + services.xserver.xkb.options = "caps:escape"; documentation = { dev.enable = true; diff --git a/home/packages-minimal.nix b/home/packages-minimal.nix index 3b5ede1..6738492 100644 --- a/home/packages-minimal.nix +++ b/home/packages-minimal.nix @@ -28,6 +28,6 @@ jq html-tidy nodePackages.stylelint nodePackages.js-beautify zola lowdown # nix things - nixfmt niv deploy-rs.deploy-rs + nixfmt-rfc-style niv deploy-rs.deploy-rs ]; } diff --git a/home/packages.nix b/home/packages.nix index 8e1c87c..ca923ca 100644 --- a/home/packages.nix +++ b/home/packages.nix @@ -25,7 +25,7 @@ in pkgFilter = pkg: lib.elem pkg.tlType [ "run" "bin" "doc" ]; }) # general cli utils - almanac libnotify grim slurp zbar.override ({ enableVideo = false; withXorg = false; }) + almanac libnotify grim slurp (zbar.override { enableVideo = false; withXorg = false; }) wl-clipboard showrt kijetesantakaluotokieni mpc_cli duf dufs progress hledger wineWowPackages.full sops xdg-utils exiftool @@ -34,7 +34,7 @@ in # graphical utils kitty baobab # gnss things - gpsd galmon-full + gpsd # galmon-full # transport things transport_validator # things for emacs @@ -66,13 +66,13 @@ in rust-bin.stable.latest.minimal rust-analyzer rustfmt # go - go gopls godef gore gocode gotests gomodifytags + go gopls godef gore gotests gomodifytags # C/C++ clang clang-tools rtags irony-server # others julia python39 inweb # nix things - nixfmt niv + niv #haskellPackages.nix-serve-ng nix-doc nix-output-monitor direnv @@ -7,7 +7,7 @@ let callFlake = name: inputs: let self = (import "${sources.${name}}/flake.nix").outputs - ({ inherit self; } // inputs); + ({ self = self // { outPath = sources.${name}.outPath; }; } // inputs); in self // { outPath = sources.${name}.outPath; }; @@ -41,7 +41,8 @@ let # this absurd third copy only exists because non-flake nixpkgs does not # as easily expose the evalConfig function .. nixpkgs-flake = - (import "${sources.nixpkgs}/flake.nix").outputs { self = nixpkgs-flake; }; + (import "${sources.nixpkgs}/flake.nix").outputs { self = nixpkgs-flake; } + // { outPath = sources.nixpkgs.outPath; }; home-manager = callFlake "home-manager" { inherit nixpkgs; }; diff --git a/modules/bookwyrm.nix b/modules/bookwyrm.nix index b57636d..5adc498 100644 --- a/modules/bookwyrm.nix +++ b/modules/bookwyrm.nix @@ -11,7 +11,7 @@ in settings = mkOption { default = {}; type = types.attrsOf (types.oneOf [ types.bool types.str types.int ]); - description = mdDoc '' + description = '' Settings passed to bookwyrm via environment variables. See bookwyrm's [.env.example](https://github.com/bookwyrm-social/bookwyrm/blob/v0.7.2/.env.example) file for what is permissible here. @@ -21,7 +21,7 @@ in package = mkOption { default = pkgs.bookwyrm.override { inherit (cfg) settings; }; type = types.package; - description = mdDoc '' + description = '' The bookwyrm package to use. Note that this includes the settings .env file; if you set this directly, settings set via {option}`services.bookwyrm.settings` will be ignored. @@ -31,7 +31,7 @@ in stateDir = mkOption { default = "/var/lib/bookwyrm"; type = types.path; - description = mdDoc '' + description = '' Where bookwyrm keeps dynamic data (in practice, exclusively book covers?) when not configured to use an S3-compatible storage. This should be persistent storage, otherwise you will have missing book covers and no obvious way to re-download them @@ -42,7 +42,7 @@ in bindAddress = mkOption { default = "0.0.0.0"; type = types.str; - description = mdDoc '' + description = '' Address bookwyrm should bind to. ''; }; @@ -50,7 +50,7 @@ in port = mkOption { default = 8000; type = types.port; - description = mdDoc '' + description = '' Port bookwyrm should listen on. ''; }; @@ -58,7 +58,7 @@ in threads = mkOption { default = 8; type = types.int; - description = mdDoc '' + description = '' Number of threads that gunicorn should spawn. ''; }; @@ -66,7 +66,7 @@ in setupNginx = mkOption { default = false; type = types.bool; - description = mdDoc '' + description = '' Whether to set up a simple nginx config to server bookwyrm's `static/` and `image` directories. ''; @@ -75,7 +75,7 @@ in nginxVirtualHost = mkOption { default = "default"; type = types.str; - description = mdDoc '' + description = '' The name of the nginx virtual host to set up. ''; }; @@ -83,7 +83,7 @@ in installWrapper = mkOption { default = true; type = types.bool; - description = mdDoc '' + description = '' Whether to install a wrapper script `bookworm-manage.py` into the system environmnt, which calls bookwyrm's `manage.py` script with the correct python path. ''; @@ -92,7 +92,7 @@ in environmentFile = mkOption { default = null; type = types.nullOr types.path; - description = mdDoc '' + description = '' An environment file containing config options which should not be set via Nix / not be contained in the nix store. ''; diff --git a/modules/mollysocket.nix b/modules/mollysocket.nix index 5ca68c9..a318124 100644 --- a/modules/mollysocket.nix +++ b/modules/mollysocket.nix @@ -6,6 +6,8 @@ let configFile = configFormat.generate "mollysocket-config.toml" cfg.settings; in { + disabledModules = [ "services/misc/mollysocket.nix" ]; + options.services.mollysocket = with lib; { enable = mkEnableOption "mollysocket, which allows getting Signal notifications via UnifiedPush"; @@ -13,7 +15,7 @@ in settings = mkOption { default = {}; type = with types; attrsOf (oneOf [ str int bool (listOf str) ]); - description = lib.mdDoc '' + description = '' Configuration options for mollysocket. See the upstream [Readme.md](https://github.com/mollyim/mollysocket/blob/main/README.md#configuration) file for what is permissable here. @@ -28,7 +30,7 @@ in environmentFile = mkOption { default = null; type = with types; nullOr path; - description = lib.mdDoc '' + description = '' Configuration options set via environment Variables. Useful for e.g. keeping some values outside of Nix. ''; @@ -37,7 +39,7 @@ in stateDir = mkOption { default = "/var/lib/mollysocket"; type = lib.types.path; - description = lib.mdDoc '' + description = '' Directory in which state is kept, unless a custom database location is set using {option}`services.mollysocket.settings.db`. This directory will be created automatically. @@ -47,7 +49,7 @@ in installWrapper = mkOption { default = true; type = lib.types.bool; - description = lib.mdDoc '' + description = '' Whether to install a mollysocket executable wrapped to use the generated config into {option}`environment.systemPackages`. ''; diff --git a/npins/sources.json b/npins/sources.json index 7d43fa1..dd64c1f 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -18,9 +18,9 @@ "url": "https://stuebinm.eu/git/bahnhof.name" }, "branch": "main", - "revision": "0c05c14574ed301c1f80ceeb5edabc34e47feffb", + "revision": "8a4723f12fb220204d0aa5ebde8fb65214ad1b47", "url": null, - "hash": "0vmvxypsxxlj2zxmssgpjfqmbs5lkc7vq1cfchc6pkszrywydg0g" + "hash": "0lbraq56vqlisv98hp6ck8bj6z83psqmnq17c647ln498hjp7i4c" }, "blog": { "type": "Git", @@ -53,6 +53,7 @@ }, "pre_releases": false, "version_upper_bound": null, + "release_prefix": null, "version": "v1.0.0", "revision": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8", "url": "https://api.github.com/repos/numtide/flake-utils/tarball/v1.0.0", @@ -76,10 +77,10 @@ "owner": "nix-community", "repo": "home-manager" }, - "branch": "release-23.11", - "revision": "2c78a57c544dd19b07442350727ced097e1aa6e6", - "url": "https://github.com/nix-community/home-manager/archive/2c78a57c544dd19b07442350727ced097e1aa6e6.tar.gz", - "hash": "1zb4qsyn7l1zdiv1kjx07jvgnakpsifc62fxcim50w3ni27cwxk3" + "branch": "release-24.05", + "revision": "a631666f5ec18271e86a5cde998cba68c33d9ac6", + "url": "https://github.com/nix-community/home-manager/archive/a631666f5ec18271e86a5cde998cba68c33d9ac6.tar.gz", + "hash": "13b22rkylwg4jwqmhyypkyjzm4algk5y43kfwwnb96wxmrqrplxc" }, "isabelle-utils": { "type": "Git", @@ -99,9 +100,9 @@ "url": "git+ssh://git@git.lix.systems/lix-project/lix" }, "branch": "main", - "revision": "0b91a4b0ec79c27ee36d8a7e2afd7737cb825b65", + "revision": "c55e93ca23eae608f2ff80e940f35f5daa6b4f7f", "url": null, - "hash": "17q366k4iqaphf5f3938b40lx801wvlb3nllpmdj2a2z71jxw7jq" + "hash": "1bs3gva6jmj83by30s3ar0r8cgn6m2912flaip41y5d6am2jcdaa" }, "lix-nixos-module": { "type": "Git", @@ -110,9 +111,9 @@ "url": "git+ssh://git@git.lix.systems/lix-project/nixos-module" }, "branch": "main", - "revision": "12b457c433c8d0e81f614c894be34f5bb4c54f99", + "revision": "b4b38e6b5fe18da9464f291ae5fbf2ea9acb9ccb", "url": null, - "hash": "12y0435v5gnm5bc6nnj8sb0vg70aa4pj44h7v5xgr6kpgnbf63al" + "hash": "1vdwka8bjcm02ar2cgqf11p13am3w62ki2k1ljn54qmhzk3970lf" }, "nixpkgs": { "type": "Git", @@ -121,10 +122,10 @@ "owner": "NixOS", "repo": "nixpkgs" }, - "branch": "nixos-23.11", - "revision": "9d29cd266cebf80234c98dd0b87256b6be0af44e", - "url": "https://github.com/NixOS/nixpkgs/archive/9d29cd266cebf80234c98dd0b87256b6be0af44e.tar.gz", - "hash": "0bkrjx4x6sy4g9kmcddhlwrl4cpm4yvj7cljd7b8crf7kxpvaaf6" + "branch": "nixos-24.05", + "revision": "805a384895c696f802a9bf5bf4720f37385df547", + "url": "https://github.com/NixOS/nixpkgs/archive/805a384895c696f802a9bf5bf4720f37385df547.tar.gz", + "hash": "1q7y5ygr805l5axcjhn0rn3wj8zrwbrr0c6a8xd981zh8iccmx0p" }, "nixpkgs-unstable": { "type": "Git", @@ -134,9 +135,9 @@ "repo": "nixpkgs" }, "branch": "nixpkgs-unstable", - "revision": "e2dd4e18cc1c7314e24154331bae07df76eb582f", - "url": "https://github.com/NixOS/nixpkgs/archive/e2dd4e18cc1c7314e24154331bae07df76eb582f.tar.gz", - "hash": "19zbxf7rb787jvyrfhl4z9sn3aisd6xvx6ikybbi75ym9sy39jds" + "revision": "4a4ecb0ab415c9fccfb005567a215e6a9564cdf5", + "url": "https://github.com/NixOS/nixpkgs/archive/4a4ecb0ab415c9fccfb005567a215e6a9564cdf5.tar.gz", + "hash": "15fwgghwlzq0x4i7q4i36ys1slzgfmdjsw8c2ilqnm5mz89rl9bq" }, "ntfy-matrix-bot": { "type": "Git", @@ -168,9 +169,9 @@ "repo": "rust-overlay" }, "branch": "master", - "revision": "8ef3f6a8f5af867ab5f75fc86fbd934a6351820b", - "url": "https://github.com/oxalica/rust-overlay/archive/8ef3f6a8f5af867ab5f75fc86fbd934a6351820b.tar.gz", - "hash": "0ibalz3camr9fxrmfxf6asbdbxgkh8iifd2qnxb0xzizka9wr33x" + "revision": "025e1742de4fa75b3fb63818bd9726d17da6a102", + "url": "https://github.com/oxalica/rust-overlay/archive/025e1742de4fa75b3fb63818bd9726d17da6a102.tar.gz", + "hash": "1agph0jrrz4dx3k025psvg9h0zbls8imr0wivrgnhczihwgfliy3" }, "showrt": { "type": "Git", @@ -190,10 +191,10 @@ "repo_path": "simple-nixos-mailserver/nixos-mailserver", "server": "https://gitlab.com/" }, - "branch": "nixos-23.11", - "revision": "e47f3719f1db3e0961a4358d4cb234a0acaa7baf", - "url": "https://gitlab.com/api/v4/projects/simple-nixos-mailserver%2Fnixos-mailserver/repository/archive.tar.gz?sha=e47f3719f1db3e0961a4358d4cb234a0acaa7baf", - "hash": "122vm4n3gkvlkqmlskiq749bhwfd0r71v6vcmg1bbyg4998brvx8" + "branch": "nixos-24.05", + "revision": "b51ae1a235353ffdfa9f5874e6aea32e367a5739", + "url": "https://gitlab.com/api/v4/projects/simple-nixos-mailserver%2Fnixos-mailserver/repository/archive.tar.gz?sha=b51ae1a235353ffdfa9f5874e6aea32e367a5739", + "hash": "0w97jdxjyavx78q32dda9mf93lzq7qcvj0kjl5lr8knyrjqm562h" }, "sops-nix": { "type": "Git", @@ -203,9 +204,9 @@ "repo": "sops-nix" }, "branch": "master", - "revision": "962797a8d7f15ed7033031731d0bb77244839960", - "url": "https://github.com/Mic92/sops-nix/archive/962797a8d7f15ed7033031731d0bb77244839960.tar.gz", - "hash": "0mbq58xik1dbxcbqf1sz42nq2h6i3h68d7iy4izllrivl1syh0mh" + "revision": "ab2a43b0d21d1d37d4d5726a892f714eaeb4b075", + "url": "https://github.com/Mic92/sops-nix/archive/ab2a43b0d21d1d37d4d5726a892f714eaeb4b075.tar.gz", + "hash": "0421fifd50fxb0k0mir68rs78v7ljmhkbdpzsp4lmr9hmxzvd43i" }, "traveltext": { "type": "Git", diff --git a/pkgs/hikari.nix b/pkgs/hikari.nix new file mode 100644 index 0000000..2adebe9 --- /dev/null +++ b/pkgs/hikari.nix @@ -0,0 +1,66 @@ +{ lib, stdenv, fetchzip +, pkg-config, bmake +, cairo, glib, libevdev, libinput, libxkbcommon, linux-pam, pango, pixman +, libucl, wayland, wayland-protocols, wlroots, mesa +, features ? { + gammacontrol = true; + layershell = true; + screencopy = true; + xwayland = true; + } +}: + +stdenv.mkDerivation rec { + pname = "hikari"; + version = "2.3.3"; + + src = fetchzip { + url = "https://hikari.acmelabs.space/releases/${pname}-${version}.tar.gz"; + sha256 = "sha256-5Ug0U3ESC5F/gj7bahnLYkeY/weSCj0QASwdFuWwdMI="; + }; + + nativeBuildInputs = [ pkg-config bmake ]; + + buildInputs = [ + cairo + glib + libevdev + libinput + libxkbcommon + linux-pam + pango + pixman + libucl + mesa # for libEGL + wayland + wayland-protocols + wlroots + ]; + + patches = [ ./patches/hikari-gtk4.patch ]; + + enableParallelBuilding = true; + + makeFlags = with lib; [ "PREFIX=$(out)" "DEBUG=YES" ] + ++ optional stdenv.isLinux "WITH_POSIX_C_SOURCE=YES" + ++ mapAttrsToList (feat: enabled: + optionalString enabled "WITH_${toUpper feat}=YES" + ) features; + + postPatch = '' + # Can't suid in nix store + # Run hikari as root (it will drop privileges as early as possible), or create + # a systemd unit to give it the necessary permissions/capabilities. + substituteInPlace Makefile --replace '4555' '555' + + sed -i 's@<drm_fourcc.h>@<libdrm/drm_fourcc.h>@' src/*.c + ''; + + meta = with lib; { + description = "package definition kept around since it was removed in nixpkgs"; + homepage = "https://hikari.acmelabs.space"; + license = licenses.bsd2; + platforms = platforms.linux ++ platforms.freebsd; + maintainers = with maintainers; [ jpotier ]; + }; +} diff --git a/pkgs/nomsring/nomsring.cabal b/pkgs/nomsring/nomsring.cabal index 0ee04a3..fca40c5 100644 --- a/pkgs/nomsring/nomsring.cabal +++ b/pkgs/nomsring/nomsring.cabal @@ -13,7 +13,7 @@ common warnings executable nomsring import: warnings main-is: Main.hs - build-depends: base ^>=4.17.2.1 + build-depends: base ^>=4.18 , cgi ^>=3001.5 , data-clist ^>= 0.2 default-language: GHC2021 diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix index 53e8022..5379bbf 100644 --- a/pkgs/overlay.nix +++ b/pkgs/overlay.nix @@ -34,11 +34,6 @@ in galmon-core = self.callPackage ./galmon.nix {}; galmon-full = self.callPackage ./galmon.nix { buildAll = true; }; - hikari = super.hikari.overrideAttrs (old: { - makeFlags = old.makeFlags ++ [ "DEBUG=YES" ]; - patches = [ ./patches/hikari-gtk4.patch ]; - }); - akkoma-fe = super.akkoma-frontends.akkoma-fe.overrideAttrs (old: { patches = [ ./patches/akkoma-fe-toki-pona.patch ]; }); @@ -209,6 +204,18 @@ in [ "PREFIX=$(out)" "WITH_POSIX_C_SOURCE=YES" "WITH_GAMMACONTROL=YES" "WITH_LAYERSHELL=YES" "WITH_SCREENCOPY=YES" ]; })).override { wlroots = unstable.wlroots_0_16; stdenv = self.clangStdenv; }; + 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="; + }; + }); travelynx = self.callPackage ./travelynx.nix {}; |