added sudo and step-client modules
This commit is contained in:
12
modules/programs/step-client.nix
Normal file
12
modules/programs/step-client.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
flake.modules.homeManager.step-client = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
step-cli
|
||||
(writeShellScriptBin "check-ssh" ''
|
||||
set -euo pipefail
|
||||
bash <(curl -sL https://gitea.john-stream.com/john/janus/raw/branch/main/scripts/ssh-server-check.sh)
|
||||
'')
|
||||
];
|
||||
};
|
||||
}
|
||||
29
modules/programs/sudo.nix
Normal file
29
modules/programs/sudo.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.sudo = { pkgs, lib, ... }: {
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
extraRules = [{
|
||||
commands = [
|
||||
{
|
||||
command = "${pkgs.systemd}/bin/systemctl suspend";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
{
|
||||
command = "${pkgs.systemd}/bin/reboot";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
{
|
||||
command = "${pkgs.systemd}/bin/poweroff";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
groups = [ "wheel" ];
|
||||
}];
|
||||
extraConfig = with pkgs; ''
|
||||
Defaults:picloud secure_path="${lib.makeBinPath [
|
||||
systemd
|
||||
]}:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user