mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[General+Flake] convert "default" module directory to subflake
Also move flatpak config from packages to desktop
This commit is contained in:
parent
397282c7c6
commit
6d061dce0e
12 changed files with 577 additions and 78 deletions
27
lib/config.nix
Normal file
27
lib/config.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{lib, myLib}:
|
||||
with lib;
|
||||
let
|
||||
mkListToString = { sep ? " " }: list: concatStringsSep sep (
|
||||
forEach list (v: toString v)
|
||||
);
|
||||
in rec {
|
||||
mkValueString =
|
||||
let
|
||||
gen = generators.mkValueStringDefault {};
|
||||
listToString = mkListToString {};
|
||||
in v: if isList v then listToString v
|
||||
else gen v;
|
||||
|
||||
mkKeyValue = { sep }: with generators; toKeyValue {
|
||||
mkKeyValue = mkKeyValueDefault {
|
||||
mkValueString = mkValueString;
|
||||
} sep;
|
||||
};
|
||||
|
||||
toSystemd = mkKeyValue {
|
||||
sep = "=";
|
||||
};
|
||||
toNix = mkKeyValue {
|
||||
sep = " = ";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue