diff options
author | makefu <github@syntax-fehler.de> | 2017-06-28 08:47:23 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-06-28 08:47:23 +0200 |
commit | 74bbb2c0b11691368604c1d8c0e2fb547b47dd47 (patch) | |
tree | 1e4f00951b6278df919a3e45158b0c844f5f4cd0 | |
parent | 9bd7f9ebf4055534ace98002a1a9ddbb243805d1 (diff) | |
parent | 4986344d6e2674914caa31cb4a4bd198dd3d50a0 (diff) |
Merge remote-tracking branch 'lass/master'
-rw-r--r-- | Makefile | 29 | ||||
-rw-r--r-- | krebs/3modules/build.nix | 2 | ||||
-rw-r--r-- | tv/1systems/mu.nix | 11 | ||||
-rw-r--r-- | tv/2configs/default.nix | 18 |
4 files changed, 33 insertions, 27 deletions
@@ -51,13 +51,23 @@ $(if $(target_user),,$(error unbound variable: target_user)) $(if $(target_port),,$(error unbound variable: target_port)) $(if $(target_path),,$(error unbound variable: target_path)) +whatsupnix = \ + if type whatsupnix >/dev/null 2>&1; then \ + whatsupnix $(1); \ + else \ + cat; \ + fi + build = \ nix-build \ + -Q \ --no-out-link \ --show-trace \ -I nixos-config=$(nixos-config) \ -I stockholm=$(stockholm) \ - -E "with import <stockholm>; $(1)" + -E "with import <stockholm>; $(1)" \ + $(2) \ + |& $(call whatsupnix) evaluate = \ nix-instantiate \ @@ -66,7 +76,8 @@ evaluate = \ --show-trace \ -I nixos-config=$(nixos-config) \ -I stockholm=$(stockholm) \ - -E "let eval = import <stockholm>; in with eval; $(1)" + -E "let eval = import <stockholm>; in with eval; $(1)" \ + $(2) ifeq ($(MAKECMDGOALS),) $(error No goals specified) @@ -84,11 +95,7 @@ deploy: $(ssh) $(target_user)@$(target_host) -p $(target_port) \ env STOCKHOLM_VERSION="$$STOCKHOLM_VERSION" \ nixos-rebuild -Q $(rebuild-command) --show-trace -I $(target_path) \ - |& if type whatsupnix 2>/dev/null; then \ - whatsupnix $(target_user)@$(target_host):$(target_port); \ - else \ - cat; \ - fi + |& $(call whatsupnix,$(target_user)@$(target_host):$(target_port)) # usage: make populate system=foo populate: populate-target = \ @@ -126,10 +133,10 @@ install: # usage: make test system=foo [target=bar] [method={eval,build}] method ?= eval ifeq ($(method),build) -test: command = nix-build --no-out-link +test: test = $(call build,$(1),$(2)) else ifeq ($(method),eval) -test: command ?= nix-instantiate --eval --json --readonly-mode --strict +test: test ?= $(call evaluate,$(1),$(2)) --json --strict | jq -r . else $(error bad method: $(method)) endif @@ -141,6 +148,4 @@ else test: wrapper = $(ssh) $(target_user)@$(target_host) -p $(target_port) endif test: populate - $(wrapper) \ - $(command) --show-trace -I $(target_path) \ - -A config.system.build.toplevel $(target_path)/stockholm + $(wrapper) $(call test,config.system.build.toplevel,-I $(target_path)) diff --git a/krebs/3modules/build.nix b/krebs/3modules/build.nix index 51f192703..976d378f9 100644 --- a/krebs/3modules/build.nix +++ b/krebs/3modules/build.nix @@ -24,4 +24,6 @@ with import <stockholm/lib>; type = types.user; }; }; + + config.krebs.build.source.stockholm.file = mkDefault (toString <stockholm>); } diff --git a/tv/1systems/mu.nix b/tv/1systems/mu.nix index fcd0a2178..3f3b2c2f4 100644 --- a/tv/1systems/mu.nix +++ b/tv/1systems/mu.nix @@ -79,15 +79,12 @@ with import <stockholm/lib>; gimp xsane firefoxWrapper - chromiumDev + chromium skype libreoffice - kde4.l10n.de - kde4.plasma-nm pidgin-with-plugins pidginotr - kde4.print_manager #foomatic_filters #gutenprint #cups_pdf_filter @@ -101,7 +98,7 @@ with import <stockholm/lib>; security.wrappers = { sendmail.source = "${pkgs.exim}/bin/sendmail"; # for cron - slock.slock = "${pkgs.slock}/bin/slock"; + slock.source = "${pkgs.slock}/bin/slock"; }; security.pam.loginLimits = [ @@ -138,7 +135,9 @@ with import <stockholm/lib>; twoFingerScroll = true; }; - services.xserver.desktopManager.kde4.enable = true; + services.xserver.desktopManager.plasma5 = { + enable = true; + }; services.xserver.displayManager.auto = { enable = true; user = "vv"; diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index d248bf578..bab1c72b6 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -1,20 +1,20 @@ -{ config, lib, pkgs, ... }: - with import <stockholm/lib>; - -{ +{ config, lib, pkgs, ... }: let + builder = if getEnv "dummy_secrets" == "true" + then "buildbot" + else "tv"; +in { krebs.enable = true; krebs.build = { user = config.krebs.users.tv; source = let inherit (config.krebs.build) host; in { nixos-config.symlink = "stockholm/tv/1systems/${host.name}.nix"; - secrets.file = - if getEnv "dummy_secrets" == "true" - then toString <stockholm/tv/dummy_secrets> - else "/home/tv/secrets/${host.name}"; + secrets.file = getAttr builder { + buildbot = toString <stockholm/tv/dummy_secrets>; + tv = "/home/tv/secrets/${host.name}"; + }; secrets-common.file = "/home/tv/secrets/common"; - stockholm.file = "/home/tv/stockholm"; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; ref = "412b0a17aa2975e092c7ab95a38561c5f82908d4"; # nixos-17.03 |