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; [
|
||||
mkhl.direnv
|
||||
eamodio.gitlens
|
||||
dart-code.dart-code
|
||||
dart-code.flutter
|
||||
jnoortheen.nix-ide
|
||||
timonwong.shellcheck
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
commit = "git commit -am";
|
||||
|
||||
# NixOS
|
||||
garbage = "run0 nix-collect-garbage -d && nix-collect-garbage -d";
|
||||
rebuild = "run0 nixos-rebuild switch --flake ~/.config/nixos/#";
|
||||
update = "pushd ~/.config/nixos && nix flake update && rebuild && popd";
|
||||
clean = "nh clean all";
|
||||
rebuild = "nh os switch";
|
||||
update = "pushd ~/.config/nixos && nix flake update && popd && rebuild";
|
||||
};
|
||||
};
|
||||
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 @@
|
|||
{
|
||||
security.sudo.enable = false;
|
||||
security.pam.services.systemd-run0 = {};
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = [(pkgs.writeShellScriptBin "sudo" "run0 $@")];
|
||||
security = {
|
||||
sudo.enable = false;
|
||||
pam.services.systemd-run0 = {};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue