mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-16 01:25:09 +01:00
move
This commit is contained in:
parent
f456a5c626
commit
0949cba7be
92 changed files with 19 additions and 58 deletions
43
nix/apps/does-it-build/default.nix
Normal file
43
nix/apps/does-it-build/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ pkgs, lib, does-it-build, my-projects-versions, ... }:
|
||||
let
|
||||
does-it-build-base = does-it-build { inherit pkgs; };
|
||||
does-it-build-with-commit = does-it-build-base.overrideAttrs (finalAttrs: previousAttrs: {
|
||||
DOES_IT_BUILD_OVERRIDE_VERSION = my-projects-versions.does-it-build;
|
||||
});
|
||||
in
|
||||
{
|
||||
systemd.services.does-it-build = {
|
||||
description = "https://github.com/Noratrieb/does-it-build";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
path = with pkgs; [ rustup gcc bash ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "does-it-build";
|
||||
Group = "does-it-build";
|
||||
ExecStart = "${lib.getExe' (does-it-build-with-commit) "does-it-build" }";
|
||||
Environment = "DB_PATH=/var/lib/does-it-build/db.sqlite";
|
||||
};
|
||||
};
|
||||
|
||||
services.custom-backup.jobs = [
|
||||
{
|
||||
app = "does-it-build";
|
||||
file = "/var/lib/does-it-build/db.sqlite";
|
||||
}
|
||||
];
|
||||
|
||||
users.users.does-it-build = {
|
||||
isSystemUser = true;
|
||||
home = "/var/lib/does-it-build";
|
||||
description = "does-it-build builder account";
|
||||
group = "does-it-build";
|
||||
};
|
||||
users.groups.does-it-build = { };
|
||||
|
||||
# TODO: i feel like there's gotta be a better way to do the chown..
|
||||
system.activationScripts.makeDoesItBuildDir = lib.stringAfter [ "var" ] ''
|
||||
mkdir -p /var/lib/does-it-build/
|
||||
chown does-it-build:does-it-build /var/lib/does-it-build/
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue