Add pinetab2

This commit is contained in:
asonix 2023-06-05 23:56:18 -05:00
parent caefc7dc4a
commit decd974f31
2 changed files with 66 additions and 30 deletions

View file

@ -5,11 +5,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
@ -20,31 +20,31 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1685314633,
"narHash": "sha256-8LXBPqTQXl5ofkjpJ18JcbmLJ/lWDoMxtUwiDYv0wro=",
"lastModified": 1685865905,
"narHash": "sha256-XJZ/o17eOd2sEsGif+/MQBnfa2DKmndWgJyc7CWajFc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c8a17ce7abc03c50cd072e9e6c9b389c5f61836b",
"rev": "e7603eba51f2c7820c0a182c6bbb351181caa8e7",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-22.11",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgsUnstable": {
"locked": {
"lastModified": 1685383865,
"narHash": "sha256-3uQytfnotO6QJv3r04ajSXbEFMII0dUtw0uqYlZ4dbk=",
"owner": "nixos",
"lastModified": 1685931219,
"narHash": "sha256-8EWeOZ6LKQfgAjB/USffUSELPRjw88A+xTcXnOUvO5M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5e871d8aa6f57cc8e0dc087d1c5013f6e212b4ce",
"rev": "7409480d5c8584a1a83c422530419efe4afb0d19",
"type": "github"
},
"original": {
"owner": "nixos",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@ -55,23 +55,22 @@
"nixpkgsStable": [
"nixpkgs"
],
"nixpkgsUnstable": [
"nixpkgsUnstable"
],
"nixpkgsUnstable": "nixpkgsUnstable",
"utils": [
"flake-utils"
]
},
"locked": {
"lastModified": 1685383851,
"narHash": "sha256-P5TztZnMefgSU5Uc/WMbt1HzYi3RihvaBtjKT8ETC9s=",
"owner": "nabam",
"lastModified": 1686014780,
"narHash": "sha256-82Rd14EjqUox/gsUGV7ayH/6XmbxkEp3BEkWCRRG5C0=",
"owner": "asonix",
"repo": "nixos-rockchip",
"rev": "7d78934e69139b95ae926fcf23a7773f713d5043",
"rev": "a9415c989d8e8bdba00ea80c1b92a1ad29aa3e4b",
"type": "github"
},
"original": {
"owner": "nabam",
"owner": "asonix",
"ref": "asonix/pinetab2",
"repo": "nixos-rockchip",
"type": "github"
}
@ -80,7 +79,6 @@
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"nixpkgsUnstable": "nixpkgsUnstable",
"rockchip": "rockchip"
}
},

View file

@ -3,18 +3,18 @@
# pin this to unstable
inputs = {
nixpkgsUnstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
# nixpkgsUnstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
rockchip = {
url = "github:nabam/nixos-rockchip";
inputs.nixpkgsUnstable.follows = "nixpkgsUnstable";
url = "github:asonix/nixos-rockchip/asonix/pinetab2";
# inputs.nixpkgsUnstable.follows = "nixpkgsUnstable";
inputs.nixpkgsStable.follows = "nixpkgs";
inputs.utils.follows = "flake-utils";
};
};
outputs = { self, nixpkgs, nixpkgsUnstable, flake-utils, rockchip }@inputs:
outputs = { self, nixpkgs, flake-utils, rockchip }@inputs:
let
asonix-key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3+mNUlokSKZQNXJAuGm2LCHelKuElWLJArzIYZQYEPbrFaE+J8VtfNbMMD1qVI21ksfcqvFQW4aiP4+BFDxTOGW0uBmUHWKxkyyU39y2yhnsa+svwwIooc+Iwkxw0atzSMEBb94UaZlq9cKMSnG9RGeRFqfYnW2s49wpU79wk6zEFUuOHCMKn4R7zqkPac7IyjxZeKlspY3fOasNH4zyrkbhEOlvrwEOdRNTRNCWWzDcinIVZjfmErHlSynshx9yLnCGkLBxHSxgI2TVyR3RlQ3aGbHtB3QN5X7/T/dwXJFJ11P1Q2bC3XP3hHCogDqXcPvDTFSQEM/mZuFcKNbsn asonix@asonix-tower";
trusted-public-keys = "firestar:spmMw07mO3cxflq5g2GazhE7ddgEoz6QLwaiCnyz/fg=";
@ -55,13 +55,13 @@
};
});
buildModules = ({ uBoot, fdt, kernel }: [
buildModules = ({ uBoot, fdt, kernel, extraModules ? [] }: extraModules ++ [
rockchip.nixosModules.sdImageRockchip
rockchip.nixosModules.dtOverlayPCIeFix
(customized { inherit uBoot fdt kernel; })
]);
osConfig = (modules: nixpkgsUnstable.lib.nixosSystem {
osConfig = (modules: nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
inherit modules;
specialArgs = {
@ -88,6 +88,44 @@
fdt = "rockchip/rk3566-quartz64-b.dtb";
kernel = (rockchip.kernel system).linux_6_3_rockchip;
}
{
board = "PineTab2";
uBoot = (rockchip.uBoot system).uBootPineTab2;
fdt = "rockchip/rk3566-pinetab2-v2.0.dtb";
kernel = (rockchip.kernel system).linux_6_3_pinetab;
extraModules = [{
users.users.asonix.extraGroups = [ "networkmanager" ];
networking.networkmanager.enable = true;
services = {
xserver = {
layout = "us";
xkbVariant = "";
enable = true;
desktopManager.gnome.enable = true;
displayManager.gdm.enable = true;
};
flatpak.enable = true;
printing.enable = true;
avahi = {
enable = true;
openFirewall = true;
};
pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
};
};
programs.dconf.enable = true;
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
}];
}
{
board = "SoQuartzBlade";
uBoot = (rockchip.uBoot system).uBootSoQuartzBlade;
@ -135,10 +173,10 @@
flake-utils.lib.eachDefaultSystem (system: {
packages =
builtins.foldl'
(acc: { board, uBoot, fdt, kernel }:
(acc: { board, uBoot, fdt, kernel, extraModules ? [] }:
acc // {
"${board}" = rec {
modules = buildModules { inherit uBoot fdt kernel; };
modules = buildModules { inherit uBoot fdt kernel extraModules; };
image = (osConfig modules).config.system.build.sdImage;
};
})