rp5 #10

Merged
Daholli merged 6 commits from rp5 into main 2024-11-25 22:33:27 +01:00
8 changed files with 278 additions and 14 deletions
Showing only changes of commit f8ec2f5d8f - Show all commits

View file

@ -741,6 +741,40 @@
"type": "github" "type": "github"
} }
}, },
"libcamera-src": {
"flake": false,
"locked": {
"lastModified": 1725630279,
"narHash": "sha256-KH30jmHfxXq4j2CL7kv18DYECJRp9ECuWNPnqPZajPA=",
"owner": "raspberrypi",
"repo": "libcamera",
"rev": "69a894c4adad524d3063dd027f5c4774485cf9db",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"repo": "libcamera",
"rev": "69a894c4adad524d3063dd027f5c4774485cf9db",
"type": "github"
}
},
"libpisp-src": {
"flake": false,
"locked": {
"lastModified": 1724944683,
"narHash": "sha256-Fo2UJmQHS855YSSKKmGrsQnJzXog1cdpkIOO72yYAM4=",
"owner": "raspberrypi",
"repo": "libpisp",
"rev": "28196ed6edcfeda88d23cc5f213d51aa6fa17bb3",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "v1.0.7",
"repo": "libpisp",
"type": "github"
}
},
"nix-ld": { "nix-ld": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -1026,6 +1060,35 @@
"type": "github" "type": "github"
} }
}, },
"raspberry-pi-nix": {
"inputs": {
"libcamera-src": "libcamera-src",
"libpisp-src": "libpisp-src",
"nixpkgs": [
"nixpkgs"
],
"rpi-bluez-firmware-src": "rpi-bluez-firmware-src",
"rpi-firmware-nonfree-src": "rpi-firmware-nonfree-src",
"rpi-firmware-src": "rpi-firmware-src",
"rpi-linux-6_10_12-src": "rpi-linux-6_10_12-src",
"rpi-linux-6_6_54-src": "rpi-linux-6_6_54-src",
"rpicam-apps-src": "rpicam-apps-src",
"u-boot-src": "u-boot-src"
},
"locked": {
"lastModified": 1731941843,
"narHash": "sha256-/QG4C9WVP79A7jRFC3Ci1q1l6ah7gr3/SF/MWUk/hhM=",
"owner": "nix-community",
"repo": "raspberry-pi-nix",
"rev": "aaec735faf81ff05356d65c7408136d2c1522d34",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "raspberry-pi-nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"fenix": "fenix", "fenix": "fenix",
@ -1045,12 +1108,115 @@
"nixpkgs-latest-factorio": "nixpkgs-latest-factorio", "nixpkgs-latest-factorio": "nixpkgs-latest-factorio",
"nixpkgs-master": "nixpkgs-master", "nixpkgs-master": "nixpkgs-master",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"raspberry-pi-nix": "raspberry-pi-nix",
"snowfall-flake": "snowfall-flake", "snowfall-flake": "snowfall-flake",
"snowfall-lib": "snowfall-lib_2", "snowfall-lib": "snowfall-lib_2",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
} }
}, },
"rpi-bluez-firmware-src": {
"flake": false,
"locked": {
"lastModified": 1708969706,
"narHash": "sha256-KakKnOBeWxh0exu44beZ7cbr5ni4RA9vkWYb9sGMb8Q=",
"owner": "RPi-Distro",
"repo": "bluez-firmware",
"rev": "78d6a07730e2d20c035899521ab67726dc028e1c",
"type": "github"
},
"original": {
"owner": "RPi-Distro",
"ref": "bookworm",
"repo": "bluez-firmware",
"type": "github"
}
},
"rpi-firmware-nonfree-src": {
"flake": false,
"locked": {
"lastModified": 1723266537,
"narHash": "sha256-T7eTKXqY9cxEMdab8Snda4CEOrEihy5uOhA6Fy+Mhnw=",
"owner": "RPi-Distro",
"repo": "firmware-nonfree",
"rev": "4b356e134e8333d073bd3802d767a825adec3807",
"type": "github"
},
"original": {
"owner": "RPi-Distro",
"ref": "bookworm",
"repo": "firmware-nonfree",
"type": "github"
}
},
"rpi-firmware-src": {
"flake": false,
"locked": {
"lastModified": 1727798811,
"narHash": "sha256-eavbshXGYmkYR33y9FLcQMJoAYdYTESVEy0g/RRXnb0=",
"owner": "raspberrypi",
"repo": "firmware",
"rev": "287e6a6c2d3b50eee3e2c5b2eacdd907e5cbe09a",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "1.20241001",
"repo": "firmware",
"type": "github"
}
},
"rpi-linux-6_10_12-src": {
"flake": false,
"locked": {
"lastModified": 1728305462,
"narHash": "sha256-LtvNmGD1D5YYv+C9xxxddAeHw69o3OX/H9M7F663L74=",
"owner": "raspberrypi",
"repo": "linux",
"rev": "26ee50d56618c2d98100b1bc672fd201aed4d00f",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "rpi-6.10.y",
"repo": "linux",
"type": "github"
}
},
"rpi-linux-6_6_54-src": {
"flake": false,
"locked": {
"lastModified": 1728155174,
"narHash": "sha256-/8RjW35XQMnshjAE4Ey8j3oWzE2GOntnBYY6PlvZGhs=",
"owner": "raspberrypi",
"repo": "linux",
"rev": "12f0f28db3afe451a81a34c5a444f6841c10067c",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "rpi-6.6.y",
"repo": "linux",
"type": "github"
}
},
"rpicam-apps-src": {
"flake": false,
"locked": {
"lastModified": 1727515047,
"narHash": "sha256-qCYGrcibOeGztxf+sd44lD6VAOGoUNwRqZDdAmcTa/U=",
"owner": "raspberrypi",
"repo": "rpicam-apps",
"rev": "a8ccf9f3cd9df49875dfb834a2b490d41d226031",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "v1.5.2",
"repo": "rpicam-apps",
"type": "github"
}
},
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1280,6 +1446,19 @@
"type": "github" "type": "github"
} }
}, },
"u-boot-src": {
"flake": false,
"locked": {
"lastModified": 1719857238,
"narHash": "sha256-mJ2TBy0Y5ZtcGFgtU5RKr0UDUp5FWzojbFb+o/ebRJU=",
"type": "tarball",
"url": "https://ftp.denx.de/pub/u-boot/u-boot-2024.07.tar.bz2"
},
"original": {
"type": "tarball",
"url": "https://ftp.denx.de/pub/u-boot/u-boot-2024.07.tar.bz2"
}
},
"xdph": { "xdph": {
"inputs": { "inputs": {
"hyprland-protocols": [ "hyprland-protocols": [

View file

@ -78,6 +78,11 @@
## temporary ## temporary
zen-browser.url = "github:ch4og/zen-browser-flake"; zen-browser.url = "github:ch4og/zen-browser-flake";
raspberry-pi-nix = {
url = "github:nix-community/raspberry-pi-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
################ ################
## inputs for dev shells ## inputs for dev shells
@ -124,6 +129,11 @@
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
]; ];
systems.hosts.nixberry.modules = with inputs; [
raspberry-pi-nix.nixosModules.raspberry-pi
raspberry-pi-nix.nixosModules.sd-image
];
systems.hosts.wsl.modules = with inputs; [ nixos-wsl.nixosModules.default ]; systems.hosts.wsl.modules = with inputs; [ nixos-wsl.nixosModules.default ];
} }
// { // {

View file

@ -0,0 +1,22 @@
{
lib,
pkgs,
config,
osConfig ? { },
format ? "unknown",
...
}:
with lib.wyrdgard;
{
wyrdgard = {
apps = {
kitty = enabled;
};
tools = {
direnv = enabled;
};
};
home.stateVersion = "24.11";
}

View file

@ -17,4 +17,6 @@ with lib.wyrdgard;
direnv = enabled; direnv = enabled;
}; };
}; };
home.stateVersion = "24.05";
} }

