feat(steveej-x13s and treewide): get most recent libcamera with fixes

This commit is contained in:
steveej 2024-11-02 22:48:20 +01:00
parent 9d2311bcac
commit c8509fbf7b
13 changed files with 308 additions and 271 deletions

View file

@ -10,12 +10,7 @@
packages',
...
}: {
nixpkgs.overlays = [
(final: previous: {
# inherit (nodeFlake.inputs.nixpkgs-systemd256.legacyPackages.${system}) systemd systemdMinimal;
# inherit (nodeFlake.inputs.nixpkgs-unstable.legacyPackages.${system}) libcamera libcamera-qcam;
})
];
nixpkgs.overlays = [nodeFlake.overlays.default];
nixos-x13s = {
enable = true;
@ -114,27 +109,44 @@
protocol = "ssh-ng";
systems = [
"x86_64-linux"
# "aarch64-linux"
];
supportedFeatures = [
"big-parallel"
"kvm"
"nixos-test"
];
maxJobs = 16;
}
{
hostName = "aarch64-linux-builder-0.infra.holochain.org";
sshUser = "nix-remote-builder";
sshKey = config.sops.secrets.builder-private-key.path;
protocol = "ssh-ng";
systems = [
"aarch64-linux"
];
supportedFeatures = [
"big-parallel"
"kvm"
"nixos-test"
];
maxJobs = 4;
}
{
hostName = "x64-linux-dev-01.dev.infra.holochain.org";
sshUser = "nix-remote-builder";
sshKey = config.sops.secrets.builder-private-key.path;
protocol = "ssh-ng";
systems = [
"x86_64-linux"
# "aarch64-linux"
# "x86_64-linux"
"aarch64-linux"
];
supportedFeatures = [
"big-parallel"
"kvm"
"nixos-test"
];
maxJobs = 0;
}
@ -199,12 +211,14 @@
../../../home-manager/configuration/graphical-fullblown.nix
];
nixpkgs.overlays = [nodeFlake.overlays.default];
home.sessionVariables = {};
home.packages = with pkgs; [
];
# TODO: currently unsupported
# TODO(upstream): currently unsupported on x13s
services.gammastep.enable = true;
};
@ -250,4 +264,6 @@
programs.adb.enable = true;
nix.settings.sandbox = lib.mkForce "relaxed";
systemd.user.services.wireplumber.environment.LIBCAMERA_IPA_PROXY_PATH = "${pkgs.libcamera}/libexec/libcamera";
}

View file

