Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
ef247cb3dd | |||
cad04680c4 | |||
a2d176a4fc | |||
1f813395ee | |||
0d5bce2a4f | |||
0c2f7cd1b2 | |||
b80b31d3c3 | |||
caacb4b7a7 | |||
25dba0ee19 | |||
4bed47ae43 | |||
7c4d2d53f2 |
@ -15,5 +15,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- run: attic -V
|
||||||
|
|
||||||
|
- name: Setup Attic Cache
|
||||||
|
uses: https://git.neet.dev/zuckerberg/attic-action@v0.2.5
|
||||||
|
with:
|
||||||
|
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
|
||||||
|
cache: ${{ secrets.ATTIC_CACHE }}
|
||||||
|
token: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
|
||||||
- name: Check Flake
|
- name: Check Flake
|
||||||
run: nix flake check --all-systems --print-build-logs --log-format raw --show-trace
|
run: nix flake check --all-systems --print-build-logs --log-format raw --show-trace
|
@ -6,11 +6,11 @@
|
|||||||
substituters = [
|
substituters = [
|
||||||
"https://cache.nixos.org/"
|
"https://cache.nixos.org/"
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"http://s0.koi-bebop.ts.net:5000"
|
"http://s0.koi-bebop.ts.net:28338/nixos"
|
||||||
];
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
"s0.koi-bebop.ts.net:OjbzD86YjyJZpCp9RWaQKANaflcpKhtzBMNP8I2aPUU="
|
"nixos:IDhKojUaMz+UIiri1/DQk9EpqDokih8dwxmp41uJnls="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
lf
|
lf
|
||||||
gnumake
|
gnumake
|
||||||
tree
|
tree
|
||||||
|
attic
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
40
common/server/atticd.nix
Normal file
40
common/server/atticd.nix
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.atticd;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.atticd = {
|
||||||
|
credentialsFile = "/run/agenix/atticd-credentials";
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
listen = "[::]:28338";
|
||||||
|
|
||||||
|
# Speed things up
|
||||||
|
require-proof-of-possession = false;
|
||||||
|
|
||||||
|
chunking = {
|
||||||
|
# Disable chunking for performance (I have plenty of space)
|
||||||
|
nar-size-threshold = 0;
|
||||||
|
|
||||||
|
# Chunking is disabled due to poor performance so these values don't matter but are required anyway.
|
||||||
|
# One day, when I move away from ZFS maybe this will perform well enough.
|
||||||
|
# nar-size-threshold = 64 * 1024; # 64 KiB
|
||||||
|
min-size = 16 * 1024; # 16 KiB
|
||||||
|
avg-size = 64 * 1024; # 64 KiB
|
||||||
|
max-size = 256 * 1024; # 256 KiB
|
||||||
|
};
|
||||||
|
|
||||||
|
# Disable compression for performance (I have plenty of space)
|
||||||
|
compression.type = "none";
|
||||||
|
|
||||||
|
garbage-collection = {
|
||||||
|
default-retention-period = "6 months";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
age.secrets.atticd-credentials.file = ../../secrets/atticd-credentials.age;
|
||||||
|
};
|
||||||
|
}
|
@ -22,5 +22,6 @@
|
|||||||
./dashy.nix
|
./dashy.nix
|
||||||
./librechat.nix
|
./librechat.nix
|
||||||
./actualbudget.nix
|
./actualbudget.nix
|
||||||
|
./atticd.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -116,6 +116,7 @@ in
|
|||||||
git
|
git
|
||||||
# Gitea Actions rely heavily on node. Include it because it would be installed anyway.
|
# Gitea Actions rely heavily on node. Include it because it would be installed anyway.
|
||||||
nodejs
|
nodejs
|
||||||
|
attic
|
||||||
];
|
];
|
||||||
|
|
||||||
# To allow building on the host, must override the the service's config so it doesn't use a dynamic user
|
# To allow building on the host, must override the the service's config so it doesn't use a dynamic user
|
||||||
|
52
flake.lock
generated
52
flake.lock
generated
@ -25,6 +25,36 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"attic": {
|
||||||
|
"inputs": {
|
||||||
|
"crane": "crane",
|
||||||
|
"flake-compat": [
|
||||||
|
"flake-compat"
|
||||||
|
],
|
||||||
|
"flake-utils": [
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nixpkgs-stable": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717279440,
|
||||||
|
"narHash": "sha256-kH04ReTjxOpQumgWnqy40vvQLSnLGxWP6RF3nq5Esrk=",
|
||||||
|
"owner": "zhaofengli",
|
||||||
|
"repo": "attic",
|
||||||
|
"rev": "717cc95983cdc357bc347d70be20ced21f935843",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zhaofengli",
|
||||||
|
"repo": "attic",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"blobs": {
|
"blobs": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -41,6 +71,27 @@
|
|||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"crane": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"attic",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717025063,
|
||||||
|
"narHash": "sha256-dIubLa56W9sNNz0e8jGxrX3CAkPXsq7snuFA/Ie6dn8=",
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"rev": "480dff0be03dac0e51a8dfc26e882b0d123a450e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"dailybuild_modules": {
|
"dailybuild_modules": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
@ -281,6 +332,7 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
"attic": "attic",
|
||||||
"dailybuild_modules": "dailybuild_modules",
|
"dailybuild_modules": "dailybuild_modules",
|
||||||
"deploy-rs": "deploy-rs",
|
"deploy-rs": "deploy-rs",
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
|
12
flake.nix
12
flake.nix
@ -75,6 +75,17 @@
|
|||||||
url = "github:Mic92/nix-index-database";
|
url = "github:Mic92/nix-index-database";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Attic
|
||||||
|
attic = {
|
||||||
|
url = "github:zhaofengli/attic";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
nixpkgs-stable.follows = "nixpkgs";
|
||||||
|
flake-utils.follows = "flake-utils";
|
||||||
|
flake-compat.follows = "flake-compat";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... }@inputs:
|
outputs = { self, nixpkgs, ... }@inputs:
|
||||||
@ -94,6 +105,7 @@
|
|||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
dailybuild_modules.nixosModule
|
dailybuild_modules.nixosModule
|
||||||
nix-index-database.nixosModules.nix-index
|
nix-index-database.nixosModules.nix-index
|
||||||
|
attic.nixosModules.atticd
|
||||||
self.nixosModules.kernel-modules
|
self.nixosModules.kernel-modules
|
||||||
({ lib, ... }: {
|
({ lib, ... }: {
|
||||||
config = {
|
config = {
|
||||||
|
@ -10,23 +10,6 @@
|
|||||||
|
|
||||||
# system.autoUpgrade.enable = true;
|
# system.autoUpgrade.enable = true;
|
||||||
|
|
||||||
nix.gc.automatic = lib.mkForce false; # allow the nix store to serve as a build cache
|
|
||||||
|
|
||||||
# binary cache
|
|
||||||
services.nix-serve = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
secretKeyFile = "/run/agenix/binary-cache-private-key";
|
|
||||||
};
|
|
||||||
age.secrets.binary-cache-private-key.file = ../../../secrets/binary-cache-private-key.age;
|
|
||||||
users.users.cache-push = {
|
|
||||||
isNormalUser = true;
|
|
||||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINpUZFFL9BpBVqeeU63sFPhR9ewuhEZerTCDIGW1NPSB" ];
|
|
||||||
};
|
|
||||||
nix.settings = {
|
|
||||||
trusted-users = [ "cache-push" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.iperf3.enable = true;
|
services.iperf3.enable = true;
|
||||||
services.iperf3.openFirewall = true;
|
services.iperf3.openFirewall = true;
|
||||||
|
|
||||||
@ -235,4 +218,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" "armv7l-linux" ];
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" "armv7l-linux" ];
|
||||||
|
|
||||||
|
services.atticd.enable = true;
|
||||||
}
|
}
|
||||||
|
8
secrets/atticd-credentials.age
Normal file
8
secrets/atticd-credentials.age
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 hPp1nw tMy5kLAcQD62yAfEVJ4LQZjs0kkEEQOfM4HN9yj3hBY
|
||||||
|
JvlklGTxxfAZbP+alm3nxLxqhmcu2mTKwRU5WaapL9w
|
||||||
|
-> ssh-ed25519 w3nu8g ZGzufldXq7kmIpqFecbkpDxiykWZ207k0+09I2dmxEM
|
||||||
|
SK25e5HBe4b5reGXXfCjIFbFGzfu32RFjY++/yteRVc
|
||||||
|
--- xZOe1syYAcVRDhiNRv+CsfFgoQbiANA6vNCon+5NExc
|
||||||
|
-·ñ1Å,C-.M§Áè?ÐêóµµàY|u+
|
||||||
|
‹ ³Ø<C2B3>÷ŽæÒ¡ôm†Œûäfß]=érøÜüÎAg¤€æSú:Ð8•S¦LiœùªsêÁâ9JŠð<>¸ÏæñÄÐÃ<ûAz¹[ý§xï<78>:‡'U*<2A>wÀ™D/…±VpM~!õ,* ¿”µ¡øk¥Ö´ßEíîïh› {¢p$¾R`ÿ”
|
Binary file not shown.
Binary file not shown.
@ -20,10 +20,7 @@ with roles;
|
|||||||
"robots-email-pw.age".publicKeys = gitea;
|
"robots-email-pw.age".publicKeys = gitea;
|
||||||
|
|
||||||
# nix binary cache
|
# nix binary cache
|
||||||
# public key: s0.koi-bebop.ts.net:OjbzD86YjyJZpCp9RWaQKANaflcpKhtzBMNP8I2aPUU=
|
"atticd-credentials.age".publicKeys = binary-cache;
|
||||||
"binary-cache-private-key.age".publicKeys = binary-cache;
|
|
||||||
# public key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINpUZFFL9BpBVqeeU63sFPhR9ewuhEZerTCDIGW1NPSB
|
|
||||||
"binary-cache-push-sshkey.age".publicKeys = nobody; # this value is directly given to gitea
|
|
||||||
|
|
||||||
# vpn
|
# vpn
|
||||||
"iodine.age".publicKeys = iodine;
|
"iodine.age".publicKeys = iodine;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user