Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
Harald Hoyer 2024-03-21 14:32:53 +01:00
parent 5fdd2ff06b
commit 3299df48d5
3 changed files with 99 additions and 2 deletions

View file

@ -1,8 +1,18 @@
{ options, config, lib, pkgs, ... }:
{ options
,config
,lib
,pkgs
, ... }:
with lib;
with lib.metacfg;
let cfg = config.metacfg.base;
let
cfg = config.metacfg.base;
gitconfig = pkgs.writeText "gitconfig" ''
[filter "rot8000"]
smudge = ${pkgs.metacfg.rot8000}/bin/rot8000
clean = ${pkgs.metacfg.rot8000}/bin/rot8000
'';
in
{
options.metacfg.base = with types; {
@ -38,6 +48,7 @@ in
delta
efibootmgr
git
git-crypt
git-delete-merged-branches
home-manager
htop
@ -137,6 +148,10 @@ in
];
flake = "git+https://git.hoyer.xyz/harald/nixcfg";
};
systemd.services.nixos-upgrade = {
path = [ pkgs.metacfg.rot8000 ];
environment.GIT_CONFIG_GLOBAL = toString gitconfig;
};
virtualisation.libvirtd.enable = true;

54
packages/rot8000/Cargo.lock generated Normal file
View file

@ -0,0 +1,54 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "aho-corasick"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
[[package]]
name = "memchr"
version = "2.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
[[package]]
name = "regex"
version = "1.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
name = "rot8000"
version = "0.1.0"
dependencies = [
"regex",
]

View file

@ -0,0 +1,28 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, ...
}:
rustPlatform.buildRustPackage rec {
pname = "rot8000";
version = "0.0.1";
src = fetchFromGitHub {
owner = "haraldh";
rev = "3e3c4e4d6ed5b572ca2b09c8dc7f5bc3bd86e554";
repo = "mailsmudge";
sha256 = "sha256-4cG4Mn94lewxj1qstor8R0xLWIBFxf0rOHTMxzgHyFQ=";
};
cargoLock = {
lockFile = ./Cargo.lock;
};
meta = with lib; {
description = "mailsmudge";
homepage = "https://github.com/haraldh/mailsmudge";
license = licenses.unlicense;
maintainers = [ maintainers.tailhook ];
};
}