summaryrefslogtreecommitdiff
path: root/depo/nutin-madaj
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-10-27 09:48:52 -0700
committerBen Sima <ben@bsima.me>2019-10-27 12:14:40 -0700
commitc790672cc244ac4caba1bda3572829a6c6862891 (patch)
tree2706bb8044f7b14840c5f90f215b79b433e81045 /depo/nutin-madaj
parent44df4ba39f65c3afd84bee6b03f47d9b061e9038 (diff)
move everything to namespace directories
Diffstat (limited to 'depo/nutin-madaj')
-rw-r--r--depo/nutin-madaj/default.nix94
-rw-r--r--depo/nutin-madaj/firefox.nix12
-rw-r--r--depo/nutin-madaj/git.nix18
-rw-r--r--depo/nutin-madaj/hardware-configuration.nix6
-rw-r--r--depo/nutin-madaj/mail.nix43
-rw-r--r--depo/nutin-madaj/networking.nix38
-rw-r--r--depo/nutin-madaj/web.nix41
-rw-r--r--depo/nutin-madaj/znc.nix70
8 files changed, 0 insertions, 322 deletions
diff --git a/depo/nutin-madaj/default.nix b/depo/nutin-madaj/default.nix
deleted file mode 100644
index 4d9dd02..0000000
--- a/depo/nutin-madaj/default.nix
+++ /dev/null
@@ -1,94 +0,0 @@
-{ nixos }:
-
-/*
-
-nutin-madaj - cloud infrastructure server.
-
-This serves the git repo, mailserver, znc bouncer, user sites, and so on.
-
-Currently also used as a catch-all production/staging server, until I get real
-stuff deployed.
-
-*/
-
-let
- nixos-mailserver = builtins.fetchTarball {
- url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/v2.2.1/nixos-mailserver-v2.2.1.tar.gz";
- sha256 = "03d49v8qnid9g9rha0wg2z6vic06mhp0b049s3whccn1axvs2zzx";
- };
- ibbPort = "3000";
- fathomPort = "3030";
-in
-nixos {
- system = "x86_64-linux";
- configuration = {
- imports = [
- ./hardware-configuration.nix
- ./networking.nix
-
- # common infra
- ../users.nix
- ../packages.nix
-
- # configured modules
- ./git.nix
- ./mail.nix
- ./web.nix
- ./znc.nix
-
- # our custom modules
- #../../mode/ibb.nix
- #../../mode/fathom.nix
-
- # third party
- nixos-mailserver
- ];
-
- nixpkgs.config.allowUnfree = true;
- nixpkgs.overlays = [
- (import ../../pack/overlay.nix)
- ];
-
- programs.mosh = {
- enable = true;
- withUtempter = true;
- };
-
- services.openssh = {
- enable = true;
- passwordAuthentication = false;
- };
-
- security.sudo.wheelNeedsPassword = true;
-
- # our custom apps
- #services = {
- # ibb = {
- # enable = false;
- # port = ibbPort;
- # };
- # # TODO: move this nginx config into mode/ibb.nix
- # nginx.virtualHosts."influencedbybooks.com" = {
- # forceSSL = true;
- # enableACME = true;
- # locations = {
- # "/" = {
- # proxyPass = "http://localhost:${ibbPort}";
- # };
- # };
- # };
- # fathom = {
- # enable = true;
- # port = fathomPort;
- # dataDir = "/var/lib/fathom";
- # };
- # nginx.virtualHosts."stats.simatime.com" = {
- # locations."/".proxyPass = "http://localhost:${fathomPort}";
- # forceSSL = true;
- # enableACME = true;
- # };
- #};
-
- boot.cleanTmpDir = true;
- };
-}
diff --git a/depo/nutin-madaj/firefox.nix b/depo/nutin-madaj/firefox.nix
deleted file mode 100644
index 12316fb..0000000
--- a/depo/nutin-madaj/firefox.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ ... }:
-
-{
- services = {
- firefox.syncserver = {
- enable = true;
- allowNewUsers = true;
- listen.port = 5001;
- publicUri = "http://firefoxsync.simatime.com";
- };
- };
-}
diff --git a/depo/nutin-madaj/git.nix b/depo/nutin-madaj/git.nix
deleted file mode 100644
index e61abb4..0000000
--- a/depo/nutin-madaj/git.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ pkgs, ... }:
-
-{
- services = {
- gitolite = {
- enable = true;
- enableGitAnnex = true;
- # TODO: change this to /var/lib/gitolite?
- dataDir = "/srv/git";
- user = "git";
- group = "git";
- extraGitoliteRc = ''
- $RC{SITE_INFO} = 'a computer is a bicycle for the mind.';
- '';
- adminPubkey = builtins.readFile ../../keys/ben.pub;
- };
- };
-}
diff --git a/depo/nutin-madaj/hardware-configuration.nix b/depo/nutin-madaj/hardware-configuration.nix
deleted file mode 100644
index 8c88cb7..0000000
--- a/depo/nutin-madaj/hardware-configuration.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{ ... }:
-{
- imports = [ <nixpkgs/nixos/modules/profiles/qemu-guest.nix> ];
- boot.loader.grub.device = "/dev/vda";
- fileSystems."/" = { device = "/dev/vda1"; fsType = "ext4"; };
-}
diff --git a/depo/nutin-madaj/mail.nix b/depo/nutin-madaj/mail.nix
deleted file mode 100644
index 81bddc2..0000000
--- a/depo/nutin-madaj/mail.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{ ... }:
-
-{
- mailserver = {
- enable = true;
- monitoring = {
- enable = false;
- alertAddress = "bsima@me.com";
- };
- fqdn = "simatime.com";
- domains = [ "simatime.com" "bsima.me" ];
- certificateScheme = 3; # let's encrypt
- enableImap = true;
- enablePop3 = true;
- enableImapSsl = true;
- enablePop3Ssl = true;
- enableManageSieve = true;
- virusScanning = false; # ur on ur own
- localDnsResolver = true;
-
- loginAccounts = {
- "ben@simatime.com" = {
- hashedPassword = "$6$Xr180W0PqprtaFB0$9S/Ug1Yz11CaWO7UdVJxQLZWfRUE3/rarB0driXkXALugEeQDLIjG2STGQBLU23//JtK3Mz8Kwsvg1/Zo0vD2/";
- aliases = [
- # my default email
- "ben@bsima.me"
- # admin stuff
- "postmaster@simatime.com"
- "abuse@simatime.com"
- ];
- catchAll = [ "simatime.com" "bsima.me" ];
- quota = "5G";
- };
- "nick@simatime.com" = {
- hashedPassword = "$6$31P/Mg8k8Pezy1e$Fn1tDyssf.1EgxmLYFsQpSq6RP4wbEvP/UlBlXQhyKA9FnmFtJteXsbJM1naa8Kyylo8vZM9zmeoSthHS1slA1";
- aliases = [
- "nicolai@simatime.com"
- ];
- quota = "1G";
- };
- };
- };
-}
diff --git a/depo/nutin-madaj/networking.nix b/depo/nutin-madaj/networking.nix
deleted file mode 100644
index 4cfd73d..0000000
--- a/depo/nutin-madaj/networking.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{ lib, ... }: {
- networking = {
-
- hostName = "simatime";
-
- firewall = {
- allowedTCPPorts = [ 22 80 443 ];
- allowPing = true;
- };
-
- # This following was populated at runtime with the networking details
- # gathered from the active system.
- nameservers = [
- "67.207.67.2"
- "67.207.67.3"
- ];
- defaultGateway = "159.89.128.1";
- defaultGateway6 = "";
- dhcpcd.enable = false;
- usePredictableInterfaceNames = lib.mkForce true;
- interfaces = {
- eth0 = {
- ipv4.addresses = [
- { address="159.89.128.69"; prefixLength=20; }
-{ address="10.46.0.6"; prefixLength=16; }
- ];
- ipv6.addresses = [
- { address="fe80::e899:c0ff:fe9c:e194"; prefixLength=64; }
- ];
- };
-
- };
- };
- services.udev.extraRules = ''
- ATTR{address}=="ea:99:c0:9c:e1:94", NAME="eth0"
-
- '';
-}
diff --git a/depo/nutin-madaj/web.nix b/depo/nutin-madaj/web.nix
deleted file mode 100644
index d6be348..0000000
--- a/depo/nutin-madaj/web.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{ ... }:
-
-let
- bensIp = "69.181.254.154"; # hikuj-zupip
-in
-{
- services = {
- nginx = {
- enable = true;
- recommendedGzipSettings = true;
- recommendedOptimisation = true;
- recommendedProxySettings = true;
- recommendedTlsSettings = true;
- virtualHosts = {
- "bsima.me".root = "/home/ben/public_html/";
- "www.bsima.me".root = "/home/ben/public_html/";
- "simatime.com".locations."/".root = "/srv/www/";
- "firefoxsync.simatime.com".locations."/".proxyPass = "http://localhost:5001";
- "hero.simatime.com".locations."/".proxyPass = "http://${bensIp}:3001";
- "tv.simatime.com".locations."/".proxyPass = "http://${bensIp}:8096"; # emby runs on port 8096
- "deluge.simatime.com".locations."/".proxyPass = "http://${bensIp}:8112";
-
- "notebook.simatime.com".locations = {
- "/" = {
- proxyPass = "http://${bensIp}:3099";
- proxyWebsockets = true;
- extraConfig = ''
- proxy_buffering off;
- proxy_read_timeout 86400;
-
- '';
- };
- "/(api/kernels/[^/]+/channels|terminals/websocket)/" = {
- proxyPass = "http://${bensIp}:3099";
- proxyWebsockets = true;
- };
- };
- };
- };
- };
-}
diff --git a/depo/nutin-madaj/znc.nix b/depo/nutin-madaj/znc.nix
deleted file mode 100644
index 0449893..0000000
--- a/depo/nutin-madaj/znc.nix
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-
-N.B.: generate znc passwords with 'nix-shell -p znc --command "znc --makepass"'
-
-- https://wiki.znc.in/Configuration
-
-*/
-
-{ ... }:
-
-{
- services = {
- znc = {
- enable = true;
- mutable = false;
- useLegacyConfig = false;
- openFirewall = true;
- config = {
- LoadModule = [ "adminlog" ];
- User.bsima = {
- Admin = true;
- Nick = "bsima";
- AltNick = "bsima1";
- LoadModule = [ "chansaver" "controlpanel" "log" ];
- Network.freenode = {
- Server = "chat.freenode.net +6697";
- LoadModule = [ "simple_away" "nickserv" "sasl" ];
- Chan = {
- "#ai" = {};
- "#biz" = { Modes = "+Sp"; };
- "#bsima" = { Modes = "+Sp"; };
- "##categorytheory" = { Detached = true; };
- "#clojure" = { Detached = true; };
- "#coq" = { Detached = true; };
- "#emacs" = { Detached = true; };
- "#guile" = { Detached = true; };
- "#guix" = { Detached = true; };
- "#haskell" = {};
- "#haskell-miso" = { Detached = true; };
- "#hledger" = {}
- "#hnix" = { Detached = true; };
- "#home-manager" = { Detached = true; };
- "#ledger" = {};
- "#nix-darwin" = { Detached = true; };
- "#nixos" = {};
- "#org-mode" = {};
- "#scheme" = { Detached = true; };
- "#servant" = { Detached = true; };
- "#sr.ht" = { Detached = true; };
- "#xmonad" = { Detached = true; };
- };
- };
- Network.efnet = {
- Server = "irc.efnet.info +6697";
- LoadModule = [ "simple_away" ];
- };
- Network.sorcery = {
- Server = "irc.sorcery.net +6697";
- LoadModule = [ "simple_away" ];
- };
- Pass.password = {
- Method = "sha256";
- Hash = "bead16d806e7bf5cbbc31d572b20f01e2b253eb60e2497ce465df56306becd02";
- Salt = "/GhmBMc+E6b7qd8muFEe";
- };
- };
- };
- };
- };
-}