sin0: add chicken-box

This commit is contained in:
Guanran Wang 2024-11-22 17:16:04 +08:00
parent 2b82e17411
commit 766bca73d0
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
9 changed files with 111 additions and 55 deletions

View file

@ -1,5 +1,32 @@
{ {
"nodes": { "nodes": {
"chicken-box": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
],
"systems": [
"systems"
],
"treefmt-nix": [
"treefmt-nix"
]
},
"locked": {
"lastModified": 1731829831,
"narHash": "sha256-8wG0qLffaws50E5VmjOrvgiF1y6mKuDReg2vNVy4MfI=",
"rev": "8581ccc8ac13f9d93c6265ecbc4c716097415fc3",
"type": "tarball",
"url": "https://git.ny4.dev/api/v1/repos/nyancat/chicken-box/archive/8581ccc8ac13f9d93c6265ecbc4c716097415fc3.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://git.ny4.dev/nyancat/chicken-box/archive/master.tar.gz"
}
},
"colmena": { "colmena": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@ -34,11 +61,11 @@
}, },
"crane": { "crane": {
"locked": { "locked": {
"lastModified": 1731098351, "lastModified": 1731974733,
"narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=", "narHash": "sha256-enYSSZVVl15FI5p+0Y5/Ckf5DZAvXe6fBrHxyhA/njc=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28", "rev": "3cb338ce81076ce5e461cf77f7824476addb0e1c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -54,11 +81,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731549112, "lastModified": 1732221404,
"narHash": "sha256-c9I3i1CwZ10SoM5npQQVnfwgvB86jAS3lT4ZqkRoSOI=", "narHash": "sha256-fWTyjgGt+BHmkeJ5IxOR4zGF4/uc+ceWmhBjOBSVkgQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "5fd852c4155a689098095406500d0ae3d04654a8", "rev": "97c0c4d7072f19b598ed332e9f7f8ad562c6885b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -149,11 +176,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731604581, "lastModified": 1732025103,
"narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=", "narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10", "rev": "a46e702093a5c46e192243edbd977d5749e7f294",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -178,11 +205,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1730536459, "lastModified": 1731770900,
"narHash": "sha256-kb3EZS4EndrmRVON/mEV4LvfW9k0b09gRc2JqUCKBdM=", "narHash": "sha256-67wpcT7Nrp3g9o7si4ibe2WJ1eUBGCi2r73RA/k9SYA=",
"rev": "1446585272acf9aa15cee990054663738c6c3417", "rev": "c38133fd6cce670a76472221daae4ba3b3a7fc5b",
"type": "tarball", "type": "tarball",
"url": "https://git.ny4.dev/api/v1/repos/nyancat/ip-checker/archive/1446585272acf9aa15cee990054663738c6c3417.tar.gz" "url": "https://git.ny4.dev/api/v1/repos/nyancat/ip-checker/archive/c38133fd6cce670a76472221daae4ba3b3a7fc5b.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -211,11 +238,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1730739295, "lastModified": 1731941836,
"narHash": "sha256-aYeJ/P/9AuK6Kee63ZdsmDjEwhnksF+gIv/OyGtlBJE=", "narHash": "sha256-zpmAzrvK8KdssBSwiIwwRxaUJ77oWORbW0XFvgCFpTE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "lanzaboote", "repo": "lanzaboote",
"rev": "cef39a78679c266300874e7a7000b4da066228d4", "rev": "2f48272f34174fd2a5ab3df4d8a46919247be879",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -227,11 +254,11 @@
"neovim": { "neovim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1726316254, "lastModified": 1731770937,
"narHash": "sha256-82snaLYq0U2Wt5Vy+gFUmOTrjKEHOhm0uqaT6ycLKXc=", "narHash": "sha256-jgUiofb5rQ3OpmqB5rcfRKI/3f9BzyKeUs/TALMaEXc=",
"rev": "2c3b306495070c8b20a1f28f9f7143917bbff9e6", "rev": "b41d552d7a9da39d5dbb24a0007bb9f721879e68",
"type": "tarball", "type": "tarball",
"url": "https://git.ny4.dev/api/v1/repos/nyancat/nvim/archive/2c3b306495070c8b20a1f28f9f7143917bbff9e6.tar.gz" "url": "https://git.ny4.dev/api/v1/repos/nyancat/nvim/archive/b41d552d7a9da39d5dbb24a0007bb9f721879e68.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -245,11 +272,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1729742964, "lastModified": 1731952509,
"narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=", "narHash": "sha256-p4gB3Rhw8R6Ak4eMl8pqjCPOLCZRqaehZxdZ/mbFClM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-github-actions", "repo": "nix-github-actions",
"rev": "e04df33f62cdcf93d73e9a04142464753a16db67", "rev": "7b5f051df789b6b20d259924d349a9ba3319b226",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -260,11 +287,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1731403644, "lastModified": 1731797098,
"narHash": "sha256-T9V7CTucjRZ4Qc6pUEV/kpgNGzQbHWfGcfK6JJLfUeI=", "narHash": "sha256-UhWmEZhwJZmVZ1jfHZFzCg+ZLO9Tb/v3Y6LC0UNyeTo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "f6581f1c3b137086e42a08a906bdada63045f991", "rev": "672ac2ac86f7dff2f6f3406405bddecf960e0db6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -275,11 +302,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1731682420, "lastModified": 1732263750,
"narHash": "sha256-sfhttUzz6O9YdpoEMJCCw6jjYQ2EVBjM/owcXHoMk/4=", "narHash": "sha256-bp7dvtHASIEYjaDhW9rgBm+bAYpB+pjMyV4+ipGJBoY=",
"owner": "Guanran928", "owner": "Guanran928",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a5443503ff2c9f1491bda1298f35dae196773ccc", "rev": "ca9b66d69e2c616acd39d422db7a312ec4552e98",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -304,11 +331,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731363552, "lastModified": 1732021966,
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", "narHash": "sha256-mnTbjpdqF0luOkou8ZFi2asa1N3AA2CchR/RqCNmsGE=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", "rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -334,6 +361,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"chicken-box": "chicken-box",
"colmena": "colmena", "colmena": "colmena",
"crane": "crane", "crane": "crane",
"disko": "disko", "disko": "disko",
@ -363,11 +391,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731637922, "lastModified": 1732242723,
"narHash": "sha256-6iuzRINXyPX4DfUQZIGafpJnzjFXjVRYMymB10/jFFY=", "narHash": "sha256-NWI8csIK0ujFlFuEXKnoc+7hWoCiEtINK9r48LUUMeU=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "db10c66da18e816030b884388545add8cf096647", "rev": "a229311fcb45b88a95fdfa5cecd8349c809a272a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -380,17 +408,14 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
],
"nixpkgs-stable": [
"nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1731364708, "lastModified": 1732186149,
"narHash": "sha256-HC0anOL+KmUQ2hdRl0AtunbAckasxrkn4VLmxbW/WaA=", "narHash": "sha256-N9JGWe/T8BC0Tss2Cv30plvZUYoiRmykP7ZdY2on2b0=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "4c91d52db103e757fc25b58998b0576ae702d659", "rev": "53c853fb1a7e4f25f68805ee25c83d5de18dc699",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -421,11 +446,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1730321837, "lastModified": 1732187120,
"narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=", "narHash": "sha256-XdW2mYXvPHYtZ8oQqO3tRYtxx7kI0Hs3NU64IwAtD68=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "746901bb8dba96d154b66492a29f5db0693dbfcc", "rev": "37f8f47cb618eddee0c0dd31a582b1cd3013c7f6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -42,7 +42,6 @@
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs";
}; };
systems = { systems = {
url = "github:nix-systems/default"; url = "github:nix-systems/default";
@ -64,6 +63,13 @@
inputs.systems.follows = "systems"; inputs.systems.follows = "systems";
inputs.treefmt-nix.follows = "treefmt-nix"; inputs.treefmt-nix.follows = "treefmt-nix";
}; };
chicken-box = {
url = "https://git.ny4.dev/nyancat/chicken-box/archive/master.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
inputs.systems.follows = "systems";
inputs.treefmt-nix.follows = "treefmt-nix";
};
### De-dupe flake dependencies ### De-dupe flake dependencies
crane = { crane = {

View file

@ -17,8 +17,8 @@
allowUnfreePredicate = pkg: lib.elem (lib.getName pkg) [ ]; allowUnfreePredicate = pkg: lib.elem (lib.getName pkg) [ ];
permittedInsecurePackages = [ permittedInsecurePackages = [
"cinny-4.2.2" "cinny-4.2.3"
"cinny-unwrapped-4.2.2" "cinny-unwrapped-4.2.3"
]; ];
}; };
} }

View file

@ -153,6 +153,7 @@
enableDefaultPackages = false; enableDefaultPackages = false;
packages = with pkgs; [ packages = with pkgs; [
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }) (nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
(ibm-plex.override { families = [ "mono" ]; })
(inter.overrideAttrs { (inter.overrideAttrs {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
@ -160,13 +161,6 @@
runHook postInstall runHook postInstall
''; '';
}) })
(ibm-plex.overrideAttrs {
installPhase = ''
runHook preInstall
install -Dm644 IBM-Plex-Mono/IBMPlexMono-*.otf -t $out/share/fonts/opentype
runHook postInstall
'';
})
(source-serif.overrideAttrs { (source-serif.overrideAttrs {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall

View file

@ -27,6 +27,9 @@
networking.hostName = "pek0"; networking.hostName = "pek0";
system.stateVersion = "24.05"; system.stateVersion = "24.05";
# error: 1 dependencies of derivation '/nix/store/42rdjw63xw8asrfbczy0skrx8485n75i-linux-6.12-modules.drv' failed to build
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_6_11;
######## Secrets ######## Secrets
sops.secrets = lib.mapAttrs (_name: value: value // { sopsFile = ./secrets.yaml; }) { sops.secrets = lib.mapAttrs (_name: value: value // { sopsFile = ./secrets.yaml; }) {
"hashed-passwd" = { "hashed-passwd" = {

View file

@ -4,6 +4,7 @@
./anti-feature.nix ./anti-feature.nix
./services/telegram-bot/danbooru_img_bot.nix ./services/telegram-bot/danbooru_img_bot.nix
./services/chicken-box.nix
./services/ip-checker.nix ./services/ip-checker.nix
./services/redlib.nix ./services/redlib.nix

View file

@ -0,0 +1,18 @@
{
lib,
inputs,
pkgs,
...
}:
let
pkgs' = inputs.chicken-box.packages.${pkgs.stdenv.hostPlatform.system};
in
{
services.caddy.settings.apps.http.servers.srv0.routes = lib.singleton {
match = lib.singleton { host = [ "cxk.ny4.dev" ]; };
handle = lib.singleton {
handler = "file_server";
root = pkgs'.default;
};
};
}

View file

@ -232,6 +232,15 @@ resource "cloudflare_record" "jellyfin" {
zone_id = local.cloudflare_zone_id zone_id = local.cloudflare_zone_id
} }
resource "cloudflare_record" "cxk" {
content = "sin0.ny4.dev"
name = "cxk"
proxied = true
ttl = 1
type = "CNAME"
zone_id = local.cloudflare_zone_id
}
resource "cloudflare_record" "terraform_managed_resource_856ec5e567960bf847db2e814f18168b" { resource "cloudflare_record" "terraform_managed_resource_856ec5e567960bf847db2e814f18168b" {
content = "google-site-verification=wBL5EFnbnt9lt2j_BtcwlXTaBFlFT563mC1MkCscnR8" content = "google-site-verification=wBL5EFnbnt9lt2j_BtcwlXTaBFlFT563mC1MkCscnR8"
name = "ny4.dev" name = "ny4.dev"

File diff suppressed because one or more lines are too long