This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
108: nix: add scripts and fix config file r=disassembler a=disassembler * adds `scripts.<env>.smash` for local testing * fixes smash config file to have the legacy db-sync config params pulled from nodeConfig * Defaults RUNTIME_DIRECTORY to $(pwd) Tested local script as well as deployment on testnet. Co-authored-by: Samuel Leathers <samuel.leathers@iohk.io>
- Loading branch information
Showing
8 changed files
with
103 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ dist-newstyle/ | |
tags | ||
stack.yaml.lock | ||
result* | ||
pgpass* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
{ | ||
imports = [ | ||
./smash-service.nix | ||
]; | ||
imports = import ./module-list.nix; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ | ||
./smash-service.nix | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
# our packages overlay | ||
pkgs: _: with pkgs; { | ||
smashHaskellPackages = import ./haskell.nix { | ||
inherit config | ||
lib | ||
stdenv | ||
haskell-nix | ||
buildPackages | ||
; | ||
}; | ||
pkgs: _: with pkgs; | ||
let | ||
compiler = config.haskellNix.compiler or "ghc865"; | ||
in { | ||
smashHaskellPackages = callPackage ./haskell.nix { | ||
inherit compiler; | ||
}; | ||
|
||
# Grab the executable component of our package. | ||
inherit (smashHaskellPackages.smash.components.exes) | ||
smash-exe; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ pkgs, lib, iohkNix, customConfig }: | ||
let | ||
blacklistedEnvs = [ "selfnode" "shelley_selfnode" "latency-tests" "mainnet-ci" ]; | ||
environments = lib.filterAttrs (k: v: (!builtins.elem k blacklistedEnvs)) iohkNix.cardanoLib.environments; | ||
mkStartScripts = envConfig: let | ||
systemdCompat.options = { | ||
systemd.services = lib.mkOption {}; | ||
services.postgresql = lib.mkOption {}; | ||
users = lib.mkOption {}; | ||
environment = lib.mkOption {}; | ||
}; | ||
eval = let | ||
extra = { | ||
internal.smashPackages = pkgs; | ||
services.smash = { | ||
enable = true; | ||
environment = envConfig; | ||
environmentName = envConfig.name; | ||
}; | ||
}; | ||
in lib.evalModules { | ||
prefix = []; | ||
modules = import nixos/module-list.nix ++ [ systemdCompat customConfig extra ]; | ||
args = { inherit pkgs; }; | ||
}; | ||
in { | ||
smash = eval.config.services.smash.script; | ||
}; | ||
in iohkNix.cardanoLib.forEnvironmentsCustom mkStartScripts environments // { inherit environments; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters