From fa38155eec9563dc9dc620a77900d87b97443cfe Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 15 Jul 2017 18:57:16 +0200 Subject: ma: move systems to subdir, init source --- makefu/1systems/darth/config.nix | 80 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 makefu/1systems/darth/config.nix (limited to 'makefu/1systems/darth') diff --git a/makefu/1systems/darth/config.nix b/makefu/1systems/darth/config.nix new file mode 100644 index 000000000..b39021176 --- /dev/null +++ b/makefu/1systems/darth/config.nix @@ -0,0 +1,80 @@ +{ config, pkgs, lib, ... }: + +with import ; +let + byid = dev: "/dev/disk/by-id/" + dev; + rootDisk = byid "ata-ADATA_SSD_S599_64GB_10460000000000000039"; + auxDisk = byid "ata-HGST_HTS721010A9E630_JR10006PH3A02F"; + dataPartition = auxDisk + "-part1"; + + allDisks = [ rootDisk ]; # auxDisk +in { + imports = [ + ../. + ../2configs/fs/single-partition-ext4.nix + ../2configs/zsh-user.nix + ../2configs/smart-monitor.nix + ../2configs/exim-retiolum.nix + ../2configs/virtualization.nix + + ../2configs/tinc/retiolum.nix + ../2configs/temp-share-samba.nix + ]; + services.samba.shares = { + isos = { + path = "/data/isos/"; + "read only" = "yes"; + browseable = "yes"; + "guest ok" = "yes"; + }; + }; + services.tinc.networks.siem = { + name = "sdarth"; + extraConfig = "ConnectTo = sjump"; + }; + + makefu.forward-journal = { + enable = true; + src = "10.8.10.2"; + dst = "10.8.10.6"; + }; + + #networking.firewall.enable = false; + + boot.kernelModules = [ "coretemp" "f71882fg" ]; + hardware.enableAllFirmware = true; + nixpkgs.config.allowUnfree = true; + networking = { + wireless.enable = true; + firewall = { + allowPing = true; + logRefusedConnections = false; + trustedInterfaces = [ "eno1" ]; + allowedUDPPorts = [ 80 655 1655 67 ]; + allowedTCPPorts = [ 80 655 1655 ]; + }; + # fallback connection to the internal virtual network + interfaces.virbr3.ip4 = [{ + address = "10.8.8.2"; + prefixLength = 24; + }]; + }; + + # TODO smartd omo darth gum all-in-one + services.smartd.devices = builtins.map (x: { device = x; }) allDisks; + zramSwap.enable = true; + + #fileSystems."/data" = { + # device = dataPartition; + # fsType = "ext4"; + #}; + + boot.loader.grub.device = rootDisk; + + users.users.root.openssh.authorizedKeys.keys = [ + config.krebs.users.makefu-omo.pubkey + config.krebs.users.makefu-vbob.pubkey + ]; + + krebs.build.host = config.krebs.hosts.darth; +} -- cgit v1.2.3 From 7704f80890c75f65c2906ecc17cdd89761d308ad Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 15 Jul 2017 19:01:02 +0200 Subject: ma: replace path to 2configs, init source.nix --- makefu/1systems/darth/config.nix | 16 ++++++++-------- makefu/1systems/darth/source.nix | 3 +++ 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 makefu/1systems/darth/source.nix (limited to 'makefu/1systems/darth') diff --git a/makefu/1systems/darth/config.nix b/makefu/1systems/darth/config.nix index b39021176..c8d17ca70 100644 --- a/makefu/1systems/darth/config.nix +++ b/makefu/1systems/darth/config.nix @@ -10,15 +10,15 @@ let allDisks = [ rootDisk ]; # auxDisk in { imports = [ - ../. - ../2configs/fs/single-partition-ext4.nix - ../2configs/zsh-user.nix - ../2configs/smart-monitor.nix - ../2configs/exim-retiolum.nix - ../2configs/virtualization.nix + + + + + + - ../2configs/tinc/retiolum.nix - ../2configs/temp-share-samba.nix + + ]; services.samba.shares = { isos = { diff --git a/makefu/1systems/darth/source.nix b/makefu/1systems/darth/source.nix new file mode 100644 index 000000000..b13b6c603 --- /dev/null +++ b/makefu/1systems/darth/source.nix @@ -0,0 +1,3 @@ +import { + name="darth"; +} -- cgit v1.2.3