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, ... }:
{
imports =
[ # Include the results of the hardware scan.
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
@ -56,8 +56,11 @@
users.users.kemp = {
isNormalUser = true;
description = "kemp";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
extraGroups = [
"networkmanager"
"wheel"
];
packages = with pkgs; [ ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINGHadFhDCUU/ta3p1FQgpm7NExHkyHNrJbNJP6np5w9 kempinger@ins.jku.at"
@ -81,17 +84,19 @@
git
nil
nixd
wlr-randr
kmsxx
];
programs.firefox = {
enable = true;
};
systemd.services.cage-tty1={
systemd.services.cage-tty1 = {
after = [
"network-online.target"
#"systemd-resolved.service"
];serviceConfig = {
];
serviceConfig = {
Restart = "always";
RestartSec = "1s";
};
@ -101,7 +106,16 @@
services.cage = {
enable = true;
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";