From 29746aec06b7d42d3c87245f6f14f048234251e4 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 6 Feb 2016 18:54:01 +0100 Subject: krebs.{backup.plans,hosts,users}.*.name: add default value --- makefu/2configs/backup.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'makefu') diff --git a/makefu/2configs/backup.nix b/makefu/2configs/backup.nix index ed6d1f4a..936f31c1 100644 --- a/makefu/2configs/backup.nix +++ b/makefu/2configs/backup.nix @@ -24,7 +24,7 @@ let }; }; in { - krebs.backup.plans = addNames { + krebs.backup.plans = { wry-to-omo_var-www = defaultPull wry "/var/www"; }; } -- cgit v1.2.3 From d98578e3e190463a341a94f2cc778ef886f9252d Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 8 Feb 2016 01:07:03 +0100 Subject: rm krebs.build.target --- makefu/1systems/gum.nix | 1 - makefu/1systems/vbob.nix | 1 - 2 files changed, 2 deletions(-) (limited to 'makefu') diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix index c4dfbf4b..fe800f25 100644 --- a/makefu/1systems/gum.nix +++ b/makefu/1systems/gum.nix @@ -26,7 +26,6 @@ in { nixpkgs.config.packageOverrides = pkgs: { tinc = pkgs.tinc_pre; }; ###### stable - krebs.build.target = "root@gum.krebsco.de"; krebs.build.host = config.krebs.hosts.gum; krebs.retiolum.extraConfig = '' ListenAddress = ${external-ip} 53 diff --git a/makefu/1systems/vbob.nix b/makefu/1systems/vbob.nix index 90b49080..20301795 100644 --- a/makefu/1systems/vbob.nix +++ b/makefu/1systems/vbob.nix @@ -4,7 +4,6 @@ { lib, config, pkgs, ... }: { krebs.build.host = config.krebs.hosts.vbob; - krebs.build.target = "root@10.10.10.220"; imports = [ # Include the results of the hardware scan. -- cgit v1.2.3 From 28ea7e3745540c432b03d387ad2193a134a1eed4 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 10 Feb 2016 15:34:41 +0100 Subject: ma 1 vbob: deployable again --- makefu/1systems/vbob.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'makefu') diff --git a/makefu/1systems/vbob.nix b/makefu/1systems/vbob.nix index f4a22d72..b1e5ef8b 100644 --- a/makefu/1systems/vbob.nix +++ b/makefu/1systems/vbob.nix @@ -18,8 +18,8 @@ tinc = pkgs.tinc_pre; }; - krebs.build.source.nixpkgs = { - # url = https://github.com/nixos/nixpkgs; + krebs.build.source.upstream-nixpkgs = { + url = https://github.com/makefu/nixpkgs; # HTTP Everywhere + libredir rev = "8239ac6"; }; @@ -39,7 +39,6 @@ buildbot buildbot-slave get - genid logstash ]; -- cgit v1.2.3 From 0cf6d065f43c66efadd0a364c3414e6ecdae0004 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 11 Feb 2016 03:47:26 +0100 Subject: *: turn 5pkgs into a(n optional) module --- makefu/5pkgs/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'makefu') diff --git a/makefu/5pkgs/default.nix b/makefu/5pkgs/default.nix index 436c52fc..c4a7f498 100644 --- a/makefu/5pkgs/default.nix +++ b/makefu/5pkgs/default.nix @@ -4,9 +4,11 @@ let inherit (pkgs) callPackage; in { - alsa-hdspmixer = callPackage ./alsa-tools { alsaToolTarget="hdspmixer";}; - alsa-hdspconf = callPackage ./alsa-tools { alsaToolTarget="hdspconf";}; - alsa-hdsploader = callPackage ./alsa-tools { alsaToolTarget="hdsploader";}; - awesomecfg = callPackage ./awesomecfg {}; - tw-upload-plugin = callPackage ./tw-upload-plugin {}; + nixpkgs.config.packageOverrides = rec { + alsa-hdspmixer = callPackage ./alsa-tools { alsaToolTarget="hdspmixer";}; + alsa-hdspconf = callPackage ./alsa-tools { alsaToolTarget="hdspconf";}; + alsa-hdsploader = callPackage ./alsa-tools { alsaToolTarget="hdsploader";}; + awesomecfg = callPackage ./awesomecfg {}; + tw-upload-plugin = callPackage ./tw-upload-plugin {}; + }; } -- cgit v1.2.3 From a649befbfafaff80d1d1a10896bfc4343021797b Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 11 Feb 2016 11:04:19 +0100 Subject: k 3 fetchWallpaper: scrap predicate, use unitConfig --- makefu/2configs/fetchWallpaper.nix | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'makefu') diff --git a/makefu/2configs/fetchWallpaper.nix b/makefu/2configs/fetchWallpaper.nix index b071a128..786df6d4 100644 --- a/makefu/2configs/fetchWallpaper.nix +++ b/makefu/2configs/fetchWallpaper.nix @@ -1,24 +1,15 @@ { config, pkgs, ... }: -let - # check if laptop runs on umts - weaksauce-internet = with pkgs;writeScript "weaksauce-internet" '' - #! /bin/sh - if ${iproute}/bin/ip addr show dev ppp0 2>/dev/null \ - | ${gnugrep}/bin/grep -q inet;then - exit 1 - fi - ''; - -in { +{ krebs.fetchWallpaper = { enable = true; display = ":0"; - predicate = weaksauce-internet; + unitConfig.ConditionPathExists = "!/var/run/ppp0.pid"; timerConfig = { OnCalendar = "*:0/30"; }; url = "http://echelon/wallpaper.png"; }; + } -- cgit v1.2.3 From 908837089ce22e83eae2df6518ad499090d0e1ae Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 11 Feb 2016 17:05:00 +0100 Subject: ma 1 wbob: cleanup, add awesomerc todo --- makefu/1systems/wbob.nix | 65 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 12 deletions(-) (limited to 'makefu') diff --git a/makefu/1systems/wbob.nix b/makefu/1systems/wbob.nix index d6916f00..8917e433 100644 --- a/makefu/1systems/wbob.nix +++ b/makefu/1systems/wbob.nix @@ -4,16 +4,57 @@ [ # Include the results of the hardware scan. ../2configs/main-laptop.nix ]; - krebs = { - enable = true; - retiolum.enable = true; - build.host = config.krebs.hosts.wbob; - }; - boot.loader.grub.device = "/dev/sda"; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" ]; - boot.kernelModules = [ "kvm-intel" ]; - fileSystems."/" = { - device = "/dev/sda1"; - fsType = "ext4"; - }; + krebs = { + enable = true; + retiolum.enable = true; + build.host = config.krebs.hosts.wbob; + }; + + # rt2870.bin wifi card, part of linux-unfree + hardware.enableAllFirmware = true; + nixpkgs.config.allowUnfree = true; + networking.wireless.enable = true; + # rt2870 with nonfree creates wlp2s0 from wlp0s20u2 + # not explicitly setting the interface results in wpa_supplicant to crash + networking.wireless.interfaces = [ "wlp2s0" ]; + + + # nuc hardware + boot.loader.grub.device = "/dev/sda"; + hardware.cpu.intel.updateMicrocode = true; + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.kernelModules = [ "kvm-intel" ]; + fileSystems."/" = { + device = "/dev/sda1"; + fsType = "ext4"; + }; + + # DualHead on NUC + services.xserver = { + # xrandrHeads = [ "HDMI1" "HDMI2" ]; + # prevent screen from turning off, disable dpms + displayManager.sessionCommands = '' + xset s off -dpms + xrandr --output HDMI2 --right-of HDMI1 + ''; + }; + ## TODO Awesomecfg + autostart chrome + # + #local current_screen = 1 + #awful.rules.rules = { + # { rule = { class = "chromium-browser" }, + # callback = function() + # awful.client.movetotag(tags[current_screen][1],c) + # if (current_screen == 1) then + # current_screen = current_screen+1 + # else + # current_screen = current_screen-1 + # end + # end + # }, + #} + #awful.util.spawn_with_shell("chromium --new-window --kiosk http://wolf:3000/dashboard/db/soc-critical-values") + # prevent Race Condition + #awful.util.spawn_with_shell("sleep 0.5;chromium --new-window --kiosk http://wolf:3000/dashboard/db/aralast") + } -- cgit v1.2.3 From ab52655e941f49be7f2b479bac264c030dda061d Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 11 Feb 2016 17:06:50 +0100 Subject: ma: refactoring --- makefu/1systems/pornocauster.nix | 25 ++----------------------- makefu/2configs/base-gui.nix | 2 ++ makefu/2configs/hw/tp-x220.nix | 14 ++++++++++---- makefu/2configs/hw/tp-x2x0.nix | 18 +++++++++--------- makefu/2configs/main-laptop.nix | 5 ++++- makefu/2configs/printer.nix | 4 ++++ makefu/3modules/umts.nix | 9 +-------- 7 files changed, 32 insertions(+), 45 deletions(-) (limited to 'makefu') diff --git a/makefu/1systems/pornocauster.nix b/makefu/1systems/pornocauster.nix index d7fa8edc..d8ccc584 100644 --- a/makefu/1systems/pornocauster.nix +++ b/makefu/1systems/pornocauster.nix @@ -18,7 +18,6 @@ ../2configs/exim-retiolum.nix ../2configs/mail-client.nix ../2configs/printer.nix - #../2configs/virtualization.nix ../2configs/virtualization.nix ../2configs/virtualization-virtualbox.nix ../2configs/wwan.nix @@ -35,33 +34,13 @@ # ../2configs/mediawiki.nix #../2configs/wordpress.nix ]; - hardware.sane.enable = true; - hardware.sane.extraBackends = [ pkgs.samsungUnifiedLinuxDriver ]; + nixpkgs.config.packageOverrides = pkgs: { tinc = pkgs.tinc_pre; }; - krebs.Reaktor = { - enable = false; - nickname = "makefu|r"; - plugins = with pkgs.ReaktorPlugins; [ nixos-version random-emoji ]; - }; - - # nix.binaryCaches = [ "http://acng.shack/nixos" "https://cache.nixos.org" ]; - - environment.systemPackages = with pkgs;[ - get - virtmanager - gnome3.dconf - krebspaste - ]; - - services.logind.extraConfig = "HandleLidSwitch=ignore"; # configure pulseAudio to provide a HDMI sink as well - hardware.pulseaudio.configFile = pkgs.writeText "pulse-default-pa" '' - ${builtins.readFile "${config.hardware.pulseaudio.package}/etc/pulse/default.pa"} - load-module module-alsa-sink device=hw:0,3 sink_properties=device.description="HDMIOutput" sink_name="HDMI"''; - networking.firewall.enable = false; + networking.firewall.enable = true; networking.firewall.allowedTCPPorts = [ 25 ]; diff --git a/makefu/2configs/base-gui.nix b/makefu/2configs/base-gui.nix index 1d675028..da3ad4af 100644 --- a/makefu/2configs/base-gui.nix +++ b/makefu/2configs/base-gui.nix @@ -44,6 +44,8 @@ in displayManager.auto.user = mainUser; desktopManager.xterm.enable = false; }; + # lid switch is handled via button presses + services.logind.extraConfig = mkDefault "HandleLidSwitch=ignore"; nixpkgs.config.packageOverrides = pkgs: rec { awesome = pkgs.stdenv.lib.overrideDerivation pkgs.awesome (oldAttrs : { postFixup = '' diff --git a/makefu/2configs/hw/tp-x220.nix b/makefu/2configs/hw/tp-x220.nix index f0392215..0c90e6fd 100644 --- a/makefu/2configs/hw/tp-x220.nix +++ b/makefu/2configs/hw/tp-x220.nix @@ -16,10 +16,16 @@ with lib; }; services.xserver.displayManager.sessionCommands ='' - xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1 - xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2 - xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5 - # xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 + xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1 + xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2 + xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5 + # xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 + ''; + + # enable HDMI output switching with pulseaudio + hardware.pulseaudio.configFile = pkgs.writeText "pulse-default-pa" '' + ${builtins.readFile "${config.hardware.pulseaudio.package}/etc/pulse/default.pa"} + load-module module-alsa-sink device=hw:0,3 sink_properties=device.description="HDMIOutput" sink_name="HDMI" ''; } diff --git a/makefu/2configs/hw/tp-x2x0.nix b/makefu/2configs/hw/tp-x2x0.nix index ebc72a06..1033f69c 100644 --- a/makefu/2configs/hw/tp-x2x0.nix +++ b/makefu/2configs/hw/tp-x2x0.nix @@ -18,18 +18,18 @@ with lib; sensitivity = 220; speed = 220; emulateWheel = true; - }; + }; services.tlp.enable = true; services.tlp.extraConfig = '' - START_CHARGE_THRESH_BAT0=80 - - CPU_SCALING_GOVERNOR_ON_AC=performance - CPU_SCALING_GOVERNOR_ON_BAT=ondemand - CPU_MIN_PERF_ON_AC=0 - CPU_MAX_PERF_ON_AC=100 - CPU_MIN_PERF_ON_BAT=0 - CPU_MAX_PERF_ON_BAT=30 + START_CHARGE_THRESH_BAT0=80 + + CPU_SCALING_GOVERNOR_ON_AC=performance + CPU_SCALING_GOVERNOR_ON_BAT=ondemand + CPU_MIN_PERF_ON_AC=0 + CPU_MAX_PERF_ON_AC=100 + CPU_MIN_PERF_ON_BAT=0 + CPU_MAX_PERF_ON_BAT=30 ''; } diff --git a/makefu/2configs/main-laptop.nix b/makefu/2configs/main-laptop.nix index b725f661..32f194e6 100644 --- a/makefu/2configs/main-laptop.nix +++ b/makefu/2configs/main-laptop.nix @@ -3,6 +3,7 @@ # stuff for the main laptop # this is pretty much nice-to-have and does # not fit into base-gui +# TODO split generic desktop stuff and laptop-specifics like lidswitching with lib; { @@ -17,8 +18,10 @@ with lib; chromium keepassx ntfs3g + at_spi2_core + gnome3.dconf virtmanager - at_spi2_core # dep for virtmanager? + krebspaste ]; services.redshift = { diff --git a/makefu/2configs/printer.nix b/makefu/2configs/printer.nix index 35ad54bd..d288748f 100644 --- a/makefu/2configs/printer.nix +++ b/makefu/2configs/printer.nix @@ -7,4 +7,8 @@ pkgs.samsungUnifiedLinuxDriver ]; }; + + # scanners are printers just in reverse anyway + hardware.sane.enable = true; + hardware.sane.extraBackends = [ pkgs.samsungUnifiedLinuxDriver ]; } diff --git a/makefu/3modules/umts.nix b/makefu/3modules/umts.nix index d7be45f6..1bf3ba0b 100644 --- a/makefu/3modules/umts.nix +++ b/makefu/3modules/umts.nix @@ -56,19 +56,12 @@ let environment.wvdial.dialerDefaults = wvdial-defaults; - systemd.targets.network-umts = { - description = "System is running on UMTS"; - unitConfig.StopWhenUnneeded = true; - }; - systemd.services.umts = { description = "UMTS wvdial Service"; - before = [ "network-umts.target" ]; - serviceConfig = { Type = "simple"; Restart = "always"; - RestartSec = "4s"; + RestartSec = "10s"; ExecStart = "${pkgs.wvdial}/bin/wvdial -n"; }; }; -- cgit v1.2.3 From 3f85a043e9c1a9cf2c24f8838e436719cd61ff44 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 11 Feb 2016 17:27:53 +0100 Subject: ma 2 default: bump to newest unstable --- makefu/2configs/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'makefu') diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 2b4e3111..5acc7f0a 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -23,7 +23,7 @@ with lib; source = mapAttrs (_: mkDefault) { upstream-nixpkgs = { url = https://github.com/nixos/nixpkgs; - rev = "93d8671e2c6d1d25f126ed30e5e6f16764330119"; # unstable @ 2015-01-03, tested on filepimp + rev = "77f8f35d57618c1ba456d968524f2fb2c3448295"; # unstable @ 2015-01-27, tested on wry }; secrets = "/home/makefu/secrets/${config.krebs.build.host.name}/"; stockholm = "/home/makefu/stockholm"; @@ -87,6 +87,7 @@ with lib; environment.systemPackages = with pkgs; [ jq git + get gnumake rxvt_unicode.terminfo htop -- cgit v1.2.3 From 673853e092c211e26a08030f87f9c868c6442a71 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 14 Feb 2016 16:43:44 +0100 Subject: RIP specialArgs.lib --- makefu/1systems/gum.nix | 2 +- makefu/1systems/wry.nix | 2 +- makefu/2configs/backup.nix | 2 +- makefu/2configs/base-gui.nix | 2 +- makefu/2configs/bepasty-dual.nix | 2 +- makefu/2configs/collectd/collectd-base.nix | 2 +- makefu/2configs/default.nix | 2 +- makefu/2configs/exim-retiolum.nix | 2 +- makefu/2configs/fs/cac-boot-partition.nix | 2 +- makefu/2configs/fs/sda-crypto-root-home.nix | 2 +- makefu/2configs/fs/sda-crypto-root.nix | 2 +- makefu/2configs/fs/vm-single-partition.nix | 2 +- makefu/2configs/git/brain-retiolum.nix | 2 +- makefu/2configs/git/cgit-retiolum.nix | 2 +- makefu/2configs/graphite-standalone.nix | 2 +- makefu/2configs/hw/tp-x200.nix | 2 +- makefu/2configs/hw/tp-x220.nix | 2 +- makefu/2configs/hw/tp-x2x0.nix | 2 +- makefu/2configs/mail-client.nix | 2 +- makefu/2configs/main-laptop.nix | 2 +- makefu/2configs/mattermost-docker.nix | 2 +- makefu/2configs/nginx/euer.blog.nix | 2 +- makefu/2configs/nginx/euer.test.nix | 2 +- makefu/2configs/nginx/euer.wiki.nix | 2 +- makefu/2configs/nginx/update.connector.one.nix | 2 +- makefu/2configs/omo-share.nix | 2 +- makefu/2configs/tinc-basic-retiolum.nix | 2 +- makefu/2configs/zsh-user.nix | 2 +- makefu/3modules/snapraid.nix | 2 +- makefu/3modules/umts.nix | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) (limited to 'makefu') diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix index fe800f25..43fc8109 100644 --- a/makefu/1systems/gum.nix +++ b/makefu/1systems/gum.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; let external-ip = head config.krebs.build.host.nets.internet.addrs4; internal-ip = head config.krebs.build.host.nets.retiolum.addrs4; diff --git a/makefu/1systems/wry.nix b/makefu/1systems/wry.nix index f022311c..41d207ed 100644 --- a/makefu/1systems/wry.nix +++ b/makefu/1systems/wry.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; let external-ip = head config.krebs.build.host.nets.internet.addrs4; diff --git a/makefu/2configs/backup.nix b/makefu/2configs/backup.nix index 936f31c1..6f79ed4f 100644 --- a/makefu/2configs/backup.nix +++ b/makefu/2configs/backup.nix @@ -1,5 +1,5 @@ { config, lib, ... }: -with lib; +with config.krebs.lib; let startAt = "0,6,12,18:00"; defaultBackupServer = config.krebs.hosts.omo; diff --git a/makefu/2configs/base-gui.nix b/makefu/2configs/base-gui.nix index da3ad4af..341a2ab2 100644 --- a/makefu/2configs/base-gui.nix +++ b/makefu/2configs/base-gui.nix @@ -21,7 +21,7 @@ # URxvt.visualBell: false # URxvt.font : xft:Terminus -with lib; +with config.krebs.lib; let mainUser = config.krebs.build.user.name; awesomecfg = pkgs.awesomecfg.full; diff --git a/makefu/2configs/bepasty-dual.nix b/makefu/2configs/bepasty-dual.nix index 123ae3cf..5682f5eb 100644 --- a/makefu/2configs/bepasty-dual.nix +++ b/makefu/2configs/bepasty-dual.nix @@ -10,7 +10,7 @@ # wildcard.krebsco.de.key # bepasty-secret.nix <- contains single string -with lib; +with config.krebs.lib; let sec = toString ; # secKey is nothing worth protecting on a local machine diff --git a/makefu/2configs/collectd/collectd-base.nix b/makefu/2configs/collectd/collectd-base.nix index 7909c1be..c739368c 100644 --- a/makefu/2configs/collectd/collectd-base.nix +++ b/makefu/2configs/collectd/collectd-base.nix @@ -2,7 +2,7 @@ # graphite-web on port 8080 # carbon cache on port 2003 (tcp/udp) -with lib; +with config.krebs.lib; let connect-time-cfg = with pkgs; writeText "collectd-connect-time.cfg" '' LoadPlugin python diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 5acc7f0a..c35bfc17 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; { system.stateVersion = "15.09"; diff --git a/makefu/2configs/exim-retiolum.nix b/makefu/2configs/exim-retiolum.nix index b8c5c523..34943f59 100644 --- a/makefu/2configs/exim-retiolum.nix +++ b/makefu/2configs/exim-retiolum.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; { krebs.exim-retiolum.enable = true; environment.systemPackages = with pkgs; [ diff --git a/makefu/2configs/fs/cac-boot-partition.nix b/makefu/2configs/fs/cac-boot-partition.nix index cec00458..bf08504d 100644 --- a/makefu/2configs/fs/cac-boot-partition.nix +++ b/makefu/2configs/fs/cac-boot-partition.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: # vda1 ext4 (label nixos) -> only root partition -with lib; +with config.krebs.lib; { boot.loader.grub.enable = true; boot.loader.grub.version = 2; diff --git a/makefu/2configs/fs/sda-crypto-root-home.nix b/makefu/2configs/fs/sda-crypto-root-home.nix index cc2133a4..5214cf87 100644 --- a/makefu/2configs/fs/sda-crypto-root-home.nix +++ b/makefu/2configs/fs/sda-crypto-root-home.nix @@ -8,7 +8,7 @@ # / (main-root) # /home (main-home) -with lib; +with config.krebs.lib; { imports = [ diff --git a/makefu/2configs/fs/sda-crypto-root.nix b/makefu/2configs/fs/sda-crypto-root.nix index 2bfe2696..e9d7b755 100644 --- a/makefu/2configs/fs/sda-crypto-root.nix +++ b/makefu/2configs/fs/sda-crypto-root.nix @@ -3,7 +3,7 @@ # sda: bootloader grub2 # sda1: boot ext4 (label nixboot) # sda2: cryptoluks -> ext4 -with lib; +with config.krebs.lib; { boot = { loader.grub.enable = true; diff --git a/makefu/2configs/fs/vm-single-partition.nix b/makefu/2configs/fs/vm-single-partition.nix index 27e28cb6..88f20959 100644 --- a/makefu/2configs/fs/vm-single-partition.nix +++ b/makefu/2configs/fs/vm-single-partition.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: # vda1 ext4 (label nixos) -> only root partition -with lib; +with config.krebs.lib; { imports = [ ./single-partition-ext4.nix diff --git a/makefu/2configs/git/brain-retiolum.nix b/makefu/2configs/git/brain-retiolum.nix index 25ef584b..58fd250e 100644 --- a/makefu/2configs/git/brain-retiolum.nix +++ b/makefu/2configs/git/brain-retiolum.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: # TODO: remove tv lib :) -with lib; +with config.krebs.lib; let repos = priv-repos // krebs-repos ; diff --git a/makefu/2configs/git/cgit-retiolum.nix b/makefu/2configs/git/cgit-retiolum.nix index 7d85eb8d..a488d98f 100644 --- a/makefu/2configs/git/cgit-retiolum.nix +++ b/makefu/2configs/git/cgit-retiolum.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: # TODO: remove tv lib :) -with lib; +with config.krebs.lib; let repos = priv-repos // krebs-repos // connector-repos ; diff --git a/makefu/2configs/graphite-standalone.nix b/makefu/2configs/graphite-standalone.nix index 8b70c11c..dd5438e8 100644 --- a/makefu/2configs/graphite-standalone.nix +++ b/makefu/2configs/graphite-standalone.nix @@ -2,7 +2,7 @@ # graphite-web on port 8080 # carbon cache on port 2003 (tcp/udp) -with lib; +with config.krebs.lib; { imports = [ ]; diff --git a/makefu/2configs/hw/tp-x200.nix b/makefu/2configs/hw/tp-x200.nix index ed46875d..f17ac74a 100644 --- a/makefu/2configs/hw/tp-x200.nix +++ b/makefu/2configs/hw/tp-x200.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; { imports = [ ./tp-x2x0.nix ]; diff --git a/makefu/2configs/hw/tp-x220.nix b/makefu/2configs/hw/tp-x220.nix index 0c90e6fd..0a471bde 100644 --- a/makefu/2configs/hw/tp-x220.nix +++ b/makefu/2configs/hw/tp-x220.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; { imports = [ ./tp-x2x0.nix ]; diff --git a/makefu/2configs/hw/tp-x2x0.nix b/makefu/2configs/hw/tp-x2x0.nix index 1033f69c..892be07b 100644 --- a/makefu/2configs/hw/tp-x2x0.nix +++ b/makefu/2configs/hw/tp-x2x0.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; { # TODO: put this somewhere else networking.wireless.enable = true; diff --git a/makefu/2configs/mail-client.nix b/makefu/2configs/mail-client.nix index bda21e9d..913cbf25 100644 --- a/makefu/2configs/mail-client.nix +++ b/makefu/2configs/mail-client.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; { environment.systemPackages = with pkgs; [ msmtp diff --git a/makefu/2configs/main-laptop.nix b/makefu/2configs/main-laptop.nix index 32f194e6..c3e43723 100644 --- a/makefu/2configs/main-laptop.nix +++ b/makefu/2configs/main-laptop.nix @@ -5,7 +5,7 @@ # not fit into base-gui # TODO split generic desktop stuff and laptop-specifics like lidswitching -with lib; +with config.krebs.lib; { imports = [ ./base-gui.nix diff --git a/makefu/2configs/mattermost-docker.nix b/makefu/2configs/mattermost-docker.nix index 20a93dff..e679a3d9 100644 --- a/makefu/2configs/mattermost-docker.nix +++ b/makefu/2configs/mattermost-docker.nix @@ -1,6 +1,6 @@ {config, lib, ...}: -with lib; +with config.krebs.lib; let sec = toString ; ssl_cert = "${sec}/wildcard.krebsco.de.crt"; diff --git a/makefu/2configs/nginx/euer.blog.nix b/makefu/2configs/nginx/euer.blog.nix index c6724c61..9d08f4b9 100644 --- a/makefu/2configs/nginx/euer.blog.nix +++ b/makefu/2configs/nginx/euer.blog.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; let sec = toString ; ssl_cert = "${sec}/wildcard.krebsco.de.crt"; diff --git a/makefu/2configs/nginx/euer.test.nix b/makefu/2configs/nginx/euer.test.nix index ffdc0bc6..f7214e61 100644 --- a/makefu/2configs/nginx/euer.test.nix +++ b/makefu/2configs/nginx/euer.test.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; let hostname = config.krebs.build.host.name; user = config.services.nginx.user; diff --git a/makefu/2configs/nginx/euer.wiki.nix b/makefu/2configs/nginx/euer.wiki.nix index 2b5fa6ea..a5572a51 100644 --- a/makefu/2configs/nginx/euer.wiki.nix +++ b/makefu/2configs/nginx/euer.wiki.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; let sec = toString ; ssl_cert = "${sec}/wildcard.krebsco.de.crt"; diff --git a/makefu/2configs/nginx/update.connector.one.nix b/makefu/2configs/nginx/update.connector.one.nix index eb39a166..044a1407 100644 --- a/makefu/2configs/nginx/update.connector.one.nix +++ b/makefu/2configs/nginx/update.connector.one.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; let hostname = config.krebs.build.host.name; external-ip = head config.krebs.build.host.nets.internet.addrs4; diff --git a/makefu/2configs/omo-share.nix b/makefu/2configs/omo-share.nix index 1e0975e1..a9640b38 100644 --- a/makefu/2configs/omo-share.nix +++ b/makefu/2configs/omo-share.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; let hostname = config.krebs.build.host.name; # TODO local-ip from the nets config diff --git a/makefu/2configs/tinc-basic-retiolum.nix b/makefu/2configs/tinc-basic-retiolum.nix index f49c596f..12d3b8b7 100644 --- a/makefu/2configs/tinc-basic-retiolum.nix +++ b/makefu/2configs/tinc-basic-retiolum.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; { krebs.retiolum = { enable = true; diff --git a/makefu/2configs/zsh-user.nix b/makefu/2configs/zsh-user.nix index f79f258f..9527ead1 100644 --- a/makefu/2configs/zsh-user.nix +++ b/makefu/2configs/zsh-user.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: ## -with lib; +with config.krebs.lib; let mainUser = config.krebs.build.user.name; in diff --git a/makefu/3modules/snapraid.nix b/makefu/3modules/snapraid.nix index fbdf5021..4a0363e6 100644 --- a/makefu/3modules/snapraid.nix +++ b/makefu/3modules/snapraid.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; let # returns dirname without / , used as disk name diff --git a/makefu/3modules/umts.nix b/makefu/3modules/umts.nix index 1bf3ba0b..7e0e5dad 100644 --- a/makefu/3modules/umts.nix +++ b/makefu/3modules/umts.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; let # TODO: currently it is only netzclub -- cgit v1.2.3 From 8f520b19b623919fa6319029a955d43fd051773c Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 15 Feb 2016 16:27:11 +0100 Subject: don't try to mimic nixpkgs --- makefu/1systems/filepimp.nix | 1 + makefu/1systems/gum.nix | 1 + makefu/1systems/omo.nix | 1 + makefu/1systems/pnp.nix | 1 + makefu/1systems/pornocauster.nix | 1 + makefu/1systems/repunit.nix | 1 + makefu/1systems/tsp.nix | 1 + makefu/1systems/vbob.nix | 1 + makefu/1systems/wbob.nix | 1 + makefu/1systems/wry.nix | 1 + makefu/2configs/default.nix | 4 +--- makefu/default.nix | 8 ++++++++ 12 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 makefu/default.nix (limited to 'makefu') diff --git a/makefu/1systems/filepimp.nix b/makefu/1systems/filepimp.nix index fb9324ee..f2c592ea 100644 --- a/makefu/1systems/filepimp.nix +++ b/makefu/1systems/filepimp.nix @@ -11,6 +11,7 @@ let in { imports = [ # Include the results of the hardware scan. + ../. ../2configs/fs/single-partition-ext4.nix ../2configs/tinc-basic-retiolum.nix ../2configs/smart-monitor.nix diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix index 43fc8109..04adc494 100644 --- a/makefu/1systems/gum.nix +++ b/makefu/1systems/gum.nix @@ -6,6 +6,7 @@ let internal-ip = head config.krebs.build.host.nets.retiolum.addrs4; in { imports = [ + ../. ../2configs/tinc-basic-retiolum.nix ../2configs/headless.nix ../2configs/fs/simple-swap.nix diff --git a/makefu/1systems/omo.nix b/makefu/1systems/omo.nix index 34d5a394..6cff35e9 100644 --- a/makefu/1systems/omo.nix +++ b/makefu/1systems/omo.nix @@ -20,6 +20,7 @@ let in { imports = [ + ../. # TODO: unlock home partition via ssh ../2configs/fs/single-partition-ext4.nix ../2configs/tinc-basic-retiolum.nix diff --git a/makefu/1systems/pnp.nix b/makefu/1systems/pnp.nix index 51c124bb..8791ad1d 100644 --- a/makefu/1systems/pnp.nix +++ b/makefu/1systems/pnp.nix @@ -6,6 +6,7 @@ { imports = [ + ../. ../2configs/tinc-basic-retiolum.nix ../2configs/headless.nix ../../krebs/3modules/Reaktor.nix diff --git a/makefu/1systems/pornocauster.nix b/makefu/1systems/pornocauster.nix index d8ccc584..b2cf0be7 100644 --- a/makefu/1systems/pornocauster.nix +++ b/makefu/1systems/pornocauster.nix @@ -6,6 +6,7 @@ { imports = [ # Include the results of the hardware scan. + ../. ../2configs/main-laptop.nix #< base-gui + zsh # Krebs diff --git a/makefu/1systems/repunit.nix b/makefu/1systems/repunit.nix index 0c6ba09f..6d2e7273 100644 --- a/makefu/1systems/repunit.nix +++ b/makefu/1systems/repunit.nix @@ -7,6 +7,7 @@ { imports = [ # Include the results of the hardware scan. + ../. ../2configs/cgit-retiolum.nix ]; diff --git a/makefu/1systems/tsp.nix b/makefu/1systems/tsp.nix index 990db65d..d5d44cce 100644 --- a/makefu/1systems/tsp.nix +++ b/makefu/1systems/tsp.nix @@ -6,6 +6,7 @@ { imports = [ # Include the results of the hardware scan. + ../. ../2configs/base-gui.nix ../2configs/tinc-basic-retiolum.nix ../2configs/fs/sda-crypto-root.nix diff --git a/makefu/1systems/vbob.nix b/makefu/1systems/vbob.nix index 2dee8372..e07525d0 100644 --- a/makefu/1systems/vbob.nix +++ b/makefu/1systems/vbob.nix @@ -6,6 +6,7 @@ krebs.build.host = config.krebs.hosts.vbob; imports = [ # Include the results of the hardware scan. + ../. ../2configs/main-laptop.nix #< base-gui diff --git a/makefu/1systems/wbob.nix b/makefu/1systems/wbob.nix index 8917e433..b4f7c905 100644 --- a/makefu/1systems/wbob.nix +++ b/makefu/1systems/wbob.nix @@ -2,6 +2,7 @@ { imports = [ # Include the results of the hardware scan. + ../. ../2configs/main-laptop.nix ]; krebs = { diff --git a/makefu/1systems/wry.nix b/makefu/1systems/wry.nix index 41d207ed..74732196 100644 --- a/makefu/1systems/wry.nix +++ b/makefu/1systems/wry.nix @@ -7,6 +7,7 @@ let internal-ip = head config.krebs.build.host.nets.retiolum.addrs4; in { imports = [ + ../. # TODO: copy this config or move to krebs ../../tv/2configs/hw/CAC.nix ../../tv/2configs/fs/CAC-CentOS-7-64bit.nix diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index c35bfc17..153e80bb 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -21,7 +21,7 @@ with config.krebs.lib; target = mkDefault "root@${config.krebs.build.host.name}"; user = config.krebs.users.makefu; source = mapAttrs (_: mkDefault) { - upstream-nixpkgs = { + nixpkgs = { url = https://github.com/nixos/nixpkgs; rev = "77f8f35d57618c1ba456d968524f2fb2c3448295"; # unstable @ 2015-01-27, tested on wry }; @@ -30,8 +30,6 @@ with config.krebs.lib; # Defaults for all stockholm users? nixos-config = "symlink:stockholm/${config.krebs.build.user.name}/1systems/${config.krebs.build.host.name}.nix"; - nixpkgs = symlink:stockholm/nixpkgs; - stockholm-user = "symlink:stockholm/${config.krebs.build.user.name}"; }; }; }; diff --git a/makefu/default.nix b/makefu/default.nix new file mode 100644 index 00000000..320e1a13 --- /dev/null +++ b/makefu/default.nix @@ -0,0 +1,8 @@ +_: +{ + imports = [ + ../krebs + ./2configs + ./3modules + ]; +} -- cgit v1.2.3 From b7a92f63884af00eb0243ec9328be689a6c9b845 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 15 Feb 2016 16:29:01 +0100 Subject: *: make eval.config.krebs.build.host.name work everywhere --- makefu/1systems/repunit.nix | 2 +- makefu/2configs/default.nix | 1 - makefu/3modules/snapraid.nix | 2 +- makefu/3modules/umts.nix | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) (limited to 'makefu') diff --git a/makefu/1systems/repunit.nix b/makefu/1systems/repunit.nix index 6d2e7273..f9421cfa 100644 --- a/makefu/1systems/repunit.nix +++ b/makefu/1systems/repunit.nix @@ -9,7 +9,7 @@ [ # Include the results of the hardware scan. ../. - ../2configs/cgit-retiolum.nix + ../2configs/git/cgit-retiolum.nix ]; krebs.build.host = config.krebs.hosts.repunit; diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 153e80bb..83018e9f 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -18,7 +18,6 @@ with config.krebs.lib; enable = true; search-domain = "retiolum"; build = { - target = mkDefault "root@${config.krebs.build.host.name}"; user = config.krebs.users.makefu; source = mapAttrs (_: mkDefault) { nixpkgs = { diff --git a/makefu/3modules/snapraid.nix b/makefu/3modules/snapraid.nix index 4a0363e6..3d458bbb 100644 --- a/makefu/3modules/snapraid.nix +++ b/makefu/3modules/snapraid.nix @@ -28,7 +28,7 @@ let out = { options.makefu.snapraid = api; - config = mkIf cfg.enable imp; + config = lib.mkIf cfg.enable imp; }; api = { diff --git a/makefu/3modules/umts.nix b/makefu/3modules/umts.nix index 7e0e5dad..e527a5cb 100644 --- a/makefu/3modules/umts.nix +++ b/makefu/3modules/umts.nix @@ -32,7 +32,7 @@ let out = { options.makefu.umts = api; - config = mkIf cfg.enable imp; + config = lib.mkIf cfg.enable imp; }; api = { -- cgit v1.2.3