Skip to content

Commit 41d1a48

Browse files
TrivarisDrymarchonShaun
authored andcommitted
chore: factor out system variable for maintainability
1 parent 77e837d commit 41d1a48

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

flake.nix

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,30 @@
1414
outputs =
1515
{ nixpkgs, self, ... }:
1616
let
17+
inherit (self.packages.${system}) millennium;
18+
system = "x86_64-linux";
1719
pkgs = import nixpkgs {
18-
system = "x86_64-linux";
20+
inherit system;
1921
config.allowUnfree = true;
2022
};
2123
in
2224
{
23-
overlays.default = final: prev: rec {
24-
inherit (self.packages."x86_64-linux") millennium;
25+
overlays.default = final: prev: {
26+
inherit system;
2527
steam-millennium = final.steam.override (prev: {
2628
extraPkgs = pkgs: [ pkgs.git ];
27-
extraProfile =
28-
''
29-
export LD_LIBRARY_PATH="${millennium}/lib/millenium/''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
30-
export LD_PRELOAD="${millennium}/lib/millennium/libmillennium_x86.so''${LD_PRELOAD:+:$LD_PRELOAD}"
31-
''
32-
+ (prev.extraProfile or "");
29+
extraProfile = ''
30+
export LD_LIBRARY_PATH="${millennium}/lib/millenium/''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
31+
export LD_PRELOAD="${millennium}/lib/millennium/libmillennium_x86.so''${LD_PRELOAD:+:$LD_PRELOAD}"
32+
''
33+
+ (prev.extraProfile or "");
3334
});
3435
};
3536

36-
devShells."x86_64-linux".default = import ./shell.nix { inherit pkgs; };
37+
devShells.${system}.default = import ./shell.nix { inherit pkgs; };
3738

38-
packages."x86_64-linux" = {
39-
default = self.packages."x86_64-linux".millennium;
39+
packages.${system} = {
40+
default = self.packages.${system}.millennium;
4041
millennium = pkgs.callPackage ./nix/millennium.nix { };
4142
shims = pkgs.callPackage ./nix/typescript/shims.nix { };
4243
assets = pkgs.callPackage ./nix/assets.nix { };

0 commit comments

Comments
 (0)