Compare commits

...

2 commits

2 changed files with 27 additions and 11 deletions

8
flake.lock generated
View file

@ -57,11 +57,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737728406, "lastModified": 1738146869,
"narHash": "sha256-m0Fn7+PJHKaARelpu39oe1THO2CbGTpDTj9W4rtXAJs=", "narHash": "sha256-AzAz5+EgiF9CTXspgIHCna4XwA4RvQJq2bldGI/G8Cg=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "70b5e931bacc4a59cdef5b5ea26d3f968c52b332", "rev": "edcd0a4ddf59dc9cbacf539e019da0c65896be5e",
"revCount": 44, "revCount": 50,
"type": "git", "type": "git",
"url": "https://git.uku3lig.net/uku/camasca" "url": "https://git.uku3lig.net/uku/camasca"
}, },

View file

@ -1,13 +1,29 @@
{ camasca, ... }:
{ {
imports = [ camasca.nixosModules.shlink ];
cfTunnels."uku.moe" = "http://localhost:8081"; cfTunnels."uku.moe" = "http://localhost:8081";
virtualisation.oci-containers.containers.shlink = { services = {
image = "shlinkio/shlink:stable"; shlink = {
ports = [ "8081:8080" ]; enable = true;
volumes = [ "/data/shlink/database.sqlite:/etc/shlink/data/database.sqlite" ]; environment = {
environment = { PORT = "8081";
DEFAULT_DOMAIN = "uku.moe"; DEFAULT_DOMAIN = "uku.moe";
IS_HTTPS_ENABLED = "true"; IS_HTTPS_ENABLED = "true";
DB_DRIVER = "postgres";
DB_UNIX_SOCKET = "/var/run/postgresql";
};
};
postgresql = {
ensureDatabases = [ "shlink" ];
ensureUsers = [
{
name = "shlink";
ensureDBOwnership = true;
}
];
}; };
}; };
} }