1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

flake: do not use flake-utils

This commit is contained in:
2025-12-13 14:01:31 +01:00
parent 16398282ed
commit f1a6b1f4f6
2 changed files with 143 additions and 166 deletions

84
flake.lock generated
View File

@@ -504,36 +504,20 @@
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
"id": "flake-utils",
"type": "indirect"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_4"
"systems": "systems_5"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"locked": {
"lastModified": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@@ -750,15 +734,14 @@
"menstruation-backend_2": {
"inputs": {
"fenix": "fenix",
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1759437689,
"narHash": "sha256-L3gLXmW+9oE+5YosaOSIDtNlXmXxnY8RXDNj2J8uIRs=",
"lastModified": 1765657254,
"narHash": "sha256-9kZdra5Bx3sfkcZW0eRULsWwloigv7+xQfr+JL0kX6s=",
"owner": "kmein",
"repo": "menstruation.rs",
"rev": "7ae9a7affffd20eafe0158b9b7ca50cc8a77f2af",
"rev": "cc7278fc187f1d4b1f802fbde926a6195a7a0d47",
"type": "github"
},
"original": {
@@ -801,9 +784,6 @@
},
"menstruation-telegram_2": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"menstruation-backend": [
"menstruation-backend"
],
@@ -812,11 +792,11 @@
]
},
"locked": {
"lastModified": 1677075205,
"narHash": "sha256-2+xuAhsS3y2qB0ObVPCHXrmnTsIZ8uI5HFI4+Ash8PY=",
"lastModified": 1765657432,
"narHash": "sha256-gzoBH783lFsQocSwjp2d6v778sWcLnKXIQPnkVTx+qU=",
"owner": "kmein",
"repo": "menstruation-telegram",
"rev": "f7ddb6d9610aacb50ec66a3ce1bdc49fe4664a49",
"rev": "63ff6b28e0609f470b63813b37320188fff7e95d",
"type": "github"
},
"original": {
@@ -1510,19 +1490,16 @@
"recht_2": {
"inputs": {
"blessings": "blessings_2",
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736882697,
"narHash": "sha256-G++JyQ6GJlQ8T/R18xb02HhSE1NWfpAboUEBleaadd8=",
"lastModified": 1765658439,
"narHash": "sha256-7u21xVZBEYhgEd4UX+nG86oDblxCJtG/eYT1g2S45nc=",
"owner": "kmein",
"repo": "recht",
"rev": "dd49a91b1e611920889680aa2c9101166b0ce83e",
"rev": "dbdd8fd69d6b82bce1132ceb8dd2f5715887e6ee",
"type": "github"
},
"original": {
@@ -1688,9 +1665,6 @@
},
"scripts_2": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
],
@@ -1699,11 +1673,11 @@
]
},
"locked": {
"lastModified": 1763370753,
"narHash": "sha256-sjYc9aP52GrVCPWxf+B0o0lqDGVGfpXqX9MI9eKyCZI=",
"lastModified": 1765657698,
"narHash": "sha256-Ic5lcBZQKw9kOU6BUl3w+r1zCj9hveHyaHsOAYB7Yhg=",
"owner": "kmein",
"repo": "scripts",
"rev": "e71d09ba89bb1e210a7e103aaa3fe619dbc801e7",
"rev": "aeea5b4cdaf39169ab469a7c31269c8360b9c403",
"type": "github"
},
"original": {
@@ -1775,7 +1749,7 @@
"nixpkgs"
],
"nur": "nur_3",
"systems": "systems_5",
"systems": "systems_4",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
@@ -1925,15 +1899,14 @@
},
"telebots_2": {
"inputs": {
"flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_12"
},
"locked": {
"lastModified": 1703313352,
"narHash": "sha256-EV1hfkxEn6L+z6A9rcyfkmBGzu0VwA2rF1iA32nfXW8=",
"lastModified": 1765657917,
"narHash": "sha256-buujY0TRj+Skg1Uo8ut7kUKHDfOtsvxt/LEOiO+ehvA=",
"owner": "kmein",
"repo": "telebots",
"rev": "534221956e6d9dc5528d94247dd35e9f597de169",
"rev": "1232c6f82e7cdf80b6b76a992544db42a293f7b2",
"type": "github"
},
"original": {
@@ -1976,9 +1949,6 @@
},
"tinc-graph_2": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
],
@@ -1987,11 +1957,11 @@
]
},
"locked": {
"lastModified": 1748887042,
"narHash": "sha256-WWQxnmKyQm/iccHxDdobdGOPfcVNf+PQwy9HQ2b9W8g=",
"lastModified": 1765658153,
"narHash": "sha256-cNTBy57MGlRBY9211prc/wau+CbwoJo0mydgGva1/LQ=",
"owner": "kmein",
"repo": "tinc-graph",
"rev": "8847b2d0e69065bf4bbb9885fbd465f3b1b2369a",
"rev": "119c9486460f90c45d4a157ea9b9f1cd2901d176",
"type": "github"
},
"original": {
@@ -2161,9 +2131,7 @@
},
"wallpaper-generator_2": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_13"
},
"locked": {

View File

@@ -5,10 +5,8 @@
self.submodules = true;
agenix.url = "github:ryantm/agenix";
# alew-web.url = "git+ssh://gitea@code.kmein.de:22022/kfm/alew-web.git?ref=refs/heads/master";
autorenkalender.url = "github:kmein/autorenkalender";
coptic-dictionary.url = "github:kmein/coptic-dictionary";
flake-utils.url = "github:numtide/flake-utils";
home-manager.url = "github:nix-community/home-manager/release-25.11";
menstruation-backend.url = "github:kmein/menstruation.rs";
menstruation-telegram.url = "github:kmein/menstruation-telegram";
@@ -39,32 +37,23 @@
# menstruation-backend.inputs.flake-utils.follows = "flake-utils";
# menstruation-backend.inputs.nixpkgs.follows = "nixpkgs";
# menstruation-backend.inputs.rust-overlay.follows = "rust-overlay";
menstruation-telegram.inputs.flake-utils.follows = "flake-utils";
menstruation-telegram.inputs.menstruation-backend.follows = "menstruation-backend";
menstruation-telegram.inputs.nixpkgs.follows = "nixpkgs-old";
nix-on-droid.inputs.home-manager.follows = "home-manager";
nix-on-droid.inputs.nixpkgs.follows = "nixpkgs";
recht.inputs.flake-utils.follows = "flake-utils";
recht.inputs.nixpkgs.follows = "nixpkgs";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
scripts.inputs.flake-utils.follows = "flake-utils";
scripts.inputs.nixpkgs.follows = "nixpkgs";
scripts.inputs.rust-overlay.follows = "rust-overlay";
stylix.inputs.nixpkgs.follows = "nixpkgs";
tinc-graph.inputs.flake-utils.follows = "flake-utils";
tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
tinc-graph.inputs.rust-overlay.follows = "rust-overlay";
voidrice.flake = false;
wallpaper-generator.inputs.flake-utils.follows = "flake-utils";
wallpapers.flake = false;
};
nixConfig = {
extra-substituters = [ "https://kmein.cachix.org" ];
extra-trusted-public-keys = [ "kmein.cachix.org-1:rsJ2b6++VQHJ1W6rGuDUYsK/qUkFA3bNpO6PyEyJ9Ls=" ];
};
outputs = inputs @ {
outputs =
inputs@{
self,
nixpkgs,
nixpkgs-unstable,
@@ -78,19 +67,28 @@
stylix,
...
}:
let
lib = nixpkgs.lib;
eachSupportedSystem = lib.genAttrs lib.systems.flakeExposed;
in
{
apps = {
x86_64-darwin = let
x86_64-darwin =
let
pkgs = nixpkgs.legacyPackages.x86_64-darwin;
in {
in
{
deploy-maakaron = {
type = "app";
program = toString (pkgs.writers.writeDash "deploy-maakaron" ''
program = toString (
pkgs.writers.writeDash "deploy-maakaron" ''
exec $(nix build .#homeConfigurations.maakaron.activationPackage --no-link --print-out-paths)/activate
'');
''
);
};
};
x86_64-linux = let
x86_64-linux =
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
lib = nixpkgs.lib;
in
@@ -98,13 +96,18 @@
// {
mock-secrets = {
type = "app";
program = toString (pkgs.writers.writeDash "mock-secrets" ''
program = toString (
pkgs.writers.writeDash "mock-secrets" ''
${pkgs.findutils}/bin/find secrets -not -path '*/.*' -type f | ${pkgs.coreutils}/bin/sort > secrets.txt
'');
''
);
};
}
# the following error prevents remote building of ful: https://github.com/NixOS/nixpkgs/issues/177873
// builtins.listToAttrs (map (hostname: let
// builtins.listToAttrs (
map (
hostname:
let
externalNetwork = import ./lib/external-network.nix;
targets = {
ful = "root@ful";
@@ -120,27 +123,36 @@
in
lib.attrsets.nameValuePair "deploy-${hostname}" {
type = "app";
program = toString (pkgs.writers.writeDash "deploy-${hostname}" ''
program = toString (
pkgs.writers.writeDash "deploy-${hostname}" ''
exec ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch \
--max-jobs 2 \
--log-format internal-json \
--flake .#${hostname} \
--target-host ${targets.${hostname}} 2>&1 \
| ${pkgs.nix-output-monitor}/bin/nom --json
'');
}) (builtins.attrNames self.nixosConfigurations))
''
);
}
) (builtins.attrNames self.nixosConfigurations)
)
// {
deploy-ful = {
type = "app";
program = toString (pkgs.writers.writeDash "deploy-ful" ''
program = toString (
pkgs.writers.writeDash "deploy-ful" ''
exec ${pkgs.nix}/bin/nix run .#nixinate.ful \
--log-format internal-json 2>&1 \
| ${pkgs.nix-output-monitor}/bin/nom --json
'');
''
);
};
};
};
# TODO overlay for packages
# TODO remove flake-utils dependency from my own repos
nixosModules = {
htgen = import modules/htgen.nix;
moodle-dl = import modules/moodle-dl.nix;
@@ -174,7 +186,8 @@
};
homeConfigurations = {
maakaron = let
maakaron =
let
system = "x86_64-darwin";
pkgs = nixpkgs.legacyPackages.${system};
in
@@ -318,8 +331,8 @@
];
};
};
}
// flake-utils.lib.eachSystem [flake-utils.lib.system.x86_64-linux flake-utils.lib.system.x86_64-darwin flake-utils.lib.system.aarch64-linux] (system: let
packages = eachSupportedSystem (system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
@@ -341,7 +354,6 @@
}:
pkgs.writers.writeDashBin name ''PATH=$PATH:${nixpkgs.lib.makeBinPath (packages ++ [pkgs.findutils pkgs.coreutils pkgs.gnused pkgs.gnugrep])} ${script} "$@"'';
in {
packages = rec {
auc = pkgs.callPackage packages/auc.nix {};
betacode = pkgs.callPackage packages/betacode.nix {};
brainmelter = pkgs.callPackage packages/brainmelter.nix {};
@@ -442,9 +454,6 @@
weechatScripts-hotlist2extern = pkgs.callPackage packages/weechatScripts/hotlist2extern.nix {};
wttr = pkgs.callPackage packages/wttr.nix {};
itl = pkgs.callPackage packages/itl.nix {};
itools = pkgs.callPackage packages/itools.nix {itl = itl;};
booksplit = wrapScript {
script = inputs.voidrice.outPath + "/.local/bin/booksplit";
name = "booksplit";
@@ -456,6 +465,6 @@
name = "tag";
packages = [pkgs.ffmpeg];
};
};
});
};
}