Fix container allModules import
Some checks failed
Check Flake / check-flake (push) Failing after 4s

This commit is contained in:
Zuckerberg 2023-10-18 21:11:36 -06:00
parent 5cae715fe6
commit 8623b39dc2
2 changed files with 5 additions and 11 deletions

View File

@ -10,10 +10,6 @@ jobs:
check-flake:
runs-on: nixos
steps:
- name: Install dependencies
run: nix profile install nixpkgs#nodejs-18_x
- name: Checkout the repository
uses: actions/checkout@v3
with:

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, lib, allModules, ... }:
# Gitea Actions Runner. Starts 'host' runner that runs directly on the host inside of a nixos container
# This is useful for providing a real Nix/OS builder to gitea.
@ -12,7 +12,7 @@ let
thisMachineIsARunner = builtins.elem config.networking.hostName runners;
in
{
config = lib.mkIf thisMachineIsARunner {
config = lib.mkIf (thisMachineIsARunner && !config.boot.isContainer) {
containers.gitea-runner = {
ephemeral = true;
autoStart = true;
@ -35,15 +35,15 @@ in
];
config = {
# TODO: figure out why importing 'allModules' fails
# imports = allModules;
imports = allModules;
# speeds up evaluation
nixpkgs.pkgs = pkgs;
environment.systemPackages = with pkgs; [
nodejs
git
# Gitea Actions rely heavily on node. Include it because it would be installed anyway.
nodejs
];
services.gitea-actions-runner.instances.inst = {
@ -59,8 +59,6 @@ in
virtualisation.podman.enable = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
system.stateVersion = "23.05";
};
};