Sudo -> run0 alias
This commit is contained in:
parent
91a62a686d
commit
f41698a4ec
4 changed files with 17 additions and 6 deletions
|
@ -9,6 +9,7 @@
|
||||||
vscodeExtensions = with vscode-extensions; [
|
vscodeExtensions = with vscode-extensions; [
|
||||||
mkhl.direnv
|
mkhl.direnv
|
||||||
eamodio.gitlens
|
eamodio.gitlens
|
||||||
|
dart-code.dart-code
|
||||||
dart-code.flutter
|
dart-code.flutter
|
||||||
jnoortheen.nix-ide
|
jnoortheen.nix-ide
|
||||||
timonwong.shellcheck
|
timonwong.shellcheck
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
commit = "git commit -am";
|
commit = "git commit -am";
|
||||||
|
|
||||||
# NixOS
|
# NixOS
|
||||||
garbage = "run0 nix-collect-garbage -d && nix-collect-garbage -d";
|
clean = "nh clean all";
|
||||||
rebuild = "run0 nixos-rebuild switch --flake ~/.config/nixos/#";
|
rebuild = "nh os switch";
|
||||||
update = "pushd ~/.config/nixos && nix flake update && rebuild && popd";
|
update = "pushd ~/.config/nixos && nix flake update && popd && rebuild";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users.defaultUserShell = pkgs.fish;
|
users.defaultUserShell = pkgs.fish;
|
||||||
|
|
7
modules/common/nh.nix
Normal file
7
modules/common/nh.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
programs.nh = {
|
||||||
|
enable = true;
|
||||||
|
clean.enable = true;
|
||||||
|
flake = "/home/quadradical/.config/nixos";
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,4 +1,7 @@
|
||||||
{
|
{pkgs, ...}: {
|
||||||
security.sudo.enable = false;
|
environment.systemPackages = [(pkgs.writeShellScriptBin "sudo" "run0 $@")];
|
||||||
security.pam.services.systemd-run0 = {};
|
security = {
|
||||||
|
sudo.enable = false;
|
||||||
|
pam.services.systemd-run0 = {};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue