add CI images to repo
This commit is contained in:
parent
abce966b76
commit
a2cb2e03a4
12 changed files with 76 additions and 54 deletions
12
.forgejo/workflows/check.yml
Normal file
12
.forgejo/workflows/check.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: nix-upstream-latest
|
||||||
|
steps:
|
||||||
|
- run: echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
||||||
|
- run: nix-env -i nodejs
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: nix flake check
|
||||||
|
run: nix flake check
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
name: build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: nix-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
package_name: ["nvim"]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: DeterminateSystems/nix-installer-action@main
|
|
||||||
- name: check
|
|
||||||
run: nix flake check
|
|
||||||
- name: Run `nix bundle`
|
|
||||||
if: github.ref == 'refs/heads/main'
|
|
||||||
id: build
|
|
||||||
run: |
|
|
||||||
nix bundle \
|
|
||||||
-o ${{ matrix.package_name }}.AppImage \
|
|
||||||
--bundler github:ralismark/nix-appimage \
|
|
||||||
--extra-experimental-features nix-command \
|
|
||||||
--extra-experimental-features flakes .#${{ matrix.package_name }}
|
|
||||||
echo "Done building AppImage for ${{ matrix.package_name }}"
|
|
||||||
- name: Upload bundle to release
|
|
||||||
if: github.ref == 'refs/heads/main'
|
|
||||||
uses: https://data.forgejo.org/forgejo/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: "${{ matrix.package_name }}.AppImage"
|
|
||||||
name: "${{ matrix.package_name }}-x86_64-linux.AppImage"
|
|
||||||
23
.forgejo/workflows/nvim-bundle.yml
Normal file
23
.forgejo/workflows/nvim-bundle.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'pkgs/nvim/**'
|
||||||
|
jobs:
|
||||||
|
nvim-bundle:
|
||||||
|
runs-on: nix-upstream-latest
|
||||||
|
needs:
|
||||||
|
- check
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
steps:
|
||||||
|
- run: echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
||||||
|
- run: nix-env -i nodejs
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Run `nix bundle`
|
||||||
|
run: |
|
||||||
|
path="${{ matrix.package_name }}.AppImage"
|
||||||
|
nix bundle --bundler github:ralismark/nix-appimage \
|
||||||
|
-o "$path" \
|
||||||
|
.#${{ matrix.package_name }}
|
||||||
|
curl --user "${{ secrets.FJ_USER }}:${{ secrets.FJ_PASS }}" \
|
||||||
|
--upload-file "$path" \
|
||||||
|
"${{ forge.api_url }}/packages/${{ secrets.FJ_USER }}/generic/${{ matrix.package_name }}/latest/$path"
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
docker-compose
|
docker-compose
|
||||||
tmux
|
tmux
|
||||||
];
|
];
|
||||||
system-net.openssh.ports = [2022];
|
machine.net.openssh.ports = [2022];
|
||||||
systemd.services.k3s = {
|
systemd.services.k3s = {
|
||||||
preStart = ''
|
preStart = ''
|
||||||
until ${pkgs.tailscale}/bin/tailscale status; do
|
until ${pkgs.tailscale}/bin/tailscale status; do
|
||||||
|
|
@ -107,7 +107,7 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
system-sys = {
|
machine.sys = {
|
||||||
zram = false;
|
zram = false;
|
||||||
swapSize = 16;
|
swapSize = 16;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ host, pkgs, config, lib, ...}:
|
{ host, pkgs, config, lib, ...}:
|
||||||
let cfg = config.system-net; in {
|
let cfg = config.machine.net; in {
|
||||||
options.system-net = {
|
options.machine.net = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ host, pkgs, config, lib, ...}:
|
{ host, pkgs, config, lib, ...}:
|
||||||
let cfg = config.system-nix; in {
|
let cfg = config.machine.nix; in {
|
||||||
options.system-nix = {
|
options.machine.nix = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, config, lib, ...}:
|
{ pkgs, config, lib, ...}:
|
||||||
let cfg = config.system-pkgs; in {
|
let cfg = config.machine.pkgs; in {
|
||||||
options.system-pkgs = {
|
options.machine.pkgs = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.system-sys;
|
cfg = config.machine.sys;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.system-sys = {
|
options.machine.sys = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
"net.ipv4.ip_forward" = 1;
|
"net.ipv4.ip_forward" = 1;
|
||||||
"net.ipv6.conf.all.forwarding" = 1;
|
"net.ipv6.conf.all.forwarding" = 1;
|
||||||
};
|
};
|
||||||
system-net.openssh.ports = [22 2022];
|
machine.net.openssh.ports = [22 2022];
|
||||||
networking = {
|
networking = {
|
||||||
hostId = "00238132";
|
hostId = "00238132";
|
||||||
firewall = {
|
firewall = {
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,10 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
system-net.nfs = true;
|
machine.net.nfs = true;
|
||||||
system-sys.zram = true;
|
machine.sys.zram = true;
|
||||||
system-sys.swap = false;
|
machine.sys.swap = false;
|
||||||
system-sys.documentation = true;
|
machine.sys.documentation = true;
|
||||||
hardware = {
|
hardware = {
|
||||||
graphics = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ host, config, pkgs, ... }:
|
{
|
||||||
|
host,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
@ -11,7 +16,7 @@
|
||||||
sopsFile = ../../secrets/forgejo-runner.yaml;
|
sopsFile = ../../secrets/forgejo-runner.yaml;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
system-sys.zram = false;
|
machine.sys.zram = false;
|
||||||
networking = {
|
networking = {
|
||||||
hostId = "81238132";
|
hostId = "81238132";
|
||||||
firewall = {
|
firewall = {
|
||||||
|
|
@ -21,17 +26,32 @@
|
||||||
25565 # mc
|
25565 # mc
|
||||||
25566 # mc
|
25566 # mc
|
||||||
];
|
];
|
||||||
|
interfaces."podman+" = {
|
||||||
|
allowedTCPPorts = [ 33393 ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
virtualisation.docker = {
|
};
|
||||||
|
virtualisation.podman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraOptions = "--dns 1.1.1.1";
|
|
||||||
};
|
};
|
||||||
services.gitea-actions-runner = {
|
services.gitea-actions-runner = {
|
||||||
package = pkgs.forgejo-runner;
|
package = pkgs.forgejo-runner;
|
||||||
instances.default = {
|
instances.default = {
|
||||||
enable = true;
|
enable = true;
|
||||||
name = host.hostName;
|
name = host.hostName;
|
||||||
|
settings = {
|
||||||
|
runner = {
|
||||||
|
capacity = 3;
|
||||||
|
};
|
||||||
|
cache = {
|
||||||
|
enable = true;
|
||||||
|
host = "host.containers.internal";
|
||||||
|
port = 33393;
|
||||||
|
};
|
||||||
|
container = {
|
||||||
|
force_pull = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
url = "https://git.10110110.xyz";
|
url = "https://git.10110110.xyz";
|
||||||
tokenFile = config.sops.secrets.forgejo-runner.path;
|
tokenFile = config.sops.secrets.forgejo-runner.path;
|
||||||
labels = [
|
labels = [
|
||||||
|
|
|
||||||
0
pkgs/nvim/test2
Normal file
0
pkgs/nvim/test2
Normal file
Loading…
Add table
Add a link
Reference in a new issue