View file

@ -8,7 +8,7 @@
... ...
}: }:
let let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption mkOption;
cfg = config.${namespace}.apps.cli-apps.helix; cfg = config.${namespace}.apps.cli-apps.helix;
cachix-url = "https://helix.cachix.org"; cachix-url = "https://helix.cachix.org";
@ -19,13 +19,17 @@ in
{ {
options.${namespace}.apps.cli-apps.helix = { options.${namespace}.apps.cli-apps.helix = {
enable = mkEnableOption "Whether to enable helix or not"; enable = mkEnableOption "Whether to enable helix or not";
pkg = mkOption {
type = lib.types.package;
default = helix-pkg;
description = "Which helix pacakge to use";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment = { environment = {
systemPackages = [ systemPackages = [
helix-pkg cfg.pkg
pkgs.wl-clipboard
]; ];
}; };

View file

@ -34,7 +34,7 @@ in
lfs.enable = true; lfs.enable = true;
signing = { signing = {
key = cfg.signingKey; key = cfg.signingKey;
signByDefault = mkIf gpg.enable true; signByDefault = true;
}; };
extraConfig = { extraConfig = {
init = { init = {

View file

@ -1,8 +1,7 @@
{ {
lib, lib,
modulesPath,
inputs,
namespace, namespace,
pkgs,
... ...
}: }:
@ -11,24 +10,65 @@ let
inherit (lib) mkForce; inherit (lib) mkForce;
in in
{ {
imports = with inputs.nixos-hardware.nixosModules; [ # imports = with inputs.nixos-hardware.nixosModules; [
(modulesPath + "/installer/scan/not-detected.nix") # (modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix") # raspberry-pi-5
raspberry-pi-5 # ];
];
raspberry-pi-nix.board = "bcm2712";
hardware = {
raspberry-pi = {
config = {
all = {
base-dt-params = {
BOOT_UART = {
value = 1;
enable = true;
};
uart_2ndstage = {
value = 1;
enable = true;
};
};
dt-overlays = {
disable-bt = {
enable = true;
params = { };
};
};
};
};
};
};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
${namespace} = { ${namespace} = {
submodules = { submodules = {
basics = enabled; basics = enabled;
}; };
apps.cli-apps.helix = {
pkg = pkgs.helix;
};
system = { system = {
boot = { boot = {
# Raspberry Pi requires a specific bootloader. # Raspberry Pi requires a specific bootloader.
enable = mkForce false; enable = mkForce false;
}; };
}; };
user.trustedPublicKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHFrDiO5+vMfD5MimkzN32iw3MnSMLZ0mHvOrHVVmLD0"
];
}; };
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
@ -37,5 +77,5 @@ in
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "24.11"; # Did you read the comment?
} }

View file

@ -49,8 +49,15 @@ in
]; ];
distributedBuilds = true; distributedBuilds = true;
settings = {
trusted-users = [
"@wheel"
"remotebuild"
];
trusted-public-keys = [ "nixberry:25s8/rxsolAXg4skjnecCeqcfkxYE9FGCPG5UcXsFlw=" ];
}; };
};
${namespace} = { ${namespace} = {
archetypes = { archetypes = {
gaming.enable = true; gaming.enable = true;