summaryrefslogtreecommitdiff
path: root/hosts/piframe/configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/piframe/configuration.nix')
-rw-r--r--hosts/piframe/configuration.nix78
1 files changed, 78 insertions, 0 deletions
diff --git a/hosts/piframe/configuration.nix b/hosts/piframe/configuration.nix
new file mode 100644
index 0000000..a78313b
--- /dev/null
+++ b/hosts/piframe/configuration.nix
@@ -0,0 +1,78 @@
+{ config, lib, pkgs, ... }: {
+ _archetypes = {
+ # Use headless and pi profiles
+ profiles.headless = {
+ enable = true;
+ home.users.timmy.enable = true;
+ home.users.piframe.enable = true;
+ };
+ profiles.pi = {
+ enable = true;
+ home.users.timmy.enable = true;
+ home.users.piframe.enable = true;
+ };
+ collections = {
+ desktop.xserver.enable = true;
+ };
+ };
+
+ # Install twm as basic window manager to boot into and immediately go fullscreen on immich-frame
+ services.xserver.windowManager.twm.enable = true;
+
+ # Install immich-frame
+ environment.systemPackages = with pkgs; [
+ immich-frame
+ ];
+
+ # Open 8080 for immich-frame
+ networking.firewall.allowedTCPPorts = [ 8080 ];
+
+ # Enable user timmy for ssh maintenance and wifi secrets
+ _users.timmy = {
+ enable = true;
+ wifi.enable = true;
+ };
+
+ # Enable piframe user
+ users.users.piframe = {
+ isNormalUser = true;
+ };
+
+ # Configure automatic login with getty
+ services.getty.autologinUser = "piframe";
+
+ # Configure piframe home
+ home-manager.users.piframe = {
+ services.gammastep = {
+ enable = true;
+ temperature = {
+ day = 6500;
+ night = 3600;
+ };
+ # Manual location to avoid having to mess with geoclue
+ latitude = 41.881832;
+ longitude = -87.623177;
+ };
+ programs.bash = {
+ enable = true;
+ profileExtra = ''
+ # startx on tty1 immediately
+ [ -z $DISPLAY ] && [ `tty` = /dev/tty1 ] && startx
+ '';
+ };
+ home.file.".xinitrc".text = ''
+ #!/bin/sh
+ gammastep &
+ unclutter --start-hidden &
+ immich-frame --fullscreen &
+ exec twm
+ '';
+ home.file.".twmrc".text = ''
+ *NoTitle # Hide title bar on all windows
+ *NoBorder # Hide borders on all windows
+ '';
+ home.stateVersion = "25.11";
+ };
+
+ system.stateVersion = "25.11";
+}