{ config, pkgs, ... }: {
  users.users.noe = {
    #hashedPasswordFile = config.sops.secrets."users/noe/password".path;
    isNormalUser = true;
    extraGroups = [ "wheel" ];
    shell = pkgs.fish;
    openssh.authorizedKeys.keys = import ./noe-keys.nix; 
  };

  nix.settings.trusted-users = [ "noe" ];

  programs.fish.enable = true;

  environment.systemPackages = [ pkgs.nixos-rebuild ];
  security.sudo.extraRules = [
    {
      users = [ "noe" ];
      commands = [
        { command = "${pkgs.nixos-rebuild}/bin/nixos-rebuild"; options = [ "NOPASSWD" "SETENV" ]; }
        { command = "/run/current-system/sw/bin/nixos-rebuild"; options = [ "NOPASSWD" "SETENV" ]; }
        { command = "/run/current-system/sw/bin/nixos-rebuild"; options = [ "NOPASSWD" "SETENV" ]; }
        { command = "${pkgs.systemd}/bin/systemctl"; options = [ "NOPASSWD" "SETENV" ]; }
        { command = "/run/current-system/sw/bin/shutdown"; options = [ "NOPASSWD" "SETENV" ]; }
        { command = "/run/current-system/sw/bin/reboot"; options = [ "NOPASSWD" "SETENV" ]; }
      ];
    }
  ];

  #sops.secrets."users/noe/password".neededForUsers = true;
}
