-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #245: Fix tests without secure-node
bfed10b run-tests: add command 'all' (Erik Arvstedt) 0a6b9be run-tests: simplify setting default scenario (Erik Arvstedt) 1a32292 test: speed up clightning startup when offline (Erik Arvstedt) 7d1797c clightning: add option 'extraConfig' (Erik Arvstedt) e0117d5 spark-wallet: fix always-on onion-chef setting (Erik Arvstedt) 480d0d3 liquid: fix bitcoin rpc settings (Erik Arvstedt) c07e767 test: add python test requirements (Erik Arvstedt) 9aa19c3 extract operator module (Erik Arvstedt) 2dd1a74 modules: group imports (Erik Arvstedt) Pull request description: ACKs for top commit: jonasnick: ACK bfed10b Tree-SHA512: caa6a38f9c9ad583fee8b4a705f5a94f037354eb49c2502c7b0aae620981df5c6630b1c862ead7fff2d9a47d0d15d3ce819567f63570e4d68ed02db7fe5f19a6
- Loading branch information
Showing
14 changed files
with
126 additions
and
68 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
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
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
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
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
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,47 @@ | ||
# Define an operator user for convenient interactive access to nix-bitcoin | ||
# features and services. | ||
# | ||
# When using nix-bitcoin as part of a larger system config, set | ||
# `nix-bitcoin.operator.name` to your main user name. | ||
|
||
{ config, lib, pkgs, options, ... }: | ||
|
||
with lib; | ||
let | ||
cfg = config.nix-bitcoin.operator; | ||
in { | ||
options.nix-bitcoin.operator = { | ||
enable = mkEnableOption "operator user"; | ||
name = mkOption { | ||
type = types.str; | ||
default = "operator"; | ||
description = "User name."; | ||
}; | ||
groups = mkOption { | ||
type = with types; listOf str; | ||
default = []; | ||
description = "Extra groups."; | ||
}; | ||
sudoUsers = mkOption { | ||
type = with types; listOf str; | ||
default = []; | ||
description = "Users as which the operator is allowed to run commands."; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
users.users.${cfg.name} = { | ||
isNormalUser = true; | ||
extraGroups = [ | ||
"systemd-journal" | ||
"proc" # Enable full /proc access and systemd-status | ||
] ++ cfg.groups; | ||
}; | ||
|
||
security.sudo.extraConfig = mkIf (cfg.sudoUsers != []) (let | ||
users = builtins.concatStringsSep "," cfg.sudoUsers; | ||
in '' | ||
${cfg.name} ALL=(${users}) NOPASSWD: ALL | ||
''); | ||
}; | ||
} |
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
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