add auto-login module

This commit is contained in:
tristan 2024-02-09 22:09:03 +00:00
parent f839796dc2
commit 1444fd91c8
6 changed files with 28 additions and 44 deletions

View file

@ -21,6 +21,7 @@
pkgs = import inputs.nixpkgs {inherit system;}; pkgs = import inputs.nixpkgs {inherit system;};
user = "tristan"; user = "tristan";
userFullname = "Tristan Beedell"; userFullname = "Tristan Beedell";
auto-login = import ./nixos/programs/auto-login.nix;
mkConf = import ./lib/mkconf.nix {inherit inputs system user userFullname;}; mkConf = import ./lib/mkconf.nix {inherit inputs system user userFullname;};
in { in {
@ -29,22 +30,24 @@
zenix = zenix =
mkConf [ mkConf [
./hardware/zenix.nix ./hardware/zenix.nix
./nixos/programs/hyprland.nix (auto-login "Hyprland")
./nixos/programs/gamer.nix ./nixos/programs/gamer.nix
./nixos/programs/personal.nix ./nixos/programs/personal.nix
./nixos/programs/anki.nix ./nixos/programs/anki.nix
] [ ] [
./home/programs/gamer.nix ./home/programs/gamer.nix
./home/programs/personal.nix ./home/programs/hyprland.nix
./home/programs/personal/.
]; ];
FCS-Tristan-Nixbook = FCS-Tristan-Nixbook =
mkConf [ mkConf [
./hardware/fcs-tristan-nixbook.nix ./hardware/fcs-tristan-nixbook.nix
./nixos/programs/hyprland.nix (auto-login "Hyprland")
./nixos/modules/work.nix ./nixos/modules/work.nix
] [ ] [
./home/programs/work.nix ./home/programs/work.nix
./home/programs/hyprland.nix
]; ];
vm-sway = vm-sway =
@ -57,8 +60,10 @@
mkConf mkConf
[ [
./hardware/vm.nix ./hardware/vm.nix
./nixos/programs/sway.nix (auto-login "sway")
] []; ] [
./home/programs/sway.nix
];
vm-hyprland = vm-hyprland =
builtins.trace '' builtins.trace ''
@ -72,8 +77,10 @@
mkConf mkConf
[ [
./hardware/vm.nix ./hardware/vm.nix
./nixos/programs/hyprland.nix (./nixos/programs/auto-login.nix "Hyprland")
] []; ] [
./home/programs/hyprland.nix
];
vm-tty = mkConf [ vm-tty = mkConf [
./hardware/vm.nix ./hardware/vm.nix

View file

@ -1,6 +1,6 @@
{pkgs, ...}: { {pkgs, ...}: {
imports = [ imports = [
./programs/kodi.nix ./kodi.nix
]; ];
roles.email = { roles.email = {
enable = true; enable = true;

View file

@ -0,0 +1,13 @@
command: {config, ...}: let
user = config.user;
in {
services.greetd = {
enable = true;
settings = {
default_session = {
inherit command;
user = user;
};
};
};
}

View file

@ -1,18 +0,0 @@
{config, ...}: let
user = config.user;
in {
services.greetd = {
enable = true;
settings = rec {
hypr_session = {
command = "Hyprland";
user = user;
};
default_session = hypr_session;
};
};
home-manager.users.${user}.imports = [
../../home/programs/hyprland.nix
];
}

View file

@ -1,18 +0,0 @@
{config, ...}: let
user = config.user;
in {
services.greetd = {
enable = true;
settings = rec {
sway_session = {
command = "sway";
user = user;
};
default_session = sway_session;
};
};
home-manager.users.${user}.imports = [
../../home/programs/sway.nix
];
}