2024-08-07 14:47:32 -04:00
|
|
|
inputs: rec {
|
|
|
|
# Import pkgs from a nixpkgs instance
|
|
|
|
mkPkgs = system: nixpkgs:
|
|
|
|
import nixpkgs {
|
2024-05-20 22:41:45 -04:00
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
2024-08-04 18:44:53 -04:00
|
|
|
overlays =
|
|
|
|
(map (i: inputs.${i}.overlays.default) [
|
|
|
|
"discord-overlay"
|
|
|
|
"grim-hyprland"
|
|
|
|
"jovian"
|
|
|
|
"nixpkgs-wayland"
|
|
|
|
])
|
|
|
|
++ [
|
|
|
|
inputs.self.overlays.xdg-desktop-portal-kde
|
2024-08-12 20:01:22 -04:00
|
|
|
|
|
|
|
# FIXME: https://pr-tracker.nelim.org/?pr=333586
|
|
|
|
(final: prev: {
|
|
|
|
egl-wayland = prev.egl-wayland.overrideAttrs (o: rec {
|
|
|
|
version = "1.1.15";
|
|
|
|
|
|
|
|
src = prev.fetchFromGitHub {
|
|
|
|
owner = "Nvidia";
|
|
|
|
repo = o.pname;
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-MD+D/dRem3ONWGPoZ77j2UKcOCUuQ0nrahEQkNVEUnI=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
})
|
2024-08-04 18:44:53 -04:00
|
|
|
];
|
2024-05-20 22:41:45 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
# Function that makes the attrs that make up the specialArgs
|
|
|
|
mkArgs = system:
|
|
|
|
inputs
|
|
|
|
// {
|
2024-06-24 11:38:30 -04:00
|
|
|
pkgs = mkPkgs system inputs.nixpkgs;
|
2024-05-20 22:41:45 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
# Default system
|
|
|
|
mkNixOS = mods:
|
2024-06-24 11:38:30 -04:00
|
|
|
inputs.nixpkgs.lib.nixosSystem rec {
|
2024-05-20 22:41:45 -04:00
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = mkArgs system;
|
|
|
|
modules =
|
|
|
|
[
|
|
|
|
{home-manager.extraSpecialArgs = specialArgs;}
|
2024-08-07 14:47:32 -04:00
|
|
|
../common
|
2024-05-20 22:41:45 -04:00
|
|
|
]
|
|
|
|
++ mods;
|
|
|
|
};
|
|
|
|
|
|
|
|
mkNixOnDroid = mods:
|
2024-06-24 11:38:30 -04:00
|
|
|
inputs.nix-on-droid.lib.nixOnDroidConfiguration rec {
|
2024-05-20 22:41:45 -04:00
|
|
|
extraSpecialArgs = mkArgs "aarch64-linux";
|
2024-06-24 11:38:30 -04:00
|
|
|
home-manager-path = inputs.home-manager.outPath;
|
2024-05-20 22:41:45 -04:00
|
|
|
pkgs = extraSpecialArgs.pkgs;
|
|
|
|
|
|
|
|
modules =
|
|
|
|
[
|
|
|
|
{
|
|
|
|
options = with pkgs.lib; {
|
|
|
|
environment.variables.FLAKE = mkOption {
|
|
|
|
type = with types; nullOr str;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{home-manager = {inherit extraSpecialArgs;};}
|
2024-08-07 14:47:32 -04:00
|
|
|
../common/nix-on-droid.nix
|
2024-05-20 22:41:45 -04:00
|
|
|
]
|
|
|
|
++ mods;
|
|
|
|
};
|
|
|
|
}
|