add screen rotation

This commit is contained in:
Stefan Kempinger 2026-01-28 22:26:17 +01:00
parent 87331d9826
commit 2a54626ab0

View file

@ -5,8 +5,8 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [
[ # Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@ -56,7 +56,10 @@
users.users.kemp = { users.users.kemp = {
isNormalUser = true; isNormalUser = true;
description = "kemp"; description = "kemp";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [
"networkmanager"
"wheel"
];
packages = with pkgs; [ ]; packages = with pkgs; [ ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
@ -81,17 +84,19 @@
git git
nil nil
nixd nixd
wlr-randr
kmsxx
]; ];
programs.firefox = { programs.firefox = {
enable = true; enable = true;
}; };
systemd.services.cage-tty1 = { systemd.services.cage-tty1 = {
after = [ after = [
"network-online.target" "network-online.target"
#"systemd-resolved.service" #"systemd-resolved.service"
];serviceConfig = { ];
serviceConfig = {
Restart = "always"; Restart = "always";
RestartSec = "1s"; RestartSec = "1s";
}; };
@ -101,7 +106,16 @@
services.cage = { services.cage = {
enable = true; enable = true;
user = "kemp"; user = "kemp";
program = "${pkgs.firefox}/bin/firefox"; program = "${pkgs.writeScriptBin "start-cage-app" ''
#!/usr/bin/env bash
kmsprint |
grep '(connected)' |
sed -E 's/.* ([^ ]+) \(connected\).*/\1/' |
while read -r output; do
wlr-randr --output "$output" --transform 180
done
exec ${pkgs.firefox}/bin/firefox
''}/bin/start-cage-app";
}; };
services.getty.loginProgram = "${pkgs.coreutils}/bin/true"; services.getty.loginProgram = "${pkgs.coreutils}/bin/true";