From ab7068bbbda46df0e291202efeb9a0971d0681c8 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Thu, 21 Nov 2024 11:27:28 -0500 Subject: [PATCH] use rpi4 hardware and make experience nicer --- base.nix | 16 ++++++++++++++-- flake.lock | 16 ++++++++++++++++ flake.nix | 4 +++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/base.nix b/base.nix index 2fd55d0..8cb1c65 100644 --- a/base.nix +++ b/base.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ pkgs, lib, ... }: { system.stateVersion = "24.11"; @@ -10,7 +10,9 @@ # STOP TRYING TO GIVE IT TO ME boot.supportedFilesystems.zfs = lib.mkForce false; - boot.tmp.useTmpfs = true; + boot.tmp.cleanOnBoot = true; + + boot.loader.generic-extlinux-compatible.enable = false; # Set root password to a secure password users.users.root.password = "asecurepassword"; @@ -35,4 +37,14 @@ time.timeZone = "America/New_York"; raspberry-pi-nix.board = "bcm2711"; + + environment.systemPackages = with pkgs; [ + vim + git + ]; + + nix.settings = { + substituters = [ "https://hydra.inx.moe?priority=10" ]; + trusted-public-keys = [ "infinidoge-1:uw2A6JHHdGJ9GPk0NEDnrdfVkPp0CUY3zIvwVgNlrSk=" ]; + }; } diff --git a/flake.lock b/flake.lock index d87bf0d..474b8a4 100644 --- a/flake.lock +++ b/flake.lock @@ -34,6 +34,21 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1731403644, + "narHash": "sha256-T9V7CTucjRZ4Qc6pUEV/kpgNGzQbHWfGcfK6JJLfUeI=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "f6581f1c3b137086e42a08a906bdada63045f991", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1731245184, @@ -68,6 +83,7 @@ }, "root": { "inputs": { + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "rpi-nix": "rpi-nix" } diff --git a/flake.nix b/flake.nix index 2c7c88e..85ca4ca 100644 --- a/flake.nix +++ b/flake.nix @@ -4,9 +4,10 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; rpi-nix.url = "github:nix-community/raspberry-pi-nix"; + nixos-hardware.url = "github:NixOS/nixos-hardware"; }; - outputs = { nixpkgs, rpi-nix, ... }: { + outputs = { nixpkgs, rpi-nix, nixos-hardware, ... }: { nixosConfigurations.kiosk = nixpkgs.lib.nixosSystem { system = "aarch64-linux"; @@ -16,6 +17,7 @@ rpi-nix.nixosModules.raspberry-pi rpi-nix.nixosModules.sd-image + nixos-hardware.nixosModules.raspberry-pi-4 { sdImage.compressImage = false; }