fix nixos-rebuild switch warnings on sputnik

This commit is contained in:
Ingolf Wagner 2021-09-11 20:56:00 +02:00
parent 8567dbf7b4
commit 26df76ed62
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
10 changed files with 4 additions and 289 deletions

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
services.nginx.enable = true; services.nginx.enable = true;
services.nginx.virtualHosts.codimd = { services.nginx.virtualHosts.hedgedoc = {
listen = [ listen = [
{ {
addr = "0.0.0.0"; addr = "0.0.0.0";
@ -16,7 +16,7 @@
]; ];
enableACME = true; enableACME = true;
addSSL = true; addSSL = true;
serverName = "codimd.ingolf-wagner.de"; serverName = "md.ingolf-wagner.de";
locations."/".extraConfig = '' locations."/".extraConfig = ''
client_max_body_size 4G; client_max_body_size 4G;
proxy_set_header Host $host; proxy_set_header Host $host;
@ -24,13 +24,13 @@
''; '';
}; };
services.codimd = { services.hedgedoc = {
enable = true; enable = true;
configuration = { configuration = {
allowFreeURL = true; allowFreeURL = true;
db = { db = {
dialect = "sqlite"; dialect = "sqlite";
storage = "/var/lib/codimd/db.codimd.sqlite"; storage = "/var/lib/hedgedoc/db.sqlite";
useCDN = false; useCDN = false;
}; };
port = 3091; port = 3091;

View file

@ -10,7 +10,6 @@
./codimd.nix ./codimd.nix
./bitwarden.nix ./bitwarden.nix
#./syncplay.nix #./syncplay.nix
#./mail-server.nix
]; ];

View file

@ -1,61 +0,0 @@
{ config, pkgs, lib, ... }:
# make sure no update befor changing this parameter
assert lib.versionOlder lib.version "20.09";
let release = "nixos-20.09";
in {
imports = [
(builtins.fetchTarball {
url =
"https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz";
# This hash needs to be updated
sha256 = "0000000000000000000000000000000000000000000000000000";
})
];
mailserver = {
enable = true;
fqdn = "mail.ingolf-wagner.de";
domains = [ "ingolf-wagner.de" ];
# A list of all login accounts. To create the password hashes, use
# nix-shell -p mkpasswd --run 'mkpasswd -m sha-512 "super secret password"'
loginAccounts = {
"root@ingolf-wagner.com" = {
hashedPassword = lib.fileContents
<secrets/mailserver/hashedPasswords/root_at_ingolf-wagner.de>;
#aliases = [
# "postmaster@gaykraft.com"
#];
# Make this user the catchAll address for domains
catchAll = [ "ingol-wagner.de" ];
};
};
# Extra virtual aliases. These are email addresses that are forwarded to
# loginAccounts addresses.
#extraVirtualAliases = {
# address = forward address;
#"abuse@example.com" = "user1@example.com";
#};
# Use Let's Encrypt certificates. Note that this needs to set up a stripped
# down nginx and opens port 80.
certificateScheme = 3;
# Enable IMAP and POP3
enableImap = false;
enablePop3 = true;
enableImapSsl = false;
enablePop3Ssl = true;
# Enable the ManageSieve protocol
enableManageSieve = true;
# whether to scan inbound emails for viruses (note that this requires at least
# 1 Gb RAM for the server. Without virus scanning 256 MB RAM should be plenty)
virusScanning = false;
};
}

View file

@ -5,14 +5,11 @@
./hardware-configuration.nix ./hardware-configuration.nix
#./bepasty.nix not working https://github.com/NixOS/nixpkgs/issues/116326 #./bepasty.nix not working https://github.com/NixOS/nixpkgs/issues/116326
#./castget.nix
./gogs.nix ./gogs.nix
./grafana.nix ./grafana.nix
./graylog.nix ./graylog.nix
./jenkins.nix ./jenkins.nix
./kibana.nix ./kibana.nix
#./lektor-gaykraft.nix
#./lektor-terranix.nix
./mail-fetcher.nix ./mail-fetcher.nix
./packages.nix ./packages.nix
./prometheus.nix ./prometheus.nix
@ -21,9 +18,7 @@
./tinc.nix ./tinc.nix
./transmission.nix ./transmission.nix
./weechat.nix ./weechat.nix
#./wetten.nix
./nextcloud.nix ./nextcloud.nix
#./mattermost.nix
./borg.nix ./borg.nix
#./metabase.nix #./metabase.nix
#./jupyter.nix #./jupyter.nix

View file

@ -79,19 +79,6 @@ in {
in [ in [
(job "deploy-gaykraft" {
url = "ssh://gogs@workhorse.private:2222/palo/gaykraft.git";
credentialsId = gogs-id;
} [
{ "build" = [ "nix-shell --run build" ]; }
{
"publish" = [{
script = "nix-shell --run publish";
credentialsId = sshSputnik;
}];
}
])
(job "sync-retiolum" { (job "sync-retiolum" {
url = "git@github.com:krebs/retiolum.git"; url = "git@github.com:krebs/retiolum.git";
credentialsId = github-id; credentialsId = github-id;

View file

@ -1,55 +0,0 @@
{ config, pkgs, lib, ... }:
let
containerName = "gaykraft";
port = 5001;
repository = "ssh://gogs@git.ingolf-wagner.de:443/palo/gaykraft.git";
sshKey = toString <secrets/lektor/gaykraft>;
in {
services.nginx = {
enable = true;
statusPage = true;
virtualHosts = {
"${containerName}.${config.networking.hostName}.private" = {
serverAliases = [ ];
locations."/" = {
proxyPass =
"http://${config.networking.hostName}.private:${toString port}";
};
};
};
};
containers.${containerName} = {
bindMounts = {
"/var/src" = {
hostPath = toString "/var/src/";
isReadOnly = true;
};
};
autoStart = true;
config = { config, pkgs, ... }: {
imports = [ <system/all> ];
services.lektor = {
enable = true;
host = "git.ingolf-wagner.de";
sshKey = sshKey;
repository = repository;
port = port;
additionalScript =
pkgs.writeScript "build" "${pkgs.nix}/bin/nix-shell --run build";
};
};
};
# it might take some time will this thing is up
systemd.services."container@${containerName}".serviceConfig.TimeoutStartSec =
lib.mkForce "infinity";
}

View file

@ -1,55 +0,0 @@
{ config, pkgs, lib, ... }:
let
containerName = "terranix";
port = 5003;
repository = "ssh://gogs@git.ingolf-wagner.de:443/terranix/terranix.org.git";
sshKey = toString <secrets/lektor/terranix>;
in {
services.nginx = {
enable = true;
statusPage = true;
virtualHosts = {
"${containerName}.${config.networking.hostName}.private" = {
serverAliases = [ ];
locations."/" = {
proxyPass =
"http://${config.networking.hostName}.private:${toString port}";
};
};
};
};
containers.${containerName} = {
bindMounts = {
"/var/src" = {
hostPath = toString "/var/src/";
isReadOnly = true;
};
};
autoStart = true;
config = { config, pkgs, ... }: {
imports = [ <system/all> ];
services.lektor = {
enable = true;
host = "git.ingolf-wagner.de";
sshKey = sshKey;
repository = repository;
port = port;
additionalScript =
pkgs.writeScript "build" "${pkgs.nix}/bin/nix-shell --run build";
};
};
};
# it might take some time will this thing is up
systemd.services."container@${containerName}".serviceConfig.TimeoutStartSec =
lib.mkForce "infinity";
}

View file

@ -457,11 +457,6 @@ in {
source = toString <secrets/mail/siteground/contact>; source = toString <secrets/mail/siteground/contact>;
requiredBy = [ "fetchmail.service" ]; requiredBy = [ "fetchmail.service" ];
}; };
"gaykraft.root" = {
user = config.users.users.mailUser.name;
source = toString <secrets/mail/gaykraft/root>;
requiredBy = [ "fetchmail.service" ];
};
"c-base.palo" = { "c-base.palo" = {
user = config.users.users.mailUser.name; user = config.users.users.mailUser.name;
source = toString <secrets/mail/c-base/palo>; source = toString <secrets/mail/c-base/palo>;

View file

@ -1,50 +0,0 @@
{ config, lib, pkgs, ... }:
let
hostname = "seafile.gaykraft.com";
port = 3030;
home = "/home/seafile";
serviceName = "seafile-docker";
in {
services.nginx = {
enable = true;
statusPage = true;
virtualHosts = {
"seafile.${config.networking.hostName}.private" = {
serverAliases = [ ];
locations."/" = {
proxyPass =
"http://${config.networking.hostName}.private:${toString port}";
};
};
};
};
systemd.services."${serviceName}" = {
enable = true;
description = "seafile service running as docker";
after = [ "network.target" "docker.service" ];
requires = [ "docker.service" ];
wantedBy = [ "multi-user.target" ];
script = ''
# delete old instance to ensure update
${pkgs.docker}/bin/docker stop seafile || true && ${pkgs.docker}/bin/docker rm -f seafile || true
# start instance
${pkgs.docker}/bin/docker run \
--name seafile \
--env SEAFILE_SERVER_HOSTNAME=${hostname} \
--env SEAFILE_ADMIN_EMAIL="root@${hostname}" \
--env SEAFILE_ADMIN_PASSWORD="${
lib.fileContents <secrets/seafile/root>
}" \
--volume ${home}:/shared \
--publish ${toString port}:80 \
seafileltd/seafile:latest
'';
};
virtualisation.docker.enable = lib.mkDefault true;
}

View file

@ -1,40 +0,0 @@
{ config, lib, pkgs , ... }:
{
imports = [
<wetten/nixos>
];
krops.userKeys."wetten_appkey" = {
user = "wetten";
source = toString <secrets/betfair/appkey>;
requiredBy = [ "wetten.service" ];
};
krops.userKeys."wetten_key" = {
user = "wetten";
source = <secrets/betfair/key>;
requiredBy = [ "wetten.service" ];
};
krops.userKeys."wetten_cert" = {
user = "wetten";
source = toString <secrets/betfair/cert>;
requiredBy = [ "wetten.service" ];
};
krops.userKeys."wetten_password" = {
user = "wetten";
source = toString <secrets/betfair/password>;
requiredBy = [ "wetten.service" ];
};
services.wetten = {
enable = true;
username = "palipalo9@googlemail.com";
passwordFile = config.krops.userKeys."wetten_password".target;
appKeyFile = config.krops.userKeys."wetten_appkey".target;
clientCert = config.krops.userKeys."wetten_cert".target;
clientCertKey = config.krops.userKeys."wetten_key".target;
};
}