feat: introduce treefmt and fmt all
This commit is contained in:
parent
80250b0179
commit
27c6c4f9fa
237 changed files with 5440 additions and 5214 deletions
|
@ -14,16 +14,15 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixos-x13s.url =
|
||||
"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
|
||||
# "git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?branch=remaintain&rev=bd580ee9c35fcb8a720122d5bb2f903f1b7395ee"
|
||||
# "git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?branch=remaintain&rev=1286d20be2321a1a2d27f5d09257ebaf54ce0630"
|
||||
#"/home/steveej/src/others/nixos-x13s"
|
||||
#
|
||||
;
|
||||
nixos-x13s.url = "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
|
||||
# "git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?branch=remaintain&rev=bd580ee9c35fcb8a720122d5bb2f903f1b7395ee"
|
||||
# "git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?branch=remaintain&rev=1286d20be2321a1a2d27f5d09257ebaf54ce0630"
|
||||
#"/home/steveej/src/others/nixos-x13s"
|
||||
#
|
||||
;
|
||||
|
||||
# nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s?ref=refs/tags/2024-02-28";
|
||||
# nixos-x13s.url = "path:/home/steveej/src/others/nixos-x13s";
|
||||
|
@ -39,127 +38,125 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
get-flake,
|
||||
nixpkgs,
|
||||
...
|
||||
}: let
|
||||
nativeSystem = "aarch64-linux";
|
||||
nodeName = "steveej-x13s";
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
get-flake,
|
||||
nixpkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
nativeSystem = "aarch64-linux";
|
||||
nodeName = "steveej-x13s";
|
||||
|
||||
repoFlake = get-flake ../../../..;
|
||||
repoFlake = get-flake ../../../..;
|
||||
|
||||
mkNixosConfiguration = {extraModules ? [], ...} @ attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
mkNixosConfiguration =
|
||||
{
|
||||
specialArgs =
|
||||
(import ./default.nix {
|
||||
system = nativeSystem;
|
||||
inherit nodeName;
|
||||
extraModules ? [ ],
|
||||
...
|
||||
}@attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate attrs {
|
||||
specialArgs =
|
||||
(import ./default.nix {
|
||||
system = nativeSystem;
|
||||
inherit nodeName;
|
||||
|
||||
inherit repoFlake;
|
||||
repoFlakeWithSystem = repoFlake.lib.withSystem;
|
||||
nodeFlake = self;
|
||||
})
|
||||
.meta
|
||||
.nodeSpecialArgs
|
||||
.${nodeName};
|
||||
inherit repoFlake;
|
||||
repoFlakeWithSystem = repoFlake.lib.withSystem;
|
||||
nodeFlake = self;
|
||||
}).meta.nodeSpecialArgs.${nodeName};
|
||||
|
||||
modules =
|
||||
[
|
||||
modules = [
|
||||
./configuration.nix
|
||||
|
||||
# flake registry
|
||||
{
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
}
|
||||
]
|
||||
++ extraModules;
|
||||
}
|
||||
);
|
||||
in {
|
||||
lib = {
|
||||
inherit mkNixosConfiguration;
|
||||
};
|
||||
|
||||
overlays.libcamera = final: previous: let
|
||||
webkitgtkPreConfigure = ''
|
||||
export NIX_BUILD_CORES="$((NIX_BUILD_CORES > 2 ? 2 : NIX_BUILD_CORES))"
|
||||
export NUMBER_OF_PROCESSORS="$NIX_BUILD_CORES"
|
||||
'';
|
||||
in {
|
||||
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
|
||||
'';
|
||||
});
|
||||
|
||||
webkitgtk = previous.webkitgtk.overrideAttrs (attrs: {
|
||||
preConfigure =
|
||||
attrs.preConfigure + webkitgtkPreConfigure;
|
||||
});
|
||||
|
||||
webkitgtk_4_1 = previous.webkitgtk_4_1.overrideAttrs (attrs: {
|
||||
preConfigure =
|
||||
attrs.preConfigure + webkitgtkPreConfigure;
|
||||
});
|
||||
|
||||
webkitgtk_6_0 = previous.webkitgtk_6_0.overrideAttrs (attrs: {
|
||||
preConfigure =
|
||||
attrs.preConfigure + webkitgtkPreConfigure;
|
||||
});
|
||||
};
|
||||
|
||||
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;
|
||||
inherit
|
||||
(pkgsUnstable)
|
||||
libcamera
|
||||
webkitgtk
|
||||
webkitgtk_4_1
|
||||
webkitgtk_6_0
|
||||
;
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
native = mkNixosConfiguration {
|
||||
system = nativeSystem;
|
||||
};
|
||||
|
||||
cross = mkNixosConfiguration {
|
||||
extraModules = [
|
||||
{
|
||||
nixpkgs.buildPlatform.system = "x86_64-linux";
|
||||
nixpkgs.hostPlatform.system = nativeSystem;
|
||||
{ nix.registry.nixpkgs.flake = nixpkgs; }
|
||||
] ++ extraModules;
|
||||
}
|
||||
];
|
||||
);
|
||||
in
|
||||
{
|
||||
lib = {
|
||||
inherit mkNixosConfiguration;
|
||||
};
|
||||
|
||||
overlays.libcamera =
|
||||
_final: previous:
|
||||
let
|
||||
webkitgtkPreConfigure = ''
|
||||
export NIX_BUILD_CORES="$((NIX_BUILD_CORES > 2 ? 2 : NIX_BUILD_CORES))"
|
||||
export NUMBER_OF_PROCESSORS="$NIX_BUILD_CORES"
|
||||
'';
|
||||
in
|
||||
{
|
||||
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
|
||||
'';
|
||||
});
|
||||
|
||||
webkitgtk = previous.webkitgtk.overrideAttrs (attrs: {
|
||||
preConfigure = attrs.preConfigure + webkitgtkPreConfigure;
|
||||
});
|
||||
|
||||
webkitgtk_4_1 = previous.webkitgtk_4_1.overrideAttrs (attrs: {
|
||||
preConfigure = attrs.preConfigure + webkitgtkPreConfigure;
|
||||
});
|
||||
|
||||
webkitgtk_6_0 = previous.webkitgtk_6_0.overrideAttrs (attrs: {
|
||||
preConfigure = attrs.preConfigure + webkitgtkPreConfigure;
|
||||
});
|
||||
};
|
||||
|
||||
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;
|
||||
inherit (pkgsUnstable)
|
||||
libcamera
|
||||
webkitgtk
|
||||
webkitgtk_4_1
|
||||
webkitgtk_6_0
|
||||
;
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
native = mkNixosConfiguration { system = nativeSystem; };
|
||||
|
||||
cross = mkNixosConfiguration {
|
||||
extraModules = [
|
||||
{
|
||||
nixpkgs.buildPlatform.system = "x86_64-linux";
|
||||
nixpkgs.hostPlatform.system = nativeSystem;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue