This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nix: add scripts and fix config file
- Loading branch information
1 parent
b0a9b46
commit 9bab3d4
Showing
8 changed files
with
104 additions
and
30 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