@ -28,11 +28,11 @@
]
},
"locked": {
"lastModified": 1725377834,
"narHash": "sha256-tqoAO8oT6zEUDXte98cvA1saU9+1dLJQe3pMKLXv8ps=",
"lastModified": 1730190761,
"narHash": "sha256-o5m5WzvY6cGIDupuOvjgNSS8AN6yP2iI9MtUC6q/uos=",
"owner": "nix-community",
"repo": "disko",
"rev": "e55f9a8678adc02024a4877c2a403e3f6daf24fe",
"rev": "3979285062d6781525cded0f6c4ff92e71376b55",
"type": "github"
},
"original": {
@ -148,11 +148,11 @@
]
},
"locked": {
"lastModified": 1725703823,
"narHash": "sha256-tDgM4d8mLK0Hd6YMB2w1BqMto1XBXADOzPEaLl10VI4=",
"lastModified": 1726989464,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "208df2e558b73b6a1f0faec98493cb59a25f62ba",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
"type": "github"
},
"original": {
@ -165,16 +165,16 @@
"linux-jhovold": {
"flake": false,
"locked": {
"lastModified": 1728631036,
"narHash": "sha256-1LnClVjY6WS+IR9eqPFA7gzXm0cio3mY23NXj9cKHHs=",
"lastModified": 1730186574,
"narHash": "sha256-QjStPt3c/v55lJUgn4Rdx/WTaQKdUxNL9nwkIKQ8O2Q=",
"owner": "jhovold",
"repo": "linux",
"rev": "6a97bc22fa36010400b91e6d5979741c391112c3",
"rev": "699d5b0ccdc1a343ded65aa876f0b720ca7dada9",
"type": "github"
},
"original": {
"owner": "jhovold",
"ref": "wip/sc8280xp-6.12-rc2",
"ref": "wip/sc8280xp-6.12-rc5",
"repo": "linux",
"type": "github"
}
@ -190,11 +190,11 @@
]
},
"locked": {
"lastModified": 1725529869,
"narHash": "sha256-ekEL4HrZbAeoZmopkxvZ4Z4ufkUEv09b4liGnIIiryc=",
"lastModified": 1730381857,
"narHash": "sha256-PbEoM+AnZTuo9xtwcDcTH9FZAzPzfBhX41+zVVTdgRo=",
"owner": "threefoldtech",
"repo": "mycelium",
"rev": "43c774cc1d5bae9558d0086e2be334812cafe2be",
"rev": "8a2b564c8e279d4afd0a10058b4481799a7513e1",
"type": "github"
},
"original": {
@ -247,17 +247,18 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1728680044,
"narHash": "sha256-kDqUDwEEv1KPOObmdnO3zb5mFthFDHoPgzVDpmRIq44=",
"ref": "refs/heads/remaintain",
"rev": "f691c125485b6764ebef0b9f148613d79de95525",
"revCount": 109,
"lastModified": 1730215039,
"narHash": "sha256-GxhtLAsdpZX2SndSu/AoKugk/vht5RZ47FTcrYILDew=",
"ref": "bump",
"rev": "ff41877fbdf32f2029ade902f10142afb053d2da",
"revCount": 116,
"type": "git",
"url": "https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?branch=remaintain"
"url": "https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git"
},
"original": {
"ref": "bump",
"type": "git",
"url": "https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?branch=remaintain"
"url": "https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git"
}
},
"nixpkgs": {
@ -288,29 +289,13 @@
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
}
},
"nixpkgs-unstable": {
"nixpkgs-stable": {
"locked": {
"lastModified": 1728621521,
"narHash": "sha256-Fk8C/cywdAP//XjK1/CF2VMIRoQjhosCor71p84ff+c=",
"lastModified": 1730327045,
"narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7045aa75c71e90ae3bbb486d35414b08add9c424",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1725826545,
"narHash": "sha256-L64N1rpLlXdc94H+F6scnrbuEu+utC03cDDVvvJGOME=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f4c846aee8e1e29062aa8514d5e0ab270f4ec2f9",
"rev": "080166c15633801df010977d9d7474b4a6c549d7",
"type": "github"
},
"original": {
@ -320,6 +305,22 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1730200266,
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"disko": "disko",
@ -328,7 +329,10 @@
"mycelium": "mycelium",
"nix-snapshotter": "nix-snapshotter",
"nixos-x13s": "nixos-x13s",
"nixpkgs": "nixpkgs_2",
"nixpkgs": [
"nixpkgs-stable"
],
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},

View file

@ -1,22 +1,21 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
# nixpkgs.follows = "nixpkgs-unstable";
# required for home-manager modules
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable-small";
nixpkgs.follows = "nixpkgs-stable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
get-flake.url = "github:ursi/get-flake";
disko.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
# url = "github:nix-community/home-manager/master";
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-x13s.url =
"git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?branch=remaintain"
"git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?ref=bump"
# 6.11.0
# "git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?branch=remaintain&rev=6b9efe77ca80653354981c720af3c4241ac71490"
# 6.12.0-rc6
@ -75,7 +74,6 @@
# flake registry
{
nixpkgs.overlays = builtins.attrValues self.overlays;
nix.registry.nixpkgs.flake = nixpkgs;
}
]
@ -87,7 +85,52 @@
inherit mkNixosConfiguration;
};
overlays = {};
overlays.libcamera = final: previous: {
wireplumber = previous.wireplumber.overrideAttrs (_: {
version = "git";
src = previous.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "pipewire";
repo = "wireplumber";
rev = "71f868233792f10848644319dbdc97a4f147d554";
hash = "sha256-VX3OFsBK9AbISm/XTx8p05ak+z/VcKXfUXhB9aI9ev8=";
};
});
libcamera = previous.libcamera.overrideAttrs (_: {
postFixup = ''
../src/ipa/ipa-sign-install.sh src/ipa-priv-key.pem $out/lib/libcamera/ipa_*.so
'';
});
libcamera-qcam = previous.libcamera-qcam.overrideAttrs (_: {
postFixup = ''
../src/ipa/ipa-sign-install.sh src/ipa-priv-key.pem $out/lib/libcamera/ipa_*.so
'';
});
};
overlays.default = final: previous: let
inherit (previous.stdenv) system;
pkgsUnstable = import self.inputs.nixpkgs-unstable.outPath {
inherit system;
overlays = [self.overlays.libcamera];
};
in {
inherit
(pkgsUnstable)
libcamera
;
webkitgtk = previous.webkitgtk.overrideAttrs (attrs: {
preConfigure =
attrs.preConfigure
+ ''
export NIX_BUILD_CORES="$((NIX_BUILD_CORES > 8 ? 8 : NIX_BUILD_CORES))"
export NUMBER_OF_PROCESSORS="$NIX_BUILD_CORES"
'';
});
};
nixosConfigurations = {
native = mkNixosConfiguration {

View file

@ -11,7 +11,7 @@ in {
};
config = {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "zerotierone" ];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["zerotierone"];
services.zerotierone = {
enable = cfg.enable;

View file

@ -4,6 +4,7 @@
repoFlakeInputs',
packages',
pkgs,
lib,
...
}: let
# TODO: make this configurable

View file

@ -18,7 +18,7 @@ in {
services.gvfs = {
enable = true;
package = lib.mkForce pkgs.gnome3.gvfs;
package = lib.mkForce pkgs.gnome.gvfs;
};
environment.systemPackages = with pkgs; [
@ -36,7 +36,7 @@ in {
# FIXME: `true` breaks xdg-open from alacritty:
# $ xdg-open "https://github.com/"
# Error: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.OpenURI” on object at path /org/freedesktop/portal/desktop
xdgOpenUsePortal = true;
xdgOpenUsePortal = false;
wlr = {
enable = true;
@ -89,6 +89,7 @@ in {
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
};