Compare commits

...
Sign in to create a new pull request.

10 commits

Author SHA1 Message Date
6816d1c663 doc: better identation
All checks were successful
Build and Push docker image / buildAndPush (nix) (push) Successful in 3m41s
Build and Push docker image / buildAndPush (nix-host) (push) Successful in 11s
2026-09-08 16:53:13 +02:00
a5703817fe feat: nix-host updates
All checks were successful
Build and Push docker image / buildAndPush (nix-host) (push) Successful in 8s
Build and Push docker image / buildAndPush (nix) (push) Successful in 36s
- set up minimal fhs
- use root, things work with it
- add cache note
- correct ordering of `PATH`
2026-08-22 20:25:22 +02:00
0c26f377c7 chore: remove debug output from build.yml
All checks were successful
Build and Push docker image / buildAndPush (nix) (push) Successful in 52s
Build and Push docker image / buildAndPush (nix-host) (push) Successful in 5s
2026-08-22 19:24:10 +02:00
c84bf9b883 fix: rename the input nix to inputs.nix
Some checks failed
Build and Push docker image / buildAndPush (nix-host) (push) Failing after 23s
Build and Push docker image / buildAndPush (nix) (push) Successful in 1m4s
2026-08-22 18:52:57 +02:00
c576585009 feat: add nix as a package to flake.nix so the matrix works
Some checks failed
Build and Push docker image / buildAndPush (nix) (push) Failing after 3s
Build and Push docker image / buildAndPush (nix-host) (push) Failing after 21s
2026-08-22 18:48:55 +02:00
23f836e2c8 fix: nix build .nix is woefully different from nix build .#nix
Some checks failed
Build and Push docker image / buildAndPush (nix) (push) Failing after 3s
Build and Push docker image / buildAndPush (nix-host) (push) Failing after 25s
2026-08-22 18:47:03 +02:00
39e45b1e93 so what is in .nix?
Some checks failed
Build and Push docker image / buildAndPush (nix) (push) Failing after 31s
Build and Push docker image / buildAndPush (nix-host) (push) Failing after 3s
2026-08-22 18:46:07 +02:00
8b0f6d3d2d add .nix
Some checks failed
Build and Push docker image / buildAndPush (nix) (push) Failing after 40s
Build and Push docker image / buildAndPush (nix-host) (push) Failing after 3s
2026-08-22 18:40:02 +02:00
a555801be6 run this as well
Some checks failed
Build and Push docker image / buildAndPush (nix) (push) Failing after 3s
Build and Push docker image / buildAndPush (nix-host) (push) Failing after 3s
2026-08-22 18:39:01 +02:00
58a88f0dce testing 2026-08-22 18:37:58 +02:00
2 changed files with 19 additions and 12 deletions

View file

@ -5,6 +5,7 @@ on:
push:
branches:
- main
- "*"
jobs:
buildAndPush:
@ -16,7 +17,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Nix build
run: nix build --extra-experimental-features "flakes nix-command" .${{matrix.containers}}
run: |
nix build --extra-experimental-features "flakes nix-command" .#${{matrix.containers}}
- name: Setup skopeo
run: curl -o /etc/containers/policy.json --create-dirs https://raw.githubusercontent.com/containers/skopeo/refs/heads/main/default-policy.json
- name: Push Image

View file

@ -8,7 +8,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, nix, self, ... }@inputs:
outputs = { nixpkgs, ... }@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
@ -17,8 +17,9 @@
{
packages.${system} = rec {
default = nix-with-tools;
nix = nix-with-tools;
minimal-nix = import (nix + "/docker.nix") {
minimal-nix = import (inputs.nix + "/docker.nix") {
inherit pkgs;
extraPkgs = [ pkgs.nodejs pkgs.busybox ];
@ -30,7 +31,7 @@
"org.opencontainers.image.description" = "Nix container image with nodejs";
};
};
nix-with-tools = import (nix + "/docker.nix") {
nix-with-tools = import (inputs.nix + "/docker.nix") {
inherit pkgs;
extraPkgs = [
pkgs.nodejs
@ -63,25 +64,29 @@
tag = "latest";
runAsRoot = ''
${dockerTools.shadowSetup}
useradd -m -s /run/current-system/sw/bin/bash docker-ci
mkdir /etc
# ${pkgs.shadow}/bin/useradd -m -s /run/current-system/sw/bin/bash docker-ci
chmod 777 /tmp
mkdir -p /var/tmp
chmod 777 /var/tmp
'';
# volumes to mount
# -v /nix:/nix:ro
# -v /run/current-system:/run/current-system
# -v /var/cache/docker-ci:/.cache
# -v ${pkgs.buildEnv ... }:/run/container-env
config = {
Entrypoint = [ "/run/current-system/sw/bin/bash" ];
User = "1000:1000";
# User = "1000:1000";
Env = [
"NIX_REMOTE=daemon"
"PATH=${lib.concatStringsSep ":" [
"/run/current-system/sw/bin"
"/run/current-system/sw/sbin"
"/run/container-env/bin"
# "/run/container-env/sbin" # This might not be needed
]}"
"/run/container-env/bin"
"/run/current-system/sw/bin"
"/run/current-system/sw/sbin"
]}"
"SSL_CERT_FILE=/run/current-system/etc/ssl/certs/ca-bundle.crt"
"GIT_SSL_CAINFO=/run/current-system/etc/ssl/certs/ca-bundle.crt"