From 9303ab870cda5c110929cc206e0f96f506f25879 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 27 Jul 2015 04:37:56 +0200 Subject: [PATCH 1/5] default.nix: ${user-name} top-level dirs --- default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/default.nix b/default.nix index 49e889924..77c5ead22 100644 --- a/default.nix +++ b/default.nix @@ -4,10 +4,10 @@ let eval = import { system = builtins.currentSystem; - modules = [ - (./1systems + "/${user-name}/${system-name}.nix") - (./3modules/krebs) - (./3modules + "/${user-name}") + modules = map (p: ./. + "/${p}") [ + "${user-name}/systems/${system-name}.nix" + "${user-name}/modules" + "3modules/krebs" ]; }; From d40a714c08fcdd47136847c23d852af91fb3db8a Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 27 Jul 2015 15:42:33 +0200 Subject: [PATCH 2/5] krebs.types.user: add pubkeys --- 4lib/krebs/types.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/4lib/krebs/types.nix b/4lib/krebs/types.nix index 970ef2f8e..92410dd58 100644 --- a/4lib/krebs/types.nix +++ b/4lib/krebs/types.nix @@ -93,6 +93,10 @@ types // rec { pubkey = mkOption { type = str; }; + pubkeys = mkOption { + type = attrsOf str; + default = {}; + }; }; }; From d720588fb5f52e587a311c0960b5e623733d33dd Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 27 Jul 2015 16:05:41 +0200 Subject: [PATCH 3/5] krebs.build.search-domain: s/example/default/ --- 3modules/krebs/default.nix | 3 +-- tv/configs/base.nix | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/3modules/krebs/default.nix b/3modules/krebs/default.nix index d32143be3..2b20613ca 100644 --- a/3modules/krebs/default.nix +++ b/3modules/krebs/default.nix @@ -151,8 +151,7 @@ let # TODO search-domains :: listOf hostname search-domain = mkOption { type = types.hostname; - default = ""; - example = "retiolum"; + default = "retiolum"; }; }; diff --git a/tv/configs/base.nix b/tv/configs/base.nix index 06f83ea9e..997d4c235 100644 --- a/tv/configs/base.nix +++ b/tv/configs/base.nix @@ -10,7 +10,6 @@ in { krebs.enable = true; - krebs.search-domain = "retiolum"; networking.hostName = config.krebs.build.host.name; From 6fcb2682dbb4ae4dd23f821ff1adfcb7a0550a88 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 27 Jul 2015 16:26:50 +0200 Subject: [PATCH 4/5] krebs.build.script: update system profile --- 3modules/krebs/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/3modules/krebs/default.nix b/3modules/krebs/default.nix index 2b20613ca..32c936891 100644 --- a/3modules/krebs/default.nix +++ b/3modules/krebs/default.nix @@ -107,15 +107,18 @@ let '') config.deps)} echo build system... + profile=/nix/var/nix/profiles/system NIX_PATH=/root/src \ - nix-build \ + nix-env \ -Q \ + -p "$profile" \ + -f '' \ + --set \ -A system \ - '' \ --argstr user-name ${escapeShellArg cfg.build.user.name} \ --argstr system-name ${escapeShellArg cfg.build.host.name} - exec result/bin/switch-to-configuration switch + exec "$profile"/bin/switch-to-configuration switch EOF ''; }; From 5a03593b3a6eb97d2f369424b2631ad122b8de85 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 27 Jul 2015 17:49:02 +0200 Subject: [PATCH 5/5] tv pkgs lentil: 0.1.2.7 -> 0.1.3.0 --- tv/pkgs/lentil/1.patch | 39 -------------------------------------- tv/pkgs/lentil/default.nix | 6 ++---- 2 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 tv/pkgs/lentil/1.patch diff --git a/tv/pkgs/lentil/1.patch b/tv/pkgs/lentil/1.patch deleted file mode 100644 index 1ed9818c7..000000000 --- a/tv/pkgs/lentil/1.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -rN -u old-lentil/src/Lentil/File.hs new-lentil/src/Lentil/File.hs ---- old-lentil/src/Lentil/File.hs 2015-07-20 22:43:23.177620724 +0200 -+++ new-lentil/src/Lentil/File.hs 2015-07-20 22:43:23.177620724 +0200 -@@ -13,10 +13,13 @@ - import Lentil.Types - import Lentil.Parse.Run - -+import System.Directory - import System.FilePath - import System.FilePath.Find -+import Data.Either - import Data.Monoid - import Control.Applicative -+import Control.Exception.Base - - import qualified Data.List as L - -@@ -36,7 +39,12 @@ - -------------- - - findIssues :: [FilePath] -> [FilePath] -> IO [Issue] --findIssues is xs = find always (findClause is xs) "." >>= issueFinder -+findIssues is xs = -+ (mapM (try . canonicalizePath) is :: IO [Either SomeException FilePath]) >>= -+ return . rights >>= -+ mapM (\i -> find always (findClause [i] xs) i) >>= -+ return . concat >>= -+ issueFinder - - -- fp to include, fp to exclude, clause - findClause :: [FilePath] -> [FilePath] -> FindClause Bool -@@ -47,6 +55,6 @@ - (not <$> fmap getAny xc) - where - fp2fc :: FilePath -> FindClause Any -- fp2fc f = Any . L.isPrefixOf (combine "." f) <$> filePath -+ fp2fc f = Any . L.isPrefixOf f <$> filePath - -- TODO: combine funziona su windows? [feature:intermediate] - diff --git a/tv/pkgs/lentil/default.nix b/tv/pkgs/lentil/default.nix index 1385cbd4d..fc9b4fd31 100644 --- a/tv/pkgs/lentil/default.nix +++ b/tv/pkgs/lentil/default.nix @@ -4,13 +4,11 @@ overrides = self: super: { lentil = super.lentil.override { mkDerivation = (attrs: self.mkDerivation (attrs // { - version = "0.1.2.7"; - sha256 = "1g3if2y41li6wyg7ffvpybqvbywiq8bf5b5fb6pz499hinzahb9d"; + version = "0.1.3.0"; + sha256 = "0xa59avh0bvfg69xh9p5b8dppfhx29mvfq8v41sk9j7qbcnzjivg"; patches = [ - ./1.patch ./syntaxes.patch ]; - doCheck = false; })); }; };