Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add statix into CI #705

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ task:
- name: shellcheck
build_script:
- ./test/shellcheck.sh

- name: statix
build_script:
- ./test/statix.sh
45 changes: 25 additions & 20 deletions modules/bitcoind.nix
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ let
${optionalString cfg.listenWhitelisted
"whitebind=${cfg.address}:${toString cfg.whitelistedPort}"}
${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"}
${optionalString (cfg.i2p != false) "i2psam=${nbLib.addressWithPort i2pSAM.address i2pSAM.port}"}
${optionalString cfg.i2p "i2psam=${nbLib.addressWithPort i2pSAM.address i2pSAM.port}"}
${optionalString (cfg.i2p == "only-outgoing") "i2pacceptincoming=0"}

${optionalString (cfg.discover != null) "discover=${if cfg.discover then "1" else "0"}"}
Expand Down Expand Up @@ -364,7 +364,7 @@ in {
}
];

services.i2pd = mkIf (cfg.i2p != false) {
services.i2pd = mkIf cfg.i2p {
enable = true;
proto.sam.enable = true;
};
Expand Down Expand Up @@ -435,28 +435,33 @@ in {
// optionalAttrs zmqServerEnabled nbLib.allowNetlink;
};

users.users.${cfg.user} = {
isSystemUser = true;
group = cfg.group;
users = {
users.${cfg.user} = {
isSystemUser = true;
group = cfg.group;
};
groups = {
${cfg.group} = {};
bitcoinrpc-public = {};
};
};
users.groups.${cfg.group} = {};
users.groups.bitcoinrpc-public = {};

nix-bitcoin.operator.groups = [ cfg.group ];
nix-bitcoin = {
operator.groups = [ cfg.group ];
secrets = {
bitcoin-rpcpassword-privileged.user = cfg.user;
bitcoin-rpcpassword-public = {
user = cfg.user;
group = "bitcoinrpc-public";
};

nix-bitcoin.secrets = {
bitcoin-rpcpassword-privileged.user = cfg.user;
bitcoin-rpcpassword-public = {
user = cfg.user;
group = "bitcoinrpc-public";
bitcoin-HMAC-privileged.user = cfg.user;
bitcoin-HMAC-public.user = cfg.user;
};

bitcoin-HMAC-privileged.user = cfg.user;
bitcoin-HMAC-public.user = cfg.user;
generateSecretsCmds.bitcoind = ''
makeBitcoinRPCPassword privileged
makeBitcoinRPCPassword public
'';
};
nix-bitcoin.generateSecretsCmds.bitcoind = ''
makeBitcoinRPCPassword privileged
makeBitcoinRPCPassword public
'';
};
}
Loading