diff --git a/configuration.nix b/configuration.nix index 61cbb55..54853c2 100755 --- a/configuration.nix +++ b/configuration.nix @@ -29,6 +29,7 @@ in ./system/hardware.nix ./system/fonts.nix inputs.home-manager.nixosModules.home-manager + inputs.jovian.nixosModules.default #inputs.niri.nixosModules.niri ]; @@ -61,6 +62,7 @@ in "docker" "libvirt" "input" + "seat" ]; packages = with pkgs; [ ]; }; @@ -77,25 +79,31 @@ in "docker" "libvirt" "input" + "seat" ]; packages = with pkgs; [ ]; }; - + users.game = { + isNormalUser = true; + description = "Dedicated gaming user (auto-login in Steam specialisation)"; + shell = pkgs.bash; + createHome = true; + password = ""; # no password + extraGroups = [ + "wheel" + "video" + "render" + "input" + "seat" + "networkmanager" + ]; + home = "/home/game"; + }; groups.libvirtd.members = [ "mrfluffy" "work" ]; }; - # greetd + tuigreet - services.greetd = { - enable = true; - restart = true; - useTextGreeter = true; - settings.default_session = { - command = "${lib.getExe pkgs.tuigreet} --window-padding 1 --time --time-format '%R - %F' --remember --remember-session --asterisks"; - user = "greeter"; - }; - }; ############################################################################## # Home-Manager ############################################################################## @@ -104,6 +112,7 @@ in users = { mrfluffy = import ./home/mrfluffy.nix; work = import ./home/work.nix; + game = import ./home/game.nix; }; }; @@ -141,6 +150,21 @@ in permittedInsecurePackages = [ ]; }; + ############################################################################## + # decky + ############################################################################## + nixpkgs.overlays = [ + inputs.jovian.overlays.default + ]; + jovian.decky-loader = { + enable = true; + user = "game"; # Run as your gaming user + stateDir = "/home/game/.local/share/decky"; # Store plugins/data in user's home (adjust if preferred) + # Optional: Add extra packages if needed for specific plugins + # extraPackages = with pkgs; [ some-package ]; + # extraPythonPackages = ps: with ps; [ some-python-package ]; + }; + ############################################################################## # State version ############################################################################## @@ -149,36 +173,64 @@ in specialisation = { "01-steam" = { configuration = { + + boot = { + kernelParams = lib.mkForce [ "ipv6e=1" "quiet" "splash"]; + plymouth = { + enable = true; + themePackages = [ pkgs.adi1090x-plymouth-themes ]; + theme = "abstract_ring_alt"; + }; + + }; + # ── HDMI-CEC: Turn on TV when Steam specialisation starts ───────────────────── services.udev.packages = [ pkgs.libcec ]; # ensures cec-utils is in PATH + services.blueman.enable = true; + services.seatd.enable = true; # A user service that runs once the graphical session (Steam/GameScope) is ready - systemd.user.services.cec-tv-on = { - description = "Turn on TV via HDMI-CEC when entering Steam specialisation"; - wantedBy = [ "graphical-session.target" ]; - after = [ "graphical-session.target" ]; - serviceConfig = { - Type = "oneshot"; - RemainAfterExit = true; - ExecStart = toString ( - pkgs.writeShellScript "cec-tv-on.sh" '' - # Wait a moment for the HDMI link to settle - sleep 3 + #systemd.user.services.cec-tv-on = { + # description = "Turn on TV via HDMI-CEC when entering Steam specialisation"; + # wantedBy = [ "graphical-session.target" ]; + # after = [ "graphical-session.target" ]; + # serviceConfig = { + # Type = "oneshot"; + # RemainAfterExit = true; + # ExecStart = toString ( + # pkgs.writeShellScript "cec-tv-on.sh" '' + # # Wait a moment for the HDMI link to settle + # sleep 3 - # Turn on the TV and set it as active source (most TVs understand this) - ${pkgs.libcec}/bin/cec-client -s -d 1 <