This commit is contained in:
joy 2024-10-15 20:13:25 +02:00
parent 4542caafc5
commit d241f84f30
5 changed files with 17 additions and 6 deletions

View file

@ -15,9 +15,9 @@
ser = "ssh root@joygnu.org"; ser = "ssh root@joygnu.org";
ip = "sh ~/nix/modules/programs/home/zsh/scripts/ip.sh"; ip = "sh ~/nix/modules/programs/home/zsh/scripts/ip.sh";
rb = "sh ~/nix/modules/programs/home/zsh/scripts/rebuild.sh"; rb = "sh ~/nix/modules/programs/home/zsh/scripts/rebuild.sh";
fr = "sudo systemctl reboot --firmware"; fr = "doas systemctl reboot --firmware";
up = "nix flake update ~/nix"; up = "nix flake update ~/nix";
del = "sudo nix-collect-garbage -d"; del = "doas nix-collect-garbage -d";
dn = "dotnet new console"; dn = "dotnet new console";
dr = "dotnet run"; dr = "dotnet run";
}; };

View file

@ -11,11 +11,11 @@ alejandra .
hostname=$(hostname) hostname=$(hostname)
if echo "$hostname" | grep -q 'desktop'; then if echo "$hostname" | grep -q 'desktop'; then
sudo nixos-rebuild switch --flake ~/nix/#desktop doas nixos-rebuild switch --flake ~/nix/#desktop
elif echo "$hostname" | grep -q 'laptop'; then elif echo "$hostname" | grep -q 'laptop'; then
sudo nixos-rebuild switch --flake ~/nix/#laptop doas nixos-rebuild switch --flake ~/nix/#laptop
elif echo "$hostname" | grep -q 'server'; then elif echo "$hostname" | grep -q 'server'; then
sudo nixos-rebuild switch --flake ~/nix/#server doas nixos-rebuild switch --flake ~/nix/#server
elif echo "$hostname" | grep -q 'localhost'; then elif echo "$hostname" | grep -q 'localhost'; then
nix-on-droid switch --flake ~/nix nix-on-droid switch --flake ~/nix
fi fi

View file

@ -5,6 +5,7 @@
./xdg ./xdg
./networking ./networking
./lact ./lact
./doas
./misc ./misc
]; ];
} }

View file

@ -0,0 +1,11 @@
{
security.doas.enable = true;
security.sudo.enable = false;
security.doas.extraRules = [
{
users = ["joy"];
keepEnv = true;
persist = true;
}
];
}

View file

@ -2,6 +2,5 @@
users.users.joy = { users.users.joy = {
isNormalUser = true; isNormalUser = true;
description = "joy"; description = "joy";
extraGroups = ["wheel" "sudo"];
}; };
} }