Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
rudesome committed Mar 17, 2024
1 parent 02a856e commit f7d517a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
18 changes: 13 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
pkgs = import nixpkgs { inherit system; };
name = "flakes";
tag = "latest";
#buildCLIImage = pkgs.callPackage ./lib/buildCLIImage.nix { };
nix = pkgs.callPackage ./images/nix { };
nix-flakes = pkgs.callPackage ./images/nix-flakes/default.nix { inherit nix; };
in
{

#buildCLIImage = pkgs.callPackage ./lib/buildCLIImage.nix { };
nix = pkgs.callPackage ./images/nix { };
flakes = pkgs.callPackage ./images/nix-flakes/default.nix { nix = self.nix; };

packages.${system} = {
bare = self.nix;
bare = nix-flakes;

default =
with pkgs.dockerTools;
buildImage {
inherit name tag;
fromImage = self.flakes.flakeOverride;
fromImage = nix-flakes;
copyToRoot =
with pkgs;
buildEnv {
Expand Down Expand Up @@ -53,5 +53,13 @@
];
};

devShells."aarch64-darwin".default =
with pkgs;
mkShell
{
buildInputs = with pkgs; [
gnumake
];
};
};
}
26 changes: 11 additions & 15 deletions images/nix-flakes/default.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
{ nix
#, nixFlakes
, writeTextFile
, extraContents ? [ ]
}:
{
flakeOverride = nix.override {
#nix = nixFlakes;
extraContents = [
(writeTextFile {
name = "nix.conf";
destination = "/etc/nix/nix.conf";
text = ''
accept-flake-config = true
experimental-features = nix-command flakes
'';
})
] ++ extraContents;
};
nix.override {
extraContents = [
(writeTextFile {
name = "nix.conf";
destination = "/etc/nix/nix.conf";
text = ''
accept-flake-config = true
experimental-features = nix-command flakes
'';
})
] ++ extraContents;
}

0 comments on commit f7d517a

Please sign in to comment.