ccache lix
This commit is contained in:
parent
9f14173c43
commit
f969379666
5 changed files with 56 additions and 44 deletions
|
@ -34,11 +34,13 @@ let
|
||||||
hash = "sha256-vmzj7gF8jwHdqxN+dQiJ4MRxKpHvBTzbrUvFgt1DK8I=";
|
hash = "sha256-vmzj7gF8jwHdqxN+dQiJ4MRxKpHvBTzbrUvFgt1DK8I=";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# enable ccache for lix if ccache is enabled
|
||||||
|
enable_lix_ccache = true;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
"${nivSources.agenix}/modules/age.nix"
|
"${nivSources.agenix}/modules/age.nix"
|
||||||
(import "${nivSources.lix-module}/module.nix" { lix = nivSources.lix-pkg; })
|
|
||||||
"${nivSources.nixos-mailserver}/default.nix"
|
"${nivSources.nixos-mailserver}/default.nix"
|
||||||
"${nivSources.nixos-matrix-modules}/module.nix"
|
"${nivSources.nixos-matrix-modules}/module.nix"
|
||||||
|
|
||||||
|
@ -48,8 +50,6 @@ in
|
||||||
# (builtins.getFlake "git+${nivSources.nixos-mailserver.repo}").nixosModules.default
|
# (builtins.getFlake "git+${nivSources.nixos-mailserver.repo}").nixosModules.default
|
||||||
] ++ lib.optionals (builtins.hasAttr build_target host_modules) host_modules.${build_target};
|
] ++ lib.optionals (builtins.hasAttr build_target host_modules) host_modules.${build_target};
|
||||||
|
|
||||||
nixpkgs.hostPlatform = system;
|
|
||||||
|
|
||||||
system.nixos = {
|
system.nixos = {
|
||||||
distroId = "lixos";
|
distroId = "lixos";
|
||||||
distroName = "LixOS";
|
distroName = "LixOS";
|
||||||
|
@ -77,24 +77,40 @@ in
|
||||||
))
|
))
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.pkgs =
|
nixpkgs =
|
||||||
let
|
let
|
||||||
src = nivSources.nixpkgs;
|
src = nivSources.nixpkgs;
|
||||||
|
unpatched = import src { inherit config system; };
|
||||||
|
inherit (unpatched) applyPatches fetchpatch;
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
unpatched = import src { inherit config system; };
|
|
||||||
inherit (unpatched) applyPatches fetchpatch;
|
|
||||||
in
|
in
|
||||||
import (applyPatches {
|
{
|
||||||
name = "nixpkgs-patched";
|
hostPlatform = system;
|
||||||
inherit src;
|
pkgs = import (applyPatches {
|
||||||
patches = map fetchpatch nixpkgs_patches;
|
name = "nixpkgs-patched";
|
||||||
}) { inherit config; };
|
inherit src;
|
||||||
|
patches = map fetchpatch nixpkgs_patches;
|
||||||
|
}) { inherit config; };
|
||||||
|
|
||||||
nixpkgs.overlays = lib.singleton (
|
overlays = [
|
||||||
final: prev: { agenix = final.callPackage "${nivSources.agenix}/pkgs/agenix.nix" { }; }
|
(import (
|
||||||
);
|
if enable_lix_ccache then
|
||||||
|
"${
|
||||||
|
applyPatches {
|
||||||
|
name = "lix-overlay-ccache";
|
||||||
|
src = nivSources.lix-module;
|
||||||
|
patches = [ ./patches/lix-ccache.patch ];
|
||||||
|
}
|
||||||
|
}/overlay.nix"
|
||||||
|
else
|
||||||
|
"${nivSources.lix-module}/overlay.nix"
|
||||||
|
) { lix = nivSources.lix-pkg; })
|
||||||
|
(final: prev: { agenix = final.callPackage "${nivSources.agenix}/pkgs/agenix.nix" { }; })
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
_module.args = {
|
_module.args = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
|
@ -17,22 +17,22 @@
|
||||||
"homepage": "https://nyx.chaotic.cx",
|
"homepage": "https://nyx.chaotic.cx",
|
||||||
"owner": "chaotic-cx",
|
"owner": "chaotic-cx",
|
||||||
"repo": "nyx",
|
"repo": "nyx",
|
||||||
"rev": "986bdd8abf617176a67a463c81c4d18d2bc7913f",
|
"rev": "dcb0f06376629577a71a5322566acaf5c33bc232",
|
||||||
"sha256": "1fvh1wnwm91am94hjj09dhff3vya2syqn66fmvh7vqrcviy5vlay",
|
"sha256": "0cgddk9mdw6v1dmz55w2xcfbg26mxyyqs21hcbk0lpz6rgcb7lqg",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/chaotic-cx/nyx/archive/986bdd8abf617176a67a463c81c4d18d2bc7913f.tar.gz",
|
"url": "https://github.com/chaotic-cx/nyx/archive/dcb0f06376629577a71a5322566acaf5c33bc232.tar.gz",
|
||||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
},
|
},
|
||||||
"lix-module": {
|
"lix-module": {
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"repo": "https://git.lix.systems/lix-project/nixos-module.git",
|
"repo": "https://git.lix.systems/lix-project/nixos-module.git",
|
||||||
"rev": "d15ff50703ea83b595249eb3e67d2e668235d5a6",
|
"rev": "c8ab1e79ba0140bc75731c75177242089506260b",
|
||||||
"type": "git"
|
"type": "git"
|
||||||
},
|
},
|
||||||
"lix-pkg": {
|
"lix-pkg": {
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"repo": "https://git.lix.systems/lix-project/lix.git",
|
"repo": "https://git.lix.systems/lix-project/lix.git",
|
||||||
"rev": "8552519bb81fc2ee2d11e76594fd7de9393f4fe9",
|
"rev": "9ae90612a7535b87f26f2f9ff6b6ef2bb066998f",
|
||||||
"type": "git"
|
"type": "git"
|
||||||
},
|
},
|
||||||
"nixos-mailserver": {
|
"nixos-mailserver": {
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
|
programs.ccache.packageNames = [
|
||||||
|
"agenix"
|
||||||
|
"the-powder-toy"
|
||||||
|
"mcontrolcenter"
|
||||||
|
];
|
||||||
|
|
||||||
nixpkgs.overlays =
|
nixpkgs.overlays =
|
||||||
map
|
map
|
||||||
(
|
(
|
||||||
|
|
|
@ -1,22 +1,12 @@
|
||||||
diff --git a/package.nix b/package.nix
|
diff --git a/overlay.nix b/overlay.nix
|
||||||
index 0186b7472..da783e152 100644
|
index 649aa28..cd8134f 100644
|
||||||
--- a/package.nix
|
--- a/overlay.nix
|
||||||
+++ b/package.nix
|
+++ b/overlay.nix
|
||||||
@@ -1,7 +1,7 @@
|
@@ -26,6 +26,7 @@ let
|
||||||
{
|
lixPkg = (final.callPackage (lix + "/package.nix") {
|
||||||
pkgs,
|
build-release-notes = false;
|
||||||
lib,
|
versionSuffix = "-lix${versionSuffix}";
|
||||||
- stdenv,
|
+ stdenv = prev.ccacheStdenv;
|
||||||
+ ccacheStdenv,
|
boehmgc-nix = boehmgc-patched;
|
||||||
aws-sdk-cpp,
|
});
|
||||||
# If the patched version of Boehm isn't passed, then patch it based off of
|
|
||||||
# pkgs.boehmgc. This allows `callPackage`ing this file without needing to
|
|
||||||
@@ -81,6 +81,8 @@ let
|
|
||||||
inherit (__forDefaults) canRunInstalled;
|
|
||||||
inherit (lib) fileset;
|
|
||||||
|
|
||||||
+ stdenv = ccacheStdenv;
|
|
||||||
+
|
|
||||||
version = lib.fileContents ./.version + versionSuffix;
|
|
||||||
|
|
||||||
aws-sdk-cpp-nix = aws-sdk-cpp.override {
|
|
||||||
|
|
|
@ -11,10 +11,10 @@ in
|
||||||
{
|
{
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
||||||
# boot = {
|
# boot = {
|
||||||
# kernelPackages = pkgs.linuxPackages_latest;
|
# kernelPackages = pkgs.linuxPackages_latest;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
networking.hostName = "grimmauld-nixos-server";
|
networking.hostName = "grimmauld-nixos-server";
|
||||||
networking.domain = "grimmauld.de";
|
networking.domain = "grimmauld.de";
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue