diff options
31 files changed, 525 insertions, 295 deletions
diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..0e40f2a --- /dev/null +++ b/Readme.md @@ -0,0 +1,32 @@ +# stuebinm's nixfiles + +this repository contains most of my personal NixOS configuration. + +Unless you're me, you're probably not interested in most of it, with the following +possible exceptions: + - `/pkgs` contains several package recipes which are not in `nixpkgs`, and which + I don't plan to contribute there. Not all of them are stable or regularly + tested, built, or otherwise maintained, but several of them are part of my + normal setup. If in doubt, consult the ordering in `pkgs/overlay.nix`, which + can give a rough indication. + + Several of these depend on each other; if you want to use these, it's probably + best to import the entire `overlay.nix` file into your nixpkgs; but be aware + that it's opinionated in several ways, and some packages also depend on the + rust-overlay. + - `/modules` contains NixOS modules for a few of the packages in `/pkgs`. + You can use these by overlaying the relevant packages into your nixpkgs instance + & then importing the module file into your system configuration. + - `/tests` contains NixOS VM tests for the things in `/modules`. + Run these as `nix-build tests -A <name>`. + +In general you're welcome to re-use or import these definitions, but don't +necessarily except me to continue maintaining anything here (assume the usual +"this software is provided 'as-is', without warranty of any kind ..." etc.). + +More generally, this repository might also server as an example for a +deterministic NixOS setup with `npins` which does not depend on flakes (beyond +some hackery to get at the flake-specific definitions of `nixpkgs`, since what I +do here is still closer to a flake-based setup than it is to a traditional +channels-based setup). + diff --git a/chaski/services/chat.nix b/chaski/services/chat.nix index 6d26ada..484a3b9 100644 --- a/chaski/services/chat.nix +++ b/chaski/services/chat.nix @@ -4,7 +4,7 @@ # (and not deal with having an irc relay) { - imports = [ inputs.home-manager.nixosModule ]; + imports = [ inputs.home-manager.nixosModules.default ]; programs.mosh.enable = true; programs.fish.enable = true; diff --git a/chaski/services/headscale.nix b/chaski/services/headscale.nix index 8240d93..80153e4 100644 --- a/chaski/services/headscale.nix +++ b/chaski/services/headscale.nix @@ -1,27 +1,27 @@ { config, lib, pkgs, ... }: { - services.headscale = { - enable = true; - settings = { - server_url = "https://headscale.noms.ing"; - listen_addr = "127.0.0.1:8323"; + # services.headscale = { + # enable = true; + # settings = { + # server_url = "https://headscale.noms.ing"; + # listen_addr = "127.0.0.1:8323"; - # oidc = { - # only_start_if_oidc_is_available = true; - # issuer = "https://idm.cuties.network/oauth2/openid/headscale"; - # client_id = "headscale"; - # client_secret_path = "/run/secrets/headscale_oidc_secret"; - # strip_email_domain = true; - # }; + # # oidc = { + # # only_start_if_oidc_is_available = true; + # # issuer = "https://idm.cuties.network/oauth2/openid/headscale"; + # # client_id = "headscale"; + # # client_secret_path = "/run/secrets/headscale_oidc_secret"; + # # strip_email_domain = true; + # # }; - dns_config.magic_dns = true; - dns_config.domains = [ "nodes.headscale.noms.ing" ]; - # dns_config.base_domain = "ts.cuties.network"; - }; - }; + # # dns_config.magic_dns = true; + # # dns_config.domains = [ "nodes.headscale.noms.ing" ]; + # # dns_config.base_domain = "ts.cuties.network"; + # }; + # }; - users.users.headscale.extraGroups = [ config.users.groups.keys.name ]; + # users.users.headscale.extraGroups = [ config.users.groups.keys.name ]; # sops.secrets.headscale_oidc_secret = { # owner = config.users.users.headscale.name; # sopsFile = ./headscale.sops.yaml; @@ -36,5 +36,5 @@ }; }; - services.tailscale.enable = true; + # services.tailscale.enable = true; } diff --git a/common/desktop.nix b/common/desktop.nix index d3812b2..e570579 100644 --- a/common/desktop.nix +++ b/common/desktop.nix @@ -86,7 +86,8 @@ noto-fonts-cjk-sans noto-fonts-cjk-serif noto-fonts-emoji - ]; + ] ++ (with lib.attrsets; + builtins.filter isDerivation (attrValues pkgs.nerd-fonts)); xdg.portal.wlr.enable = true; diff --git a/default.nix b/default.nix index 1d100d1..55e130e 100644 --- a/default.nix +++ b/default.nix @@ -87,7 +87,7 @@ let modules = import ./modules; packages = import ./pkgs { inherit nixpkgs; }; - tests = import ./tests { inherit nixpkgs; }; + tests = import ./tests { inherit nixpkgs; inherit system; }; }; in self diff --git a/flora/services/akkoma.nix b/flora/services/akkoma.nix index db00bbe..6864a29 100644 --- a/flora/services/akkoma.nix +++ b/flora/services/akkoma.nix @@ -45,7 +45,7 @@ in ref = "stable"; }; admin = { - package = pkgs.akkoma-frontends.admin-fe; + package = pkgs.akkoma-admin-fe; name = "admin-fe"; ref = "stable"; }; @@ -59,7 +59,8 @@ in config = { ":pleroma"."Pleroma.Web.Endpoint" = { "url" = { host = "pleroma.stuebinm.eu"; scheme = "https"; port = 443; }; - "http" = { ip = "::"; port = 4000; }; + # below uses IPv4; IPv6 breaks the elixir format generator … + "http" = { ip = "0.0.0.0"; port = 4000; }; secret_key_base._secret = "/sops/keyBase"; signing_salt._secret = "/sops/signingSalt"; }; @@ -221,7 +222,7 @@ in enableACME = true; locations."/" = { - proxyPass = "http://[${config.containers.pleroma.localAddress6}]:4000"; + proxyPass = "http://${config.containers.pleroma.localAddress}:4000"; proxyWebsockets = true; # these headers are in the example config in the NixOS manual. # take some time to figure out what they all do, and if these diff --git a/flora/services/cgit.nix b/flora/services/cgit.nix index 1dae737..b846ad4 100644 --- a/flora/services/cgit.nix +++ b/flora/services/cgit.nix @@ -105,7 +105,8 @@ in # user for git repo administration users.users.git = { - openssh.authorizedKeys.keys = config.users.users.root.openssh.authorizedKeys.keys; + openssh.authorizedKeys.keys = config.users.users.root.openssh.authorizedKeys.keys + ++ [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIbHG2wmMiUyvqb9oUa2KunEgv4Iab3FGCER/i2f2gKL terru@work" ]; home = "/var/git"; isNormalUser = true; packages = [ pkgs.gitMinimal ]; diff --git a/flora/services/nginx.nix b/flora/services/nginx.nix index 4a9bf33..c5aa45b 100644 --- a/flora/services/nginx.nix +++ b/flora/services/nginx.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs, ... }: { networking.firewall.allowedTCPPorts = [ 80 443 ]; @@ -14,11 +14,17 @@ enableACME = true; forceSSL = true; locations."/".root = ../../pkgs/nomsing; + extraConfig = '' + include ${inputs."ai.robots.txt"}/nginx-block-ai-bots.conf; + ''; }; virtualHosts."meow.noms.ing" = { enableACME = true; forceSSL = true; locations."/".root = ../../pkgs/nomsing; + extraConfig = '' + include ${inputs."ai.robots.txt"}/nginx-block-ai-bots.conf; + ''; }; virtualHosts."webring.noms.ing" = { enableACME = true; @@ -29,7 +35,11 @@ fastcgi_param SCRIPT_FILENAME ${lib.getExe pkgs.nomsring}; fastcgi_param PATH_INFO $1; ''; + extraConfig = '' + include ${inputs."ai.robots.txt"}/nginx-block-ai-bots.conf; + ''; }; + }; services.fcgiwrap.instances.nomsing = { diff --git a/home/home.nix b/home/home.nix index c93daef..e743f2a 100644 --- a/home/home.nix +++ b/home/home.nix @@ -392,11 +392,13 @@ services.mako = { enable = true; - backgroundColor = "#74389eb0"; - borderColor = "#c27cb6ff"; - defaultTimeout = 5000; # milliseconds - padding = "10"; - output = "DP-9"; + settings = { + background-color = "#74389eb0"; + border-color = "#c27cb6ff"; + default-timeout = 5000; # milliseconds + padding = "10"; + output = "DP-9"; + }; }; services.mpd = { diff --git a/home/newsboat-public.nix b/home/newsboat-public.nix index 0302c04..29e2370 100644 --- a/home/newsboat-public.nix +++ b/home/newsboat-public.nix @@ -79,7 +79,7 @@ with import ./newsboat-lib.nix; (btag "https://www.haskellforall.com/feeds/posts/default" "comp") (btag "http://conal.net/blog/feed" "comp") (btag "https://michael.stapelberg.ch/posts/tags/distri/feed.xml" "comp") - (btag "https://mattermost.com/blog/category/releases/rss" "security") + (btag "https://mattermost.com/blog/category/releases/feed/" "security") (btag "https://mattermost.com/security-updates/feed/" "security") (btag "https://ionathan.ch/feed.xml" "comp") (btag "https://wingolog.org/feed/atom" "comp") @@ -231,8 +231,6 @@ with import ./newsboat-lib.nix; (ytag "UCXuqSBlHAE6Xw-yeJA0Tunw" "tech") # Linus Tech Tips (ytag "UCBa659QWEk1AI4Tg--mrJ2A" "stuff") # Tom Scott (ytag "UCtGG8ucQgEJPeUPhJZ4M4jA" "stuff") # Rare Earth - (ytag "UCwRH985XgMYXQ6NxXDo8npw" "stuff") # Kurzgesagt de - (ytag "UCsXVk37bltHxD1rDPwtNM8Q" "stuff") # Kurzgesagt en (ytag "UC9GwQ_SGeq7Nrn4NQfwVoRA" "climate") # Students for Future (ytag "UCN29LJGZ8FY30ysxdTnDsaw" "stuff") # Die Filmanalyse (ytag "UCv1WDP5EiipMQ__C4Cg6aow" "pol") # Tilo Jung @@ -241,8 +239,6 @@ with import ./newsboat-lib.nix; (ytag "UCncTjqw75krp9j_wRRh5Gvw" "writing") # World Building Notes (ytag "UCPlJ-KlPelfnwq0GHSeSpGQ" "talks") # It's all about Math (ytag "UCmrWzKsW9IGU2l6a_MGJ3dw" "ling") # LangTime Studio - (ytag "UCXl0Zbk8_rvjyLwAR-Xh9pQ" "maths") # Insights into Mathematics (Wildberger) - (ytag "UCPjHlmSGP-rMg5PR-PyaJug" "chaos") # Henk Rijckaert (ytag "UC3XTzVzaHQEd30rQbuvCtTQ" "latenight") # Last Week Tonight (ytag "UCSju5G2aFaWMqn-_0YBtq5A" "maths") # Standupmaths (ytag "UC2PA-AKmVpU6NKCGtZq_rKQ" "left") # Philosophy Tube @@ -305,8 +301,7 @@ with import ./newsboat-lib.nix; (podcast "https://feed.podbean.com/lingfieldnotes/feed.xml") (podcast "https://dasklima.podigee.io/feed/mp3") (podcast "https://www.haecksen.org/podcast/rss") - (podcast "https://www.ndr.de/nachrichten/info/podcast4684.xml") - + (music "https://feeds.soundcloud.com/users/soundcloud%3Ausers%3A39508706/sounds.rss") ] diff --git a/home/packages.nix b/home/packages.nix index 7f910bb..415d963 100644 --- a/home/packages.nix +++ b/home/packages.nix @@ -1,12 +1,12 @@ { config, lib, pkgs, inputs, system, craneLib, ... }: let - isabelle = import "${inputs.playground.outPath}/isabelle-nix-fhsenv" { inherit pkgs; }; + isabelle = import "${inputs.playground.outPath}/isabelle-nix-fhsenv" { inherit pkgs; }; in { home.packages = with pkgs; [ - emacs - emacs-all-the-icons-fonts nerdfonts + emacs-pgtk + emacs-all-the-icons-fonts julia-mono # internet apps & clients firefox keepassxc mumble lynx offpunk @@ -17,7 +17,7 @@ in gimp-with-plugins inkscape pavucontrol # krita gst_all_1.gstreamer vimiv-qt # LaTeX & documents - xournal pandoc zathura pdfpc + xournalpp pandoc zathura pdfpc poppler_utils typst rustex (texlive.combine { inherit (texlive) scheme-full; @@ -28,7 +28,7 @@ in wl-clipboard showrt kijetesantakaluotokieni mpc_cli dufs progress hledger wineWowPackages.full sops xdg-utils exiftool - mercurial darcs git-annex-remote-remarkable2 + mercurial darcs git-annex-remote-remarkable2 git-who rlwrap # graphical utils kitty @@ -58,7 +58,7 @@ in # C/C++ clang clang-tools rtags irony-server # others - python39 inweb + python3 inweb # nix things npins nix-output-monitor direnv # isabelle diff --git a/home/unstable.nix b/home/unstable.nix index f4fbccc..fc3b6ac 100644 --- a/home/unstable.nix +++ b/home/unstable.nix @@ -3,15 +3,7 @@ with inputs.nixpkgs-unstable; { home.packages = [ - (stdenv.mkDerivation { - name = "signal-wayland"; - src = signal-desktop; - phases = [ "buildPhase" ]; - buildPhase = '' - mkdir -p $out - cp -r $src/{bin,lib} $out - ''; - }) + signal-desktop yazi ]; diff --git a/ilex/configuration.nix b/ilex/configuration.nix index f8530b8..d648adc 100644 --- a/ilex/configuration.nix +++ b/ilex/configuration.nix @@ -10,7 +10,7 @@ services.avahi.enable = true; services.avahi.nssmdns4 = true; services.avahi.nssmdns6 = true; - services.ipp-usb.enable=true; + services.ipp-usb.enable = true; hardware.sane.enable = true; users.users.stuebinm.extraGroups = [ "scanner" "lp" ]; }; @@ -34,6 +34,16 @@ let ]; } // { outPath = sources.nixpkgs.outPath; }; + # 'boring' version of nixpkgs with fewer (used for vm tests, + # so they're buildable without having to compile e.g. the lix version + # from the overlay) + nixpkgs-boring = import sources.nixpkgs { + inherit system; + overlays = [ + (import ./pkgs/overlay.nix { inherit inputs; }) + ]; + } // { outPath = sources.nixpkgs.outPath; }; + nixpkgs-unstable = import sources.nixpkgs-unstable { inherit system; } // { outPath = sources.nixpkgs-unstable.outPath; }; @@ -53,7 +63,7 @@ let simple-nixos-mailserver = import sources.simple-nixos-mailserver; lix-overlay = import "${sources.lix-nixos-module}/overlay.nix" { - lix = sources.lix; + lix = sources.lix // { rev = sources.lix.revision; }; }; }; in inputs diff --git a/npins/default.nix b/npins/default.nix index 891db57..6592476 100644 --- a/npins/default.nix +++ b/npins/default.nix @@ -1,64 +1,146 @@ +/* + This file is provided under the MIT licence: + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ # Generated by npins. Do not modify; will be overwritten regularly let - requireFile = { sha256, hashMode ? "recursive" }: - builtins.derivation { - name = "source"; - outputHashMode = hashMode; - outputHashAlgo = "sha256"; - outputHash = sha256; - preferLocalBuild = true; - allowSubstitutes = false; - builder = "builtins:fetchurl"; - system = "builtin"; # builtins.currentSystem; - }; - data = builtins.fromJSON (builtins.readFile ./sources.json); version = data.version; - mkSource = spec: - assert spec ? type; let + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 + range = + first: last: if first > last then [ ] else builtins.genList (n: first + n) (last - first + 1); + + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 + stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); + + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269 + stringAsChars = f: s: concatStrings (map f (stringToCharacters s)); + concatMapStrings = f: list: concatStrings (map f list); + concatStrings = builtins.concatStringsSep ""; + + # If the environment variable NPINS_OVERRIDE_${name} is set, then use + # the path directly as opposed to the fetched source. + # (Taken from Niv for compatibility) + mayOverride = + name: path: + let + envVarName = "NPINS_OVERRIDE_${saneName}"; + saneName = stringAsChars (c: if (builtins.match "[a-zA-Z0-9]" c) == null then "_" else c) name; + ersatz = builtins.getEnv envVarName; + in + if ersatz == "" then + path + else + # this turns the string into an actual Nix path (for both absolute and + # relative paths) + builtins.trace "Overriding path of \"${name}\" with \"${ersatz}\" due to set \"${envVarName}\"" ( + if builtins.substring 0 1 ersatz == "/" then + /. + ersatz + else + /. + builtins.getEnv "PWD" + "/${ersatz}" + ); + + mkSource = + name: spec: + assert spec ? type; + let path = - if spec.type == "Git" then mkGitSource spec - else if spec.type == "GitRelease" then mkGitSource spec - else if spec.type == "PyPi" then mkPyPiSource spec - else if spec.type == "Channel" then mkChannelSource spec - else builtins.throw "Unknown source type ${spec.type}"; + if spec.type == "Git" then + mkGitSource spec + else if spec.type == "GitRelease" then + mkGitSource spec + else if spec.type == "PyPi" then + mkPyPiSource spec + else if spec.type == "Channel" then + mkChannelSource spec + else if spec.type == "Tarball" then + mkTarballSource spec + else + builtins.throw "Unknown source type ${spec.type}"; in - spec // { outPath = path; }; + spec // { outPath = mayOverride name path; }; - mkGitSource = { repository, revision, url ? null, hash, ... }: + mkGitSource = + { + repository, + revision, + url ? null, + submodules, + hash, + branch ? null, + ... + }: assert repository ? type; # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository # In the latter case, there we will always be an url to the tarball - if url != null then - (builtins.fetchTarball { + if url != null && !submodules then + builtins.fetchTarball { inherit url; sha256 = hash; # FIXME: check nix version & use SRI hashes - }) - else assert repository.type == "Git"; + } + else let - cached = requireFile { sha256 = hash; }; - fetched = builtins.fetchGit { - url = repository.url; - rev = revision; - }; - in if builtins.pathExists (builtins.unsafeDiscardStringContext cached.outPath) - then cached.outPath - else builtins.trace "npins: re-fetching source ${repository.url}" fetched.outPath; + url = + if repository.type == "Git" then + repository.url + else if repository.type == "GitHub" then + "https://github.com/${repository.owner}/${repository.repo}.git" + else if repository.type == "GitLab" then + "${repository.server}/${repository.repo_path}.git" + else + throw "Unrecognized repository type ${repository.type}"; + urlToName = + url: rev: + let + matched = builtins.match "^.*/([^/]*)(\\.git)?$" url; + + short = builtins.substring 0 7 rev; + + appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; + in + "${if matched == null then "source" else builtins.head matched}${appendShort}"; + name = urlToName url revision; + in + builtins.fetchGit { + rev = revision; + inherit name; + # hash = hash; + inherit url submodules; + }; - mkPyPiSource = { url, hash, ... }: + mkPyPiSource = + { url, hash, ... }: builtins.fetchurl { inherit url; sha256 = hash; }; - mkChannelSource = { url, hash, ... }: + mkChannelSource = + { url, hash, ... }: builtins.fetchTarball { inherit url; sha256 = hash; }; + + mkTarballSource = + { + url, + locked_url ? url, + hash, + ... + }: + builtins.fetchTarball { + url = locked_url; + sha256 = hash; + }; in -if version == 3 then - builtins.mapAttrs (_: mkSource) data.pins +if version == 5 then + builtins.mapAttrs mkSource data.pins else throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" diff --git a/npins/sources.json b/npins/sources.json index 3cf167d..c22ea40 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1,5 +1,18 @@ { "pins": { + "ai.robots.txt": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ai-robots-txt", + "repo": "ai.robots.txt" + }, + "branch": "main", + "submodules": false, + "revision": "4ed17b8e4af67d347b039429eb633c96acbba72f", + "url": "https://github.com/ai-robots-txt/ai.robots.txt/archive/4ed17b8e4af67d347b039429eb633c96acbba72f.tar.gz", + "hash": "1j36ynmb4hcjr8mlgb7m3n9qi8izj11rc5z8zawbqc9d1skpk16b" + }, "almanac": { "type": "Git", "repository": { @@ -7,6 +20,7 @@ "url": "https://stuebinm.eu/git/forks/almanac" }, "branch": "master", + "submodules": false, "revision": "cdd82b013777324f146c4961b866154a9287110b", "url": null, "hash": "0804k1zcnyhfdgjxmpgyg9l537j6p4ajrjgzz9svxka6acc1l85h" @@ -18,6 +32,7 @@ "url": "https://stuebinm.eu/git/bahnhof.name" }, "branch": "main", + "submodules": false, "revision": "2dd565d546ef7cba05846e90d79ae4a15a193f41", "url": null, "hash": "137wq0hj9j4wikq401mz577a7r5cmfzfxyf4wv1ncxy450l4lrsh" @@ -29,6 +44,7 @@ "url": "ssh://cgit/~/blog" }, "branch": "main", + "submodules": false, "revision": "99f88a9b675838f08e711a73a1bd5b6c80d66d31", "url": null, "hash": "1dnkz5vsbn8f924crhqp97xfkamypai1mqmbj867kwv0bvs036gb" @@ -40,6 +56,7 @@ "url": "https://stuebinm.eu/git/forks/deploy-rs" }, "branch": "nom-flag", + "submodules": false, "revision": "9001480e03ab8c957716e2bf164bbde605472399", "url": null, "hash": "1iiplqa731ldha728xk2fi36n87p20hnzf35g21jli1dlknw388f" @@ -54,6 +71,7 @@ "pre_releases": false, "version_upper_bound": null, "release_prefix": null, + "submodules": false, "version": "v1.0.0", "revision": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8", "url": "https://api.github.com/repos/numtide/flake-utils/tarball/v1.0.0", @@ -66,6 +84,7 @@ "url": "https://stuebinm.eu/git/forks/gtfs-books" }, "branch": "main", + "submodules": false, "revision": "2a9d4fcf48b872aef1343f71dfddf44946fd8eb5", "url": null, "hash": "077xjxaisjqcnqwjpq8cfg34y27cv5aidvzwv4d5736rz9v96bak" @@ -77,10 +96,11 @@ "owner": "nix-community", "repo": "home-manager" }, - "branch": "release-24.11", - "revision": "f6af7280a3390e65c2ad8fd059cdc303426cbd59", - "url": "https://github.com/nix-community/home-manager/archive/f6af7280a3390e65c2ad8fd059cdc303426cbd59.tar.gz", - "hash": "13mmmf5apnd6ima3a1zzybax5nyxfw0kaljk8znyrr7zqz7gllnc" + "branch": "release-25.05", + "submodules": false, + "revision": "7aae0ee71a17b19708b93b3ed448a1a0952bf111", + "url": "https://github.com/nix-community/home-manager/archive/7aae0ee71a17b19708b93b3ed448a1a0952bf111.tar.gz", + "hash": "12246mk1xf1bmak1n36yfnr4b0vpcwlp6q66dgvz8ip8p27pfcw2" }, "isabelle-utils": { "type": "Git", @@ -89,6 +109,7 @@ "url": "https://stuebinm.eu/git/isabelle-utils" }, "branch": "master", + "submodules": false, "revision": "e7427d5c67c0a90c369adecb4b0c65c043cb2e34", "url": null, "hash": "129pizyyvxg7lzgk9pqn48a7brhyh5fv7vwzrs7wnhkp30hrpjq2" @@ -97,23 +118,25 @@ "type": "Git", "repository": { "type": "Git", - "url": "git+ssh://git@git.lix.systems/lix-project/lix" + "url": "https://git.lix.systems/lix-project/lix.git" }, "branch": "main", - "revision": "175091efb55cae0d7629fe0b5947fc52b5969805", + "submodules": false, + "revision": "cd129186ea2bfbd13bf9170b820ca13711eb2310", "url": null, - "hash": "1gv6pzr37slxjqca3zv5dq6fywrx18d0zgzwzals81cvdh0pn9n6" + "hash": "0i206c6zcip5m11kdmhj3b9zmvw877610cd86410drw8l8i13ksa" }, "lix-nixos-module": { "type": "Git", "repository": { "type": "Git", - "url": "git+ssh://git@git.lix.systems/lix-project/nixos-module" + "url": "https://git.lix.systems/lix-project/nixos-module.git" }, "branch": "main", - "revision": "a6da43f8193d9e329bba1795c42590c27966082e", + "submodules": false, + "revision": "3c23c6ae2aecc1f76ae7993efe1a78b5316f0700", "url": null, - "hash": "09vglsb2n67xfc1g9dpmr0ka56dk4r1b8sw5jq3ka4jv68sg8l6q" + "hash": "1yv1d45jgfzjxcg23m2qwis5rxx2v45vfid8b0lm1sl6p66h4hpc" }, "nixos-mailserver": { "type": "Git", @@ -123,9 +146,10 @@ "server": "https://gitlab.com/" }, "branch": "master", - "revision": "90539a1a993a7ec16563139e82fa66f1c439ba0f", - "url": "https://gitlab.com/api/v4/projects/simple-nixos-mailserver%2Fnixos-mailserver/repository/archive.tar.gz?sha=90539a1a993a7ec16563139e82fa66f1c439ba0f", - "hash": "056nxpz9691f3mv0llcxsfnx440sqq7j9zy47vff82j7naza7wsp" + "submodules": false, + "revision": "b9e28e23af46f4b5c4ca287ea8ce46e5b39e723c", + "url": "https://gitlab.com/api/v4/projects/simple-nixos-mailserver%2Fnixos-mailserver/repository/archive.tar.gz?sha=b9e28e23af46f4b5c4ca287ea8ce46e5b39e723c", + "hash": "14zhxa6ig7wf0pr1ya3hc4frbb8rpj5ac1pmpd28lh5cbqcnr2yf" }, "nixpkgs": { "type": "Git", @@ -134,10 +158,11 @@ "owner": "NixOS", "repo": "nixpkgs" }, - "branch": "nixos-24.11", - "revision": "a1185f4064c18a5db37c5c84e5638c78b46e3341", - "url": "https://github.com/NixOS/nixpkgs/archive/a1185f4064c18a5db37c5c84e5638c78b46e3341.tar.gz", - "hash": "0ipjb56fdhfvhgnrw0rvp89g0mplpyhjil29fqdcpmv4ablbadqc" + "branch": "nixos-25.05", + "submodules": false, + "revision": "b2485d56967598da068b5a6946dadda8bfcbcd37", + "url": "https://github.com/NixOS/nixpkgs/archive/b2485d56967598da068b5a6946dadda8bfcbcd37.tar.gz", + "hash": "1q0m25p83mk0zz42yyi0avyvm77x09ydgrlkkfpzwf22ghb27yfy" }, "nixpkgs-unstable": { "type": "Git", @@ -147,9 +172,10 @@ "repo": "nixpkgs" }, "branch": "nixpkgs-unstable", - "revision": "5d9b5431f967007b3952c057fc92af49a4c5f3b2", - "url": "https://github.com/NixOS/nixpkgs/archive/5d9b5431f967007b3952c057fc92af49a4c5f3b2.tar.gz", - "hash": "0wkr3liw6fhl1jp2sgn3qakrykphbs03sxhan5f2kb5xvc8zchcy" + "submodules": false, + "revision": "3078b9a9e75f1790e6d6ef9955fdc6a2d1740cc6", + "url": "https://github.com/NixOS/nixpkgs/archive/3078b9a9e75f1790e6d6ef9955fdc6a2d1740cc6.tar.gz", + "hash": "0wl64hww7n9yyswq5w0xg1svnlh1cn07dlnv4dqlp5pinhy1qgy5" }, "ntfy-matrix-bot": { "type": "Git", @@ -158,6 +184,7 @@ "url": "https://stuebinm.eu/git/ntfy-matrix-bot" }, "branch": "main", + "submodules": false, "revision": "c4bedb1756c96db3f7d01feedc6587f7b0c3dc0f", "url": null, "hash": "1kq34zk7k6rg9k8frvx51hl1ldqqbfgvhm9f827b5a4c0rx28dah" @@ -169,6 +196,7 @@ "url": "https://stuebinm.eu/git/playground" }, "branch": "master", + "submodules": false, "revision": "19144f12772063b1c6f00ad186dabbf53ea25985", "url": null, "hash": "1ss0n237f0dmw0akw2q0qp8nvnijcg35f9qgy3i27m4ib3gl4ybk" @@ -181,9 +209,10 @@ "repo": "rust-overlay" }, "branch": "master", - "revision": "954582a766a50ebef5695a9616c93b5386418c08", - "url": "https://github.com/oxalica/rust-overlay/archive/954582a766a50ebef5695a9616c93b5386418c08.tar.gz", - "hash": "0g3wvgplicyjhzmh6fj9cypl2ihld372bzyxc548njq3v8qjfsjb" + "submodules": false, + "revision": "65162ae665154e0eddb395166bd4956358981dd0", + "url": "https://github.com/oxalica/rust-overlay/archive/65162ae665154e0eddb395166bd4956358981dd0.tar.gz", + "hash": "05di19x4h0w4gdd47qbmi9zch5l60h550447msdm72yc910kly40" }, "showrt": { "type": "Git", @@ -192,6 +221,7 @@ "url": "https://stuebinm.eu/git/showrt" }, "branch": "main", + "submodules": false, "revision": "7de36af3c6ffcc25832a6ff2303ba6c4c1101de5", "url": null, "hash": "09shk9b3969gmbmh8mavgss6f90zb51rsfby5n1d924agxzl93d6" @@ -204,6 +234,7 @@ "server": "https://gitlab.com/" }, "branch": "nixos-24.05", + "submodules": false, "revision": "636b82f4175e3f6b1e80d2189bb0469e2ae01a55", "url": "https://gitlab.com/api/v4/projects/simple-nixos-mailserver%2Fnixos-mailserver/repository/archive.tar.gz?sha=636b82f4175e3f6b1e80d2189bb0469e2ae01a55", "hash": "08zdidja5kdqgskynxsmcd8skh1b7cfl9ijjy9pak4b5h3aw2iqv" @@ -216,9 +247,10 @@ "repo": "sops-nix" }, "branch": "master", - "revision": "b33837ae3cfa012b65810891bebbee71fa4c0658", - "url": "https://github.com/Mic92/sops-nix/archive/b33837ae3cfa012b65810891bebbee71fa4c0658.tar.gz", - "hash": "00r497l5izngy8j0j255q3y5spip9dyflx01ga01j6n1wdngbgz3" + "submodules": false, + "revision": "77c423a03b9b2b79709ea2cb63336312e78b72e2", + "url": "https://github.com/Mic92/sops-nix/archive/77c423a03b9b2b79709ea2cb63336312e78b72e2.tar.gz", + "hash": "0hw7xx8y5lsf3gzzdl1wc3m5li7dl5gcfvjwfphhdkgxijiczgj6" }, "traveltext": { "type": "Git", @@ -227,6 +259,7 @@ "url": "https://stuebinm.eu/git/traveltext" }, "branch": "main", + "submodules": false, "revision": "d876202506621eb76012c12cbb0e91fd2bb0ada0", "url": null, "hash": "0886l3r4fnnd6pc699n9l7kzh1y00y6bbdalab90gjqccviwv9cd" @@ -238,10 +271,11 @@ "url": "https://stuebinm.eu/git/forks/uplcg" }, "branch": "main", + "submodules": false, "revision": "b61c0b191578d6ed39a6038cca7b436764a1f9f1", "url": null, "hash": "0675z5gvw0chx3hrr7bpiqxiwcykxhgw8qws17yazi071i8jgl29" } }, - "version": 3 -}
\ No newline at end of file + "version": 5 +} diff --git a/pkgs/akkoma/default.nix b/pkgs/akkoma/default.nix index 2e577f0..32d85a9 100644 --- a/pkgs/akkoma/default.nix +++ b/pkgs/akkoma/default.nix @@ -11,12 +11,12 @@ }: beamPackages.mixRelease rec { pname = "akkoma"; - version = "3.15.1"; + version = "3.15.2"; src = fetchgit { url = "https://akkoma.dev/AkkomaGang/akkoma.git"; - rev = "refs/tags/v3.15.1"; - hash = "sha256-6qsqTguEVu9t6dW8c+VAE5Z7D3FbQ0S2ZfAN5qy7Xak="; + rev = "refs/tags/v${version}"; + hash = "sha256-GW86OyO/XPIrCS+cPKQ8LG8PdhhfA2rNH1FXFiuL6vM="; }; postPatch = '' diff --git a/pkgs/bookwyrm.nix b/pkgs/bookwyrm.nix deleted file mode 100644 index a72176c..0000000 --- a/pkgs/bookwyrm.nix +++ /dev/null @@ -1,142 +0,0 @@ -{ lib -, fetchFromGitHub -, python -, writeShellScriptBin -, writeText -, settings ? { } -}: - -let - # set some dummy values to make the package build - settingsWithDefaults = { - DOMAIN = "localhost"; - DEBUG = false; - USE_HTTPS = false; - EMAIL = "your@email.here"; - PGPORT = 5432; - POSTGRES_USER = "bookwyrm"; - POSTGRES_DB = "bookwyrm"; - POSTGRES_HOST = "localhost"; - REDIS_ACTIVITY_HOST = "localhost"; - REDIS_ACTIVITY_PORT = 6379; - REDIS_BROKER_HOST = "localhost"; - REDIS_BROKER_PORT = 6379; - EMAIL_HOST = "smtp.example.com"; - EMAIL_PORT = 587; - EMAIL_HOST_USER = "mail@example.org"; - EMAIL_HOST_PASSWORD = "blub"; - MEDIA_ROOT = "/var/lib/bookwyrm/images"; - } // settings; - - # toShellVar produces "" for false, which bookwyrm rejects - toDjangoVar = name: value: lib.toShellVar name - (if value == false then "false" else - (if value == true then "true" else value)); - - envfile = writeText "bookwyrm.env" - (lib.strings.concatLines - (lib.mapAttrsToList toDjangoVar settingsWithDefaults)); - - bookwyrm = python.pkgs.buildPythonApplication rec { - pname = "bookwyrm"; - version = "0.7.4"; - - format = "other"; - - src = fetchFromGitHub { - owner = "bookwyrm-social"; - repo = "bookwyrm"; - rev = "refs/tags/v${version}"; - hash = "sha256-fhFgAsq859fbCvCw+QAioI5lW1c2k6rEiCxwFBGe7vE="; - }; - - propagatedBuildInputs = with python.pkgs; [ - aiohttp - bleach - celery - colorthief - django - django-celery-beat - bw-file-resubmit - django-compressor - django-imagekit - django-model-utils - django-sass-processor - django-csp - django-oauth-toolkit - django-storages - django-pgtrigger - s3-tar - environs - flower - gunicorn - libsass - markdown - packaging - pillow - psycopg2 - pycryptodome - dateutil - redis - requests - responses - pytz - boto3 - django-storages - django-redis - opentelemetry-api - opentelemetry-exporter-otlp-proto-grpc - # opentelemetry-instrumentation-celery - opentelemetry-instrumentation-django - # opentelemetry-instrumentation-pyscopg2 - opentelemetry-sdk - protobuf - pyotp - qrcode - grpcio - ]; - - postBuild = '' - ln -s ${envfile} .env - # needed for the python settings.py file to not fail, but not - # used during the commands executed below, so this is safe - export SECRET_KEY=fnord - - substituteInPlace contrib/systemd/* \ - --replace /opt/bookwyrm/venv/bin/gunicorn ${lib.getExe python.pkgs.gunicorn} \ - --replace /opt/bookwyrm/venv/bin/celery ${lib.getExe' python.pkgs.celery "celery"} \ - --replace /opt/bookwyrm $out - - sed -i /BindPath/d contrib/systemd/* - - python manage.py compile_themes - python manage.py collectstatic --no-input - ''; - - postInstall = '' - mkdir -p $out/lib/systemd/system - cp -r * .env $out - cp -r contrib/systemd/* $out/lib/systemd/system - ''; - - passthru = { - pythonPath = python.pkgs.makePythonPath propagatedBuildInputs; - gunicorn = python.pkgs.gunicorn; - celery = python.pkgs.celery; - manage = environmentFile: writeShellScriptBin "bookwyrm-manage.py" '' - set -a - ${if environmentFile != null - then "source ${environmentFile}" - else ""} - export PYTHONPATH=${passthru.pythonPath} - cd ${bookwyrm.outPath} - exec ${bookwyrm.outPath}/manage.py "$@" - ''; - }; - - # hacky hacky hack - shellHook = '' - export PYTHONPATH=${passthru.pythonPath} - ''; - }; -in bookwyrm diff --git a/pkgs/bookwyrm/default.nix b/pkgs/bookwyrm/default.nix new file mode 100644 index 0000000..e4c55bf --- /dev/null +++ b/pkgs/bookwyrm/default.nix @@ -0,0 +1,94 @@ +{ lib +, stdenvNoCC +, writeShellScriptBin +, writeText +, source-han-sans-vf-ttf +, bookwyrm-unwrapped +, settings ? { } +}: + +let + # set some dummy values to make the package build + settingsWithDefaults = { + DOMAIN = "localhost"; + DEBUG = false; + USE_HTTPS = false; + EMAIL = "your@email.here"; + PGPORT = 5432; + POSTGRES_USER = "bookwyrm"; + POSTGRES_DB = "bookwyrm"; + POSTGRES_HOST = "localhost"; + REDIS_ACTIVITY_HOST = "localhost"; + REDIS_ACTIVITY_PORT = 6379; + REDIS_BROKER_HOST = "localhost"; + REDIS_BROKER_PORT = 6379; + EMAIL_HOST = "smtp.example.com"; + EMAIL_PORT = 587; + EMAIL_HOST_USER = "mail@example.org"; + EMAIL_HOST_PASSWORD = "blub"; + MEDIA_ROOT = "/var/lib/bookwyrm/images"; + } // settings; + + # toShellVar produces "" for false, which bookwyrm rejects + toDjangoVar = name: value: lib.toShellVar name + (if value == false then "false" else + (if value == true then "true" else value)); + + envfile = writeText "bookwyrm.env" + (lib.strings.concatLines + (lib.mapAttrsToList toDjangoVar settingsWithDefaults)); + +in stdenvNoCC.mkDerivation (finalAttrs: { + pname = "bookwyrm"; + inherit (bookwyrm-unwrapped) version; + src = bookwyrm-unwrapped; + + dontConfigure = true; + + buildPhase = '' + runHook preBuild + + ln -s ${envfile} .env + # needed for the python settings.py file to not fail, but not + # used during the commands executed below, so this is safe + export SECRET_KEY=fnord + + export PYTHONPATH=${bookwyrm-unwrapped.pythonPath} + ./manage.py compile_themes + ./manage.py collectstatic --no-input + + ln -s ${source-han-sans-vf-ttf}/share/fonts/variable/SourceHanSans-VF.ttf.ttc static/fonts/source_han_sans/ + + substituteInPlace contrib/systemd/* \ + --replace /opt/bookwyrm/venv/bin/gunicorn ${lib.getExe bookwyrm-unwrapped.gunicorn} \ + --replace /opt/bookwyrm/venv/bin/celery ${lib.getExe' bookwyrm-unwrapped.celery "celery"} \ + --replace /opt/bookwyrm $out + + sed -i /BindPath/d contrib/systemd/* + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/lib/systemd/system + cp -r * .env $out + cp -r contrib/systemd/* $out/lib/systemd/system + + runHook postInstall + ''; + + passthru = rec { + inherit (bookwyrm-unwrapped) celery gunicorn pythonPath; + manage = environmentFile: writeShellScriptBin "bookwyrm-manage.py" '' + set -a + ${if environmentFile != null + then "source ${environmentFile}" + else ""} + export PYTHONPATH=${pythonPath} + cd ${finalAttrs.finalPackage.outPath} + exec ${finalAttrs.finalPackage.outPath}/manage.py "$@" + ''; + }; +}) diff --git a/pkgs/bookwyrm/unwrapped.nix b/pkgs/bookwyrm/unwrapped.nix new file mode 100644 index 0000000..151a9b5 --- /dev/null +++ b/pkgs/bookwyrm/unwrapped.nix @@ -0,0 +1,80 @@ +{ lib +, fetchFromGitHub +, python +}: + +python.pkgs.buildPythonApplication rec { + pname = "bookwyrm-unwrapped"; + version = "0.7.5"; + + format = "other"; + + src = fetchFromGitHub { + owner = "bookwyrm-social"; + repo = "bookwyrm"; + rev = "refs/tags/v${version}"; + hash = "sha256-/oak9dEB2rR2z8b9oXVQ6+F2H7s0F5hVxmAlPdpaA0w="; + }; + + propagatedBuildInputs = with python.pkgs; [ + aiohttp + bleach + celery + colorthief + django + django-celery-beat + bw-file-resubmit + django-compressor + django-imagekit + django-model-utils + django-sass-processor + django-csp + django-oauth-toolkit + django-storages + django-pgtrigger + s3-tar + environs + flower + gunicorn + libsass + markdown + packaging + pillow + psycopg2 + pycryptodome + dateutil + redis + requests + responses + pytz + boto3 + django-storages + django-redis + opentelemetry-api + opentelemetry-exporter-otlp-proto-grpc + # opentelemetry-instrumentation-celery + opentelemetry-instrumentation-django + # opentelemetry-instrumentation-pyscopg2 + opentelemetry-sdk + protobuf + pyotp + qrcode + grpcio + ]; + + postInstall = '' + mkdir $out + cp -r * $out + ''; + + passthru = { + pythonPath = python.pkgs.makePythonPath propagatedBuildInputs; + gunicorn = python.pkgs.gunicorn; + celery = python.pkgs.celery; + }; + + # hacky hacky hack + shellHook = '' + export PYTHONPATH=${passthru.pythonPath} + ''; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 3f8dda3..9e4b3b4 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -7,7 +7,7 @@ travelynx crs-tracker crs-php bahnhof-name matrix-to hikari_unstable heartwood radicle-interface radicle-tui inweb nomsring bookwyrm mollysocket git-annex-remote-remarkable2 - ntfy-matrix-bot transport_validator mergiraf; + ntfy-matrix-bot transport_validator mergiraf git-who; pkgs = nixpkgs; } diff --git a/pkgs/hikari.nix b/pkgs/hikari.nix index 6506590..afbc335 100644 --- a/pkgs/hikari.nix +++ b/pkgs/hikari.nix @@ -2,6 +2,7 @@ , pkg-config, bmake , cairo, glib, libevdev, libinput, libxkbcommon, linux-pam, pango, pixman , libucl, wayland, wayland-protocols, wayland-scanner, wlroots, mesa +, libdrm, libgbm , features ? { gammacontrol = true; layershell = true; @@ -27,6 +28,8 @@ stdenv.mkDerivation rec { libevdev libinput libxkbcommon + libdrm + libgbm linux-pam pango pixman diff --git a/pkgs/mollysocket.nix b/pkgs/mollysocket.nix index 1a079b4..a58c1a0 100644 --- a/pkgs/mollysocket.nix +++ b/pkgs/mollysocket.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { hash = "sha256-2OWkPTbrD4oXHoB+qszVjLr0e/AUuNnuaYXZ3kOyuxg="; }; - cargoHash = "sha256-fVH5gzQYzW6uIBO8Fob04IiVyxHDh+Pr21rSow40qLk="; + cargoHash = "sha256-fR87PUgb+F2Q4vRYUonmGi6JzJLvGWPEKhwHw+TAsyQ="; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/nomsring/nomsring.cabal b/pkgs/nomsring/nomsring.cabal index fca40c5..ea3625f 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.18 + build-depends: base , cgi ^>=3001.5 , data-clist ^>= 0.2 default-language: GHC2021 diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix index b54a774..687d5cf 100644 --- a/pkgs/overlay.nix +++ b/pkgs/overlay.nix @@ -12,7 +12,7 @@ let radicle = import ./radicle.nix; in { - beam = super.beam_nox; + beam = super.beam_minimal; git-annex-remote-remarkable2 = self.callPackage ({ rustPlatform, fetchgit, ... }: @@ -31,8 +31,11 @@ in galmon-core = self.callPackage ./galmon.nix {}; galmon-full = self.callPackage ./galmon.nix { buildAll = true; }; - akkoma-fe = super.akkoma-frontends.akkoma-fe.overrideAttrs (old: { - patches = [ ./patches/akkoma-fe-toki-pona.patch ]; + akkoma-fe = super.akkoma-fe.overrideAttrs (old: { + patches = [ + ./patches/akkoma-fe-toki-pona.patch + ./patches/akkoma-fe-toki-pona-2.patch + ]; }); akkoma = (self.callPackage ./akkoma {}).overrideAttrs { @@ -202,7 +205,7 @@ in , lib, stm, text, time, vector, wai, wai-extra, warp }: mkDerivation { - pname = "bahnhof.name"; + pname = "bahnhof-name"; version = "0.2.0.0"; src = inputs.bahnhof-name; isLibrary = false; @@ -212,6 +215,7 @@ in http-client-openssl http-types stm text time vector wai wai-extra warp ]; + jailbreak = true; mainProgram = "bahnhof-name"; license = lib.licenses.eupl12; postInstall = '' @@ -243,6 +247,30 @@ in }; }); + git-who = self.buildGoModule rec { + pname = "git-who"; + version = "1.1"; + + src = (self.fetchFromGitHub { + owner = "sinclairtarget"; + repo = "git-who"; + rev = "v${version}"; + hash = "sha256-H6RbmkM8/n0HDMI3auz6YyEn/vsfXWk5ig+pBhZG3nI="; + # submodules contain test data and have ssh urls, hence this absurdity + fetchSubmodules = true; + leaveDotGit = true; + }).overrideAttrs { + GIT_CONFIG_COUNT = 1; + GIT_CONFIG_KEY_0 = "url.https://github.com/.insteadOf"; + GIT_CONFIG_VALUE_0 = "git@github.com:"; + }; + + vendorHash = "sha256-e2P7szjtAn4EFTy+eGi/9cYf/Raw/7O+PbYEOD8i3Hs="; + + nativeCheckInputs = [ self.gitMinimal ]; + }; + + hikari = self.callPackage ./hikari.nix { wlroots = self.wlroots_0_15; }; wlroots_0_15 = self.callPackage ./wlroots_0_15.nix {}; @@ -253,7 +281,8 @@ in #### packaged mostly as shitpost / to play around with #### - bookwyrm = (self.callPackage ./bookwyrm.nix { + bookwyrm = self.callPackage ./bookwyrm {}; + bookwyrm-unwrapped = (self.callPackage ./bookwyrm/unwrapped.nix { python = super.python312.override ({ packageOverrides = self: super: { django-sass-processor = self.callPackage ./python/django-sass-processor.nix {}; diff --git a/pkgs/patches/akkoma-fe-toki-pona-2.patch b/pkgs/patches/akkoma-fe-toki-pona-2.patch new file mode 100644 index 0000000..3dc549b --- /dev/null +++ b/pkgs/patches/akkoma-fe-toki-pona-2.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/post_language.js b/src/lib/post_language.js +index 7dcaebce..4d146773 100644 +--- a/src/lib/post_language.js ++++ b/src/lib/post_language.js +@@ -3,7 +3,7 @@ import { computed } from 'vue' + + export const usePostLanguageOptions = () => { + const postLanguageOptions = computed(() => { +- return iso6391.getAllCodes().map(lang => ({ ++ return iso6391.getAllCodes().concat(['tok']).map(lang => ({ + key: lang, + value: lang, + label: lang, diff --git a/pkgs/patches/akkoma-fe-toki-pona.patch b/pkgs/patches/akkoma-fe-toki-pona.patch index 281fdfc..b556fb6 100644 --- a/pkgs/patches/akkoma-fe-toki-pona.patch +++ b/pkgs/patches/akkoma-fe-toki-pona.patch @@ -4,23 +4,9 @@ Date: Fri, 23 Jun 2023 01:56:43 +0200 Subject: [PATCH] mi la, toki pona li pona a --- - src/components/post_status_form/post_status_form.js | 2 +- src/services/locale/locale.service.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) -diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js -index 5647a9eb..25180ba9 100644 ---- a/src/components/post_status_form/post_status_form.js -+++ b/src/components/post_status_form/post_status_form.js -@@ -303,7 +303,7 @@ const PostStatusForm = { - mobileLayout: state => state.interface.mobileLayout - }), - isoLanguages () { -- return iso6391.getAllCodes(); -+ return iso6391.getAllCodes().concat(['tok']); - } - }, - watch: { diff --git a/src/services/locale/locale.service.js b/src/services/locale/locale.service.js index 8cef2522..8bee6ad2 100644 --- a/src/services/locale/locale.service.js diff --git a/pkgs/python/django-imagekit.nix b/pkgs/python/django-imagekit.nix index 9a11a4f..f746db7 100644 --- a/pkgs/python/django-imagekit.nix +++ b/pkgs/python/django-imagekit.nix @@ -9,12 +9,12 @@ buildPythonPackage rec { pname = "django-imagekit"; - version = "4.1.0"; + version = "5.0.0"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-5VmuquQ6M7NPh2Man6VpZFXkRR/6c4pCY1/eRC/trFw="; + hash = "sha256-qun3So6bbOtdFffY4mYwKQHnbZ9TLHi9UTXLD6IGprA="; }; propagatedBuildInputs = [ diff --git a/pkgs/python/django-sass-processor.nix b/pkgs/python/django-sass-processor.nix index 90bba5f..8566bea 100644 --- a/pkgs/python/django-sass-processor.nix +++ b/pkgs/python/django-sass-processor.nix @@ -8,13 +8,13 @@ }: buildPythonPackage rec { - pname = "django-sass-processor"; - version = "1.2.2"; + pname = "django_sass_processor"; + version = "1.4.1"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-9gmMGBzJWiFZPfa7UCeR4yAVYVIigD3iFv3Mi7QsD3c="; + hash = "sha256-Hp0Edp922Ju/d7myebqD36ytnJjAPKiljs/CnZl+b88="; }; propagatedBuildInputs = [ diff --git a/pkgs/wlroots_0_15.nix b/pkgs/wlroots_0_15.nix index 93095f8..6b63e4c 100644 --- a/pkgs/wlroots_0_15.nix +++ b/pkgs/wlroots_0_15.nix @@ -23,6 +23,9 @@ , glslang , libliftoff , libdisplay-info +, libdrm +, libgbm +, cmake , nixosTests , enableXWayland ? true @@ -47,6 +50,8 @@ stdenv.mkDerivation { hash = "sha256-MFR38UuB/wW7J9ODDUOfgTzKLse0SSMIRYTpEaEdRwM="; }; + CFLAGS = [ "-Wno-calloc-transposed-args" ]; + postPatch = '' substituteInPlace backend/drm/meson.build \ --replace /usr/share/hwdata/ ${hwdata}/share/hwdata/ @@ -58,10 +63,12 @@ stdenv.mkDerivation { strictDeps = true; depsBuildBuild = [ pkg-config ]; - nativeBuildInputs = [ meson ninja pkg-config wayland-scanner glslang ]; + nativeBuildInputs = [ meson ninja pkg-config wayland-scanner glslang cmake ]; buildInputs = [ libGL + libdrm + libgbm libcap libinput libpng diff --git a/tests/default.nix b/tests/default.nix index 5c165db..06d2f52 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -1,4 +1,4 @@ -{ nixpkgs ? (import ../inputs.nix { }).nixpkgs }: +{ system ? "x86_64-linux", nixpkgs ? (import ../inputs.nix { inherit system; }).nixpkgs-boring }: { bookwyrm = nixpkgs.nixosTest ./bookwyrm.nix; |