exploitoverload / PwNixOS

PwNixOS - A Productivity Focused and Hacking-Oriented NixOS Flake
MIT License
101 stars 9 forks source link

Replicating the greetd auto login #4

Closed etherbiswas closed 9 months ago

etherbiswas commented 11 months ago

Hello im trying to get greetd to autologin on my fork; https://github.com/etherbiswas/nixos

it currently doesnt work even when user is added to greetd group manually, i tried adding hashed password for the user but no luck. Most of the config is same as yours i just remove the hashed password.

exploitoverload commented 10 months ago

Hi @etherbiswas !

I think that you have to edit your /modules/system/configuration.nix file and change the greetd block with something like this:

services.greetd = {
  enable = true;
  settings = rec {
    initial_session = {
      command = "Hyprland";
      user = "d3fault";
    };
    default_session = initial_session;
  };
};
etherbiswas commented 10 months ago

Hi @etherbiswas !

I think that you have to edit your /modules/system/configuration.nix file and change the greetd block with something like this:

services.greetd = {
  enable = true;
  settings = rec {
    initial_session = {
      command = "Hyprland";
      user = "d3fault";
    };
    default_session = initial_session;
  };
};

doesnt work unfortunately

exploitoverload commented 9 months ago

Hi again @etherbiswas !

Sorry for the late reply. I have been trying some solutions to configure the automatic login and the following solution I just checked that it works and runs hyprland as the chosen user:

  services.greetd = {
    enable = true;
    settings = {
      default_session = {
        command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --greeting 'Welcome to PwNixOS!' --cmd Hyprland";
        user = "d3fault";
      };
      initial_session = {
        command = "${pkgs.hyprland}/bin/Hyprland";
        user = "d3fault";
      };
    };
  };

I hope this helps you.