chore: format nix files treewide

This commit is contained in:
Mohammad Rafiq 2025-05-20 12:53:13 +08:00
parent e1652efa53
commit 90d10606bc
No known key found for this signature in database
30 changed files with 387 additions and 319 deletions

View file

@ -1,6 +1,11 @@
{config, lib, osConfig, ... }:
{
options.cli = {
config,
lib,
osConfig,
...
}:
{
options.cli = {
shell = lib.pantheon.mkStrOption;
editor = lib.pantheon.mkStrOption;
file-browser = lib.pantheon.mkStrOption;
@ -14,7 +19,9 @@
config = lib.mkMerge [
{
programs.zoxide.enable = true;
home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [ "./local/share/zoxide" ];
home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [
"./local/share/zoxide"
];
}
{
programs.nix-index.enable = true;

View file

@ -5,15 +5,15 @@
programs.nvf = {
enable = true;
settings.vim = {
keymaps = import ./keymaps.nix;
keymaps = import ./keymaps.nix;
utility.yazi-nvim = {
enable = true;
mappings = {
mappings = {
openYazi = "t";
openYaziDir = "T";
};
setupOpts.open_for_directories = true;
};
};
setupOpts.open_for_directories = true;
};
};
};
};

View file

@ -1,9 +1,9 @@
[
{
desc = "Open the file path under the cursor, making the file if it doesn't exist.";
key = "gf";
mode = "n";
action = ":cd %:p:h<CR>:e <cfile><CR>";
silent = true;
}
]
{
desc = "Open the file path under the cursor, making the file if it doesn't exist.";
key = "gf";
mode = "n";
action = ":cd %:p:h<CR>:e <cfile><CR>";
silent = true;
}
]

View file

@ -1,8 +1,6 @@
{ config, lib, ... }:
{
config =
lib.mkIf (config.cli.file-browser == "yazi")
{
config = lib.mkIf (config.cli.file-browser == "yazi") {
home.sessionVariables.FILE_BROWSER = "yazi";
programs.yazi = {
enable = true;

View file

@ -1,15 +1,15 @@
{ config, lib, ... }:
{
config = lib.mkIf (config.cli.shell == "zsh") {
home.sessionVariables.SHELL = "zsh";
programs.zsh = {
enable = true;
enableVteIntegration = true;
syntaxHighlighting.enable = true;
history.share = true;
history.size = 10000;
history.ignoreDups = true;
history.ignoreSpace = true;
};
home.sessionVariables.SHELL = "zsh";
programs.zsh = {
enable = true;
enableVteIntegration = true;
syntaxHighlighting.enable = true;
history.share = true;
history.size = 10000;
history.ignoreDups = true;
history.ignoreSpace = true;
};
};
}

View file

@ -1,3 +1,3 @@
{
imports = [ ./git.nix ];
imports = [ ./git.nix ];
}

View file

@ -1,27 +1,27 @@
{lib,config,...}:
{ lib, config, ... }:
{
config = {
home.sessionVariables.GIT_CONFIG_GLOBAL = "$HOME/.config/git/config";
home.shellAliases = {
gs = "git status";
gc = "git commit";
gcam = "git commit -am";
gu = "git push";
gy = "git pull";
};
programs.git = {
enable = true;
userName = config.cli.git.name;
userEmail = config.cli.git.email;
signing.key = "~/.ssh/id_ed25519.pub";
signing.signByDefault = true;
extraConfig = {
init.defaultBranch = config.cli.git.defaultBranch;
push.autoSetupRemote = true;
pull.rebase = false;
core.editor = "$EDITOR";
gpg.format = "ssh";
home.sessionVariables.GIT_CONFIG_GLOBAL = "$HOME/.config/git/config";
home.shellAliases = {
gs = "git status";
gc = "git commit";
gcam = "git commit -am";
gu = "git push";
gy = "git pull";
};
programs.git = {
enable = true;
userName = config.cli.git.name;
userEmail = config.cli.git.email;
signing.key = "~/.ssh/id_ed25519.pub";
signing.signByDefault = true;
extraConfig = {
init.defaultBranch = config.cli.git.defaultBranch;
push.autoSetupRemote = true;
pull.rebase = false;
core.editor = "$EDITOR";
gpg.format = "ssh";
};
};
};
};
}