mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-09 20:30:05 +00:00
✨ Run nixfmt-rfc-style on repository and add it to Zed config
This commit is contained in:
parent
f5e5adb2fd
commit
45494079c5
41 changed files with 441 additions and 240 deletions
|
@ -2,30 +2,35 @@
|
|||
lib,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# Create a NixOS module option on a single line.
|
||||
mkOpt = type: default: description:
|
||||
lib.mkOption {inherit type default description;};
|
||||
mkOpt =
|
||||
type: default: description:
|
||||
lib.mkOption { inherit type default description; };
|
||||
|
||||
# Create a simple bool options
|
||||
mkBool = default: description:
|
||||
mkBool =
|
||||
default: description:
|
||||
lib.mkOption {
|
||||
inherit default description;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
# Create a module compliant with the NixOS module system.
|
||||
mkModule = {
|
||||
name ? "puzzlevision",
|
||||
class,
|
||||
modules,
|
||||
}: {
|
||||
_class = class;
|
||||
# Template: "[path-to-flake]/flake.nix#[class-name]Modules.[module-name]"
|
||||
# Example: "[path-to-flake]/flake.nix#nixosModules.system.audio"
|
||||
_file = "${self.outPath}/flake.nix#${class}Modules.${name}";
|
||||
imports = modules;
|
||||
};
|
||||
mkModule =
|
||||
{
|
||||
name ? "puzzlevision",
|
||||
class,
|
||||
modules,
|
||||
}:
|
||||
{
|
||||
_class = class;
|
||||
# Template: "[path-to-flake]/flake.nix#[class-name]Modules.[module-name]"
|
||||
# Example: "[path-to-flake]/flake.nix#nixosModules.system.audio"
|
||||
_file = "${self.outPath}/flake.nix#${class}Modules.${name}";
|
||||
imports = modules;
|
||||
};
|
||||
|
||||
# TODO: add mkIfElse function
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue