Skip to content

Commit

Permalink
flakes: outsource overlays & update distrobox
Browse files Browse the repository at this point in the history
  • Loading branch information
pongo1231 committed Dec 15, 2024
1 parent 1fba08e commit eecb6f5
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 71 deletions.
54 changes: 1 addition & 53 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,59 +42,7 @@
modules = [
(_: {
nixpkgs.overlays = [
(final: prev: {
kernel = import inputs.nixpkgs-desktop-kernel {
inherit system;
config = {
allowUnfree = true;
nvidia.acceptLicense = true;
};
};

nbfc-linux = final.callPackage ./pkgs/nbfc-linux { };

extest = final.pkgsi686Linux.callPackage ./pkgs/extest { };

#mesa-radv-jupiter = final.callPackage ./pkgs/mesa-radv-jupiter { mesa-radv-jupiter' = prev.mesa-radv-jupiter; };

steamPackages = prev.steamPackages.overrideScope (finalScope: prevScope: {
steam = prevScope.steam.overrideAttrs (finalAttrs: prevAttrs: {
postInstall = prevAttrs.postInstall + ''
substituteInPlace $out/share/applications/steam.desktop --replace "steam %U" "LD_PRELOAD=${final.extest}/lib/libextest.so steam %U -silent"
'';
});
});

libvirt = prev.libvirt.override (prevAttrs: { enableXen = false; });

openvswitch = prev.openvswitch.override { kernel = null; };

virtiofsd = final.callPackage ./pkgs/qemu_7/virtiofsd.nix {
qemu = final.callPackage ./pkgs/qemu_7 {
inherit (final.darwin.apple_sdk.frameworks) CoreServices Cocoa Hypervisor vmnet;
inherit (final.darwin.stubs) rez setfile;
inherit (final.darwin) sigtool;
};
};

distrobox = prev.distrobox.overrideAttrs (finalAttrs: prevAttrs: {
version = "git";
src = final.fetchFromGitHub {
owner = "89luca89";
repo = "distrobox";
rev = "18053c254a83750c49c08e58df2e48a0f04aef48";
hash = "sha256-Gqi9kot7omRrxQPy3PbpqvU3tb33pzIyMA33anzHSjw=";
};

patches = [
./patches/distrobox/relative-default-icon.patch
];

installPhase = ''
./install -P $out
'';
});
})
(import ./overlay.nix { inherit inputs system; })
];

nixpkgs = {
Expand Down
19 changes: 1 addition & 18 deletions home-manager/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,7 @@

(_: {
nixpkgs.overlays = [
(final: prev: {
duperemove = prev.duperemove.overrideAttrs (finalAttrs: prevAttrs: {
src = final.fetchFromGitHub {
owner = "markfasheh";
repo = "duperemove";
rev = "c389d3d5309ed5641aae8cb5d7a255019396bf86";
hash = "sha256-5yyeHGttSlVro+j72VUBoscwIPd4scsQ8X2He4xWFJU=";
};

nativeBuildInputs = prevAttrs.nativeBuildInputs ++ [ final.libbsd final.xxHash ];

postPatch = ''
substituteInPlace Makefile --replace "--std=c23" "--std=c2x"
substituteInPlace results-tree.h --replace "// TODO: delete this" "#include \"list.h\""
substituteInPlace results-tree.h --replace "struct list_head {" "struct list_head_b {"
'';
});
})
(import ./overlay.nix { })
];

home = {
Expand Down
19 changes: 19 additions & 0 deletions home-manager/overlay.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{}:
(final: prev: {
duperemove = prev.duperemove.overrideAttrs (finalAttrs: prevAttrs: {
src = final.fetchFromGitHub {
owner = "markfasheh";
repo = "duperemove";
rev = "c389d3d5309ed5641aae8cb5d7a255019396bf86";
hash = "sha256-5yyeHGttSlVro+j72VUBoscwIPd4scsQ8X2He4xWFJU=";
};

nativeBuildInputs = prevAttrs.nativeBuildInputs ++ [ final.libbsd final.xxHash ];

postPatch = ''
substituteInPlace Makefile --replace "--std=c23" "--std=c2x"
substituteInPlace results-tree.h --replace "// TODO: delete this" "#include \"list.h\""
substituteInPlace results-tree.h --replace "struct list_head {" "struct list_head_b {"
'';
});
})
48 changes: 48 additions & 0 deletions overlay.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{ inputs
, system
}:
(final: prev: {
kernel = import inputs.nixpkgs-desktop-kernel {
inherit system;
config = {
allowUnfree = true;
nvidia.acceptLicense = true;
};
};

nbfc-linux = final.callPackage ./pkgs/nbfc-linux { };

extest = final.pkgsi686Linux.callPackage ./pkgs/extest { };

#mesa-radv-jupiter = final.callPackage ./pkgs/mesa-radv-jupiter { mesa-radv-jupiter' = prev.mesa-radv-jupiter; };

steamPackages = prev.steamPackages.overrideScope (finalScope: prevScope: {
steam = prevScope.steam.overrideAttrs (finalAttrs: prevAttrs: {
postInstall = prevAttrs.postInstall + ''
substituteInPlace $out/share/applications/steam.desktop --replace "steam %U" "LD_PRELOAD=${final.extest}/lib/libextest.so steam %U -silent"
'';
});
});

libvirt = prev.libvirt.override (prevAttrs: { enableXen = false; });

openvswitch = prev.openvswitch.override { kernel = null; };

virtiofsd = final.callPackage ./pkgs/qemu_7/virtiofsd.nix {
qemu = final.callPackage ./pkgs/qemu_7 {
inherit (final.darwin.apple_sdk.frameworks) CoreServices Cocoa Hypervisor vmnet;
inherit (final.darwin.stubs) rez setfile;
inherit (final.darwin) sigtool;
};
};

distrobox = prev.distrobox.overrideAttrs (finalAttrs: prevAttrs: {
version = "git";
src = final.fetchFromGitHub {
owner = "89luca89";
repo = "distrobox";
rev = "3bac964bf0952674848dce170af8b41d743abe57";
hash = "sha256-uPCnI52PjxZPPzoMqS3ayF+5lqvQqb8WmeP1BxAC2ZE=";
};
});
})

0 comments on commit eecb6f5

Please sign in to comment.