Use harmonia instead of attic for binary cache
Some checks failed
CI / Check, build and cache Nix flake (push) Failing after 47s
Some checks failed
CI / Check, build and cache Nix flake (push) Failing after 47s
This commit is contained in:
@@ -31,6 +31,13 @@ in
|
||||
{
|
||||
config = mkMerge [
|
||||
{
|
||||
fileSystems = {
|
||||
"/var/lib/harmonia" = {
|
||||
device = "/mnt/atticd/harmonia";
|
||||
options = [ "bind" ];
|
||||
};
|
||||
};
|
||||
|
||||
my = {
|
||||
deploy.enable = false;
|
||||
server.enable = true;
|
||||
@@ -48,6 +55,7 @@ in
|
||||
group = config.my.user.config.group;
|
||||
};
|
||||
"object/atticd.env" = {};
|
||||
"nix-cache.key" = {};
|
||||
"object/hedgedoc.env" = {};
|
||||
"object/wastebin.env" = {};
|
||||
};
|
||||
@@ -68,14 +76,26 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
users = with lib.my.c.ids; let inherit (config.services.atticd) user group; in {
|
||||
users."${user}" = {
|
||||
isSystemUser = true;
|
||||
uid = uids.atticd;
|
||||
group = group;
|
||||
};
|
||||
groups."${user}".gid = gids.atticd;
|
||||
};
|
||||
users = with lib.my.c.ids; mkMerge [
|
||||
(let inherit (config.services.atticd) user group; in {
|
||||
users."${user}" = {
|
||||
isSystemUser = true;
|
||||
uid = uids.atticd;
|
||||
group = group;
|
||||
};
|
||||
groups."${user}".gid = gids.atticd;
|
||||
})
|
||||
{
|
||||
users = {
|
||||
harmonia = {
|
||||
shell = pkgs.bashInteractive;
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
lib.my.c.sshKeyFiles.harmonia
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
systemd = {
|
||||
network.networks."80-container-host0" = networkdAssignment "host0" assignments.internal;
|
||||
@@ -93,7 +113,9 @@ in
|
||||
MINIO_BROWSER_REDIRECT_URL = "https://minio.nul.ie";
|
||||
};
|
||||
};
|
||||
|
||||
sharry = awaitPostgres;
|
||||
|
||||
atticd = mkMerge [
|
||||
awaitPostgres
|
||||
{
|
||||
@@ -104,6 +126,15 @@ in
|
||||
};
|
||||
}
|
||||
];
|
||||
harmonia = {
|
||||
environment.NIX_REMOTE = "/var/lib/harmonia";
|
||||
preStart = ''
|
||||
${config.nix.package}/bin/nix store ping
|
||||
'';
|
||||
serviceConfig = {
|
||||
StateDirectory = "harmonia";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -203,6 +234,14 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
harmonia = {
|
||||
enable = true;
|
||||
signKeyPath = config.age.secrets."nix-cache.key".path;
|
||||
settings = {
|
||||
priority = 30;
|
||||
};
|
||||
};
|
||||
|
||||
hedgedoc = {
|
||||
enable = true;
|
||||
environmentFile = config.age.secrets."object/hedgedoc.env".path;
|
||||
|
Reference in New Issue
Block a user