aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/machine')
-rw-r--r--nixos/machine/albert.nix3
-rw-r--r--nixos/machine/binky.nix11
-rw-r--r--nixos/machine/default.nix30
-rw-r--r--nixos/machine/errol.nix5
-rw-r--r--nixos/machine/lipwig.nix50
-rw-r--r--nixos/machine/ridcully.nix5
-rw-r--r--nixos/machine/spt-mox.nix2
-rw-r--r--nixos/machine/susan.nix25
8 files changed, 72 insertions, 59 deletions
diff --git a/nixos/machine/albert.nix b/nixos/machine/albert.nix
index 68d55ba..85bc943 100644
--- a/nixos/machine/albert.nix
+++ b/nixos/machine/albert.nix
@@ -3,8 +3,7 @@
lib,
pkgs,
...
-}:
-with lib; {
+}: {
config = {
cynerd = {
desktop = {
diff --git a/nixos/machine/binky.nix b/nixos/machine/binky.nix
index a90d625..3b3d35f 100644
--- a/nixos/machine/binky.nix
+++ b/nixos/machine/binky.nix
@@ -3,8 +3,9 @@
lib,
pkgs,
...
-}:
-with lib; {
+}: let
+ inherit (lib) mkDefault;
+in {
config = {
cynerd = {
desktop = {
@@ -20,8 +21,10 @@ with lib; {
};
};
- boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"];
- boot.kernelModules = ["kvm-amd"];
+ boot = {
+ initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"];
+ kernelModules = ["kvm-amd"];
+ };
hardware.cpu.amd.updateMicrocode = true;
diff --git a/nixos/machine/default.nix b/nixos/machine/default.nix
index aba8b6e..4aa05ba 100644
--- a/nixos/machine/default.nix
+++ b/nixos/machine/default.nix
@@ -1,21 +1,9 @@
-self: {
- machine-albert = import ./albert.nix;
- machine-binky = import ./binky.nix;
- machine-dean = import ./dean.nix;
- machine-errol = import ./errol.nix;
- machine-ridcully = import ./ridcully.nix;
- machine-susan = import ./susan.nix;
-
- machine-lipwig = import ./lipwig.nix;
-
- machine-gaspode = import ./gaspode.nix;
-
- machine-spt-omnia = import ./spt-omnia.nix;
- machine-spt-mox = import ./spt-mox.nix;
- machine-spt-mox2 = import ./spt-mox2.nix;
- machine-spt-mpd = import ./spt-mpd.nix;
-
- machine-adm-omnia = import ./adm-omnia.nix;
- machine-adm-omnia2 = import ./adm-omnia2.nix;
- machine-adm-mpd = import ./adm-mpd.nix;
-}
+self: let
+ inherit (builtins) readDir;
+ inherit (self.inputs.nixpkgs.lib) filterAttrs nameValuePair mapAttrs' hasSuffix removeSuffix;
+in
+ mapAttrs'
+ (n: v: nameValuePair "machine-${removeSuffix ".nix" n}" (import (./. + "/${n}")))
+ (filterAttrs
+ (n: v: v == "regular" && hasSuffix ".nix" n && n != "default.nix")
+ (readDir ./.))
diff --git a/nixos/machine/errol.nix b/nixos/machine/errol.nix
index 922ff57..f0d0aa2 100644
--- a/nixos/machine/errol.nix
+++ b/nixos/machine/errol.nix
@@ -3,8 +3,9 @@
lib,
pkgs,
...
-}:
-with lib; {
+}: let
+ inherit (lib) mkDefault;
+in {
config = {
cynerd = {
desktop.enable = true;
diff --git a/nixos/machine/lipwig.nix b/nixos/machine/lipwig.nix
index 042ee27..fe101f4 100644
--- a/nixos/machine/lipwig.nix
+++ b/nixos/machine/lipwig.nix
@@ -3,8 +3,7 @@
lib,
pkgs,
...
-}:
-with lib; {
+}: {
config = {
cynerd = {
syncthing = {
@@ -55,6 +54,10 @@ with lib; {
fastcgi_param HTTP_HOST $server_name;
'';
};
+ "cloud.cynerd.cz" = {
+ forceSSL = true;
+ useACMEHost = "cynerd.cz";
+ };
"grafana.cynerd.cz" = {
forceSSL = true;
useACMEHost = "cynerd.cz";
@@ -75,6 +78,7 @@ with lib; {
defaults.email = "cynerd+acme@email.cz";
certs."cynerd.cz".extraDomainNames = [
"git.cynerd.cz"
+ "cloud.cynerd.cz"
"grafana.cynerd.cz"
];
};
@@ -157,6 +161,48 @@ with lib; {
};
};
+ # Nextcloud ################################################################
+ services.nextcloud = {
+ enable = true;
+ package = pkgs.nextcloud28;
+ https = true;
+ hostName = "cloud.cynerd.cz";
+ datadir = "/nas/nextcloud";
+ config = {
+ adminuser = "cynerd";
+ adminpassFile = "/run/secrets/nextcloud.admin.pass";
+ };
+ extraOptions = {
+ #log_type = "systemd";
+ default_phone_region = "CZ";
+ };
+ phpOptions = {
+ "opcache.interned_strings_buffer" = "16";
+ };
+ maxUploadSize = "1G";
+ appstoreEnable = false;
+ extraApps = {
+ inherit
+ (config.services.nextcloud.package.packages.apps)
+ calendar
+ contacts
+ cookbook
+ deck
+ groupfolders
+ notes
+ phonetrack
+ tasks
+ twofactor_nextcloud_notification
+ twofactor_webauthn
+ ;
+ passwords = pkgs.fetchNextcloudApp {
+ url = "https://git.mdns.eu/api/v4/projects/45/packages/generic/passwords/2023.12.2/passwords.tar.gz";
+ sha256 = "17qkkkmc3gai6pryl3lb4y074pzbjk26swnpgvy6qfvkp64n8bw1";
+ license = "agpl3";
+ };
+ };
+ };
+
# Old Syncthing ############################################################
services.syncthing = {
enable = true;
diff --git a/nixos/machine/ridcully.nix b/nixos/machine/ridcully.nix
index 5814c0f..8d45959 100644
--- a/nixos/machine/ridcully.nix
+++ b/nixos/machine/ridcully.nix
@@ -3,8 +3,9 @@
lib,
pkgs,
...
-}:
-with lib; {
+}: let
+ inherit (lib) mkDefault;
+in {
config = {
cynerd = {
desktop.enable = true;
diff --git a/nixos/machine/spt-mox.nix b/nixos/machine/spt-mox.nix
index 7dc74fa..accd963 100644
--- a/nixos/machine/spt-mox.nix
+++ b/nixos/machine/spt-mox.nix
@@ -10,7 +10,7 @@ with lib; {
cynerd = {
home-assistant = true;
wifiAP.spt = {
- enable = false;
+ enable = true;
qca988x = {
interface = "wls1";
channel = 7;
diff --git a/nixos/machine/susan.nix b/nixos/machine/susan.nix
deleted file mode 100644
index d05120f..0000000
--- a/nixos/machine/susan.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}:
-with lib; {
- config = {
- cynerd.desktop.enable = true;
-
- fileSystems = {
- "/" = {
- device = "/dev/disk/by-uuid/e092a3ad-fb32-44fa-bc1f-14c2733da033";
- options = ["compress=lzo" "subvol=@nix"];
- };
- "/home" = {
- device = "/dev/disk/by-uuid/e092a3ad-fb32-44fa-bc1f-14c2733da033";
- options = ["compress=lzo" "subvol=@home"];
- };
- "/boot" = {
- device = "/dev/disk/by-uuid/EB3E-3635";
- };
- };
- };
-}