mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 06:00:45 -06:00
more silly refactors
This commit is contained in:
parent
8c1f72b605
commit
df15bc9621
3 changed files with 36 additions and 19 deletions
|
@ -2,10 +2,10 @@
|
||||||
inputs,
|
inputs,
|
||||||
system,
|
system,
|
||||||
lib,
|
lib,
|
||||||
|
self,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (builtins) map;
|
inherit (lib) flakeFromSystem attrValues;
|
||||||
inherit (lib) flakeFromSystem;
|
|
||||||
|
|
||||||
flake = flakeFromSystem system;
|
flake = flakeFromSystem system;
|
||||||
pkgs = import inputs.nixpkgs {
|
pkgs = import inputs.nixpkgs {
|
||||||
|
@ -16,25 +16,23 @@ let
|
||||||
(flake.overlay "nixpkgs-wayland")
|
(flake.overlay "nixpkgs-wayland")
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
myPackages = map [
|
|
||||||
"tsm"
|
|
||||||
"hyprman"
|
|
||||||
"zls"
|
|
||||||
] flake.pkg;
|
|
||||||
|
|
||||||
hyprPackages = with (flake.pkgs "hyprland"); [
|
hyprPackages = with (flake.pkgs "hyprland"); [
|
||||||
default
|
default
|
||||||
xdg-desktop-portal-hyprland
|
xdg-desktop-portal-hyprland
|
||||||
];
|
];
|
||||||
|
|
||||||
|
selfPackages = (attrValues self.packages.${pkgs.system});
|
||||||
in
|
in
|
||||||
|
# selfPackages = self.packages.${pkgs.system} |> attrValues;
|
||||||
{
|
{
|
||||||
makePackages =
|
makePackages =
|
||||||
pkgs.runCommandLocal "build-third-party"
|
pkgs.runCommandLocal "build-third-party"
|
||||||
{
|
{
|
||||||
src = ./.;
|
src = ./.;
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
|
# packages from overlays
|
||||||
(with pkgs; [
|
(with pkgs; [
|
||||||
pixi
|
|
||||||
swww
|
swww
|
||||||
nixVersions.stable
|
nixVersions.stable
|
||||||
])
|
])
|
||||||
|
@ -42,9 +40,8 @@ in
|
||||||
(flake.pkgs "roc").full
|
(flake.pkgs "roc").full
|
||||||
(flake.pkgs "zig2nix").zig.master.bin
|
(flake.pkgs "zig2nix").zig.master.bin
|
||||||
]
|
]
|
||||||
++ myPackages
|
++ hyprPackages
|
||||||
++ hyprPackages;
|
++ selfPackages;
|
||||||
|
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
mkdir "$out"
|
mkdir "$out"
|
||||||
|
|
|
@ -3,22 +3,40 @@ let
|
||||||
lib = nixpkgs.lib.extend (import ./extended.nix inputs);
|
lib = nixpkgs.lib.extend (import ./extended.nix inputs);
|
||||||
|
|
||||||
inherit (builtins) mapAttrs readDir listToAttrs;
|
inherit (builtins) mapAttrs readDir listToAttrs;
|
||||||
inherit (lib) genAttrs;
|
inherit (lib) genAttrs pkgFromSystem pkgsFromSystem;
|
||||||
|
|
||||||
inherit (import ./find-modules.nix { inherit lib; }) findModulesList;
|
inherit (import ./find-modules.nix { inherit lib; }) findModulesList;
|
||||||
inherit (import ./generators.nix { inherit lib self inputs; }) mkIso mkSystem;
|
inherit (import ./generators.nix { inherit lib self inputs; }) mkIso mkSystem;
|
||||||
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
||||||
supportedSystems = [ "x86_64-linux" ];
|
supportedSystems = [ "x86_64-linux" ];
|
||||||
forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; }));
|
forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; }));
|
||||||
|
inheritFlakePkgs =
|
||||||
|
pkgs: flakes:
|
||||||
|
listToAttrs (
|
||||||
|
map (name: {
|
||||||
|
inherit name;
|
||||||
|
value = pkgFromSystem pkgs.system name;
|
||||||
|
}) flakes
|
||||||
|
);
|
||||||
|
|
||||||
oizysFlake = {
|
oizysFlake = {
|
||||||
nixosModules = listToAttrs (findModulesList ../modules);
|
nixosModules = listToAttrs (findModulesList ../modules);
|
||||||
nixosConfigurations = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
nixosConfigurations = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
||||||
packages = forAllSystems (pkgs: rec {
|
packages = forAllSystems (
|
||||||
iso = mkIso.config.system.build.isoImage;
|
pkgs:
|
||||||
oizys-go = pkgs.callPackage ../pkgs/oizys { };
|
rec {
|
||||||
default = oizys-go;
|
default = oizys-cli;
|
||||||
});
|
oizys-cli = pkgs.callPackage ../pkgs/oizys { };
|
||||||
|
iso = mkIso.config.system.build.isoImage;
|
||||||
|
roc = (pkgsFromSystem pkgs.system "roc").full;
|
||||||
|
}
|
||||||
|
// (inheritFlakePkgs pkgs [
|
||||||
|
"pixi"
|
||||||
|
"f1multiviewer"
|
||||||
|
"tsm"
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
devShells = forAllSystems (pkgs: {
|
devShells = forAllSystems (pkgs: {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
@ -30,7 +48,7 @@ let
|
||||||
checks = forAllSystems (
|
checks = forAllSystems (
|
||||||
pkgs:
|
pkgs:
|
||||||
import ./checks.nix {
|
import ./checks.nix {
|
||||||
inherit inputs lib;
|
inherit inputs lib self;
|
||||||
system = pkgs.system;
|
system = pkgs.system;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -24,5 +24,7 @@ buildGoModule {
|
||||||
installShellCompletion --cmd oizys \
|
installShellCompletion --cmd oizys \
|
||||||
--zsh <(OIZYS_SKIP_CHECK=true $out/bin/oizys completion zsh)
|
--zsh <(OIZYS_SKIP_CHECK=true $out/bin/oizys completion zsh)
|
||||||
'';
|
'';
|
||||||
|
meta = {
|
||||||
|
description = "nix begat oizys";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue