Add Jules' RockPro64
This commit is contained in:
parent
46ba563e2f
commit
e11627bd8f
18 changed files with 155 additions and 5 deletions
|
@ -65,6 +65,7 @@
|
|||
kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010
|
||||
midas = mkNix [ ./hosts/midas ]; # Dell Optiplex 5040
|
||||
prophet = mkNix [ ./hosts/prophet ]; # Oracle Neoverse-N1
|
||||
rubble = mkNix [ ./hosts/rubble ]; # ROCKPro64 SBC
|
||||
};
|
||||
|
||||
# home-manager switch --flake /etc/nixos#username
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
system = {
|
||||
desktop.enable = true;
|
||||
lanzaboote.enable = true;
|
||||
fancyboot.enable = true;
|
||||
wireless.enable = true;
|
||||
wireguard.client.enable = true;
|
||||
libvirtd.enable = true;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
system = {
|
||||
desktop.enable = true;
|
||||
lanzaboote.enable = true;
|
||||
fancyboot.enable = true;
|
||||
libvirtd.enable = true;
|
||||
stateVersion = "24.11";
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_hardened;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
boot.kernelParams = [
|
||||
"radeon.cik_support=0"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
system = {
|
||||
desktop.enable = true;
|
||||
lanzaboote.enable = true;
|
||||
fancyboot.enable = true;
|
||||
wireless.enable = true;
|
||||
wireguard.client.enable = true;
|
||||
stateVersion = "24.05";
|
||||
|
|
21
hosts/rubble/default.nix
Normal file
21
hosts/rubble/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./disko
|
||||
./hardware
|
||||
./users
|
||||
../../modules/system
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostName = "rubble";
|
||||
hostId = "3d16423a";
|
||||
};
|
||||
|
||||
system = {
|
||||
desktop.enable = true;
|
||||
extlinux.enable = true;
|
||||
wireguard.client.enable = true;
|
||||
stateVersion = "24.11";
|
||||
};
|
||||
}
|
90
hosts/rubble/disko/default.nix
Normal file
90
hosts/rubble/disko/default.nix
Normal file
|
@ -0,0 +1,90 @@
|
|||
{ config, disko, ... }:
|
||||
{
|
||||
imports = [ disko.nixosModules.disko ];
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"${config.networking.hostName}" = {
|
||||
type = "disk";
|
||||
device = "/dev/mmcblk1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
priority = 1;
|
||||
size = "2G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "${config.networking.hostName}-disk";
|
||||
settings.allowDiscards = true;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "${config.networking.hostName}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lvm_vg = {
|
||||
"${config.networking.hostName}" = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
"/prev" = {
|
||||
mountpoint = "/prev";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" "noexec" ];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
|
||||
# Impermanence
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
};
|
||||
"/persist/.snapshots" = { };
|
||||
"/persist/home/${config.sysusers.main}" = { };
|
||||
"/persist/home/${config.sysusers.main}/.snapshots" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "4G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Needed for impermanence
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
}
|
9
hosts/rubble/hardware/default.nix
Normal file
9
hosts/rubble/hardware/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.kernelModules = [ "ahci" "dm-snapshot" "mmc_core" "pcie_rockchip_host" "phy_rockchip_pcie" "rockchip_dfi" "rockchip_thermal" "rtc_rk808" "rockchip_saradc" "uas" "fusb302" ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
}
|
1
hosts/rubble/id_ed25519.pub
Normal file
1
hosts/rubble/id_ed25519.pub
Normal file
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF4oyz5yAvmVZDdr3NL2AmlnCA6Z17b2Vj0FXj07DFiv jimbo@rubble
|
4
hosts/rubble/users/default.nix
Normal file
4
hosts/rubble/users/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [ ./main ];
|
||||
}
|
7
hosts/rubble/users/main/default.nix
Normal file
7
hosts/rubble/users/main/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
home-manager.users."${config.sysusers.main}".home = {
|
||||
desktop.enable = true;
|
||||
stateVersion = lib.mkForce config.system.stateVersion;
|
||||
};
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.looking-glass-client = {
|
||||
enable = config.home.desktop.enable;
|
||||
enable = if config.home.desktop.enable && config.nixpkgs.system == "x86_64-linux" then true else false;
|
||||
settings = {
|
||||
input = {
|
||||
rawMouse = true;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
../../../../../../hosts/kitty/id_ed25519.pub
|
||||
../../../../../../hosts/midas/id_ed25519.pub
|
||||
../../../../../../hosts/prophet/id_ed25519.pub
|
||||
../../../../../../hosts/rubble/id_ed25519.pub
|
||||
];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJahAoF74BY6GCTsFkt1ADKaraFgJJozW1Y1aBTLK0j9 Pixel9"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./extlinux
|
||||
./lanzaboote
|
||||
./plymouth
|
||||
./services
|
||||
|
|
10
modules/system/devices/boot/extlinux/default.nix
Normal file
10
modules/system/devices/boot/extlinux/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.system.extlinux.enable = lib.mkEnableOption "Enable extlinux";
|
||||
|
||||
config.boot.loader = lib.mkIf config.system.extlinux.enable {
|
||||
grub.enable = false;
|
||||
systemd-boot.enable = lib.mkForce false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
boot = lib.mkIf config.system.desktop.enable {
|
||||
options.system.fancyboot.enable = lib.mkEnableOption "Enable Plymouth";
|
||||
|
||||
config.boot = lib.mkIf config.system.desktop.enable {
|
||||
plymouth.enable = true;
|
||||
loader.timeout = lib.mkForce 0;
|
||||
consoleLogLevel = lib.mkForce 0;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
hardware.graphics = {
|
||||
enable = config.system.desktop.enable;
|
||||
enable32Bit = true;
|
||||
enable32Bit = if config.nixpkgs.hostPlatform == "x86_64-linux" then true else false;
|
||||
extraPackages = with pkgs; [
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
|
|
Loading…
Add table
Reference in a new issue