Add version suffix in nixos module

This commit is contained in:
jade 2024-03-25 13:44:56 -07:00
parent f8b5d0bc9c
commit 1062d3c1ff
2 changed files with 21 additions and 22 deletions

View file

@ -8,25 +8,24 @@
inputs.flake-compat.url = "git+ssh://git@git.lix.systems/lix-project/flake-compat";
inputs.flakey-profile.url = "github:lf-/flakey-profile";
outputs = inputs@{ self, nixpkgs, lix, flake-utils, flakey-profile, ... }: {
inherit inputs;
nixosModules.default = import ./module.nix { inherit lix; };
overlays.default = import ./overlay.nix {
inherit lix;
versionSuffix = "pre${builtins.substring 0 8 lix.lastModifiedDate}-${lix.shortRev}";
};
} // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
in
{
inherit pkgs;
packages.default = pkgs.nixVersions.nix_2_18;
packages.nix-doc = pkgs.nix-doc;
outputs = inputs@{ self, nixpkgs, lix, flake-utils, flakey-profile, ... }:
let versionSuffix = "pre${builtins.substring 0 8 lix.lastModifiedDate}-${lix.shortRev}";
in {
inherit inputs;
nixosModules.default = import ./module.nix { inherit lix versionSuffix; };
overlays.default = import ./overlay.nix { inherit lix versionSuffix; };
} // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
in
{
inherit pkgs;
packages.default = pkgs.nixVersions.nix_2_18;
packages.nix-doc = pkgs.nix-doc;
packages.system-profile = import ./system-profile.nix { inherit pkgs flakey-profile; };
});
packages.system-profile = import ./system-profile.nix { inherit pkgs flakey-profile; };
});
}

View file

@ -1,5 +1,5 @@
{ lix }:
{ lix, versionSuffix ? "" }:
{ pkgs, config, ... }:
{
nixpkgs.overlays = [ (import ./overlay.nix { inherit lix; }) ];
nixpkgs.overlays = [ (import ./overlay.nix { inherit lix versionSuffix; }) ];
}