summaryrefslogtreecommitdiff
path: root/hosts/piframe
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/piframe')
-rw-r--r--hosts/piframe/configuration.nix78
-rw-r--r--hosts/piframe/hardware-configuration.nix24
2 files changed, 102 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";
+}
diff --git a/hosts/piframe/hardware-configuration.nix b/hosts/piframe/hardware-configuration.nix
new file mode 100644
index 0000000..ceb755a
--- /dev/null
+++ b/hosts/piframe/hardware-configuration.nix
@@ -0,0 +1,24 @@
+# Do not modify this file! It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations. Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+ imports =
+ [ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
+ fsType = "ext4";
+ };
+
+ swapDevices = [ ];
+
+ nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
+}