Compare commits

...

2 Commits

Author SHA1 Message Date
3c63ae7741 refactor: overlay 2025-07-04 21:32:45 +08:00
e79ed0f643 feat(doas): add sudo wrapper 2025-07-04 21:32:35 +08:00
3 changed files with 14 additions and 9 deletions

View File

@@ -27,6 +27,7 @@ lib.my.makeHomeProgramConfig {
name = "monospace";
size = 14;
};
shellIntegration.mode = "no-cursor no-sudo";
extraConfig = ''
include ${./tokyonight-storm.conf}
'';

View File

@@ -35,20 +35,22 @@ lib.my.makeSwitch {
};
users.users.root.hashedPasswordFile = lib.mkDefault config.sops.secrets.imxyy-nix-hashed-password.path;
security.sudo.enable = false;
security.doas = {
enable = true;
extraRules = [
{
users = [ username ];
noPass = true;
keepEnv = true;
}
];
};
environment.shellAliases = {
sudo = "doas";
sudoedit = "doasedit";
};
environment.systemPackages = [
(pkgs.writeShellScriptBin "sudo" ''exec doas "$@"'')
(pkgs.writeShellScriptBin "doasedit" ''
if [ -n "''${2}" ]; then
printf 'Expected only one argument\n'

View File

@@ -14,15 +14,17 @@
)
'';
sing-box.__output.version.__assign = "unstable-2024-08-16";
sing-box.__output.src.__assign = final.fetchFromGitHub {
owner = "PuerNya";
repo = "sing-box";
rev = "067c81a73e1fb7b6edbc58e6b06b8b943fa6c40a";
hash = "sha256-03mkClYVAfAatfYJ1OuM1OvABj/fgbseqK8jPbBtI8g=";
sing-box.__assign = infuse prev.sing-box {
version.__assign = "unstable-2024-08-16";
src.__assign = final.fetchFromGitHub {
owner = "PuerNya";
repo = "sing-box";
rev = "067c81a73e1fb7b6edbc58e6b06b8b943fa6c40a";
hash = "sha256-03mkClYVAfAatfYJ1OuM1OvABj/fgbseqK8jPbBtI8g=";
};
vendorHash.__assign = "sha256-ZWFZkVRtybQAK9oZRIMBGeDfxXTV7kzXwNSbkvslMFk=";
postInstall.__assign = "";
};
sing-box.__output.vendorHash.__assign = "sha256-ZWFZkVRtybQAK9oZRIMBGeDfxXTV7kzXwNSbkvslMFk=";
sing-box.__output.postInstall.__assign = "";
};
# this allows us to access specific version of nixpkgs