2024-06-24 11:38:30 -04:00
|
|
|
{...} @ inputs: rec {
|
2024-06-13 22:27:54 -04:00
|
|
|
mkVersion = src: "0pre+" + src.shortRev;
|
|
|
|
|
2024-06-24 11:38:30 -04:00
|
|
|
buildPlugin = pname: src:
|
|
|
|
inputs.pkgs.vimUtils.buildVimPlugin {
|
|
|
|
inherit pname src;
|
|
|
|
version = mkVersion src;
|
|
|
|
};
|
|
|
|
|
2024-05-20 22:41:45 -04:00
|
|
|
# Import pkgs from a nixpkgs
|
|
|
|
mkPkgs = system: input:
|
|
|
|
import input {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
2024-06-08 23:50:13 -04:00
|
|
|
overlays = [
|
2024-07-03 13:24:53 -04:00
|
|
|
inputs.discord-overlay.overlays.default
|
2024-06-24 11:38:30 -04:00
|
|
|
inputs.grim-hyprland.overlays.default
|
2024-06-28 13:44:12 -04:00
|
|
|
inputs.jovian.overlays.default
|
2024-06-24 11:38:30 -04:00
|
|
|
inputs.nixpkgs-wayland.overlays.default
|
2024-06-08 23:50:13 -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;}
|
|
|
|
./common
|
|
|
|
]
|
|
|
|
++ 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;};}
|
|
|
|
./common/nix-on-droid.nix
|
|
|
|
]
|
|
|
|
++ mods;
|
|
|
|
};
|
|
|
|
}
|