Run nixfmt-rfc-style on repository and add it to Zed config

This commit is contained in:
Jo 2025-05-26 18:06:37 +02:00
parent f5e5adb2fd
commit 45494079c5
41 changed files with 441 additions and 240 deletions

View file

@ -3,12 +3,14 @@
self,
config,
...
}: let
}:
let
inherit (lib) mkEnableOption mkIf;
inherit (self) namespace;
cfg = config.${namespace}.system.audio;
in {
in
{
options.${namespace}.system.audio = {
enable = mkEnableOption "system audio support.";
};

View file

@ -4,18 +4,20 @@
self,
config,
...
}: let
}:
let
inherit (lib) mkEnableOption mkIf;
inherit (self) namespace;
cfg = config.${namespace}.system.bluetooth;
in {
in
{
options.${namespace}.system.bluetooth = {
enable = mkEnableOption "bluetooth support.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [bluez];
environment.systemPackages = with pkgs; [ bluez ];
hardware.bluetooth = {
enable = true;

View file

@ -4,12 +4,14 @@
self,
config,
...
}: let
}:
let
inherit (lib) mkEnableOption mkIf mkOption;
inherit (self) namespace;
cfg = config.${namespace}.system.fonts;
in {
in
{
options.${namespace}.system.fonts = with lib.types; {
enable = mkEnableOption "system font management";
fonts = mkOption {
@ -30,13 +32,16 @@ in {
material-icons
material-design-icons
];
example = [noto-fonts noto-fonts-emoji];
example = [
noto-fonts
noto-fonts-emoji
];
description = "Install additional font packages";
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [font-manager];
environment.systemPackages = with pkgs; [ font-manager ];
fonts.packages = cfg.fonts;
};

View file

@ -3,12 +3,14 @@
self,
config,
...
}: let
}:
let
inherit (lib) mkEnableOption mkIf;
inherit (self) namespace;
cfg = config.${namespace}.system.grub;
in {
in
{
options.${namespace}.system.grub = {
enable = mkEnableOption "the grub bootloader.";
};
@ -18,7 +20,7 @@ in {
boot.loader.grub = {
enable = true;
devices = ["nodev"];
devices = [ "nodev" ];
efiInstallAsRemovable = true;
efiSupport = true;

View file

@ -4,16 +4,20 @@
self,
config,
...
}: let
}:
let
inherit (lib) mkEnableOption mkIf;
inherit (self) namespace;
inherit (self.lib) mkOpt;
cfg = config.${namespace}.system.kernel;
in {
in
{
options.${namespace}.system.kernel = {
enable = mkEnableOption "Modify the standard kernel settings";
version = mkOpt lib.types.str "linuxPackages_latest" "Set the kernel version to be used by your system";
version =
mkOpt lib.types.str "linuxPackages_latest"
"Set the kernel version to be used by your system";
};
config = mkIf cfg.enable {

View file

@ -3,12 +3,14 @@
self,
config,
...
}: let
}:
let
inherit (lib) mkEnableOption mkIf mkOption;
inherit (self) namespace;
cfg = config.${namespace}.system.locale;
in {
in
{
options.${namespace}.system.locale = {
enable = mkEnableOption "system locale tweaks.";

View file

@ -3,12 +3,14 @@
self,
config,
...
}: let
}:
let
inherit (lib) mkEnableOption mkIf;
inherit (self) namespace;
cfg = config.${namespace}.system.networking;
in {
in
{
options.${namespace}.system.networking = {
enable = mkEnableOption "networking.";
};

View file

@ -4,18 +4,22 @@
self,
config,
...
}: let
}:
let
inherit (lib) mkEnableOption mkIf types;
inherit (self) namespace;
inherit (self.lib) mkOpt;
cfg = config.${namespace}.system.nix;
in {
in
{
options.${namespace}.system.nix = {
enable = mkEnableOption "Nix configuration overrides.";
use-lix = mkEnableOption "Lix as an alternative to CppNix.";
use-nixld = mkEnableOption "the use of dynamically linked executables on nix based systems.";
trusted-users = mkOpt (types.listOf types.str) ["@wheel"] "List of trusted users for this NixOS system.";
trusted-users = mkOpt (types.listOf types.str) [
"@wheel"
] "List of trusted users for this NixOS system.";
};
config = mkIf cfg.enable {
@ -23,7 +27,10 @@ in {
settings = {
auto-optimise-store = true;
builders-use-substitutes = true;
experimental-features = ["nix-command" "flakes"];
experimental-features = [
"nix-command"
"flakes"
];
keep-derivations = true;
keep-outputs = true;
max-jobs = "auto";

View file

@ -4,16 +4,18 @@
self,
config,
...
}: let
}:
let
inherit (lib) mkEnableOption mkIf types;
inherit (self) namespace;
inherit (self.lib) mkOpt;
cfg = config.${namespace}.system.shell;
in {
in
{
options.${namespace}.system.shell = {
enable = mkEnableOption "custom user shells.";
installed = mkOpt (types.listOf types.package) [pkgs.fish] "List of shell packages to install";
installed = mkOpt (types.listOf types.package) [ pkgs.fish ] "List of shell packages to install";
default = mkOpt types.str "fish" "Set a custom shell as the default for all users.";
};