mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
fix(lint): nixfmt the whole tree
This commit is contained in:
parent
643b136863
commit
bf219a30c2
69 changed files with 2605 additions and 1726 deletions
|
|
@ -1,14 +1,26 @@
|
|||
{ config, pkgs, lib, myLib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
myLib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.aviallon.programs.libreoffice;
|
||||
|
||||
|
||||
applyOverrides = overrides: pkg: pipe pkg overrides;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.aviallon.programs.libreoffice = {
|
||||
enable = mkEnableOption "LibreOffice";
|
||||
variant = mkOption {
|
||||
type = with types; types.enum [ "still" "fresh" ];
|
||||
type =
|
||||
with types;
|
||||
types.enum [
|
||||
"still"
|
||||
"fresh"
|
||||
];
|
||||
default = "fresh";
|
||||
description = "Which LibreOffice variant to use";
|
||||
};
|
||||
|
|
@ -35,18 +47,26 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
aviallon.programs.libreoffice.package =
|
||||
let
|
||||
overridesList = []
|
||||
++ [(pkg: pkg.override {
|
||||
variant = cfg.variant;
|
||||
})]
|
||||
++ optional cfg.opencl (pkg: pkg.overrideAttrs (old: {
|
||||
overridesList =
|
||||
[ ]
|
||||
++ [
|
||||
(
|
||||
pkg:
|
||||
pkg.override {
|
||||
variant = cfg.variant;
|
||||
}
|
||||
)
|
||||
]
|
||||
++ optional cfg.opencl (
|
||||
pkg:
|
||||
pkg.overrideAttrs (old: {
|
||||
buildInputs = old.buildInputs ++ [ pkgs.ocl-icd ];
|
||||
}))
|
||||
;
|
||||
in pkgs.libreoffice.override {
|
||||
unwrapped = applyOverrides overridesList cfg.package';
|
||||
};
|
||||
|
||||
})
|
||||
);
|
||||
in
|
||||
pkgs.libreoffice.override {
|
||||
unwrapped = applyOverrides overridesList cfg.package';
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
cfg.package
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue