diff options
Diffstat (limited to 'old/modules/mors')
-rw-r--r-- | old/modules/mors/default.nix | 25 | ||||
-rw-r--r-- | old/modules/mors/git.nix | 161 | ||||
-rw-r--r-- | old/modules/mors/paths.nix | 12 | ||||
-rw-r--r-- | old/modules/mors/repos.nix | 9 | ||||
-rw-r--r-- | old/modules/mors/retiolum.nix | 21 |
5 files changed, 170 insertions, 58 deletions
diff --git a/old/modules/mors/default.nix b/old/modules/mors/default.nix index d83d6abc9..8ba052d60 100644 --- a/old/modules/mors/default.nix +++ b/old/modules/mors/default.nix @@ -5,8 +5,7 @@ ../lass/xresources.nix ../lass/desktop-base.nix ../lass/programs.nix - ../lass/retiolum-mors.nix - ../lass/xserver-lass.nix + ./retiolum.nix ../tv/synaptics.nix ../lass/bitcoin.nix ../lass/browsers.nix @@ -31,7 +30,7 @@ nixpkgs = { url = "https://github.com/Lassulus/nixpkgs"; - rev = "45c99e522dcc4ef24cf71dbe38d94a308cb30530"; + rev = "7ef800430789252dac47f0b67e75a6b9bb616397"; }; networking.hostName = "mors"; @@ -110,6 +109,7 @@ SUBSYSTEM=="net", ATTR{address}=="f0:de:f1:0c:a7:63", NAME="et0" ''; + #TODO activationScripts seem broken, fix them! #activationScripts #split up and move into base system.activationScripts.powertopTunables = '' @@ -141,10 +141,18 @@ echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.1/power/control' echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.4/power/control' ''; - system.activationScripts.trackpoint = '' - echo 0 > '/sys/devices/platform/i8042/serio1/serio2/speed' - echo 220 > '/sys/devices/platform/i8042/serio1/serio2/sensitivity' - ''; + + hardware.trackpoint = { + enable = true; + sensitivity = 220; + speed = 0; + emulateWheel = true; + }; + + #system.activationScripts.trackpoint = '' + # echo 0 > '/sys/devices/platform/i8042/serio1/serio2/speed' + # echo 220 > '/sys/devices/platform/i8042/serio1/serio2/sensitivity' + #''; services.xserver = { videoDriver = "intel"; @@ -201,6 +209,9 @@ ]; }; + services.mongodb = { + enable = true; + }; #services.ircdHybrid = { # enable = true; diff --git a/old/modules/mors/git.nix b/old/modules/mors/git.nix index 1dd61d164..375064868 100644 --- a/old/modules/mors/git.nix +++ b/old/modules/mors/git.nix @@ -1,71 +1,130 @@ { config, lib, pkgs, ... }: -{ - imports = [ - ../tv/git +let + inherit (builtins) map readFile; + inherit (lib) concatMap listToAttrs; + # TODO lib should already include our stuff + inherit (import ../../lib { inherit lib pkgs; }) addNames git; + + x-repos = [ + (krebs-private "brain") + + (public "painload") + (public "shitment") + (public "wai-middleware-time") + (public "web-routes-wai-custom") + + (secret "pass") + + (tv-lass "emse-drywall") + (tv-lass "emse-hsdb") ]; - services.git = - let - inherit (builtins) readFile; - # TODO lib should already include our stuff - inherit (import ../../lib { inherit lib pkgs; }) addNames git; + users = addNames { + tv = { pubkey = readFile <pubkeys/tv_wu.ssh.pub>; }; + lass = { pubkey = readFile <pubkeys/lass.ssh.pub>; }; + uriel = { pubkey = readFile <pubkeys/uriel.ssh.pub>; }; + makefu = { pubkey = "xxx"; }; + }; - krebs-private = name: desc: - { - inherit desc; - hooks = { - post-receive = git.irc-announce { - nick = config.networking.hostName; # TODO make this the default - channel = "#retiolum"; - server = "ire.retiolum"; - }; - }; - } - in rec { - enable = true; + repos = listToAttrs (map ({ repo, ... }: { name = repo.name; value = repo; }) x-repos); - users = addNames { - tv = { pubkey = readFile <pubkeys/tv.ssh.pub>; }; - lass = { pubkey = readFile <pubkeys/lass.ssh.pub>; }; - uriel = { pubkey = readFile <pubkeys/lass.ssh.pub>; }; - makefu = { pubkey = "xxx"; }; - }; + rules = concatMap ({ rules, ... }: rules) x-repos; - repos = addNames { - shitment = { - desc = "shitment repository"; - hooks = { - post-receive = git.irc-announce { - nick = config.networking.hostName; # TODO make this the default - channel = "#retiolum"; - server = "ire.retiolum"; - }; + krebs-private = repo-name: + rec { + repo = { + name = repo-name; + hooks = { + post-receive = git.irc-announce { + nick = config.networking.hostName; # TODO make this the default + channel = "#retiolum"; + server = "ire.retiolum"; }; - public = true; }; - testing = { - desc = "testing repository"; - hooks = { - post-receive = git.irc-announce { - nick = config.networking.hostName; # TODO make this the default - channel = "#repository"; - server = "ire.retiolum"; - }; + }; + rules = with git; with users; [ + { user = lass; + repo = [ repo ]; + perm = push "refs/*" [ non-fast-forward create delete merge ]; + } + { user = [ tv makefu uriel ]; + repo = [ repo ]; + perm = fetch; + } + ]; + }; + + public = repo-name: + rec { + repo = { + name = repo-name; + hooks = { + post-receive = git.irc-announce { + nick = config.networking.hostName; # TODO make this the default + channel = "#retiolum"; + server = "ire.retiolum"; }; - public = true; }; + public = true; + }; + rules = with git; with users; [ + { user = lass; + repo = [ repo ]; + perm = push "refs/*" [ non-fast-forward create delete merge ]; + } + { user = [ tv makefu uriel ]; + repo = [ repo ]; + perm = fetch; + } + ]; + }; + + secret = repo-name: + rec { + repo = { + name = repo-name; + hooks = {}; }; + rules = with git; with users; [ + { user = lass; + repo = [ repo ]; + perm = push "refs/*" [ non-fast-forward create delete merge ]; + } + { user = [ uriel ]; + repo = [ repo ]; + perm = fetch; + } + ]; + }; - rules = with git; with users; with repos; [ + tv-lass = repo-name: + rec { + repo = { + name = repo-name; + hooks = {}; + }; + rules = with git; with users; [ { user = lass; - repo = [ testing shitment ]; - perm = push master [ non-fast-forward create delete merge ]; + repo = [ repo ]; + perm = push "refs/*" [ non-fast-forward create delete merge ]; } - { user = [ tv uriel makefu ]; - repo = [ testing shitment ]; + { user = [ tv ]; + repo = [ repo ]; perm = fetch; } ]; }; + +in + +{ + imports = [ + ../tv/git + ]; + + tv.git = { + enable = true; + inherit repos rules users; + }; } diff --git a/old/modules/mors/paths.nix b/old/modules/mors/paths.nix new file mode 100644 index 000000000..153356a7e --- /dev/null +++ b/old/modules/mors/paths.nix @@ -0,0 +1,12 @@ +{ + lib.file.url = ../../lib; + modules.file.url = ../../modules; + nixpkgs.git = { + url = https://github.com/Lassulus/nixpkgs; + rev = "7ef800430789252dac47f0b67e75a6b9bb616397"; + cache = ../../tmp/git-cache; + }; + pubkeys.file.url = ../../pubkeys; + retiolum-hosts.file.url = ../../hosts; + secrets.file.url = ../../secrets; +} diff --git a/old/modules/mors/repos.nix b/old/modules/mors/repos.nix index e31ba9481..1f7f33456 100644 --- a/old/modules/mors/repos.nix +++ b/old/modules/mors/repos.nix @@ -35,6 +35,15 @@ extraConfig = "option hook.post-receive = irc-announce"; }; + emse-drywall = { + users = { + lass = "RW+"; + uriel = "R"; + tv = "R"; + }; + extraConfig = "option hook.post-receive = irc-announce"; + }; + emse-hsdb = { users = { lass = "RW+"; diff --git a/old/modules/mors/retiolum.nix b/old/modules/mors/retiolum.nix new file mode 100644 index 000000000..1148bee9c --- /dev/null +++ b/old/modules/mors/retiolum.nix @@ -0,0 +1,21 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ../tv/retiolum + ]; + + tv.retiolum = { + enable = true; + hosts = <retiolum-hosts>; + privateKeyFile = "/etc/nixos/secrets/mors.retiolum.rsa_key.priv"; + connectTo = [ + "fastpoke" + "gum" + "ire" + ]; + }; + + networking.firewall.allowedTCPPorts = [ 655 ]; + networking.firewall.allowedUDPPorts = [ 655 ]; +} |