From ebb68ee1f89d9387402effe0726809831e6de9b6 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 21:30:05 +0200 Subject: tv mu: security.wrappers.slock.{slock => source} --- tv/1systems/mu.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tv/1systems/mu.nix b/tv/1systems/mu.nix index fcd0a2178..cb8e7d97a 100644 --- a/tv/1systems/mu.nix +++ b/tv/1systems/mu.nix @@ -101,7 +101,7 @@ with import ; 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 = [ -- cgit v1.2.3 From 24adece79e47af6602ce1fc48a2d5b772c225b61 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 21:30:22 +0200 Subject: tv mu: kde4 -> plasma5, maybe --- tv/1systems/mu.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tv/1systems/mu.nix b/tv/1systems/mu.nix index cb8e7d97a..8e527b021 100644 --- a/tv/1systems/mu.nix +++ b/tv/1systems/mu.nix @@ -82,12 +82,9 @@ with import ; chromiumDev skype libreoffice - kde4.l10n.de - kde4.plasma-nm pidgin-with-plugins pidginotr - kde4.print_manager #foomatic_filters #gutenprint #cups_pdf_filter @@ -138,7 +135,9 @@ with import ; twoFingerScroll = true; }; - services.xserver.desktopManager.kde4.enable = true; + services.xserver.desktopManager.plasma5 = { + enable = true; + }; services.xserver.displayManager.auto = { enable = true; user = "vv"; -- cgit v1.2.3 From 4fc9f53f7a44a52fafc4ba7e7d3bf8e3dd865dd5 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 22:29:46 +0200 Subject: tv mu: chromiumDev -> chromium --- tv/1systems/mu.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tv/1systems/mu.nix b/tv/1systems/mu.nix index 8e527b021..3f3b2c2f4 100644 --- a/tv/1systems/mu.nix +++ b/tv/1systems/mu.nix @@ -79,7 +79,7 @@ with import ; gimp xsane firefoxWrapper - chromiumDev + chromium skype libreoffice pidgin-with-plugins -- cgit v1.2.3 From 954996f78fbd65f89d2e768d09e2bcc41c080d17 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 22:57:34 +0200 Subject: tv: configure stockholm for buildbot --- tv/2configs/default.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index d248bf578..5d61cb941 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -1,20 +1,24 @@ -{ config, lib, pkgs, ... }: - with import ; - -{ +{ 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 - else "/home/tv/secrets/${host.name}"; + secrets.file = getAttr builder { + buildbot = toString ; + tv = "/home/tv/secrets/${host.name}"; + }; secrets-common.file = "/home/tv/secrets/common"; - stockholm.file = "/home/tv/stockholm"; + stockholm.file = getAttr builder { + buildbot = getEnv "PWD"; + tv = "/home/tv/stockholm"; + }; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; ref = "412b0a17aa2975e092c7ab95a38561c5f82908d4"; # nixos-17.03 -- cgit v1.2.3 From 62638ad7f17a4ed536a1842e36130c264d1e2bc2 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 23:28:41 +0200 Subject: Makefile: call build with whatsupnix --- Makefile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index ce6205c5b..ecc2f493d 100644 --- a/Makefile +++ b/Makefile @@ -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 ; $(1)" + -E "with import ; $(1)" \ + $(2) \ + |& $(call whatsupnix) evaluate = \ nix-instantiate \ @@ -84,11 +94,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 = \ -- cgit v1.2.3 From f61a6d03e3ad27b18fcf96f586717ba99c588c4a Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 23:29:43 +0200 Subject: make test: use build and evaluate --- Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index ecc2f493d..cab53d52a 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,8 @@ evaluate = \ --show-trace \ -I nixos-config=$(nixos-config) \ -I stockholm=$(stockholm) \ - -E "let eval = import ; in with eval; $(1)" + -E "let eval = import ; in with eval; $(1)" \ + $(2) ifeq ($(MAKECMDGOALS),) $(error No goals specified) @@ -132,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 @@ -147,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)) -- cgit v1.2.3 From ee08824427c0a8dbc92aa2858300f7aae5d70df0 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 23:40:38 +0200 Subject: tv: stockholm is really just --- tv/2configs/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 5d61cb941..aae7c5a1b 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -15,10 +15,7 @@ in { tv = "/home/tv/secrets/${host.name}"; }; secrets-common.file = "/home/tv/secrets/common"; - stockholm.file = getAttr builder { - buildbot = getEnv "PWD"; - tv = "/home/tv/stockholm"; - }; + stockholm.file = toString ; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; ref = "412b0a17aa2975e092c7ab95a38561c5f82908d4"; # nixos-17.03 -- cgit v1.2.3 From 62e50105badbe23a3e448d8ca9f5770f7698b22b Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Jun 2017 23:48:05 +0200 Subject: krebs.build.source: stockholm default is --- krebs/3modules/build.nix | 2 ++ tv/2configs/default.nix | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) 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 ; type = types.user; }; }; + + config.krebs.build.source.stockholm.file = mkDefault (toString ); } diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index aae7c5a1b..bab1c72b6 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -15,7 +15,6 @@ in { tv = "/home/tv/secrets/${host.name}"; }; secrets-common.file = "/home/tv/secrets/common"; - stockholm.file = toString ; nixpkgs.git = { url = https://github.com/NixOS/nixpkgs; ref = "412b0a17aa2975e092c7ab95a38561c5f82908d4"; # nixos-17.03 -- cgit v1.2.3