feat: added steam data sink

feat: removed autorandr
fix: added streamdeck config location
This commit is contained in:
Patrick Großmann 2023-10-11 20:54:56 +02:00
parent 052f438b23
commit 3263277616
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
11 changed files with 79 additions and 53 deletions

View file

@ -34,8 +34,4 @@
applications = 10;
desktop = 10;
};
services.xserver = {
layout = "de";
xkbVariant = "bone";
};
}

View file

@ -32,8 +32,18 @@
};
zpool = with lib.disko.zfs; {
rpool = defaultZpoolOptions // {datasets = defaultZfsDatasets;};
panzer = defaultZpoolOptions // {datasets = {};};
panzer =
defaultZpoolOptions
// {
datasets = {
"local" = unmountable;
"local/state" = filesystem "/panzer/state";
};
};
};
};
fileSystems."/state".neededForBoot = true;
fileSystems."/panzer/state".neededForBoot = true;
boot.initrd.luks.devices.enc-rpool.allowDiscards = true;
boot.initrd.luks.devices.enc-panzer.allowDiscards = true;
}

View file

@ -7,7 +7,6 @@
imports = [./users.nix];
# to allow all users to access hm managed persistent folders
programs.fuse.userAllowOther = true;
fileSystems."/state".neededForBoot = true;
environment.persistence."/state" = {
hideMounts = true;

View file

@ -25,8 +25,22 @@ in {
};
};
config = mkIf config.programs.streamdeck-ui.enable {
home.packages = [pkgs.streamdeck-ui];
home.sessionVariables.STREAMDECK_UI_CONFIG = "${config.xdg.configHome}/streamdeck-ui/config.json";
systemd.user = {
services = {
streamdeck = {
Unit = {
Description = "start streamdeck-ui";
};
Service = {
Type = "exec";
ExecStart = "${pkgs.streamdeck-ui}/bin/streamdeck-ui --no-ui";
Environment = "STREAMDECK_UI_CONFIG=${config.xdg.configHome}/streamdeck-ui/config.json";
};
Install.WantedBy = ["graphical-session.target"];
};
};
};
xdg.configFile.streamdeck-ui = {
target = "streamdeck-ui/config.json";
source = settingsFormat.generate "config.json" {

View file

@ -27,7 +27,6 @@ lib.optionalAttrs (!minimal) {
};
};
};
services.autorandr.enable = true;
services.udev.extraRules = let
exe =
pkgs.writeShellScript "set-key-repeat"
@ -40,7 +39,6 @@ lib.optionalAttrs (!minimal) {
# sleep to give X time to access the keyboard
(sleep 0.2; ${pkgs.util-linux}/bin/runuser -u "$user" -- ${pkgs.xorg.xset}/bin/xset r rate \
${toString config.services.xserver.autoRepeatDelay} ${toString config.services.xserver.autoRepeatInterval})&
echo "lol" > /tmp/lel
done
fi
'';

View file

@ -1,8 +1,4 @@
{
config,
pkgs,
...
}: {
{pkgs, ...}: {
programs.autorandr = let
dpi_hd = 96;
dpi_uhd = 216;

View file

@ -6,7 +6,6 @@
imports = [
../.
./rofi.nix
./autorandr.nix
./i3.nix
./wallpapers.nix
];

View file

@ -9,6 +9,10 @@
xsession.windowManager.i3 = {
enable = true;
config = {
startup = [
{command = "xrandr --output DVI-D-0 --mode 1920x1080 --pos 0x0 --rate 60.00 --output DP-4 --mode 2560x1440 --pos 1920x720 --primary --rate 144 --output HDMI-0 --pos 0x1080 --rate 60.00";}
{command = "systemctl --user start set-wallpaper.timer streamdeck.service";}
];
menu = "rofi -show drun";
keybindings = let
cfg = config.xsession.windowManager.i3.config;

View file

@ -17,7 +17,7 @@ in {
Description = "Set a random wallpaper every 3 minutes";
};
Timer = {
OnActiveSec = "5 sec";
OnActiveSec = "10 sec";
OnUnitActiveSec = "3 min";
};
Install.WantedBy = [

View file

@ -15,9 +15,7 @@ if command -v dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment DISPLAY XAUTHORITY
fi
autorandr -c
# I3 does no start graphical session.target because ????
# so we need to manually start all service we want
systemctl --user start set-wallpaper.timer streamdeck.service
xset r rate 235 60
exec i3

View file

@ -1,5 +1,11 @@
{
home.persistence."/state" = {
nixosConfig,
lib,
...
}: {
home.persistence =
{
"/state" = {
directories = [
"repos"
"Downloads"
@ -28,3 +34,9 @@
];
};
}
// lib.mkIf (nixosConfig.disko.devices.zpool ? "panzer") {
"/panzer/state".directories = [
".local/share/SteamPanzer"
];
};
}