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,10 +5,10 @@
{ 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
]; ];
# Bootloader. # Bootloader.
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
@ -56,8 +56,11 @@
users.users.kemp = { users.users.kemp = {
isNormalUser = true; isNormalUser = true;
description = "kemp"; description = "kemp";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [
packages = with pkgs; []; "networkmanager"
"wheel"
];
packages = with pkgs; [ ];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINGHadFhDCUU/ta3p1FQgpm7NExHkyHNrJbNJP6np5w9 kempinger@ins.jku.at" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINGHadFhDCUU/ta3p1FQgpm7NExHkyHNrJbNJP6np5w9 kempinger@ins.jku.at"
@ -76,32 +79,43 @@
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget # wget
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 = { ];
Restart = "always"; serviceConfig = {
RestartSec = "1s"; Restart = "always";
}; RestartSec = "1s";
environment.XKB_DEFAULT_LAYOUT = "de"; };
environment.XKB_DEFAULT_LAYOUT = "de";
}; };
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";