summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archetypes/default.nix1
-rw-r--r--archetypes/profiles/pi/default.nix31
-rw-r--r--hosts/piframe/configuration.nix13
3 files changed, 38 insertions, 7 deletions
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