Formatting
This commit is contained in:
parent
fa02a4c72a
commit
1202eac75c
5 changed files with 134 additions and 122 deletions
17
caddy.nix
17
caddy.nix
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
settings = import ./settings.nix {};
|
||||
{ config
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
settings = import ./settings.nix { };
|
||||
|
||||
elementClient = pkgs.element-web.override {
|
||||
conf = {
|
||||
|
@ -17,7 +17,8 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
email = "ssl@catnip.ee";
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, inputs
|
||||
, system
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
settings = import ./settings.nix { };
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
system,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
settings = import ./settings.nix {};
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./containers.nix
|
||||
|
@ -22,7 +23,7 @@ in {
|
|||
];
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [inputs.nix-minecraft.overlay];
|
||||
overlays = [ inputs.nix-minecraft.overlay ];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
|
@ -44,10 +45,10 @@ in {
|
|||
};
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = ["06:00"];
|
||||
dates = [ "06:00" ];
|
||||
};
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
allowed-users = [
|
||||
"@wheel"
|
||||
|
@ -57,7 +58,7 @@ in {
|
|||
};
|
||||
|
||||
boot = {
|
||||
supportedFilesystems = ["ntfs" "btrfs" "mergerfs"];
|
||||
supportedFilesystems = [ "ntfs" "btrfs" "mergerfs" ];
|
||||
tmp.cleanOnBoot = true;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
loader = {
|
||||
|
@ -67,7 +68,7 @@ in {
|
|||
};
|
||||
|
||||
systemd.services = {
|
||||
caddy.serviceConfig.ReadWriteDirectories = lib.mkForce ["/var/lib/caddy" "/run/mastodon-web"];
|
||||
caddy.serviceConfig.ReadWriteDirectories = lib.mkForce [ "/var/lib/caddy" "/run/mastodon-web" ];
|
||||
|
||||
mautrix-telegram.path = with pkgs; [
|
||||
lottieconverter # for animated stickers conversion, unfree package
|
||||
|
@ -101,7 +102,7 @@ in {
|
|||
'';
|
||||
Restart = "always";
|
||||
};
|
||||
wantedBy = ["default.target"];
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -240,7 +241,7 @@ in {
|
|||
Domain = "drasl.snailcore.net";
|
||||
BaseURL = "https://drasl.snailcore.net";
|
||||
ListenAddress = "0.0.0.0:${toString settings.ports.drasl}";
|
||||
DefaultAdmins = ["kaya"];
|
||||
DefaultAdmins = [ "kaya" ];
|
||||
|
||||
RegistrationNewPlayer = {
|
||||
Allow = true;
|
||||
|
@ -302,7 +303,7 @@ in {
|
|||
sonarr = [
|
||||
{
|
||||
url = "http://localhost:8989";
|
||||
paths = ["/mnt/drive1/torrents/downloads" "/mnt/drive2/torrents" "/mnt/drive3/torrents" "/mnt/drive4/torrents"];
|
||||
paths = [ "/mnt/drive1/torrents/downloads" "/mnt/drive2/torrents" "/mnt/drive3/torrents" "/mnt/drive4/torrents" ];
|
||||
protocols = "torrent";
|
||||
timeout = "100s";
|
||||
delete_delay = "10m";
|
||||
|
@ -312,7 +313,7 @@ in {
|
|||
radarr = [
|
||||
{
|
||||
url = "http://localhost:7878";
|
||||
paths = ["/mnt/drive1/torrents/downloads" "/mnt/drive2/torrents" "/mnt/drive3/torrents" "/mnt/drive4/torrents"];
|
||||
paths = [ "/mnt/drive1/torrents/downloads" "/mnt/drive2/torrents" "/mnt/drive3/torrents" "/mnt/drive4/torrents" ];
|
||||
protocols = "torrent";
|
||||
timeout = "100s";
|
||||
delete_delay = "10m";
|
||||
|
@ -494,14 +495,17 @@ in {
|
|||
"tcp+udp:1.1.1.1"
|
||||
"https://1.1.1.1/dns-query"
|
||||
];
|
||||
customDNS = let
|
||||
customDNS =
|
||||
let
|
||||
localDomains = names: ip:
|
||||
builtins.listToAttrs (map (x: {
|
||||
builtins.listToAttrs (map
|
||||
(x: {
|
||||
name = x;
|
||||
value = ip;
|
||||
})
|
||||
names);
|
||||
in {
|
||||
in
|
||||
{
|
||||
mapping = localDomains [
|
||||
"catnip.ee"
|
||||
"files"
|
||||
|
@ -517,14 +521,17 @@ in {
|
|||
"lidarr"
|
||||
] "100.93.150.89";
|
||||
};
|
||||
conditional = let
|
||||
conditional =
|
||||
let
|
||||
opennic = names: ip:
|
||||
builtins.listToAttrs (map (x: {
|
||||
builtins.listToAttrs (map
|
||||
(x: {
|
||||
name = x;
|
||||
value = ip;
|
||||
})
|
||||
names);
|
||||
in {
|
||||
in
|
||||
{
|
||||
mapping = opennic [
|
||||
"epic"
|
||||
"geek"
|
||||
|
@ -786,12 +793,12 @@ in {
|
|||
];
|
||||
listeners = [
|
||||
{
|
||||
bind_addresses = ["127.0.0.1"];
|
||||
bind_addresses = [ "127.0.0.1" ];
|
||||
port = settings.ports.synapse;
|
||||
resources = [
|
||||
{
|
||||
compress = true;
|
||||
names = ["client" "federation"];
|
||||
names = [ "client" "federation" ];
|
||||
}
|
||||
];
|
||||
tls = false;
|
||||
|
@ -880,7 +887,7 @@ in {
|
|||
|
||||
owo = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["networkmanager" "wheel" "docker"];
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EA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0Z8fVD1ysoU= mina@navi"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{...}: let
|
||||
settings = import ./settings.nix {};
|
||||
in {
|
||||
{ ... }:
|
||||
let
|
||||
settings = import ./settings.nix { };
|
||||
in
|
||||
{
|
||||
virtualisation.oci-containers = {
|
||||
backend = "docker";
|
||||
containers = {
|
||||
|
@ -35,7 +37,7 @@ in {
|
|||
plextraktsync = {
|
||||
autoStart = true;
|
||||
image = "ghcr.io/taxel/plextraktsync";
|
||||
cmd = ["watch"];
|
||||
cmd = [ "watch" ];
|
||||
environment = {
|
||||
PUID = "1000";
|
||||
PGID = "1000";
|
||||
|
@ -79,9 +81,11 @@ in {
|
|||
"--interval=60"
|
||||
];
|
||||
};
|
||||
archivebox = let
|
||||
archivebox =
|
||||
let
|
||||
internalHttpPort = 8000;
|
||||
in {
|
||||
in
|
||||
{
|
||||
autoStart = true;
|
||||
image = "docker.io/archivebox/archivebox:master";
|
||||
cmd = [
|
||||
|
|
12
flake.nix
12
flake.nix
|
@ -12,15 +12,15 @@
|
|||
drasl.url = "github:unmojang/drasl";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, ...
|
||||
} @ inputs: {
|
||||
nixosConfigurations.server = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {inherit inputs system;};
|
||||
modules = [./configuration.nix];
|
||||
specialArgs = { inherit inputs system; };
|
||||
modules = [ ./configuration.nix ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{...}: {
|
||||
{ ... }: {
|
||||
# sudo mkdir -p /var/lib/acme-turn
|
||||
# sudo chown -R acme:caddy /var/lib/acme-turn
|
||||
turnAcmeDir = "/var/lib/acme-turn";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue