Set up DynDNS

This commit is contained in:
2019-11-06 23:04:16 +01:00
parent 72d77e44f5
commit 140676179e
3 changed files with 52 additions and 10 deletions

40
modules/networking.nix Normal file
View File

@@ -0,0 +1,40 @@
{ config, pkgs, lib, ... }:
{
environment.systemPackages = with pkgs; [
ddclient
];
# Dynamic DNS configuration
services.ddclient = {
enable = true;
quiet = true;
use = "cmd, cmd='/run/current-system/sw/bin/curl https://checkipv4.dedyn.io/'";
server = "update.dedyn.io";
extraConfig = "
login=coolneng.dedyn.io\n
password='5320e326cf0564e10703e16ef38644da161f195a'\n
coolneng.dedyn.io\n
\n
login=rehiwi.dedyn.io\n
password='b05f777b8ca7193f5054a308c3cf396e73c2fb69'\n
rehiwi.dedyn.io\n
\n
login=nujabes.dedyn.io\n
password='IVstfQqFT8mDT9-CXsVS-nbv36rY'\n
nujabes.dedyn.io\n
\n
login=methyl.dedyn.io\n
password='vQ0S5dSWCwsO4LUSlVWqkZ2LDYD8'\n
methyl.dedyn.io\n
";
};
# Firewall configuration
networking.firewall = {
allowedTCPPorts = [ 631 6566 ];
autoLoadConntrackHelpers = true;
connectionTrackingModules = [ "sane" ];
};
}

31
modules/vim.nix Normal file
View File

@@ -0,0 +1,31 @@
# Vim configuration
with import <nixpkgs> {};
vim_configurable.customize {
name = "vim";
vimrcConfig.customRC = ''
""Basic stuff
set number
set ttyfast
""Colors
colorscheme synthwave
set t_Co=256
""Misc
set clipboard=unnamedplus
set nofoldenable
""Spaces instead of tabs
set expandtab
set tabstop=2
set shiftwidth=2
""Don't litter swp files everywhere
set backupdir=~/.cache
set directory=~/.cache
""Keybindings
set pastetoggle=<F2>
let mapleader="\<Space>"
nnoremap <leader>n :noh<cr>
"Move the current line up or down
nnoremap <leader>k :m-2<cr>==
nnoremap <leader>j :m+<cr>==
'';
}