Compare commits
No commits in common. "8ba08ce982f3175c11ac114fdfa746c0d8632977" and "fa6e092c064677aadd2a7de57df77c79e8b8828c" have entirely different histories.
8ba08ce982
...
fa6e092c06
@ -4,45 +4,35 @@ on: [push]
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
PATH: /run/current-system/sw/bin/:/nix/var/nix/profiles/per-user/gitea-runner/profile/bin
|
||||||
|
|
||||||
|
# defaults:
|
||||||
|
# run:
|
||||||
|
# shell: nix shell nixpkgs#nodejs-18_x
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-flake:
|
check-flake:
|
||||||
runs-on: ubuntu-latest
|
runs-on: nixos
|
||||||
steps:
|
steps:
|
||||||
- name: Install Nix
|
# - run: node --version
|
||||||
uses: https://github.com/cachix/install-nix-action@v23
|
# - name: Install basic dependencies
|
||||||
with:
|
# run: apt-get update && apt-get install -y --no-install-recommends sudo curl ca-certificates xz-utils
|
||||||
github_access_token: ${{ secrets.__GITHUB_TOKEN }}
|
|
||||||
extra_nix_config: |
|
# - name: Install Nix
|
||||||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= s0.koi-bebop.ts.net:OjbzD86YjyJZpCp9RWaQKANaflcpKhtzBMNP8I2aPUU=
|
# uses: https://github.com/cachix/install-nix-action@v20
|
||||||
substituters = https://cache.nixos.org/ http://s0.koi-bebop.ts.net:5000
|
# with:
|
||||||
|
# github_access_token: ${{ secrets.__GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: nix profile install nixpkgs#nodejs-18_x
|
||||||
|
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
# - name: Get ENV var names
|
||||||
|
# run: printenv | cut -d'=' -f1
|
||||||
|
|
||||||
- name: Check Flake
|
- name: Check Flake
|
||||||
run: |
|
run: nix flake check --show-trace
|
||||||
# Can only build x84_64 for now, so pick out those specifically
|
|
||||||
# nix flake check --show-trace
|
|
||||||
|
|
||||||
nix build .#nixosConfigurations."ray".config.system.build.toplevel
|
|
||||||
nix build .#nixosConfigurations."s0".config.system.build.toplevel
|
|
||||||
nix build .#nixosConfigurations."ponyo".config.system.build.toplevel
|
|
||||||
nix build .#nixosConfigurations."zoidberg".config.system.build.toplevel
|
|
||||||
|
|
||||||
- name: Setup SSH For Pushing to Binary Cache
|
|
||||||
run: |
|
|
||||||
# Set up push key with ssh-agent
|
|
||||||
echo "${{ secrets.BINARY_CACHE_PUSH_SSH_KEY }}" | base64 -d > ./.id_ed25519
|
|
||||||
chmod 600 ./.id_ed25519
|
|
||||||
eval $(ssh-agent -a $SSH_AUTH_SOCK)
|
|
||||||
ssh-add ./.id_ed25519
|
|
||||||
# Add Binary Cache as known host
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "s0.koi-bebop.ts.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAwiXcUFtAvZCayhu4+AIcF+Ktrdgv9ee/mXSIhJbp4q" | tee -a ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
- name: Copy all built derivations to remote cache
|
|
||||||
run: nix copy --to ssh://cache-push@s0.koi-bebop.ts.net /nix/store/*
|
|
@ -10,6 +10,7 @@
|
|||||||
./matrix.nix
|
./matrix.nix
|
||||||
./zerobin.nix
|
./zerobin.nix
|
||||||
./gitea.nix
|
./gitea.nix
|
||||||
|
./gitea-runner.nix
|
||||||
./privatebin/privatebin.nix
|
./privatebin/privatebin.nix
|
||||||
./radio.nix
|
./radio.nix
|
||||||
./samba.nix
|
./samba.nix
|
||||||
|
52
common/server/gitea-runner.nix
Normal file
52
common/server/gitea-runner.nix
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.gitea-runner;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.services.gitea-runner = {
|
||||||
|
enable = lib.mkEnableOption "Enables gitea runner";
|
||||||
|
dataDir = lib.mkOption {
|
||||||
|
default = "/var/lib/gitea-runner";
|
||||||
|
type = lib.types.str;
|
||||||
|
description = lib.mdDoc "gitea runner data directory.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
users.users.gitea-runner = {
|
||||||
|
description = "Gitea Runner Service";
|
||||||
|
home = cfg.dataDir;
|
||||||
|
useDefaultShell = true;
|
||||||
|
group = "gitea-runner";
|
||||||
|
isSystemUser = true;
|
||||||
|
createHome = true;
|
||||||
|
extraGroups = [
|
||||||
|
"docker" # allow creating docker containers
|
||||||
|
];
|
||||||
|
};
|
||||||
|
users.groups.gitea-runner = { };
|
||||||
|
|
||||||
|
systemd.services.gitea-runner = {
|
||||||
|
description = "Gitea Runner";
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
WorkingDirectory = cfg.dataDir;
|
||||||
|
User = "gitea-runner";
|
||||||
|
Group = "gitea-runner";
|
||||||
|
};
|
||||||
|
|
||||||
|
requires = [ "network-online.target" ];
|
||||||
|
after = [ "network.target" "network-online.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
path = with pkgs; [ gitea-actions-runner ];
|
||||||
|
|
||||||
|
script = ''
|
||||||
|
exec act_runner daemon
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
8
flake.lock
generated
8
flake.lock
generated
@ -185,16 +185,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695825837,
|
"lastModified": 1691888369,
|
||||||
"narHash": "sha256-4Ne11kNRnQsmSJCRSSNkFRSnHC4Y5gPDBIQGjjPfJiU=",
|
"narHash": "sha256-fBS5YOyiziv7tmR+yCJHr1Tm15Ve4PO1syyJwE9Xnuc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5cfafa12d57374f48bcc36fda3274ada276cf69e",
|
"rev": "a4d0fe7270cc03eeb1aba4e8b343fe47bfd7c4d5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-23.05",
|
"ref": "master",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/master";
|
||||||
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
|
@ -6,17 +6,5 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "phil";
|
networking.hostName = "phil";
|
||||||
|
services.gitea-runner.enable = true;
|
||||||
services.gitea-actions-runner.instances.inst = {
|
|
||||||
enable = true;
|
|
||||||
name = config.networking.hostName;
|
|
||||||
url = "https://git.neet.dev/";
|
|
||||||
tokenFile = "/run/agenix/gitea-actions-runner-token";
|
|
||||||
labels = [
|
|
||||||
"debian-latest:docker://catthehacker/ubuntu:act-latest"
|
|
||||||
"ubuntu-latest:docker://catthehacker/ubuntu:act-latest"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
age.secrets.gitea-actions-runner-token.file = ../../secrets/gitea-actions-runner-token.age;
|
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
systemRoles = [
|
systemRoles = [
|
||||||
"server"
|
"server"
|
||||||
|
"gitea-runner"
|
||||||
"nix-builder"
|
"nix-builder"
|
||||||
"gitea-actions-runner"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
hostKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBlgRPpuUkZqe8/lHugRPm/m2vcN9psYhh5tENHZt9I2";
|
hostKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBlgRPpuUkZqe8/lHugRPm/m2vcN9psYhh5tENHZt9I2";
|
||||||
|
@ -9,20 +9,9 @@
|
|||||||
|
|
||||||
# system.autoUpgrade.enable = true;
|
# system.autoUpgrade.enable = true;
|
||||||
|
|
||||||
# gitea runner and allow it to build ARM derivationsFV
|
# gitea runner and allow it to build ARM derivations
|
||||||
services.gitea-actions-runner.instances.inst = {
|
services.gitea-runner.enable = true;
|
||||||
enable = true;
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
name = config.networking.hostName;
|
|
||||||
url = "https://git.neet.dev/";
|
|
||||||
tokenFile = "/run/agenix/gitea-actions-runner-token";
|
|
||||||
labels = [
|
|
||||||
"debian-latest:docker://catthehacker/ubuntu:act-latest"
|
|
||||||
"ubuntu-latest:docker://catthehacker/ubuntu:act-latest"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
virtualisation.podman.enable = true;
|
|
||||||
age.secrets.gitea-actions-runner-token.file = ../../../secrets/gitea-actions-runner-token.age;
|
|
||||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; # todo: still needed?
|
|
||||||
nix.gc.automatic = lib.mkForce false; # allow the nix store to serve as a build cache
|
nix.gc.automatic = lib.mkForce false; # allow the nix store to serve as a build cache
|
||||||
|
|
||||||
# binary cache
|
# binary cache
|
||||||
@ -32,13 +21,6 @@
|
|||||||
secretKeyFile = "/run/agenix/binary-cache-private-key";
|
secretKeyFile = "/run/agenix/binary-cache-private-key";
|
||||||
};
|
};
|
||||||
age.secrets.binary-cache-private-key.file = ../../../secrets/binary-cache-private-key.age;
|
age.secrets.binary-cache-private-key.file = ../../../secrets/binary-cache-private-key.age;
|
||||||
users.users.cache-push = {
|
|
||||||
isNormalUser = true;
|
|
||||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINpUZFFL9BpBVqeeU63sFPhR9ewuhEZerTCDIGW1NPSB" ];
|
|
||||||
};
|
|
||||||
nix.settings = {
|
|
||||||
trusted-users = [ "cache-push" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.iperf3.enable = true;
|
services.iperf3.enable = true;
|
||||||
services.iperf3.openFirewall = true;
|
services.iperf3.openFirewall = true;
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
"server"
|
"server"
|
||||||
"pia"
|
"pia"
|
||||||
"binary-cache"
|
"binary-cache"
|
||||||
"gitea-actions-runner"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
hostKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAwiXcUFtAvZCayhu4+AIcF+Ktrdgv9ee/mXSIhJbp4q";
|
hostKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAwiXcUFtAvZCayhu4+AIcF+Ktrdgv9ee/mXSIhJbp4q";
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableAllFirmware = true;
|
||||||
|
|
||||||
# ROCm
|
|
||||||
hardware.opengl.extraPackages = with pkgs; [
|
hardware.opengl.extraPackages = with pkgs; [
|
||||||
rocm-opencl-icd
|
rocm-opencl-icd
|
||||||
rocm-opencl-runtime
|
rocm-opencl-runtime
|
||||||
@ -41,7 +40,6 @@
|
|||||||
"L+ /opt/rocm/hip - - - - ${pkgs.hip}"
|
"L+ /opt/rocm/hip - - - - ${pkgs.hip}"
|
||||||
];
|
];
|
||||||
|
|
||||||
# System wide barrier instance
|
|
||||||
systemd.services.barrier-sddm = {
|
systemd.services.barrier-sddm = {
|
||||||
description = "Barrier mouse/keyboard share";
|
description = "Barrier mouse/keyboard share";
|
||||||
requires = [ "display-manager.service" ];
|
requires = [ "display-manager.service" ];
|
||||||
@ -62,9 +60,6 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Login into X11 plasma so barrier works well
|
|
||||||
services.xserver.displayManager.defaultSession = "Plasma (X11)";
|
|
||||||
|
|
||||||
users.users.cris = {
|
users.users.cris = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
hashedPassword = "$y$j9T$LMGwHVauFWAcAyWSSmcuS/$BQpDyjDHZZbvj54.ijvNb03tr7IgX9wcjYCuCxjSqf6";
|
hashedPassword = "$y$j9T$LMGwHVauFWAcAyWSSmcuS/$BQpDyjDHZZbvj54.ijvNb03tr7IgX9wcjYCuCxjSqf6";
|
||||||
@ -78,20 +73,7 @@
|
|||||||
# Dr. John A. Zoidberg
|
# Dr. John A. Zoidberg
|
||||||
users.users.john = {
|
users.users.john = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
inherit (config.users.users.googlebot) hashedPassword packages;
|
hashedPassword = "";
|
||||||
uid = 1002;
|
uid = 1002;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Auto login into Plasma in john zoidberg account
|
|
||||||
# services.xserver.displayManager.sddm.settings = {
|
|
||||||
# Autologin = {
|
|
||||||
# Session = "Plasma (X11)";
|
|
||||||
# User = "john";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
jellyfin-media-player
|
|
||||||
config.services.xserver.desktopManager.kodi.package
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
# Fetch key from USB drive
|
# Fetch key from USB drive
|
||||||
keyFileSize = 4096;
|
keyFileSize = 4096;
|
||||||
keyFile = "/dev/disk/by-id/usb-Mass_Storage_Device_121220160204-0:0-part2";
|
keyFile = "/dev/disk/by-id/usb-Mass_Storage_Device_121220160204-0:0";
|
||||||
fallbackToPassword = true;
|
fallbackToPassword = true;
|
||||||
};
|
};
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
@ -35,7 +35,7 @@
|
|||||||
};
|
};
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{
|
{
|
||||||
device = "/dev/disk/by-uuid/8074-B04D";
|
device = "/dev/disk/by-uuid/954B-AB3E";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
swapDevices =
|
swapDevices =
|
||||||
|
Binary file not shown.
@ -1,11 +0,0 @@
|
|||||||
age-encryption.org/v1
|
|
||||||
-> ssh-ed25519 WBT1Hw ucC+p6pRevUWJIVqG5DfXSO4W0PjR2lUW7tY924FVHA
|
|
||||||
te6rrH/nsn/Pn4mySjQ0mv2M3ZTCOwbglCcnH2ZiUJQ
|
|
||||||
-> ssh-ed25519 hPp1nw 1nmzowG+nzD8ixyqTU+duUxV3g4yWo7RqKJ+dDlf0g8
|
|
||||||
ln3CyhUYuZ71EdyqIPBdeRP98dun4cs9uZnxAGadDG0
|
|
||||||
-> ssh-ed25519 dMQYog pHRtIaJr39QqD7xqX2ovUf8QfUPwDl58TmqHa1xhSDQ
|
|
||||||
dr8tYQ3oFrQehq2326jimOCRDX6Zrsq/epQbVA8+UPw
|
|
||||||
-> I)m(V&-grease i5{
|
|
||||||
lYnHQc5cQahDoah2rPlIlGOLc49nTDp+aHPB
|
|
||||||
--- AdMW2y8Z9XmbxzmvSAP9NKqgj2JGgkimXJqcXIFPdtI
|
|
||||||
]°m]pmòžY.ؽ¢âÞzÀhÑ<68>Sß!fI~Åpô³ˆ]¦KÅ‹Còü\KHgÎí_ÇÌ»§6ÌÑðÜ–Üj”)ü«@á‹[¿
|
|
@ -22,8 +22,6 @@ with roles;
|
|||||||
# nix binary cache
|
# nix binary cache
|
||||||
# public key: s0.koi-bebop.ts.net:OjbzD86YjyJZpCp9RWaQKANaflcpKhtzBMNP8I2aPUU=
|
# public key: s0.koi-bebop.ts.net:OjbzD86YjyJZpCp9RWaQKANaflcpKhtzBMNP8I2aPUU=
|
||||||
"binary-cache-private-key.age".publicKeys = binary-cache;
|
"binary-cache-private-key.age".publicKeys = binary-cache;
|
||||||
# public key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINpUZFFL9BpBVqeeU63sFPhR9ewuhEZerTCDIGW1NPSB
|
|
||||||
"binary-cache-push-sshkey.age".publicKeys = nobody; # this value is directly given to gitea
|
|
||||||
|
|
||||||
# vpn
|
# vpn
|
||||||
"iodine.age".publicKeys = iodine;
|
"iodine.age".publicKeys = iodine;
|
||||||
@ -45,7 +43,4 @@ with roles;
|
|||||||
# backups
|
# backups
|
||||||
"backblaze-s3-backups.age".publicKeys = personal ++ server;
|
"backblaze-s3-backups.age".publicKeys = personal ++ server;
|
||||||
"restic-password.age".publicKeys = personal ++ server;
|
"restic-password.age".publicKeys = personal ++ server;
|
||||||
|
|
||||||
# gitea actions runner
|
|
||||||
"gitea-actions-runner-token.age".publicKeys = gitea-actions-runner;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user