chore: format nix files treewide
This commit is contained in:
parent
e1652efa53
commit
90d10606bc
30 changed files with 387 additions and 319 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
]
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
imports = [ ./git.nix ];
|
||||
imports = [ ./git.nix ];
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf (config.desktop.browser == "firefox") {
|
||||
home.persistence."/persist/home/rafiq".directories = [ ".mozilla/firefox" ];
|
||||
home.persistence."/persist/home/rafiq".directories = [ ".mozilla/firefox" ];
|
||||
home.sessionVariables.BROWSER = "firefox";
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles.rafiq.id = 0;
|
||||
profiles.test.id = 1;
|
||||
};
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles.rafiq.id = 0;
|
||||
profiles.test.id = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, osConfig, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.desktop = {
|
||||
windowManager = lib.pantheon.mkStrOption;
|
||||
|
@ -6,14 +11,12 @@
|
|||
terminal = lib.pantheon.mkStrOption;
|
||||
};
|
||||
|
||||
|
||||
config = {
|
||||
assertions =
|
||||
[
|
||||
{
|
||||
assertion = (osConfig.desktop.windowManager == config.desktop.windowManager);
|
||||
message = "You have set your home window manager to one that is not installed on this system.";
|
||||
}
|
||||
];
|
||||
config = {
|
||||
assertions = [
|
||||
{
|
||||
assertion = (osConfig.desktop.windowManager == config.desktop.windowManager);
|
||||
message = "You have set your home window manager to one that is not installed on this system.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (config.desktop.terminal == "kitty") {
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, osConfig, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
mainMonitor = osConfig.desktop.mainMonitor;
|
||||
in
|
||||
|
@ -7,48 +12,50 @@ in
|
|||
|
||||
];
|
||||
|
||||
config = lib.mkIf (config.desktop.windowManager == "hyprland") (lib.mkMerge [
|
||||
{
|
||||
xdg.configFile."uwsm/env".text = # sh
|
||||
''
|
||||
|
||||
'';
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
settings = {
|
||||
ecosystem.no_update_news = true;
|
||||
"$hypr" = "CTRL_SUPER_ALT_SHIFT";
|
||||
config = lib.mkIf (config.desktop.windowManager == "hyprland") (
|
||||
lib.mkMerge [
|
||||
{
|
||||
xdg.configFile."uwsm/env".text = # sh
|
||||
''
|
||||
|
||||
monitor = [
|
||||
"${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
|
||||
", preferred, auto, 1"
|
||||
];
|
||||
'';
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
settings = {
|
||||
ecosystem.no_update_news = true;
|
||||
"$hypr" = "CTRL_SUPER_ALT_SHIFT";
|
||||
|
||||
bind = [
|
||||
"$hypr, Q, exec, uwsm stop"
|
||||
"SUPER, W, killactive"
|
||||
monitor = [
|
||||
"${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
|
||||
", preferred, auto, 1"
|
||||
];
|
||||
|
||||
"SUPER, return, exec, uwsm app -- $TERMINAL"
|
||||
"SUPER, O, exec, uwsm app -- $BROWSER"
|
||||
bind = [
|
||||
"$hypr, Q, exec, uwsm stop"
|
||||
"SUPER, W, killactive"
|
||||
|
||||
"SUPER, H, cyclenext, visible"
|
||||
"SUPER, L, cyclenext, visible prev"
|
||||
"SUPER_ALT, H, movewindow, l"
|
||||
"SUPER_ALT, J, movewindow, d"
|
||||
"SUPER_ALT, K, movewindow, u"
|
||||
"SUPER_ALT, L, movewindow, r"
|
||||
"ALT_SHIFT, H, resizeactive, -10% 0"
|
||||
"ALT_SHIFT, J, resizeactive, 0 -10%"
|
||||
"ALT_SHIFT, K, resizeactive, 0 10%"
|
||||
"ALT_SHIFT, L, resizeactive, 10% 0"
|
||||
"SUPER_CTRL, H, workspace, r-1"
|
||||
"SUPER_CTRL, L, workspace, r+1"
|
||||
"$hypr, H, movetoworkspace, r-1"
|
||||
"$hypr, L, movetoworkspace, r+1"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
]);
|
||||
"SUPER, return, exec, uwsm app -- $TERMINAL"
|
||||
"SUPER, O, exec, uwsm app -- $BROWSER"
|
||||
|
||||
"SUPER, H, cyclenext, visible"
|
||||
"SUPER, L, cyclenext, visible prev"
|
||||
"SUPER_ALT, H, movewindow, l"
|
||||
"SUPER_ALT, J, movewindow, d"
|
||||
"SUPER_ALT, K, movewindow, u"
|
||||
"SUPER_ALT, L, movewindow, r"
|
||||
"ALT_SHIFT, H, resizeactive, -10% 0"
|
||||
"ALT_SHIFT, J, resizeactive, 0 -10%"
|
||||
"ALT_SHIFT, K, resizeactive, 0 10%"
|
||||
"ALT_SHIFT, L, resizeactive, 10% 0"
|
||||
"SUPER_CTRL, H, workspace, r-1"
|
||||
"SUPER_CTRL, L, workspace, r+1"
|
||||
"$hypr, H, movetoworkspace, r-1"
|
||||
"$hypr, L, movetoworkspace, r+1"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
home.persistence."/persist/home/${config.snowfallorg.user.name}" = {
|
||||
directories = [
|
||||
".ssh"
|
||||
".config/sops/age"
|
||||
];
|
||||
allowOther = true;
|
||||
directories = [
|
||||
".ssh"
|
||||
".config/sops/age"
|
||||
];
|
||||
allowOther = true;
|
||||
};
|
||||
|
||||
home.stateVersion = "24.11";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue