Personal Nix setup

Apply sshd config to macOS server

+4
machines/irnbru/configuration.nix
···
{
imports = [ ];
+
+
modules = {
+
server.enable = true;
+
};
}
+1 -1
modules/server/caddy.nix
···
}
'') cfg.caddy.exposeFolders;
in strings.concatStringsSep "\n\n" configs;
-
in {
+
in helpers.linuxAttrs {
options.modules.server.caddy = {
enable = mkOption {
default = false;
+2 -2
modules/server/hd-idle.nix
···
-
{ lib, config, pkgs, ... }:
+
{ lib, config, pkgs, helpers, ... }:
with lib;
let
cfgRoot = config.modules.server;
cfg = config.modules.server.hd-idle;
-
in {
+
in helpers.linuxAttrs {
options.modules.server.hd-idle = {
enable = mkOption {
default = false;
+2 -2
modules/server/home-assistant.nix
···
-
{ lib, config, pkgs, ... }:
+
{ lib, config, pkgs, helpers, ... }:
with lib;
let
···
containerImage = if stdenv.isAarch64
then "ghcr.io/home-assistant/aarch64-homeassistant:${cfg.revision}"
else "ghcr.io/home-assistant/home-assistant:${cfg.revision}";
-
in {
+
in helpers.linuxAttrs {
options.modules.server.home-assistant = {
enable = mkOption {
default = false;
+2 -2
modules/server/jellyfin.nix
···
-
{ lib, config, pkgs, user, ... }:
+
{ lib, config, pkgs, user, helpers, ... }:
with lib;
let
···
cfg = config.modules.server.jellyfin;
group = "share";
-
in {
+
in helpers.linuxAttrs {
options.modules.server.jellyfin = {
enable = mkOption {
default = false;
+2 -2
modules/server/podman.nix
···
-
{ lib, config, user, pkgs, ... }:
+
{ lib, config, user, pkgs, helpers, ... }:
with lib;
let
cfgRoot = config.modules.server;
cfg = config.modules.server.podman;
-
in {
+
in helpers.linuxAttrs {
options.modules.server.podman = {
enable = mkOption {
default = false;
+2 -1
modules/server/sshd.nix
···
-
{ lib, config, user, ... }:
+
{ lib, config, user, helpers, ... }:
with lib;
let
···
services.openssh = {
enable = true;
+
} // helpers.linuxAttrs {
openFirewall = mkDefault (!config.modules.router.enable);
};
};
+2 -2
modules/server/tailscale.nix
···
-
{ lib, config, pkgs, user, hostname, ... }:
+
{ lib, config, pkgs, user, helpers, hostname, ... }:
with lib;
let
cfgRoot = config.modules.server;
cfgRouter = config.modules.router;
cfg = config.modules.server.tailscale;
-
in {
+
in helpers.linuxAttrs {
options.modules.server.tailscale = {
enable = mkOption {
default = false;
+2 -2
modules/server/vaultwarden.nix
···
-
{ lib, config, hostname, ... }:
+
{ lib, config, hostname, helpers, ... }:
with lib;
let
address = config.modules.router.adress;
cfg = config.modules.server;
-
in {
+
in helpers.linuxAttrs {
options.modules.server.vaultwarden = {
enable = mkOption {
default = false;