Compare commits
4 Commits
2bdbece800
...
bead/nixos
| Author | SHA1 | Date | |
|---|---|---|---|
| 347fab0ff6 | |||
| 90217ec85a | |||
| f99f4069f0 | |||
| 320a2d3738 |
18
.gitea/workflows/ci.yml
Normal file
18
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: https://git.johnogle.info/johno/gitea-actions/nix-setup@main
|
||||||
|
|
||||||
|
- name: Check flake
|
||||||
|
run: nix flake check
|
||||||
@@ -162,6 +162,7 @@
|
|||||||
modules = nixosModules ++ [
|
modules = nixosModules ++ [
|
||||||
nixos-wsl.nixosModules.default
|
nixos-wsl.nixosModules.default
|
||||||
./machines/wixos/configuration.nix
|
./machines/wixos/configuration.nix
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.users.johno = import ./home/home-desktop.nix;
|
home-manager.users.johno = import ./home/home-desktop.nix;
|
||||||
home-manager.extraSpecialArgs = { inherit system; };
|
home-manager.extraSpecialArgs = { inherit system; };
|
||||||
@@ -173,6 +174,7 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = nixosModules ++ [
|
modules = nixosModules ++ [
|
||||||
./machines/zix790prors/configuration.nix
|
./machines/zix790prors/configuration.nix
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.users.johno = import ./home/home-desktop.nix;
|
home-manager.users.johno = import ./home/home-desktop.nix;
|
||||||
home-manager.extraSpecialArgs = { inherit system; };
|
home-manager.extraSpecialArgs = { inherit system; };
|
||||||
|
|||||||
@@ -8,6 +8,21 @@ 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;
|
||||||
@@ -18,8 +33,8 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable
|
config = mkIf cfg.enable
|
||||||
{
|
{
|
||||||
fileSystems."/media" = {
|
fileSystems.${cfg.mountPoint} = {
|
||||||
device = "10.0.0.43:/media";
|
device = "${cfg.server}:${cfg.remotePath}";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = [
|
options = [
|
||||||
"defaults"
|
"defaults"
|
||||||
|
|||||||
@@ -8,6 +8,21 @@ 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
|
||||||
@@ -21,11 +36,11 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
hardware.printers.ensurePrinters = [{
|
hardware.printers.ensurePrinters = [{
|
||||||
name = "MFC-L8900CDW_series";
|
name = cfg.printerName;
|
||||||
deviceUri = "ipp://brother.oglehome/ipp/print";
|
deviceUri = cfg.printerUri;
|
||||||
model = "everywhere";
|
model = cfg.printerModel;
|
||||||
}];
|
}];
|
||||||
hardware.printers.ensureDefaultPrinter = "MFC-L8900CDW_series";
|
hardware.printers.ensureDefaultPrinter = cfg.printerName;
|
||||||
|
|
||||||
# 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,6 +8,11 @@ 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
|
||||||
@@ -15,6 +20,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 = [ "johno" ];
|
users.extraGroups.docker.members = cfg.dockerUsers;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user