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

View file

@ -42,7 +42,6 @@
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs";
};
systems = {
url = "github:nix-systems/default";
@ -64,6 +63,13 @@
inputs.systems.follows = "systems";
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
crane = {

View file

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

View file

@ -153,6 +153,7 @@
enableDefaultPackages = false;
packages = with pkgs; [
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
(ibm-plex.override { families = [ "mono" ]; })
(inter.overrideAttrs {
installPhase = ''
runHook preInstall
@ -160,13 +161,6 @@
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 {
installPhase = ''
runHook preInstall

View file

@ -27,6 +27,9 @@
networking.hostName = "pek0";
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
sops.secrets = lib.mapAttrs (_name: value: value // { sopsFile = ./secrets.yaml; }) {
"hashed-passwd" = {

View file

@ -4,6 +4,7 @@
./anti-feature.nix
./services/telegram-bot/danbooru_img_bot.nix
./services/chicken-box.nix
./services/ip-checker.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
}
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" {
content = "google-site-verification=wBL5EFnbnt9lt2j_BtcwlXTaBFlFT563mC1MkCscnR8"
name = "ny4.dev"

File diff suppressed because one or more lines are too long