mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat[server]: add dns server
This commit is contained in:
parent
4da44f134c
commit
c26814f64e
22 changed files with 478 additions and 38 deletions
|
|
@ -114,13 +114,31 @@ in
|
|||
|
||||
services = mkOption {
|
||||
type = types.attrsOf (
|
||||
types.submodule {
|
||||
types.submodule (serviceSubmod: {
|
||||
options = {
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
subDomain = mkOption {
|
||||
readOnly = true;
|
||||
type = types.str;
|
||||
default = lib.swarselsystems.getSubDomain serviceSubmod.config.domain;
|
||||
};
|
||||
baseDomain = mkOption {
|
||||
readOnly = true;
|
||||
type = types.str;
|
||||
default = lib.swarselsystems.getBaseDomain serviceSubmod.config.domain;
|
||||
};
|
||||
proxyAddress4 = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
};
|
||||
proxyAddress6 = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -163,6 +181,12 @@ in
|
|||
defaultGateway6 = mkOption {
|
||||
type = types.nullOr types.net.ipv6;
|
||||
};
|
||||
wanAddress4 = mkOption {
|
||||
type = types.nullOr types.net.ipv4;
|
||||
};
|
||||
wanAddress6 = mkOption {
|
||||
type = types.nullOr types.net.ipv6;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
inputs.nix-index-database.homeModules.nix-index
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.spicetify-nix.homeManagerModules.default
|
||||
# inputs.swarsel-modules.homeModules.default
|
||||
inputs.swarsel-nix.homeModules.default
|
||||
{
|
||||
imports = [
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ in
|
|||
hideMounts = true;
|
||||
directories =
|
||||
[
|
||||
"/root/.dotfiles"
|
||||
"/etc/nix"
|
||||
"/etc/NetworkManager/system-connections"
|
||||
"/var/lib/nixos"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ self, lib, pkgs, config, outputs, inputs, minimal, ... }:
|
||||
let
|
||||
inherit (config.swarselsystems) mainUser;
|
||||
settings = if minimal then { } else {
|
||||
environment.etc."nixos/configuration.nix".source = pkgs.writeText "configuration.nix" ''
|
||||
assert builtins.trace "This location is not used. The config is found in ${config.swarselsystems.flakePath}!" false;
|
||||
|
|
@ -36,7 +37,8 @@ let
|
|||
channel.enable = false;
|
||||
registry = rec {
|
||||
nixpkgs.flake = inputs.nixpkgs;
|
||||
swarsel.flake = inputs.swarsel;
|
||||
# swarsel.flake = inputs.swarsel;
|
||||
swarsel.flake = self;
|
||||
n = nixpkgs;
|
||||
s = swarsel;
|
||||
};
|
||||
|
|
@ -57,7 +59,7 @@ in
|
|||
(lib.recursiveUpdate
|
||||
{
|
||||
sops.secrets.github-api-token = lib.mkIf (!minimal) {
|
||||
sopsFile = "${config.swarselsystems.flakePath}/secrets/general/secrets.yaml";
|
||||
owner = mainUser;
|
||||
};
|
||||
|
||||
nix =
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
{ self, pkgs, config, lib, globals, minimal, ... }:
|
||||
let
|
||||
sopsFile = self + /secrets/general/secrets.yaml;
|
||||
in
|
||||
{ pkgs, config, lib, globals, minimal, ... }:
|
||||
{
|
||||
options.swarselmodules.users = lib.mkEnableOption "user config";
|
||||
config = lib.mkIf config.swarselmodules.users {
|
||||
sops.secrets.main-user-hashed-pw = lib.mkIf (!config.swarselsystems.isPublic) { inherit sopsFile; neededForUsers = true; };
|
||||
sops.secrets.main-user-hashed-pw = lib.mkIf (!config.swarselsystems.isPublic) { neededForUsers = true; };
|
||||
|
||||
users = {
|
||||
mutableUsers = lib.mkIf (!minimal) false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue