Compare commits

...

4 Commits

Author SHA1 Message Date
Agatha Lovelace ff11eaead4
Update mastodon to 4.3.0
Yarn v2 hacks mostly stolen from d7eb0c761a
2024-01-30 23:20:45 +01:00
Agatha Lovelace c0f6d1ea7e
Use zdiff3 in git 2024-01-30 23:17:16 +01:00
Agatha Lovelace 264896aba7
Update and cleanup 2024-01-30 23:16:56 +01:00
Agatha Lovelace c2a3667552
Use systemd initrd 2024-01-24 11:25:28 +01:00
12 changed files with 574 additions and 467 deletions

View File

@ -1,4 +1,4 @@
{ pkgs, config, ... }: { pkgs, ... }:
let let
config = pkgs.writeText "config.kdl" '' config = pkgs.writeText "config.kdl" ''
status-text "hi there! i like to know people following me on here status-text "hi there! i like to know people following me on here

View File

@ -159,10 +159,6 @@
forwardX11 = true; forwardX11 = true;
forwardX11Trusted = true; forwardX11Trusted = true;
forwardAgent = true; forwardAgent = true;
remoteForwards = [{
bind.address = "/run/user/1000/gnupg/S.gpg-agent";
host.address = "/run/user/1000/gnupg/S.gpg-agent.extra";
}];
extraOptions."TCPKeepAlive" = "yes"; extraOptions."TCPKeepAlive" = "yes";
}; };

View File

@ -38,6 +38,7 @@
extraConfig = { extraConfig = {
init = { defaultBranch = "mistress"; }; init = { defaultBranch = "mistress"; };
core = { editor = "hx"; }; core = { editor = "hx"; };
merge.conflictStyle = "zdiff3";
rebase.autosquash = true; rebase.autosquash = true;
pull.rebase = true; pull.rebase = true;
}; };

View File

