mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-07-09 21:41:12 +00:00
Compare commits
No commits in common. "b6f61e45da45b0b2dd859270635caa0753be3d53" and "5b42fa59e89ef80a5619e795e9f4a60f6a74e67c" have entirely different histories.
b6f61e45da
...
5b42fa59e8
2 changed files with 159 additions and 22 deletions
|
|
@ -167,7 +167,6 @@ in
|
||||||
})
|
})
|
||||||
// {
|
// {
|
||||||
enable = cfg.audio.noise-filter.strength > 0.0;
|
enable = cfg.audio.noise-filter.strength > 0.0;
|
||||||
environment.LADSPA_PATH = "${pkgs.rnnoise-plugin}/lib/ladspa";
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
pipewire-airplay-sink = mkIf cfg.audio.airplay.enable (mkPipewireModule {
|
pipewire-airplay-sink = mkIf cfg.audio.airplay.enable (mkPipewireModule {
|
||||||
|
|
|
||||||
178
overlays.nix
178
overlays.nix
|
|
@ -6,20 +6,19 @@
|
||||||
myLib,
|
myLib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
with builtins;
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.aviallon.overlays;
|
cfg = config.aviallon.overlays;
|
||||||
in {
|
pkgNames = pkgs: forEach pkgs (p: "${getName p}-${p.version}");
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
(mkRenamedOptionModule
|
(mkRenamedOptionModule
|
||||||
[ "aviallon" "overlays" "optimizations" ]
|
[ "aviallon" "overlays" "optimizations" ]
|
||||||
[ "aviallon" "optimizations" "enable" ]
|
[ "aviallon" "optimizations" "enable" ]
|
||||||
)
|
)
|
||||||
(mkRemovedOptionModule
|
|
||||||
[ "aviallon" "overlays" "traceCallPackage" ]
|
|
||||||
"removed as it was debug only and not properly tested"
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
options.aviallon.overlays = {
|
options.aviallon.overlays = {
|
||||||
|
|
@ -29,40 +28,179 @@ in {
|
||||||
description = "Wether to enable system-wide overlays or not";
|
description = "Wether to enable system-wide overlays or not";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
traceCallPackage = mkEnableOption "printing package names each time callPackage is evaluated";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
nix.nixPath =
|
nix.nixPath =
|
||||||
# Append our nixpkgs-overlays.
|
# Append our nixpkgs-overlays.
|
||||||
[ "nixpkgs-overlays=/etc/nixos/overlays-compat/" ];
|
[ "nixpkgs-overlays=/etc/nixos/overlays-compat/" ];
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays =
|
||||||
(final: prev: {
|
[ ]
|
||||||
htop = prev.htop.overrideAttrs (old: {
|
++ optional cfg.traceCallPackage (
|
||||||
configureFlags =
|
self: super: {
|
||||||
(filter (c: c != "--enable-affinity" ) old.configureFlags)
|
callPackage =
|
||||||
++ [ "--enable-hwloc" ];
|
path: overrides:
|
||||||
|
let
|
||||||
|
_pkg = super.callPackage path overrides;
|
||||||
|
_name = _pkg.name or _pkg.pname or "<unknown>";
|
||||||
|
in
|
||||||
|
trace "callPackage ${_name}" _pkg;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
++ [
|
||||||
|
(self: super: {
|
||||||
|
htop = super.htop.overrideAttrs (old: {
|
||||||
|
configureFlags = old.configureFlags ++ [
|
||||||
|
"--enable-affinity"
|
||||||
|
"--enable-delayacct"
|
||||||
|
"--enable-capabilities"
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
old.nativeBuildInputs
|
old.nativeBuildInputs
|
||||||
++ [ final.pkg-config (getDev final.hwloc) ];
|
++ (with super; [
|
||||||
|
pkg-config
|
||||||
|
]);
|
||||||
buildInputs =
|
buildInputs =
|
||||||
old.buildInputs
|
old.buildInputs
|
||||||
++ [ (getLib final.hwloc) ];
|
++ (with super; [
|
||||||
|
libcap
|
||||||
|
libunwind
|
||||||
|
libnl
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
|
ark = super.ark.override {
|
||||||
ark = prev.ark.override {
|
|
||||||
unfreeEnableUnrar = true;
|
unfreeEnableUnrar = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
})
|
})
|
||||||
# (final: prev: {
|
# (final: prev: {
|
||||||
# # linux-manual requires scripts/split-man.pl from the kernel source, but
|
# # linux-manual requires scripts/split-man.pl from the kernel source, but
|
||||||
# # neither xanmod 6.19.7 nor vanilla 6.18.x ship it yet.
|
# # neither xanmod 6.19.7 nor vanilla 6.18.x ship it yet. Mark broken so
|
||||||
# linux-manual = prev.linux-manual.override { kernel = config.boot.kernelPackages.kernel; }
|
# # the build doesn't fail; man-pages and man-pages-posix still build fine.
|
||||||
|
# linux-manual = prev.linux-manual.overrideAttrs (_: {
|
||||||
|
# meta = (prev.linux-manual.meta or { }) // {
|
||||||
|
# broken = true;
|
||||||
|
# };
|
||||||
|
# });
|
||||||
# })
|
# })
|
||||||
];
|
|
||||||
|
|
||||||
|
(final: prev: {
|
||||||
|
lutris-fhs = (
|
||||||
|
prev.buildFHSUserEnv {
|
||||||
|
name = "lutris";
|
||||||
|
targetPkgs =
|
||||||
|
pkgs:
|
||||||
|
(with pkgs; [
|
||||||
|
glibc
|
||||||
|
bashInteractive
|
||||||
|
|
||||||
|
python3Full
|
||||||
|
|
||||||
|
lutris
|
||||||
|
gamescope
|
||||||
|
wineWow64Packages.waylandFull
|
||||||
|
flatpak
|
||||||
|
]);
|
||||||
|
|
||||||
|
# symlink shared assets, including icons and desktop entries
|
||||||
|
extraInstallCommands = ''
|
||||||
|
ln -s "${pkgs.lutris}/share" "$out/"
|
||||||
|
'';
|
||||||
|
|
||||||
|
runScript = "/usr/bin/lutris";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
|
|
||||||
|
(
|
||||||
|
final: prev:
|
||||||
|
let
|
||||||
|
pycharm-common =
|
||||||
|
pkg:
|
||||||
|
let
|
||||||
|
myIsDerivation = x: !(myLib.derivations.isBroken x);
|
||||||
|
interpreters = pkgs: filter (x: myIsDerivation x) (attrValues pkgs.pythonInterpreters);
|
||||||
|
in
|
||||||
|
prev.buildFHSUserEnv rec {
|
||||||
|
name = pkg.pname;
|
||||||
|
targetPkgs =
|
||||||
|
pkgs:
|
||||||
|
(
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
glibc
|
||||||
|
bashInteractive
|
||||||
|
zlib
|
||||||
|
|
||||||
|
python3Full
|
||||||
|
|
||||||
|
pkg
|
||||||
|
]
|
||||||
|
++ trace "Using the following interpreters: ${toString (pkgNames (interpreters pkgs))}" (
|
||||||
|
interpreters pkgs
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
# symlink shared assets, including icons and desktop entries
|
||||||
|
extraInstallCommands = ''
|
||||||
|
ln -s "${pkg}/share" "$out/"
|
||||||
|
'';
|
||||||
|
|
||||||
|
runScript = "/usr/bin/${pkg.pname}";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
jetbrains = prev.jetbrains // {
|
||||||
|
pycharm-community-fhs = pycharm-common prev.jetbrains.pycharm-community;
|
||||||
|
pycharm-professional-fhs = pycharm-common prev.jetbrains.pycharm-professional;
|
||||||
|
|
||||||
|
clion-fhs =
|
||||||
|
let
|
||||||
|
compilers =
|
||||||
|
pkgs:
|
||||||
|
with pkgs;
|
||||||
|
with llvmPackages_17;
|
||||||
|
[
|
||||||
|
(setPrio (-9) gcc13)
|
||||||
|
(hiPrio clang)
|
||||||
|
clang-unwrapped
|
||||||
|
libcxx
|
||||||
|
];
|
||||||
|
in
|
||||||
|
prev.buildFHSUserEnv rec {
|
||||||
|
name = "clion";
|
||||||
|
targetPkgs =
|
||||||
|
pkgs:
|
||||||
|
(
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
jetbrains.clion
|
||||||
|
(hiPrio cmake)
|
||||||
|
(hiPrio ninja)
|
||||||
|
gnumake
|
||||||
|
extra-cmake-modules
|
||||||
|
]
|
||||||
|
++ trace "Using the following compilers: ${toString (pkgNames (compilers pkgs))}" (compilers pkgs)
|
||||||
|
);
|
||||||
|
# symlink shared assets, including icons and desktop entries
|
||||||
|
extraInstallCommands = ''
|
||||||
|
ln -s "${prev.jetbrains.clion}/share" "$out/"
|
||||||
|
'';
|
||||||
|
extraOutputsToInstall = [
|
||||||
|
"include"
|
||||||
|
"dev"
|
||||||
|
"doc"
|
||||||
|
];
|
||||||
|
|
||||||
|
runScript = "/usr/bin/clion";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
];
|
||||||
aviallon.programs.allowUnfreeList = [
|
aviallon.programs.allowUnfreeList = [
|
||||||
"unrar"
|
"unrar"
|
||||||
"ark"
|
"ark"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue