Compare commits
1 Commits
bead/nixos
...
bead/nixos
| Author | SHA1 | Date | |
|---|---|---|---|
| ee40c469bf |
47
.forgejo/workflows/ci.yaml
Normal file
47
.forgejo/workflows/ci.yaml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
flake-check:
|
||||||
|
runs-on: nix
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check flake syntax
|
||||||
|
run: nix flake check --no-build
|
||||||
|
|
||||||
|
- name: Show flake metadata
|
||||||
|
run: nix flake metadata
|
||||||
|
|
||||||
|
- name: Show flake outputs
|
||||||
|
run: nix flake show
|
||||||
|
|
||||||
|
build-configs:
|
||||||
|
runs-on: nix
|
||||||
|
needs: flake-check
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
config:
|
||||||
|
# Critical server configurations
|
||||||
|
- john-endesktop
|
||||||
|
# Desktop configurations
|
||||||
|
- zix790prors
|
||||||
|
- nix-book
|
||||||
|
# Media center
|
||||||
|
- boxy
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build ${{ matrix.config }}
|
||||||
|
run: |
|
||||||
|
nix build .#nixosConfigurations.${{ matrix.config }}.config.system.build.toplevel \
|
||||||
|
--no-link \
|
||||||
|
--print-build-logs
|
||||||
@@ -8,21 +8,6 @@ in
|
|||||||
{
|
{
|
||||||
options.roles.nfs-mounts = {
|
options.roles.nfs-mounts = {
|
||||||
enable = mkEnableOption "Enable default NFS mounts";
|
enable = mkEnableOption "Enable default NFS mounts";
|
||||||
server = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "10.0.0.43";
|
|
||||||
description = "IP address or hostname of the NFS server";
|
|
||||||
};
|
|
||||||
remotePath = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "/media";
|
|
||||||
description = "Remote path to mount from the NFS server";
|
|
||||||
};
|
|
||||||
mountPoint = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "/media";
|
|
||||||
description = "Local mount point for the NFS share";
|
|
||||||
};
|
|
||||||
# TODO: implement requireMount
|
# TODO: implement requireMount
|
||||||
requireMount = mkOption {
|
requireMount = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
@@ -33,8 +18,8 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable
|
config = mkIf cfg.enable
|
||||||
{
|
{
|
||||||
fileSystems.${cfg.mountPoint} = {
|
fileSystems."/media" = {
|
||||||
device = "${cfg.server}:${cfg.remotePath}";
|
device = "10.0.0.43:/media";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = [
|
options = [
|
||||||
"defaults"
|
"defaults"
|
||||||
|
|||||||
@@ -8,21 +8,6 @@ in
|
|||||||
{
|
{
|
||||||
options.roles.printing = {
|
options.roles.printing = {
|
||||||
enable = mkEnableOption "Enable default printing setup";
|
enable = mkEnableOption "Enable default printing setup";
|
||||||
printerName = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "MFC-L8900CDW_series";
|
|
||||||
description = "Name for the default printer";
|
|
||||||
};
|
|
||||||
printerUri = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "ipp://brother.oglehome/ipp/print";
|
|
||||||
description = "Device URI for the default printer (e.g., ipp://hostname/ipp/print)";
|
|
||||||
};
|
|
||||||
printerModel = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "everywhere";
|
|
||||||
description = "PPD model for the printer (use 'everywhere' for driverless IPP)";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable
|
config = mkIf cfg.enable
|
||||||
@@ -36,11 +21,11 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
hardware.printers.ensurePrinters = [{
|
hardware.printers.ensurePrinters = [{
|
||||||
name = cfg.printerName;
|
name = "MFC-L8900CDW_series";
|
||||||
deviceUri = cfg.printerUri;
|
deviceUri = "ipp://brother.oglehome/ipp/print";
|
||||||
model = cfg.printerModel;
|
model = "everywhere";
|
||||||
}];
|
}];
|
||||||
hardware.printers.ensureDefaultPrinter = cfg.printerName;
|
hardware.printers.ensureDefaultPrinter = "MFC-L8900CDW_series";
|
||||||
|
|
||||||
# Fix ensure-printers service to wait for network availability
|
# Fix ensure-printers service to wait for network availability
|
||||||
systemd.services.ensure-printers = {
|
systemd.services.ensure-printers = {
|
||||||
|
|||||||
@@ -8,11 +8,6 @@ in
|
|||||||
{
|
{
|
||||||
options.roles.virtualisation = {
|
options.roles.virtualisation = {
|
||||||
enable = mkEnableOption "Enable virtualisation";
|
enable = mkEnableOption "Enable virtualisation";
|
||||||
dockerUsers = mkOption {
|
|
||||||
type = types.listOf types.str;
|
|
||||||
default = [ "johno" ];
|
|
||||||
description = "List of users to add to the docker group";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable
|
config = mkIf cfg.enable
|
||||||
@@ -20,6 +15,6 @@ in
|
|||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
users.extraGroups.docker.members = cfg.dockerUsers;
|
users.extraGroups.docker.members = [ "johno" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user