@ -1,6 +1,5 @@
{ lib, stdenv, nodejs-slim, bundlerEnv, nixosTests, yarn, callPackage { lib, stdenv, nodejs-slim, bundlerEnv, nixosTests, yarn-berry, callPackage
, imagemagick, ffmpeg, file, ruby, writeShellScript, fetchYarnDeps , imagemagick, ffmpeg, file, ruby, writeShellScript, brotli
, fixup_yarn_lock, brotli
# Allow building a fork or custom version of Mastodon: # Allow building a fork or custom version of Mastodon:
, pname ? "mastodon", version ? srcOverride.version, patches ? [ ] , pname ? "mastodon", version ? srcOverride.version, patches ? [ ]
# src is a package # src is a package
@ -34,19 +33,13 @@ stdenv.mkDerivation rec {
pname = "${pname}-modules"; pname = "${pname}-modules";
inherit src version; inherit src version;
yarnOfflineCache = fetchYarnDeps { yarnOfflineCache = callPackage ./yarn.nix {
yarnLock = "${src}/yarn.lock"; src = srcOverride;
hash = yarnHash; hash = yarnHash;
}; };
nativeBuildInputs = [ nativeBuildInputs =
fixup_yarn_lock [ nodejs-slim yarn-berry mastodonGems mastodonGems.wrappedRuby brotli ];
nodejs-slim
yarn
mastodonGems
mastodonGems.wrappedRuby
brotli
];
RAILS_ENV = "production"; RAILS_ENV = "production";
NODE_ENV = "production"; NODE_ENV = "production";
@ -58,9 +51,12 @@ stdenv.mkDerivation rec {
# This option is needed for openssl-3 compatibility # This option is needed for openssl-3 compatibility
# Otherwise we encounter this upstream issue: https://github.com/mastodon/mastodon/issues/17924 # Otherwise we encounter this upstream issue: https://github.com/mastodon/mastodon/issues/17924
export NODE_OPTIONS=--openssl-legacy-provider export NODE_OPTIONS=--openssl-legacy-provider
fixup_yarn_lock ~/yarn.lock
yarn config --offline set yarn-offline-mirror $yarnOfflineCache export YARN_ENABLE_TELEMETRY=0
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress mkdir -p ~/.yarn/berry
ln -sf $yarnOfflineCache ~/.yarn/berry/cache
yarn install --immutable --immutable-cache
patchShebangs ~/bin patchShebangs ~/bin
patchShebangs ~/node_modules patchShebangs ~/node_modules
@ -70,7 +66,7 @@ stdenv.mkDerivation rec {
OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder \ OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder \
rails assets:precompile rails assets:precompile
yarn cache clean --offline yarn cache clean
rm -rf ~/node_modules/.cache rm -rf ~/node_modules/.cache
# Create missing static gzip and brotli files # Create missing static gzip and brotli files

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,15 @@
# This file was generated by pkgs.mastodon.updateScript. # This file was generated by pkgs.mastodon.updateScript.
{ fetchFromGitHub, applyPatches, patches ? [] }: { fetchFromGitHub, applyPatches, patches ? [ ] }:
let let version = "4615ff9a14d80753ebbae8eb6174d43f553241ad";
version = "8fbaf6711d6d33de2fcc62888a7109993a5c8f24"; in (applyPatches {
in src = fetchFromGitHub {
( owner = "AgathaSorceress";
applyPatches { repo = "mastodon";
src = fetchFromGitHub { rev = "${version}";
owner = "AgathaSorceress"; sha256 = "bTjyeZbxdkAtLb63jBgNUKhlnXY0KIpGAN0YCglcT5E=";
repo = "mastodon"; };
rev = "${version}"; patches = patches ++ [ ./yarn-typescript.patch ];
hash = "sha256-AVlugSNe55feq3RUiFITU0MWcIr9rNAa1iqPFV3aVPg="; }) // {
};
patches = patches ++ [];
}) // {
inherit version; inherit version;
yarnHash = "sha256-WsPNqV1PC2YjL37qnWfRTj8LaIBUI7+C0cWTfFd7HGo="; yarnHash = "sha256-qE1TBqa3BSEu1MC3Qw/k3h7QEicWd3AwJdA+U1v8924=";
} }

View File

@ -0,0 +1,15 @@
--- a/yarn.lock
+++ b/yarn.lock
@@ -16483,11 +16483,11 @@
"typescript@patch:typescript@npm%3A5#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.0.4#optional!builtin<compat/typescript>":
version: 5.3.3
- resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"
+ resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=29ae49"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500
+ checksum: e22df47df9b2b2f2617b8bf511a29aea3d177f9f7a0756818230a76b01cbd7da988bf55f9463aaa1a4c1ff90b80f8dc5676460d4e9dfc010572cbba59b822b0c
languageName: node
linkType: hard

View File

@ -0,0 +1,32 @@
{ stdenvNoCC, yarn-berry, cacert, src, hash }:
stdenvNoCC.mkDerivation {
pname = "yarn-deps";
version = hash;
nativeBuildInputs = [ yarn-berry cacert ];
inherit src;
dontInstall = true;
NODE_EXTRA_CA_CERTS = "${cacert}/etc/ssl/certs/ca-bundle.crt";
buildPhase = ''
mkdir -p $out
export HOME=$(mktemp -d)
echo $HOME
export YARN_ENABLE_TELEMETRY=0
export YARN_COMPRESSION_LEVEL=0
cache="$(yarn config get cacheFolder)"
yarn install --immutable --mode skip-build
cp -r $cache/* $out/
'';
outputHashAlgo = "sha256";
outputHash = hash;
outputHashMode = "recursive";
}

View File

@ -194,11 +194,11 @@
"utils": "utils_3" "utils": "utils_3"
}, },
"locked": { "locked": {
"lastModified": 1687004839, "lastModified": 1704635792,
"narHash": "sha256-2DxUHOyJ9FY6zibWabHEpecmv7ImsQFDbuND/eweDJM=", "narHash": "sha256-18cwml0k6g7wWkPlFtORFt/eVf6vxu/g2fEr8LrEQIE=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "a131f680ddb64f4dd8a2761c41af3980c17aad30", "rev": "fa324fbf2651f33f1d3557c058f5fbf8e985e624",
"revCount": 5, "revCount": 6,
"type": "git", "type": "git",
"url": "https://git.xenua.me/xenua/fedi-frq-friend" "url": "https://git.xenua.me/xenua/fedi-frq-friend"
}, },
@ -217,11 +217,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1702485432, "lastModified": 1705976678,
"narHash": "sha256-3wcT7NGgH1Du9w+acJEnrorr49g2c2040m00FNNFLWs=", "narHash": "sha256-gPVkZJ4XbdJ5JWltoMHfJbmgbgsgYi/hE2zkj/njUjM=",
"owner": "helix-editor", "owner": "helix-editor",
"repo": "helix", "repo": "helix",
"rev": "7c55190806f31595e18da2b56c8ca54d8f5b33b7", "rev": "ae8042bb83e34b7cf085ec8792fcbf529896d998",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -237,11 +237,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1702195709, "lastModified": 1705659542,
"narHash": "sha256-+zRjWkm5rKqQ57PuLZ3JF3xi3vPMiOJzItb1m/43Cq4=", "narHash": "sha256-WA3xVfAk1AYmFdwghT7mt/erYpsU6JPu9mdTEP/e9HQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "6761b8188b860f374b457eddfdb05c82eef9752f", "rev": "10cd9c53115061aa6a0a90aad0b0dde6a999cdb9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -374,11 +374,11 @@
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1679567394, "lastModified": 1698420672,
"narHash": "sha256-ZvLuzPeARDLiQUt6zSZFGOs+HZmE+3g4QURc8mkBsfM=", "narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "naersk", "repo": "naersk",
"rev": "88cd22380154a2c36799fe8098888f0f59861a15", "rev": "aeb58d5e8faead8980a807c840232697982d47b9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -440,11 +440,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1702272962, "lastModified": 1705883077,
"narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=", "narHash": "sha256-ByzHHX3KxpU1+V0erFy8jpujTufimh6KaS/Iv3AciHk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e97b3e4186bcadf0ef1b6be22b8558eab1cdeb5d", "rev": "5f5210aa20e343b7e35f40c033000db0ef80d7b9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -499,11 +499,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1702346276, "lastModified": 1705916986,
"narHash": "sha256-eAQgwIWApFQ40ipeOjVSoK4TEHVd6nbSd9fApiHIw5A=", "narHash": "sha256-iBpfltu6QvN4xMpen6jGGEb6jOqmmVQKUrXdOJ32u8w=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cf28ee258fd5f9a52de6b9865cdb93a1f96d09b7", "rev": "d7f206b723e42edb09d9d753020a84b3061a79d8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -514,11 +514,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1680273054, "lastModified": 1704161960,
"narHash": "sha256-Bs6/5LpvYp379qVqGt9mXxxx9GSE789k3oFc+OAL07M=", "narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3364b5b117f65fe1ce65a3cdd5612a078a3b31e3", "rev": "63143ac2c9186be6d9da6035fa22620018c85932",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -592,11 +592,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1699986787, "lastModified": 1704167711,
"narHash": "sha256-eYlLWibKtHN/uWJQLzOMRXpoTbO6VcFTfVY4dpgdJcQ=", "narHash": "sha256-kFDq+kf/Di/P8bq5sUP8pVwRkrSVrABksBjMPmLic3s=",
"owner": "the-argus", "owner": "the-argus",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"rev": "3c702af1f717b7876fac08809201b1368d0d956c", "rev": "1325416f951d6a82cfddb1289864ad782e2b87c4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -726,6 +726,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_8": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"url-eater": { "url-eater": {
"inputs": { "inputs": {
"naersk": "naersk_4", "naersk": "naersk_4",
@ -735,11 +750,11 @@
"utils": "utils_5" "utils": "utils_5"
}, },
"locked": { "locked": {
"lastModified": 1691162641, "lastModified": 1705955798,
"narHash": "sha256-j2LTtFVXtVhuwtp0ETYLD8Ra9izW4BiW2k+ttGh2Vag=", "narHash": "sha256-lN3AnOCz5thhFhnj8xN7KuuUrAbG9FrvUcNJ3Ys45NU=",
"owner": "AgathaSorceress", "owner": "AgathaSorceress",
"repo": "url-eater", "repo": "url-eater",
"rev": "605b5f5388e6f31c7c5306a21f8a8c5ac4b15096", "rev": "3ea3d1363d61654d489f31578994bcb799b683b2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -821,12 +836,15 @@
} }
}, },
"utils_5": { "utils_5": {
"inputs": {
"systems": "systems_7"
},
"locked": { "locked": {
"lastModified": 1678901627, "lastModified": 1701680307,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -837,7 +855,7 @@
}, },
"utils_6": { "utils_6": {
"inputs": { "inputs": {
"systems": "systems_7" "systems": "systems_8"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1681202837,
@ -859,11 +877,11 @@
"utils": "utils_6" "utils": "utils_6"
}, },
"locked": { "locked": {
"lastModified": 1689340601, "lastModified": 1704387018,
"narHash": "sha256-15P2VwCiGFQSDG7g8Y+Bv2zW1GUJ3i3skrwCblpojdg=", "narHash": "sha256-ng+S3lDHgAu0FApVV74omIkYOQft1Vgh2rHpYxnhV6A=",
"ref": "refs/heads/mistress", "ref": "refs/heads/mistress",
"rev": "60ebc18af7416d624883bea57a27db95e718a562", "rev": "bd6a6777ad2faf3779caaeb359354dff047066a4",
"revCount": 19, "revCount": 20,
"type": "git", "type": "git",
"url": "https://git.lain.faith/sorceress/vampysite" "url": "https://git.lain.faith/sorceress/vampysite"
}, },

View File

@ -66,7 +66,7 @@
./hosts/${hostname}/configuration.nix ./hosts/${hostname}/configuration.nix
./common/options.nix ./common/options.nix
(import "${home-manager}/nixos") (import "${home-manager}/nixos")
url-eater.nixosModule url-eater.nixosModules.default
colorpickle.nixosModules.default colorpickle.nixosModules.default
spicetify-nix.nixosModule spicetify-nix.nixosModule
]; ];
@ -110,7 +110,7 @@
''; '';
}); });
colorpickle = colorpickle.packages.${final.system}.default; colorpickle = colorpickle.packages.${final.system}.default;
frq-friend = frq-friend.defaultPackage.${final.system}; frq-friend = frq-friend.packages.${final.system}.default;
vampysite = vampysite.packages.${final.system}.default; vampysite = vampysite.packages.${final.system}.default;
spicetify-pkgs = spicetify-nix.packages.${final.system}.default; spicetify-pkgs = spicetify-nix.packages.${final.system}.default;
matrix-ril100 = matrix-ril100.packages.${final.system}.default; matrix-ril100 = matrix-ril100.packages.${final.system}.default;

View File

@ -1,7 +1,7 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: { config, lib, modulesPath, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -12,6 +12,12 @@
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.initrd.systemd = {
enable = true;
emergencyAccess =
"$2b$05$eOIXFST5/9G6vAFIZDLGfuJV7CV1B26YmRMAFRstyRHwvBNFSN6Im";
};
boot.supportedFilesystems = [ "ntfs" ]; boot.supportedFilesystems = [ "ntfs" ];
fileSystems."/" = { fileSystems."/" = {

View File

@ -12,6 +12,12 @@
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.initrd.systemd = {
enable = true;
emergencyAccess =
"$2b$05$eOIXFST5/9G6vAFIZDLGfuJV7CV1B26YmRMAFRstyRHwvBNFSN6Im";
};
boot.supportedFilesystems = [ "ntfs" ]; boot.supportedFilesystems = [ "ntfs" ];
fileSystems."/" = { fileSystems."/" = {