diff options
author | Alex Auvolat <alex@adnab.me> | 2022-08-24 15:42:47 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-08-24 15:42:47 +0200 |
commit | 2e8923b383eb06c53261eee8e5c442b857fb67e4 (patch) | |
tree | 0ad148f75f7b54dfed2dbac8f43f6df9badc502a /app/drone-ci/build/machine-config.nix | |
parent | 9848f3090f77363a2fda0f9fa673ebcf1fb8228c (diff) | |
download | nixcfg-2e8923b383eb06c53261eee8e5c442b857fb67e4.tar.gz nixcfg-2e8923b383eb06c53261eee8e5c442b857fb67e4.zip |
Move app files into cluster subdirectories; add prod garage
Diffstat (limited to 'app/drone-ci/build/machine-config.nix')
-rw-r--r-- | app/drone-ci/build/machine-config.nix | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/app/drone-ci/build/machine-config.nix b/app/drone-ci/build/machine-config.nix deleted file mode 100644 index 73d3f09..0000000 --- a/app/drone-ci/build/machine-config.nix +++ /dev/null @@ -1,89 +0,0 @@ -{ pkgs, lib, ... }: - -with lib; - -{ - imports = [ - <nixpkgs/nixos/modules/profiles/qemu-guest.nix> - ]; - - config = { - fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; - fsType = "ext4"; - autoResize = true; - }; - - fileSystems."/secrets" = { - device = "/dev/disk/by-label/QEMU\\x20VVFAT"; - fsType = "vfat"; - }; - - boot.growPartition = true; - boot.kernelParams = [ "console=ttyS0" ]; - boot.loader.grub.device = "/dev/vda"; - boot.loader.timeout = 0; - - environment.systemPackages = with pkgs; [ - iotop - jnettop - htop - ]; - - users.extraUsers.root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJpaBZdYxHqMxhv2RExAOa7nkKhPBOHupMP3mYaZ73w9 lx@lindy" - ]; - services.openssh.enable = true; - services.openssh.permitRootLogin = "prohibit-password"; - networking.firewall = { - enable = true; - allowedTCPPorts = [ 22 ]; - }; - - virtualisation.docker.enable = true; - virtualisation.oci-containers.backend = "docker"; - systemd.services.drone_nix_setup = { - enable = true; - path = [ - pkgs.docker - ]; - script = '' - docker run --rm -v /var/lib/drone/nix:/mnt nixpkgs/nix:nixos-21.05 cp -r /nix/{store,var} /mnt/ - ''; - wantedBy = [ "multi-user.target" ]; - }; - virtualisation.oci-containers.containers = { - drone_runner = { - image = "drone/drone-runner-docker:1.4.0"; - volumes = [ - "/var/lib/drone/nix:/nix" - "/var/run/docker.sock:/var/run/docker.sock" - ]; - environment = { - DRONE_RPC_PROTO = "https"; - DRONE_RPC_HOST = "drone.deuxfleurs.fr"; - DRONE_RUNNER_CAPACITY = "1"; - DRONE_DEBUG = "true"; - DRONE_LOGS_TRACE = "true"; - DRONE_RPC_DUMP_HTTP = "true"; - DRONE_RPC_DUMP_HTTP_BODY = "true"; - DRONE_RUNNER_LABELS = "nix:1"; - }; - environmentFiles = [ - "/secrets/secret_env" - ]; - }; - drone_gc = { - image = "drone/gc:latest"; - volumes = [ - "/var/run/docker.sock:/var/run/docker.sock" - ]; - environment = { - GC_DEBUG = "true"; - GC_CACHE = "10gb"; - GC_INTERVAL = "10m"; - }; - }; - }; - }; -} |