From fa38155eec9563dc9dc620a77900d87b97443cfe Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 15 Jul 2017 18:57:16 +0200 Subject: [PATCH 1/5] ma: move systems to subdir, init source --- .../1systems/{darth.nix => darth/config.nix} | 0 makefu/1systems/{drop.nix => drop/config.nix} | 0 .../{fileleech.nix => fileleech/config.nix} | 0 .../{filepimp.nix => filepimp/config.nix} | 0 makefu/1systems/{gum.nix => gum/config.nix} | 0 makefu/1systems/{iso.nix => iso/config.nix} | 0 makefu/1systems/{omo.nix => omo/config.nix} | 0 makefu/1systems/{pnp.nix => pnp/config.nix} | 0 .../{repunit.nix => repunit/config.nix} | 0 makefu/1systems/{sdev.nix => sdev/config.nix} | 0 .../{shoney.nix => shoney/config.nix} | 0 .../{studio.nix => studio/config.nix} | 0 makefu/1systems/{tsp.nix => tsp/config.nix} | 0 makefu/1systems/{vbob.nix => vbob/config.nix} | 0 makefu/1systems/{wbob.nix => wbob/config.nix} | 0 makefu/1systems/{wry.nix => wry/config.nix} | 0 makefu/1systems/{x.nix => x/config.nix} | 0 makefu/source.nix | 29 +++++++++++++++++++ 18 files changed, 29 insertions(+) rename makefu/1systems/{darth.nix => darth/config.nix} (100%) rename makefu/1systems/{drop.nix => drop/config.nix} (100%) rename makefu/1systems/{fileleech.nix => fileleech/config.nix} (100%) rename makefu/1systems/{filepimp.nix => filepimp/config.nix} (100%) rename makefu/1systems/{gum.nix => gum/config.nix} (100%) rename makefu/1systems/{iso.nix => iso/config.nix} (100%) rename makefu/1systems/{omo.nix => omo/config.nix} (100%) rename makefu/1systems/{pnp.nix => pnp/config.nix} (100%) rename makefu/1systems/{repunit.nix => repunit/config.nix} (100%) rename makefu/1systems/{sdev.nix => sdev/config.nix} (100%) rename makefu/1systems/{shoney.nix => shoney/config.nix} (100%) rename makefu/1systems/{studio.nix => studio/config.nix} (100%) rename makefu/1systems/{tsp.nix => tsp/config.nix} (100%) rename makefu/1systems/{vbob.nix => vbob/config.nix} (100%) rename makefu/1systems/{wbob.nix => wbob/config.nix} (100%) rename makefu/1systems/{wry.nix => wry/config.nix} (100%) rename makefu/1systems/{x.nix => x/config.nix} (100%) create mode 100644 makefu/source.nix diff --git a/makefu/1systems/darth.nix b/makefu/1systems/darth/config.nix similarity index 100% rename from makefu/1systems/darth.nix rename to makefu/1systems/darth/config.nix diff --git a/makefu/1systems/drop.nix b/makefu/1systems/drop/config.nix similarity index 100% rename from makefu/1systems/drop.nix rename to makefu/1systems/drop/config.nix diff --git a/makefu/1systems/fileleech.nix b/makefu/1systems/fileleech/config.nix similarity index 100% rename from makefu/1systems/fileleech.nix rename to makefu/1systems/fileleech/config.nix diff --git a/makefu/1systems/filepimp.nix b/makefu/1systems/filepimp/config.nix similarity index 100% rename from makefu/1systems/filepimp.nix rename to makefu/1systems/filepimp/config.nix diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum/config.nix similarity index 100% rename from makefu/1systems/gum.nix rename to makefu/1systems/gum/config.nix diff --git a/makefu/1systems/iso.nix b/makefu/1systems/iso/config.nix similarity index 100% rename from makefu/1systems/iso.nix rename to makefu/1systems/iso/config.nix diff --git a/makefu/1systems/omo.nix b/makefu/1systems/omo/config.nix similarity index 100% rename from makefu/1systems/omo.nix rename to makefu/1systems/omo/config.nix diff --git a/makefu/1systems/pnp.nix b/makefu/1systems/pnp/config.nix similarity index 100% rename from makefu/1systems/pnp.nix rename to makefu/1systems/pnp/config.nix diff --git a/makefu/1systems/repunit.nix b/makefu/1systems/repunit/config.nix similarity index 100% rename from makefu/1systems/repunit.nix rename to makefu/1systems/repunit/config.nix diff --git a/makefu/1systems/sdev.nix b/makefu/1systems/sdev/config.nix similarity index 100% rename from makefu/1systems/sdev.nix rename to makefu/1systems/sdev/config.nix diff --git a/makefu/1systems/shoney.nix b/makefu/1systems/shoney/config.nix similarity index 100% rename from makefu/1systems/shoney.nix rename to makefu/1systems/shoney/config.nix diff --git a/makefu/1systems/studio.nix b/makefu/1systems/studio/config.nix similarity index 100% rename from makefu/1systems/studio.nix rename to makefu/1systems/studio/config.nix diff --git a/makefu/1systems/tsp.nix b/makefu/1systems/tsp/config.nix similarity index 100% rename from makefu/1systems/tsp.nix rename to makefu/1systems/tsp/config.nix diff --git a/makefu/1systems/vbob.nix b/makefu/1systems/vbob/config.nix similarity index 100% rename from makefu/1systems/vbob.nix rename to makefu/1systems/vbob/config.nix diff --git a/makefu/1systems/wbob.nix b/makefu/1systems/wbob/config.nix similarity index 100% rename from makefu/1systems/wbob.nix rename to makefu/1systems/wbob/config.nix diff --git a/makefu/1systems/wry.nix b/makefu/1systems/wry/config.nix similarity index 100% rename from makefu/1systems/wry.nix rename to makefu/1systems/wry/config.nix diff --git a/makefu/1systems/x.nix b/makefu/1systems/x/config.nix similarity index 100% rename from makefu/1systems/x.nix rename to makefu/1systems/x/config.nix diff --git a/makefu/source.nix b/makefu/source.nix new file mode 100644 index 000000000..18733ee5c --- /dev/null +++ b/makefu/source.nix @@ -0,0 +1,29 @@ +with import ; +host@{ name, secure ? false, override ? {} }: let + builder = if getEnv "dummy_secrets" == "true" + then "buildbot" + else "tv"; + _file = + "/tv/1systems/${name}/source.nix"; +in + evalSource (toString _file) [ + { + nixos-config.symlink = "stockholm/tv/1systems/${name}/config.nix"; + nixpkgs.git = { + # nixos-17.03 + ref = mkDefault "94941cb0455bfc50b1bf63186cfad7136d629f78"; + url = https://github.com/NixOS/nixpkgs; + }; + secrets.file = getAttr builder { + buildbot = toString ; + tv = "/home/tv/secrets/${name}"; + }; + stockholm.file = toString ; + } + (mkIf (builder == "tv") { + secrets-common.file = "/home/tv/secrets/common"; + }) + (mkIf (builder == "tv" && secure) { + secrets-master.file = "/home/tv/secrets/master"; + }) + override + ] From 7704f80890c75f65c2906ecc17cdd89761d308ad Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 15 Jul 2017 19:01:02 +0200 Subject: [PATCH 2/5] ma: replace path to 2configs, init source.nix --- makefu/1systems/darth/config.nix | 16 +++---- makefu/1systems/darth/source.nix | 3 ++ makefu/1systems/drop/config.nix | 8 ++-- makefu/1systems/drop/source.nix | 3 ++ makefu/1systems/fileleech/config.nix | 18 +++---- makefu/1systems/fileleech/source.nix | 3 ++ makefu/1systems/filepimp/config.nix | 16 +++---- makefu/1systems/filepimp/source.nix | 3 ++ makefu/1systems/gum/config.nix | 72 ++++++++++++++-------------- makefu/1systems/gum/source.nix | 3 ++ makefu/1systems/iso/config.nix | 4 +- makefu/1systems/iso/source.nix | 3 ++ makefu/1systems/omo/config.nix | 44 ++++++++--------- makefu/1systems/omo/source.nix | 3 ++ makefu/1systems/pnp/config.nix | 8 ++-- makefu/1systems/pnp/source.nix | 3 ++ makefu/1systems/repunit/config.nix | 6 +-- makefu/1systems/repunit/source.nix | 3 ++ makefu/1systems/sdev/config.nix | 6 +-- makefu/1systems/sdev/source.nix | 3 ++ makefu/1systems/shoney/config.nix | 12 ++--- makefu/1systems/shoney/source.nix | 3 ++ makefu/1systems/studio/config.nix | 16 +++---- makefu/1systems/studio/source.nix | 3 ++ makefu/1systems/tsp/config.nix | 18 +++---- makefu/1systems/tsp/source.nix | 3 ++ makefu/1systems/vbob/config.nix | 22 ++++----- makefu/1systems/vbob/source.nix | 3 ++ makefu/1systems/wbob/config.nix | 32 ++++++------- makefu/1systems/wbob/source.nix | 3 ++ makefu/1systems/wry/config.nix | 24 +++++----- makefu/1systems/wry/source.nix | 3 ++ makefu/1systems/x/config.nix | 70 +++++++++++++-------------- makefu/1systems/x/source.nix | 4 ++ makefu/source.nix | 41 +++++++++------- 35 files changed, 273 insertions(+), 212 deletions(-) create mode 100644 makefu/1systems/darth/source.nix create mode 100644 makefu/1systems/drop/source.nix create mode 100644 makefu/1systems/fileleech/source.nix create mode 100644 makefu/1systems/filepimp/source.nix create mode 100644 makefu/1systems/gum/source.nix create mode 100644 makefu/1systems/iso/source.nix create mode 100644 makefu/1systems/omo/source.nix create mode 100644 makefu/1systems/pnp/source.nix create mode 100644 makefu/1systems/repunit/source.nix create mode 100644 makefu/1systems/sdev/source.nix create mode 100644 makefu/1systems/shoney/source.nix create mode 100644 makefu/1systems/studio/source.nix create mode 100644 makefu/1systems/tsp/source.nix create mode 100644 makefu/1systems/vbob/source.nix create mode 100644 makefu/1systems/wbob/source.nix create mode 100644 makefu/1systems/wry/source.nix create mode 100644 makefu/1systems/x/source.nix 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"; +} diff --git a/makefu/1systems/drop/config.nix b/makefu/1systems/drop/config.nix index 4a94c3f61..b7e0d0395 100644 --- a/makefu/1systems/drop/config.nix +++ b/makefu/1systems/drop/config.nix @@ -5,10 +5,10 @@ let prefixLength = 18; in { imports = [ - ../. - ../2configs/hw/CAC.nix - ../2configs/save-diskspace.nix - ../2configs/torrent.nix + + + + ]; krebs = { enable = true; diff --git a/makefu/1systems/drop/source.nix b/makefu/1systems/drop/source.nix new file mode 100644 index 000000000..74de846c0 --- /dev/null +++ b/makefu/1systems/drop/source.nix @@ -0,0 +1,3 @@ +import { + name="drop"; +} diff --git a/makefu/1systems/fileleech/config.nix b/makefu/1systems/fileleech/config.nix index 3aa5a54f8..b5ec370a5 100644 --- a/makefu/1systems/fileleech/config.nix +++ b/makefu/1systems/fileleech/config.nix @@ -22,16 +22,16 @@ let disks = [ { name = "luksroot"; device = rootPartition; } ] ++ dataDisks; in { imports = [ - ../. - ../2configs/tinc/retiolum.nix - ../2configs/disable_v6.nix - # ../2configs/torrent.nix - ../2configs/fs/sda-crypto-root.nix + + + + # + - #../2configs/elchos/irc-token.nix - ../2configs/elchos/log.nix - ../2configs/elchos/search.nix - ../2configs/elchos/stats.nix + # + + + ]; systemd.services.grafana.serviceConfig.LimitNOFILE=10032; diff --git a/makefu/1systems/fileleech/source.nix b/makefu/1systems/fileleech/source.nix new file mode 100644 index 000000000..699267e21 --- /dev/null +++ b/makefu/1systems/fileleech/source.nix @@ -0,0 +1,3 @@ +import { + name="fileleech"; +} diff --git a/makefu/1systems/filepimp/config.nix b/makefu/1systems/filepimp/config.nix index e143d0046..65e81af66 100644 --- a/makefu/1systems/filepimp/config.nix +++ b/makefu/1systems/filepimp/config.nix @@ -20,11 +20,11 @@ let in { imports = [ # Include the results of the hardware scan. - ../. - ../2configs/fs/single-partition-ext4.nix - ../2configs/smart-monitor.nix - ../2configs/tinc/retiolum.nix - ../2configs/filepimp-share.nix + + + + + ]; krebs.build.host = config.krebs.hosts.filepimp; @@ -73,9 +73,9 @@ in { xfsmount = name: dev: { "/media/${name}" = { device = dev; fsType = "xfs"; }; }; in - # (xfsmount "j0" (part1 jDisk0)) // - (xfsmount "j1" (part1 jDisk1)) // - (xfsmount "j2" (part1 jDisk2)) // + # (xfsmount "j0" (part1 jDisk0)) + (xfsmount "j1" (part1 jDisk1)) + (xfsmount "j2" (part1 jDisk2)) (xfsmount "par0" (part1 jDisk3)) ; diff --git a/makefu/1systems/filepimp/source.nix b/makefu/1systems/filepimp/source.nix new file mode 100644 index 000000000..88c9f4f08 --- /dev/null +++ b/makefu/1systems/filepimp/source.nix @@ -0,0 +1,3 @@ +import { + name="filepimp"; +} diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix index 51761d3fd..aaddd8a68 100644 --- a/makefu/1systems/gum/config.nix +++ b/makefu/1systems/gum/config.nix @@ -13,47 +13,47 @@ let main-disk = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0"; in { imports = [ - ../. + - ../2configs/headless.nix - ../2configs/fs/single-partition-ext4.nix - # ../2configs/smart-monitor.nix - ../2configs/git/cgit-retiolum.nix - ../2configs/backup.nix - # ../2configs/mattermost-docker.nix - # ../2configs/disable_v6.nix - ../2configs/exim-retiolum.nix - ../2configs/tinc/retiolum.nix - ../2configs/urlwatch + + + # + + + # + # + + + # Security - ../2configs/sshd-totp.nix + # Tools - ../2configs/tools/core.nix - ../2configs/tools/dev.nix - ../2configs/tools/sec.nix + + + # services - ../2configs/share/gum.nix - ../2configs/sabnzbd.nix - ../2configs/torrent.nix - ../2configs/iodined.nix + + + + ## Web - ../2configs/nginx/share-download.nix - ../2configs/nginx/euer.test.nix - ../2configs/nginx/euer.wiki.nix - ../2configs/nginx/euer.blog.nix - ../2configs/nginx/public_html.nix - ../2configs/nginx/update.connector.one.nix + + + + + + - ../2configs/deployment/mycube.connector.one.nix - ../2configs/deployment/graphs.nix - ../2configs/deployment/owncloud.nix - ../2configs/deployment/wiki-irc-bot - ../2configs/deployment/boot-euer.nix - ../2configs/deployment/hound + + + + + + { services.taskserver.enable = true; services.taskserver.fqdn = config.krebs.build.host.name; @@ -64,12 +64,12 @@ in { ip6tables -A INPUT -i retiolum -p tcp --dport 53589 -j ACCEPT ''; } - # ../2configs/ipfs.nix - ../2configs/syncthing.nix + # + - # ../2configs/opentracker.nix - ../2configs/stats/client.nix - # ../2configs/logging/client.nix + # + + # ]; makefu.dl-dir = "/var/download"; diff --git a/makefu/1systems/gum/source.nix b/makefu/1systems/gum/source.nix new file mode 100644 index 000000000..82d42b496 --- /dev/null +++ b/makefu/1systems/gum/source.nix @@ -0,0 +1,3 @@ +import { + name="gum"; +} diff --git a/makefu/1systems/iso/config.nix b/makefu/1systems/iso/config.nix index c679241e5..f863321bd 100644 --- a/makefu/1systems/iso/config.nix +++ b/makefu/1systems/iso/config.nix @@ -3,10 +3,10 @@ with import ; { imports = [ - ../. + - ../2configs/tools/core.nix + ]; # TODO: NIX_PATH and nix.nixPath are being set by default.nix right now # cd ~/stockholm ; nix-build -A config.system.build.isoImage -I nixos-config=makefu/1systems/iso.nix -I secrets=/home/makefu/secrets/iso /var/src/nixpkgs/nixos diff --git a/makefu/1systems/iso/source.nix b/makefu/1systems/iso/source.nix new file mode 100644 index 000000000..e200dbfd2 --- /dev/null +++ b/makefu/1systems/iso/source.nix @@ -0,0 +1,3 @@ +import { + name="iso"; +} diff --git a/makefu/1systems/omo/config.nix b/makefu/1systems/omo/config.nix index 0f1b8e0da..732f1d860 100644 --- a/makefu/1systems/omo/config.nix +++ b/makefu/1systems/omo/config.nix @@ -39,35 +39,35 @@ let in { imports = [ - ../. + # TODO: unlock home partition via ssh - ../2configs/fs/sda-crypto-root.nix - ../2configs/zsh-user.nix - ../2configs/backup.nix - ../2configs/exim-retiolum.nix - ../2configs/smart-monitor.nix - ../2configs/mail-client.nix - # ../2configs/disable_v6.nix - #../2configs/graphite-standalone.nix - #../2configs/share-user-sftp.nix - ../2configs/share/omo.nix - ../2configs/tinc/retiolum.nix + + + + + + + # + # + # + + # Logging - ../2configs/stats/server.nix #influx + grafana - ../2configs/stats/client.nix - ../2configs/stats/external/aralast.nix # logs to influx + + + # services - ../2configs/syncthing.nix - ../2configs/mqtt.nix - # ../2configs/logging/central-logging-client.nix + + + # - # ../2configs/torrent.nix + # - # ../2configs/elchos/search.nix - # ../2configs/elchos/log.nix - # ../2configs/elchos/irc-token.nix + # + # + # ## as long as pyload is not in nixpkgs: # docker run -d -v /var/lib/pyload:/opt/pyload/pyload-config -v /media/crypt0/pyload:/opt/pyload/Downloads --name pyload --restart=always -p 8112:8000 -P writl/pyload diff --git a/makefu/1systems/omo/source.nix b/makefu/1systems/omo/source.nix new file mode 100644 index 000000000..94fd9cbe6 --- /dev/null +++ b/makefu/1systems/omo/source.nix @@ -0,0 +1,3 @@ +import { + name="omo"; +} diff --git a/makefu/1systems/pnp/config.nix b/makefu/1systems/pnp/config.nix index 971676b79..cc6326f19 100644 --- a/makefu/1systems/pnp/config.nix +++ b/makefu/1systems/pnp/config.nix @@ -6,16 +6,16 @@ { imports = [ - ../. - ../2configs/headless.nix + + ../../krebs/3modules/Reaktor.nix # these will be overwritten by qemu-vm.nix but will be used if the system # is directly deployed - ../2configs/fs/vm-single-partition.nix + - ../2configs/tinc/retiolum.nix + # config.system.build.vm (toString ) diff --git a/makefu/1systems/pnp/source.nix b/makefu/1systems/pnp/source.nix new file mode 100644 index 000000000..0b630aa3b --- /dev/null +++ b/makefu/1systems/pnp/source.nix @@ -0,0 +1,3 @@ +import { + name="pnp"; +} diff --git a/makefu/1systems/repunit/config.nix b/makefu/1systems/repunit/config.nix index 7102b8f81..996abff08 100644 --- a/makefu/1systems/repunit/config.nix +++ b/makefu/1systems/repunit/config.nix @@ -7,10 +7,10 @@ { imports = [ # Include the results of the hardware scan. - ../. + - ../2configs/git/cgit-retiolum.nix - ../2configs/tinc/retiolum.nix + + ]; krebs.build.host = config.krebs.hosts.repunit; diff --git a/makefu/1systems/repunit/source.nix b/makefu/1systems/repunit/source.nix new file mode 100644 index 000000000..ff361fb55 --- /dev/null +++ b/makefu/1systems/repunit/source.nix @@ -0,0 +1,3 @@ +import { + name="repunit"; +} diff --git a/makefu/1systems/sdev/config.nix b/makefu/1systems/sdev/config.nix index 233f7cefa..f3853a788 100644 --- a/makefu/1systems/sdev/config.nix +++ b/makefu/1systems/sdev/config.nix @@ -4,14 +4,14 @@ makefu.awesome.modkey = "Mod1"; imports = [ # Include the results of the hardware scan. - ../. + (toString ) (toString ) - ../2configs/main-laptop.nix #< base-gui + # # environment - ../2configs/tinc/retiolum.nix + ]; # workaround for https://github.com/NixOS/nixpkgs/issues/16641 diff --git a/makefu/1systems/sdev/source.nix b/makefu/1systems/sdev/source.nix new file mode 100644 index 000000000..833d9bf73 --- /dev/null +++ b/makefu/1systems/sdev/source.nix @@ -0,0 +1,3 @@ +import { + name="sdev"; +} diff --git a/makefu/1systems/shoney/config.nix b/makefu/1systems/shoney/config.nix index 9f04e97eb..6cec260d2 100644 --- a/makefu/1systems/shoney/config.nix +++ b/makefu/1systems/shoney/config.nix @@ -9,12 +9,12 @@ let gw = "64.137.234.1"; in { imports = [ - ../. - ../2configs/save-diskspace.nix - ../2configs/hw/CAC.nix - ../2configs/fs/CAC-CentOS-7-64bit.nix - ../2configs/tinc/retiolum.nix - ../2configs/torrent.nix + + + + + + ]; diff --git a/makefu/1systems/shoney/source.nix b/makefu/1systems/shoney/source.nix new file mode 100644 index 000000000..382474f5e --- /dev/null +++ b/makefu/1systems/shoney/source.nix @@ -0,0 +1,3 @@ +import { + name="shoney"; +} diff --git a/makefu/1systems/studio/config.nix b/makefu/1systems/studio/config.nix index f7d49cac6..b9a1a5d6a 100644 --- a/makefu/1systems/studio/config.nix +++ b/makefu/1systems/studio/config.nix @@ -1,14 +1,14 @@ { config, pkgs, ... }: { imports = [ - ../. - ../2configs/vncserver.nix - ../2configs/vim.nix - ../2configs/disable_v6.nix - ../2configs/audio/jack-on-pulse.nix - ../2configs/audio/realtime-audio.nix - ../2configs/gui/studio.nix - ../2configs/binary-cache/lass.nix + + + + + + + + ]; makefu.gui.user = "user"; # we use an extra user diff --git a/makefu/1systems/studio/source.nix b/makefu/1systems/studio/source.nix new file mode 100644 index 000000000..f5a7e19c4 --- /dev/null +++ b/makefu/1systems/studio/source.nix @@ -0,0 +1,3 @@ +import { + name="studio"; +} diff --git a/makefu/1systems/tsp/config.nix b/makefu/1systems/tsp/config.nix index 25fc2b49b..7169638d4 100644 --- a/makefu/1systems/tsp/config.nix +++ b/makefu/1systems/tsp/config.nix @@ -6,18 +6,18 @@ { imports = [ # Include the results of the hardware scan. - ../. - ../2configs/gui/base.nix - ../2configs/fs/sda-crypto-root.nix + + + # hardware specifics are in here - ../2configs/hw/tp-x200.nix #< imports tp-x2x0.nix + - ../2configs/disable_v6.nix - ../2configs/rad1o.nix + + - ../2configs/zsh-user.nix - ../2configs/exim-retiolum.nix - ../2configs/tinc/retiolum.nix + + + ]; # not working in vm krebs.build.host = config.krebs.hosts.tsp; diff --git a/makefu/1systems/tsp/source.nix b/makefu/1systems/tsp/source.nix new file mode 100644 index 000000000..79f6a435d --- /dev/null +++ b/makefu/1systems/tsp/source.nix @@ -0,0 +1,3 @@ +import { + name="tsp"; +} diff --git a/makefu/1systems/vbob/config.nix b/makefu/1systems/vbob/config.nix index d8e275bf6..933fcf047 100644 --- a/makefu/1systems/vbob/config.nix +++ b/makefu/1systems/vbob/config.nix @@ -4,24 +4,24 @@ makefu.awesome.modkey = "Mod1"; imports = [ # Include the results of the hardware scan. - ../. + (toString ) (toString ) - ../2configs/main-laptop.nix #< base-gui - ../2configs/sshd-totp.nix + + # Tools - ../2configs/tools/core.nix - ../2configs/tools/core-gui.nix - ../2configs/tools/dev.nix - ../2configs/tools/extra-gui.nix - ../2configs/tools/sec.nix + + + + + # environment - ../2configs/tinc/retiolum.nix + - ../2configs/audio/jack-on-pulse.nix - ../2configs/audio/realtime-audio.nix + + ]; networking.extraHosts = import (toString ); diff --git a/makefu/1systems/vbob/source.nix b/makefu/1systems/vbob/source.nix new file mode 100644 index 000000000..96c3f368c --- /dev/null +++ b/makefu/1systems/vbob/source.nix @@ -0,0 +1,3 @@ +import { + name="vbob"; +} diff --git a/makefu/1systems/wbob/config.nix b/makefu/1systems/wbob/config.nix index 5d0dd4a79..c530aaad3 100644 --- a/makefu/1systems/wbob/config.nix +++ b/makefu/1systems/wbob/config.nix @@ -7,23 +7,23 @@ in { imports = [ # Include the results of the hardware scan. - ../. - ../2configs/zsh-user.nix - ../2configs/tools/core.nix - ../2configs/tools/core-gui.nix - ../2configs/tools/extra-gui.nix - ../2configs/tools/media.nix - ../2configs/virtualization.nix - ../2configs/tinc/retiolum.nix - ../2configs/mqtt.nix - ../2configs/deployment/led-fader.nix - # ../2configs/gui/wbob-kiosk.nix - ../2configs/stats/client.nix + + + + + + + + + + + # + - ../2configs/gui/studio.nix - ../2configs/audio/jack-on-pulse.nix - ../2configs/audio/realtime-audio.nix - ../2configs/vncserver.nix + + + + ]; krebs = { diff --git a/makefu/1systems/wbob/source.nix b/makefu/1systems/wbob/source.nix new file mode 100644 index 000000000..419ebbe3b --- /dev/null +++ b/makefu/1systems/wbob/source.nix @@ -0,0 +1,3 @@ +import { + name="wbob"; +} diff --git a/makefu/1systems/wry/config.nix b/makefu/1systems/wry/config.nix index f5097bf40..2db1a9a95 100644 --- a/makefu/1systems/wry/config.nix +++ b/makefu/1systems/wry/config.nix @@ -7,26 +7,26 @@ let internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr; in { imports = [ - ../. + # TODO: copy this config or move to krebs - ../2configs/hw/CAC.nix - ../2configs/fs/CAC-CentOS-7-64bit.nix - ../2configs/save-diskspace.nix + + + - # ../2configs/bepasty-dual.nix + # - ../2configs/iodined.nix - ../2configs/backup.nix + + # other nginx - # ../2configs/nginx/euer.test.nix + # # collectd - ../2configs/stats/client.nix - ../2configs/logging/client.nix + + - ../2configs/tinc/retiolum.nix - # ../2configs/torrent.nix + + # ]; krebs.build.host = config.krebs.hosts.wry; diff --git a/makefu/1systems/wry/source.nix b/makefu/1systems/wry/source.nix new file mode 100644 index 000000000..fac3877ee --- /dev/null +++ b/makefu/1systems/wry/source.nix @@ -0,0 +1,3 @@ +import { + name="wry"; +} diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index 235862e85..b84394cd2 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -7,61 +7,61 @@ with import ; { imports = [ # base - ../. - ../2configs/main-laptop.nix - ../2configs/extra-fonts.nix - ../2configs/tools/all.nix - ../2configs/laptop-backup.nix - ../2configs/dnscrypt.nix - ../2configs/avahi.nix + + + + + + + # Debugging - # ../2configs/disable_v6.nix + # # Testing - # ../2configs/lanparty/lancache.nix - # ../2configs/lanparty/lancache-dns.nix - # ../2configs/deployment/dirctator.nix - # ../2configs/vncserver.nix - # ../2configs/deployment/led-fader - # ../2configs/deployment/hound + # + # + # + # + # + # # development - ../2configs/sources + # Krebs - ../2configs/tinc/retiolum.nix + # applications - ../2configs/exim-retiolum.nix - ../2configs/mail-client.nix - ../2configs/printer.nix - ../2configs/task-client.nix + + + + # Virtualization - ../2configs/virtualization.nix - ../2configs/docker.nix - ../2configs/virtualization-virtualbox.nix + + + # Services - ../2configs/git/brain-retiolum.nix - ../2configs/tor.nix - ../2configs/steam.nix - # ../2configs/buildbot-standalone.nix + + + + # # Hardware - ../2configs/hw/tp-x230.nix - ../2configs/hw/rtl8812au.nix - ../2configs/hw/exfat-nofuse.nix - ../2configs/hw/wwan.nix - # ../2configs/hw/stk1160.nix - # ../2configs/rad1o.nix + + + + + # + # # Filesystem - ../2configs/fs/sda-crypto-root-home.nix + # Security - ../2configs/sshd-totp.nix + ]; diff --git a/makefu/1systems/x/source.nix b/makefu/1systems/x/source.nix new file mode 100644 index 000000000..54ec3c8a9 --- /dev/null +++ b/makefu/1systems/x/source.nix @@ -0,0 +1,4 @@ +import { + name="x"; + full = true; +} diff --git a/makefu/source.nix b/makefu/source.nix index 18733ee5c..a24af4dfb 100644 --- a/makefu/source.nix +++ b/makefu/source.nix @@ -1,29 +1,38 @@ with import ; -host@{ name, secure ? false, override ? {} }: let +host@{ name, secure ? false, override ? {}, full ? false }: let builder = if getEnv "dummy_secrets" == "true" then "buildbot" - else "tv"; - _file = + "/tv/1systems/${name}/source.nix"; + else "makefu"; + _file = + "/makefu/1systems/${name}/source.nix"; + ref = "06734d1"; # unstable @ 2017-07-03 + graceful requests2 (a772c3aa) + in evalSource (toString _file) [ { - nixos-config.symlink = "stockholm/tv/1systems/${name}/config.nix"; - nixpkgs.git = { - # nixos-17.03 - ref = mkDefault "94941cb0455bfc50b1bf63186cfad7136d629f78"; - url = https://github.com/NixOS/nixpkgs; - }; + nixos-config.symlink = "stockholm/makefu/1systems/${name}/config.nix"; + # always perform a full populate when buildbot + nixpkgs = if full || (builder == "buildbot" ) then { + git = { + url = https://github.com/makefu/nixpkgs; + inherit ref; + }; + } else { + # TODO use http, once it is implemented + # right now it is simply extracted revision folder + + ## prepare so we do not have to wait for rsync: + ## cd /var/src; curl https://github.com/nixos/nixpkgs/tarball/125ffff -L | tar zx && mv NixOS-nixpkgs-125ffff nixpkgs + file = "/home/makefu/store/${ref}"; + }; + secrets.file = getAttr builder { - buildbot = toString ; - tv = "/home/tv/secrets/${name}"; + buildbot = toString ; + makefu = "/home/makefu/secrets/${name}"; }; stockholm.file = toString ; } - (mkIf (builder == "tv") { - secrets-common.file = "/home/tv/secrets/common"; - }) - (mkIf (builder == "tv" && secure) { - secrets-master.file = "/home/tv/secrets/master"; + (mkIf (builder == "makefu") { + secrets-common.file = "/home/makefu/secrets/common"; }) override ] From 91706b67afb5cc527ea56526400e20183374a84c Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 15 Jul 2017 22:35:34 +0200 Subject: [PATCH 3/5] ma: deploy musnix via new source.nix --- makefu/1systems/studio/source.nix | 4 ++++ makefu/1systems/x/config.nix | 3 --- makefu/2configs/audio/realtime-audio.nix | 1 - makefu/2configs/sources/default.nix | 7 ------- makefu/2configs/sources/musnix.nix | 6 ------ 5 files changed, 4 insertions(+), 17 deletions(-) delete mode 100644 makefu/2configs/sources/default.nix delete mode 100644 makefu/2configs/sources/musnix.nix diff --git a/makefu/1systems/studio/source.nix b/makefu/1systems/studio/source.nix index f5a7e19c4..092330a50 100644 --- a/makefu/1systems/studio/source.nix +++ b/makefu/1systems/studio/source.nix @@ -1,3 +1,7 @@ import { name="studio"; + override.musnix.git = { + url = https://github.com/musnix/musnix.git; + ref = "f0ec1f3"; + }; } diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index b84394cd2..2dd232193 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -26,9 +26,6 @@ with import ; # # - # development - - # Krebs diff --git a/makefu/2configs/audio/realtime-audio.nix b/makefu/2configs/audio/realtime-audio.nix index 6cb18c45c..8c392dbb6 100644 --- a/makefu/2configs/audio/realtime-audio.nix +++ b/makefu/2configs/audio/realtime-audio.nix @@ -4,7 +4,6 @@ let in { imports = [ - ../sources/musnix.nix # populate musnix ]; musnix.enable = true; diff --git a/makefu/2configs/sources/default.nix b/makefu/2configs/sources/default.nix deleted file mode 100644 index 232117aec..000000000 --- a/makefu/2configs/sources/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -# the builder pc (my laptop) will also require the sources i use to deploy -# other boxes -{ - imports = [ - ./musnix.nix - ]; -} diff --git a/makefu/2configs/sources/musnix.nix b/makefu/2configs/sources/musnix.nix deleted file mode 100644 index a5be303e9..000000000 --- a/makefu/2configs/sources/musnix.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - krebs.build.source.musnix.git = { - url = https://github.com/musnix/musnix.git; - ref = "f0ec1f3"; - }; -} From e93fd37d009e9b4844b2b2cf645dbebcbe69c772 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 15 Jul 2017 22:45:07 +0200 Subject: [PATCH 4/5] ma: rip krebs.build.source --- makefu/2configs/default.nix | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 0b4ef8909..e47dfac99 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -18,34 +18,7 @@ with import ; dns.providers.lan = "hosts"; search-domain = "r"; - build = { - user = config.krebs.users.makefu; - source = let - inherit (config.krebs.build) host user; - ref = "06734d1"; # unstable @ 2017-07-03 + graceful requests2 (a772c3aa) - in { - nixpkgs = if config.makefu.full-populate || (getEnv "dummy_secrets" == "true") then - { - git = { url = https://github.com/makefu/nixpkgs; inherit ref; }; - } - else - # TODO use http, once it is implemented - # right now it is simply extracted revision folder - - ## prepare so we do not have to wait for rsync: - ## cd /var/src; curl https://github.com/nixos/nixpkgs/tarball/125ffff -L | tar zx && mv NixOS-nixpkgs-125ffff nixpkgs - { file = "/home/makefu/store/${ref}";}; - secrets.file = - if getEnv "dummy_secrets" == "true" - then toString - else "/home/makefu/secrets/${host.name}"; - stockholm.file = getEnv "PWD"; - - # Defaults for all stockholm users? - nixos-config.symlink = - "stockholm/${user.name}/1systems/${host.name}.nix"; - }; - }; + build.user = config.krebs.users.makefu; }; users.extraUsers = { From 0e0ad14c373a038e6d347017f5efe172c7409793 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 15 Jul 2017 22:46:11 +0200 Subject: [PATCH 5/5] ma iodined: run with -c --- makefu/2configs/iodined.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefu/2configs/iodined.nix b/makefu/2configs/iodined.nix index b1446eab4..a2d43e567 100644 --- a/makefu/2configs/iodined.nix +++ b/makefu/2configs/iodined.nix @@ -12,7 +12,7 @@ in { enable = true; domain = domain; ip = "172.16.10.1/24"; - extraConfig = "-P ${pw} -l ${config.krebs.build.host.nets.internet.ip4.addr}"; + extraConfig = "-c -P ${pw} -l ${config.krebs.build.host.nets.internet.ip4.addr}"; }; };