From 929d4bdfb90da7d218633fea9f100c3ff11887d6 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sat, 20 Dec 2025 00:31:29 -0600 Subject: use new pi profile for bootloader settings and set fastfetch logo to raspian logo --- archetypes/default.nix | 1 + archetypes/profiles/pi/default.nix | 31 +++++++++++++++++++++++++++++++ hosts/piframe/configuration.nix | 13 ++++++------- 3 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 archetypes/profiles/pi/default.nix diff --git a/archetypes/default.nix b/archetypes/default.nix index fa05187..3db8900 100644 --- a/archetypes/default.nix +++ b/archetypes/default.nix @@ -10,5 +10,6 @@ ./profiles/desktop ./profiles/headless + ./profiles/pi ]; } diff --git a/archetypes/profiles/pi/default.nix b/archetypes/profiles/pi/default.nix new file mode 100644 index 0000000..8ea33e4 --- /dev/null +++ b/archetypes/profiles/pi/default.nix @@ -0,0 +1,31 @@ +{ lib, pkgs, ... }: let + mkPi = lib.mkOverride 900; + + nixosConfig = { + # Use the extlinux boot loader. (NixOS wants to enable GRUB by default) + boot.loader.grub.enable = false; + # Enables the generation of /boot/extlinux/extlinux.conf + boot.loader.generic-extlinux-compatible.enable = true; + }; + + homeConfig = { + # Use raspian logo in fastfetch + programs.fastfetch = { + enable = mkPi true; + settings = { + logo.source = mkPi "raspbian"; + # Default options for the rest of this + # TODO figure out how to just override logo and keep defaults w/config file + modules = [ + "title" "separator" "os" "host" "kernel" "uptime" + "packages" "shell" "display" "de" "wm" "wmtheme" "theme" + "icons" "font" "cursor" "terminal" "terminalfont" "cpu" + "gpu" "memory" "swap" "disk" "localip" "battery" + "poweradapter" "locale" "break" "colors" + ]; + }; + }; + }; +in { + imports = [ (lib._mkProfileArchetype "pi" nixosConfig homeConfig) ]; +} diff --git a/hosts/piframe/configuration.nix b/hosts/piframe/configuration.nix index 5195de1..a78313b 100644 --- a/hosts/piframe/configuration.nix +++ b/hosts/piframe/configuration.nix @@ -1,16 +1,16 @@ { config, lib, pkgs, ... }: { - # Use the extlinux boot loader. (NixOS wants to enable GRUB by default) - boot.loader.grub.enable = false; - # Enables the generation of /boot/extlinux/extlinux.conf - boot.loader.generic-extlinux-compatible.enable = true; - _archetypes = { - # Use headless profile + # 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; }; @@ -36,7 +36,6 @@ # Enable piframe user users.users.piframe = { isNormalUser = true; - #extraGroups = [ "video" ]; }; # Configure automatic login with getty -- cgit v1.2.3