65 current 2025-03-22 11:54:41 25.05.20250315.c80f6a7 6.12.19 *

This commit is contained in:
Gustav Bruhn 2025-03-22 11:54:44 +01:00
parent 39ee5edabf
commit dd91f06de0
3 changed files with 47 additions and 1 deletions

View File

@ -8,7 +8,8 @@
# Include the results of the hardware scan.
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
../../modules/nixos/cosmic.nix
# ../../modules/nixos/cosmic.nix
../../modules/nixos/niri.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;

38
modules/nixos/greeter.nix Normal file
View File

@ -0,0 +1,38 @@
{
pkgs,
lib,
config,
inputs,
...
}: let
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
in {
options.greeter = {
session = lib.mkOption {
type = lib.types.str;
description = "Path to the session binary";
};
};
config = {
environment.etc.session.text = toString config.greeter.session;
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${tuigreet} --time --rememeber --remember-session --sessions ${config.greeter.session}";
user = "greeter";
};
};
};
};
# systemd.services.greetd.serviceConfig = {
# Type = "idle";
# StandardInput = "tty";
# StandardOutput = "tty";
# StandardError = "journal";
# TTYReset = true;
# TTYVHangup = true;
# TTYVDisallocate = true;
# };
}

7
modules/nixos/niri.nix Normal file
View File

@ -0,0 +1,7 @@
{pkgs, ...}: {
imports = [
./greeter.nix
];
greeter.session = "${pkgs.niri}/bin/niri-session";
programs.niri.enable = true;
}