Skip to content

Commit

Permalink
feat(nix): add sudo and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
sbulav committed Jan 31, 2024
1 parent 38c2c50 commit ee4bad4
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 254 deletions.
39 changes: 0 additions & 39 deletions .gitconfig

This file was deleted.

3 changes: 0 additions & 3 deletions .gitconfig-pagaya

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
nvim/.netrwhist
nvim/plugin/
.DS_Store
nix/home-manager/desktop/hypr/hyprpaper.conf
210 changes: 0 additions & 210 deletions .vim_help

This file was deleted.

2 changes: 1 addition & 1 deletion nix/modules/nixos/desktop/addons/hyprpaper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
with lib;
with lib.custom; let
cfg = config.custom.desktop.addons.hyprpaper;
wallpaper = /home/sab/Pictures/wallpaper.png;
wallpaper = /home/sab/Pictures/cityscape2.jpg;
in {
options.custom.desktop.addons.hyprpaper = with types; {
enable = mkBoolOpt false "Whether to enable the hyprpaper config";
Expand Down
1 change: 1 addition & 0 deletions nix/modules/nixos/desktop/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ in {

grim
slurp
networkmanagerapplet
];

environment.sessionVariables = {
Expand Down
1 change: 1 addition & 0 deletions nix/modules/nixos/suites/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ in {
xkb.enable = true;

security.doas.enable = false;
security.sudo.enable = true;
security.gpg.enable = true;
};

Expand Down
18 changes: 18 additions & 0 deletions nix/modules/nixos/system/security/sudo/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
options,
config,
lib,
...
}:
with lib;
with lib.custom; let
cfg = config.system.security.sudo;
in {
options.system.security.sudo = {
enable = mkBoolOpt false "Whether or not to configure sudo";
};

config = mkIf cfg.enable {
security.sudo.wheelNeedsPassword = false;
};
}

0 comments on commit ee4bad4

Please sign in to comment.