summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Stachurski <j.stachurski@student.utwente.nl>2026-02-01 18:00:27 +0100
committerJakub Stachurski <j.stachurski@student.utwente.nl>2026-02-01 18:00:27 +0100
commitc0182f70c7e3070b4122ed98a5c1c5cba1741bec (patch)
tree8e2f560bd34f111caf8ef1f5751f88d3147e3d67
parentfb26a8a59b840c6430c73df6c1cc44ecff156b67 (diff)
Format and do fixes
-rw-r--r--hosts/omega-relay/default.nix2
-rw-r--r--hosts/omega-relay/disko.nix20
-rw-r--r--hosts/omega-relay/firewall.nix10
-rw-r--r--hosts/omega-relay/hardware-configuration.nix22
-rw-r--r--overlays/stable_overrides.nix4
-rw-r--r--services/freshrss.nix2
-rw-r--r--services/mysql.nix12
-rw-r--r--services/uptimekuma.nix2
-rw-r--r--services/vaultwarden.nix4
-rw-r--r--services/wakapi.nix2
10 files changed, 48 insertions, 32 deletions
diff --git a/hosts/omega-relay/default.nix b/hosts/omega-relay/default.nix
index dcb7466..90277a2 100644
--- a/hosts/omega-relay/default.nix
+++ b/hosts/omega-relay/default.nix
@@ -68,7 +68,7 @@
doACME = !isVM;
};
wakapi = {
- enable = true;
+ enable = false;
domain = if isVM then "wakapi.omega-relay.local" else "wakapi.wilkuu.xyz";
doACME = !isVM;
};
diff --git a/hosts/omega-relay/disko.nix b/hosts/omega-relay/disko.nix
index adfaf71..2de6943 100644
--- a/hosts/omega-relay/disko.nix
+++ b/hosts/omega-relay/disko.nix
@@ -1,22 +1,22 @@
{ config, lib, ... }:
let
cfg = config.hosts.omega-relay;
-in
+in
{
options.hosts.omega-relay = with lib; {
root_device = mkOption {
- type = types.path;
- default = "/dev/sda";
- example = "/dev/sda";
+ type = types.path;
+ default = "/dev/sda";
+ example = "/dev/sda";
description = "Root device for disko and grub";
- };
+ };
do_disko = mkOption {
- type = types.bool;
- default = !config.addons.virtualisation.isTestVM;
- description = "Whenever to do disko or not.";
- };
- };
+ type = types.bool;
+ default = !config.addons.virtualisation.isTestVM;
+ description = "Whenever to do disko or not.";
+ };
+ };
config = lib.mkIf (cfg.do_disko) ({
services.btrfs.autoScrub = {
enable = true;
diff --git a/hosts/omega-relay/firewall.nix b/hosts/omega-relay/firewall.nix
index 553730e..626307e 100644
--- a/hosts/omega-relay/firewall.nix
+++ b/hosts/omega-relay/firewall.nix
@@ -1,4 +1,4 @@
-{ config,... }:
+{ ... }:
let
baseTCP = [
20
@@ -33,6 +33,14 @@ let
];
in
{
+ systemd.network.enable = true;
+ systemd.network.networks."10-uplink" = {
+ matchConfig.Name = "ens1";
+ networkConfig.DHCP = "ipv4";
+ };
+
+ networking.useDHCP = false;
+ networking.useNetworkd = true;
networking.nftables.enable = true;
networking.firewall = {
enable = true;
diff --git a/hosts/omega-relay/hardware-configuration.nix b/hosts/omega-relay/hardware-configuration.nix
index 247b382..328d228 100644
--- a/hosts/omega-relay/hardware-configuration.nix
+++ b/hosts/omega-relay/hardware-configuration.nix
@@ -1,20 +1,26 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
-{ config, lib, pkgs, modulesPath, ... }:
+{ lib, modulesPath, ... }:
{
- imports =
- [ (modulesPath + "/profiles/qemu-guest.nix")
- ];
+ imports = [
+ (modulesPath + "/profiles/qemu-guest.nix")
+ ];
- boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
+ boot.initrd.availableKernelModules = [
+ "ahci"
+ "xhci_pci"
+ "virtio_pci"
+ "sr_mod"
+ "virtio_blk"
+ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
- hosts.omega-relay.root_device = "/dev/vda";
- hosts.omega-relay.do_disko = true;
- addons.virtualisation.isTestVM = true;
+ hosts.omega-relay.root_device = "/dev/vda";
+ hosts.omega-relay.do_disko = true;
+ addons.virtualisation.isTestVM = true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}
diff --git a/overlays/stable_overrides.nix b/overlays/stable_overrides.nix
index f32cae2..ed1f6fe 100644
--- a/overlays/stable_overrides.nix
+++ b/overlays/stable_overrides.nix
@@ -1,4 +1,4 @@
-{ nixpkgs-stable, ... }:
-(_final: prev: {
+{ ... }:
+(_final: _prev: {
})
diff --git a/services/freshrss.nix b/services/freshrss.nix
index 2cabe68..2c28baa 100644
--- a/services/freshrss.nix
+++ b/services/freshrss.nix
@@ -54,7 +54,7 @@ in
enableACME = cfg.doACME;
};
- systemd.services.freshrss.after = ["mysql.service"];
+ systemd.services.freshrss.after = [ "mysql.service" ];
wilkuu.services.mysql = {
enable = true;
users."freshrss" = {
diff --git a/services/mysql.nix b/services/mysql.nix
index 445751a..83a5033 100644
--- a/services/mysql.nix
+++ b/services/mysql.nix
@@ -26,7 +26,7 @@ let
ALTER USER IF EXISTS '${name}'@'%' IDENTIFIED BY '${ucfg.sopsPlaceholder}';
CREATE USER IF NOT EXISTS '${name}'@'%' IDENTIFIED BY '${ucfg.sopsPlaceholder}';
''
- + (lib.concatMapAttrsStringSep "\n" (priviledge_clause name) (create_users_ensure name))
+ + (lib.concatMapAttrsStringSep "\n" (priviledge_clause "'name'@'%'") (create_users_ensure name))
)
else
" -- Ommitted user ${name}";
@@ -38,7 +38,9 @@ let
ALTER USER IF EXISTS '${name}'@'localhost' IDENTIFIED VIA unix_socket;
CREATE USER IF NOT EXISTS '${name}'@'localhost' IDENTIFIED VIA unix_socket;
''
- + (lib.concatMapAttrsStringSep "\n" (priviledge_clause "'${name}'@'localhost'") (create_users_ensure name));
+ + (lib.concatMapAttrsStringSep "\n" (priviledge_clause "'${name}'@'localhost'") (
+ create_users_ensure name
+ ));
in
{
@@ -99,14 +101,14 @@ in
# sopsFile = ../secrets/${config.networking.hostName}/secrets.yaml;
# };
# };
- config.sops.templates."init-mysql" = {
+ config.sops.templates."init-mysql" = lib.mkIf cfg.enable {
owner = config.systemd.services.mysql.serviceConfig.User;
content = (
lib.concatLines (
(builtins.attrValues (builtins.mapAttrs add-user-clauses cfg.users))
++ (map add-unix-user-clauses cfg.unix_users)
- ++ ["FLUSH PRIVILEGES;"]
- )
+ ++ [ "FLUSH PRIVILEGES;" ]
+ )
);
};
diff --git a/services/uptimekuma.nix b/services/uptimekuma.nix
index 32549c3..d98a0b3 100644
--- a/services/uptimekuma.nix
+++ b/services/uptimekuma.nix
@@ -33,7 +33,7 @@ in
users.groups.uptimekuma = { };
systemd.services.uptime-kuma.serviceConfig.User = "uptimekuma";
- systemd.services.uptime-kuma.after = ["mysql.service"];
+ systemd.services.uptime-kuma.after = [ "mysql.service" ];
# sops.secrets =
# (lib.genAttrs (map toSops secrets)
diff --git a/services/vaultwarden.nix b/services/vaultwarden.nix
index 90feace..ff3466d 100644
--- a/services/vaultwarden.nix
+++ b/services/vaultwarden.nix
@@ -61,9 +61,9 @@ in
services.vaultwarden = {
enable = cfg.enable;
- backupDir = cfg.backupDir;
+ # backupDir = cfg.backupDir;
config = {
- DOMAIN = cfg.domain;
+ DOMAIN = "${if cfg.doACME then "https" else "http"}://${cfg.domain}";
ROCKET_ADDRESS = "127.0.0.1";
ROCKET_PORT = "3222";
SIGNUPS_DOMAINS_WHITELIST = (lib.concatStringsSep "," cfg.signupWhitelist);
diff --git a/services/wakapi.nix b/services/wakapi.nix
index 69251d3..a350b6a 100644
--- a/services/wakapi.nix
+++ b/services/wakapi.nix
@@ -64,7 +64,7 @@ in
};
};
- systemd.services.wakapi.after = ["mysql.service"];
+ systemd.services.wakapi.after = [ "mysql.service" ];
services.wakapi = {
enable = true;
stateDir = cfg.dataDir;