Skip to content

Commit

Permalink
build packages for stable and unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
NyCodeGHG committed Dec 12, 2024
1 parent 7b1ab10 commit d53ff31
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 46 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ jobs:
fail-fast: false
matrix:
package:
- packages.x86_64-linux.installer-stable
- packages.x86_64-linux.alvr-unstable
- packages.x86_64-linux.alvr
- packages.x86_64-linux.nixvim
- packages.x86_64-linux.opentofu
- packages.x86_64-linux.plasma-aero-theme
- packages.x86_64-linux.plasma-aero-theme-unstable
- packages.x86_64-linux.qpm-cli
- packages.x86_64-linux.qpm-cli-unstable
- packages.x86_64-linux.sandwine
- packages.x86_64-linux.sandwine-unstable
- packages.x86_64-linux.wgsl-analyzer
- packages.x86_64-linux.wgsl-analyzer-unstable
- packages.x86_64-linux.yt-dlp
- packages.x86_64-linux.yt-dlp-unstable
- nixosConfigurations.marie-desktop.config.system.build.kernel
- nixosConfigurations.marie-desktop.config.system.build.initialRamdisk
name: Build package ${{ matrix.package }}
Expand Down
62 changes: 19 additions & 43 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
"x86_64-linux"
"aarch64-linux"
] (system: f nixpkgs.legacyPackages.${system});
packages = pkgs: {
};
in
{
formatter = forEachSystem nixpkgs (pkgs: pkgs.nixfmt-rfc-style);
Expand All @@ -71,35 +69,10 @@
];
};
});
packages = forEachSystem nixpkgs (
pkgs:
let
inherit (pkgs.stdenv.hostPlatform) system;
currentHostPlatform = {
nixpkgs.hostPlatform = system;
};
installerImage = inputs:
(inputs.nixpkgs.lib.nixosSystem {
modules = [
./hosts/installer/configuration.nix
currentHostPlatform
];
}).config.system.build.isoImage;
in
{
inherit (pkgs) opentofu;
installer-stable = installerImage inputs;
nixvim = nixvim.legacyPackages.${system}.makeNixvimWithModule { module = import ./config/nixvim; };
wgsl-analyzer = pkgs.callPackage ./pkgs/wgsl-analyzer/package.nix { };
sandwine = pkgs.callPackage ./pkgs/sandwine { };
qpm-cli = nixpkgs-unstable.legacyPackages.${system}.callPackage ./pkgs/qpm-cli/default.nix { };
alvr = pkgs.callPackage ./pkgs/alvr/package.nix { };
yt-dlp = pkgs.yt-dlp.overrideAttrs (prev: {
patches = (prev.patches or [ ]) ++ [ ./patches/yt-dlp-ZDF-fields.patch ];
});
plasma-aero-theme = pkgs.callPackage ./pkgs/plasma-aero-theme/package.nix { };
}
);
packages = let
stable = forEachSystem nixpkgs (pkgs: self.overlays.packages pkgs pkgs);
unstable = forEachSystem nixpkgs-unstable (pkgs: nixpkgs.lib.mapAttrs' (n: v: nixpkgs.lib.nameValuePair "${n}-unstable" v) (self.overlays.packages pkgs pkgs));
in nixpkgs.lib.recursiveUpdate stable unstable;

lib = {
nixosSystem =
Expand Down Expand Up @@ -148,20 +121,23 @@
in
{
inherit (nixpkgs-unstable.legacyPackages.${system}) jujutsu;
wgsl-analyzer = prev.callPackage ./pkgs/wgsl-analyzer/package.nix { };
sandwine = prev.callPackage ./pkgs/sandwine { };
qpm-cli = nixpkgs-unstable.legacyPackages.${system}.callPackage ./pkgs/qpm-cli/default.nix { };
alvr = prev.callPackage ./pkgs/alvr/package.nix { };
yt-dlp = prev.yt-dlp.overrideAttrs (prev: {
patches = (prev.patches or [ ]) ++ [ ./patches/yt-dlp-ZDF-fields.patch ];
});
plasma-aero-theme = prev.callPackage ./pkgs/plasma-aero-theme/package.nix { };
btop = prev.btop.overrideAttrs (prev: {
patches = (prev.patches or [ ]) ++ [ ./patches/btop_Fix-typo-Mhz-MHz.patch ];
});
}
} // self.overlays.packages final prev
);

overlays.packages = (final: prev: {
wgsl-analyzer = prev.callPackage ./pkgs/wgsl-analyzer/package.nix { };
sandwine = prev.callPackage ./pkgs/sandwine { };
qpm-cli = prev.callPackage ./pkgs/qpm-cli/default.nix { };
alvr = prev.callPackage ./pkgs/alvr/package.nix { };
yt-dlp = prev.yt-dlp.overrideAttrs (prev: {
patches = (prev.patches or [ ]) ++ [ ./patches/yt-dlp-ZDF-fields.patch ];
});
plasma-aero-theme = prev.callPackage ./pkgs/plasma-aero-theme/package.nix { };
btop = prev.btop.overrideAttrs (prev: {
patches = (prev.patches or [ ]) ++ [ ./patches/btop_Fix-typo-Mhz-MHz.patch ];
});
});

nixosModules = {
config = import ./config/nixos;
authentik = ./modules/nixos/applications/authentik.nix;
Expand Down

0 comments on commit d53ff31

Please sign in to comment.