more silly refactors

This commit is contained in:
Daylin Morgan 2024-08-09 11:57:03 -05:00
parent 8c1f72b605
commit df15bc9621
Signed by: daylin
GPG key ID: 950D13E9719334AD
3 changed files with 36 additions and 19 deletions

View file

@ -2,10 +2,10 @@
inputs,
system,
lib,
self,
}:
let
inherit (builtins) map;
inherit (lib) flakeFromSystem;
inherit (lib) flakeFromSystem attrValues;
flake = flakeFromSystem system;
pkgs = import inputs.nixpkgs {
@ -16,25 +16,23 @@ let
(flake.overlay "nixpkgs-wayland")
];
};
myPackages = map [
"tsm"
"hyprman"
"zls"
] flake.pkg;
hyprPackages = with (flake.pkgs "hyprland"); [
default
xdg-desktop-portal-hyprland
];
selfPackages = (attrValues self.packages.${pkgs.system});
in
# selfPackages = self.packages.${pkgs.system} |> attrValues;
{
makePackages =
pkgs.runCommandLocal "build-third-party"
{
src = ./.;
nativeBuildInputs =
# packages from overlays
(with pkgs; [
pixi
swww
nixVersions.stable
])
@ -42,9 +40,8 @@ in
(flake.pkgs "roc").full
(flake.pkgs "zig2nix").zig.master.bin
]
++ myPackages
++ hyprPackages;
++ hyprPackages
++ selfPackages;
}
''
mkdir "$out"

View file

@ -3,22 +3,40 @@ let
lib = nixpkgs.lib.extend (import ./extended.nix inputs);
inherit (builtins) mapAttrs readDir listToAttrs;
inherit (lib) genAttrs;
inherit (lib) genAttrs pkgFromSystem pkgsFromSystem;
inherit (import ./find-modules.nix { inherit lib; }) findModulesList;
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" ];
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 = {
nixosModules = listToAttrs (findModulesList ../modules);
nixosConfigurations = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
packages = forAllSystems (pkgs: rec {
iso = mkIso.config.system.build.isoImage;
oizys-go = pkgs.callPackage ../pkgs/oizys { };
default = oizys-go;
});
packages = forAllSystems (
pkgs:
rec {
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: {
default = pkgs.mkShell {
packages = with pkgs; [
@ -30,7 +48,7 @@ let
checks = forAllSystems (
pkgs:
import ./checks.nix {
inherit inputs lib;
inherit inputs lib self;
system = pkgs.system;
}
);

View file

@ -24,5 +24,7 @@ buildGoModule {
installShellCompletion --cmd oizys \
--zsh <(OIZYS_SKIP_CHECK=true $out/bin/oizys completion zsh)
'';
meta = {
description = "nix begat oizys";
};
}