Rework docs and add streamcontroller
This commit is contained in:
parent
5443370f16
commit
7c70384da2
12 changed files with 156 additions and 112 deletions
2
.github/workflows/docs.yaml
vendored
2
.github/workflows/docs.yaml
vendored
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
extra-conf: |
|
||||
extra-experimental-features = nix-command flakes
|
||||
extra-experimental-features = nix-command flakes pipe-operators
|
||||
|
||||
- name: Set up cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
|
|
|||
3
.github/workflows/release.yaml
vendored
3
.github/workflows/release.yaml
vendored
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
extra-conf: |
|
||||
extra-experimental-features = nix-command flakes
|
||||
extra-experimental-features = nix-command flakes pipe-operators
|
||||
- name: Set up cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Build ISO
|
||||
|
|
@ -27,4 +27,3 @@ jobs:
|
|||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
path: path/
|
||||
|
||||
|
|
|
|||
|
|
@ -14,15 +14,35 @@
|
|||
echo "- [${name}](${name}.md)" >> src/SUMMARY.md
|
||||
'';
|
||||
system = (build_systems {root = ../example/.;})."example".options;
|
||||
makeOptionsDocPrograms = name: pkgs.nixosOptionsDoc {options = system.mods.${name};};
|
||||
makeOptionsDocPrograms = names: pkgs.nixosOptionsDoc {options = lib.attrByPath (lib.splitString "." names) null system.mods;};
|
||||
conf = makeOptionsDoc system.conf;
|
||||
paths = builtins.readDir ../modules/programs;
|
||||
names = lib.lists.remove "default" (
|
||||
map (name: lib.strings.removeSuffix ".nix" name) (lib.attrsets.mapAttrsToList (name: _: name) paths)
|
||||
basePath = ../modules/programs;
|
||||
pathToAttrs = path:
|
||||
lib.attrsets.mapAttrsToList (
|
||||
name: meta: {
|
||||
name = name;
|
||||
meta = meta;
|
||||
}
|
||||
)
|
||||
(builtins.readDir path);
|
||||
pathToStrings = path: prefix: let
|
||||
mapFn = attrs:
|
||||
if attrs.meta == "directory"
|
||||
then pathToStrings "${basePath}/${attrs.name}" attrs.name
|
||||
else if prefix != ""
|
||||
then "${prefix}.${attrs.name}"
|
||||
else attrs.name;
|
||||
in
|
||||
map
|
||||
mapFn
|
||||
(pathToAttrs path);
|
||||
filteredNames = builtins.filter (names: !(lib.strings.hasInfix "default" names)) (
|
||||
map (name: lib.strings.removeSuffix ".nix" name) (lib.lists.flatten (pathToStrings basePath ""))
|
||||
);
|
||||
mods = map makeOptionsDocPrograms names;
|
||||
docs = lib.strings.concatLines (map generateDocs (lib.lists.zipLists names mods));
|
||||
summary = lib.strings.concatStringsSep " " (map summaryAppend names);
|
||||
deduplicatedNames = map (name: lib.strings.splitString "." name |> lib.lists.unique |> lib.strings.concatStringsSep "." ) filteredNames;
|
||||
mods = map makeOptionsDocPrograms deduplicatedNames;
|
||||
docs = lib.strings.concatLines (map generateDocs (lib.lists.zipLists deduplicatedNames mods));
|
||||
summary = lib.strings.concatStringsSep " " (map summaryAppend deduplicatedNames);
|
||||
in
|
||||
pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "dashNix-book";
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
./common.nix
|
||||
./themes
|
||||
./sync.nix
|
||||
../modules/programs/browser/foxwrappers.nix
|
||||
../lib/foxwrappers.nix
|
||||
]
|
||||
++ homeMods
|
||||
++ additionalHomeMods
|
||||
|
|
|
|||
|
|
@ -104,17 +104,6 @@
|
|||
'';
|
||||
};
|
||||
|
||||
streamdeck = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Install streamdeck configuration program.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
kernelOverride = lib.mkOption {
|
||||
default = null;
|
||||
type = with lib.types; nullOr package;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ in {
|
|||
(mkExtension "@react-devtools" "https://addons.mozilla.org/firefox/downloads/latest/react-devtools/latest.xpi")
|
||||
(mkExtension "extension@redux.devtools" "https://addons.mozilla.org/firefox/downloads/latest/reduxdevtools/latest.xpi")
|
||||
(mkExtension "private-relay@firefox.com" "https://addons.mozilla.org/firefox/downloads/latest/private-relay/latest.xpi")
|
||||
(mkExtension "addon@darkreader.org" "file://${pkgs.callPackage ./darkreader.nix {inherit lib stable;}}/latest.xpi")
|
||||
(mkExtension "addon@darkreader.org" "file://${pkgs.callPackage ../../../patches/darkreader.nix {inherit lib stable;}}/latest.xpi")
|
||||
];
|
||||
example = [];
|
||||
type = with lib.types; listOf anything;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
./sddm.nix
|
||||
./sops.nix
|
||||
./starship.nix
|
||||
./streamcontroller.nix
|
||||
./stylix.nix
|
||||
./supersonic.nix
|
||||
./sway.nix
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@
|
|||
then config.mods.homePackages.browser.meta.mainProgram
|
||||
else config.mods.homePackages.browser.pname;
|
||||
in {
|
||||
options.mods = {
|
||||
hyprland = {
|
||||
options.mods.hyprland = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
|
|
@ -103,7 +102,6 @@ in {
|
|||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.hyprland.enable (
|
||||
lib.optionalAttrs (options ? wayland.windowManager.hyprland) {
|
||||
|
|
|
|||
37
modules/programs/streamcontroller.nix
Normal file
37
modules/programs/streamcontroller.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}: {
|
||||
options.mods = {
|
||||
streamcontroller = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enables starship prompt
|
||||
'';
|
||||
};
|
||||
configFilePath = lib.mkOption {
|
||||
default = null;
|
||||
type = with lib.types; nullOr path;
|
||||
description = ''
|
||||
Path to the config json for the streamcontroller.
|
||||
-> ./something.json
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.streamcontroller.enable (
|
||||
lib.optionalAttrs (options ? environment.systemPackages) {
|
||||
programs.streamcontroller.enable = true;
|
||||
}
|
||||
// (lib.optionalAttrs (options ? home.file) {
|
||||
home.file."var/app/com.core447.StreamController/data/pages/defaultpage.json".path = lib.mkIf (!isNull config.mods.streamcontroller.path) config.mods.streamcontroller.path;
|
||||
})
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue