chore: format with nixpkgs-fmt

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-01-06 17:40:57 -03:00
parent 2de4955197
commit 01d94ec4fd
10 changed files with 209 additions and 207 deletions

View File

@@ -28,12 +28,12 @@
in
{
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
inputs.home-manager.nixosModules.default
./hosts/default/configuration.nix
];
};
specialArgs = { inherit inputs; };
modules = [
inputs.home-manager.nixosModules.default
./hosts/default/configuration.nix
];
};
homeConfiguration."guz" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit inputs; };

View File

@@ -1,4 +1,3 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
@@ -7,7 +6,8 @@
{
imports =
[ # Include the results of the hardware scan.
[
# Include the results of the hardware scan.
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
];
@@ -93,7 +93,7 @@
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
firefox
# thunderbird
# thunderbird
];
shell = pkgs.zsh;
};
@@ -112,7 +112,7 @@
environment.systemPackages = with pkgs; [
vim
neovim
git
git
gcc # Added temporally so my neovim config doesn't break
wget
nixpkgs-fmt

View File

@@ -5,7 +5,8 @@
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
@@ -14,18 +15,19 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/a97b3b84-be9f-4f71-9798-79ca792738fe";
{
device = "/dev/disk/by-uuid/a97b3b84-be9f-4f71-9798-79ca792738fe";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/88AB-2855";
{
device = "/dev/disk/by-uuid/88AB-2855";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d890b8ef-5437-4ffc-9b1e-1324f623c2d1"; }
];
[{ device = "/dev/disk/by-uuid/d890b8ef-5437-4ffc-9b1e-1324f623c2d1"; }];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

@@ -43,9 +43,9 @@
flatpak.enable = true;
flatpak.packages = [
"flathub:app/nz.mega.MEGAsync//stable"
"flathub:app/nz.mega.MEGAsync//stable"
];
home.packages = with pkgs; [
obsidian
# # It is sometimes useful to fine-tune packages, for example, by applying

View File

@@ -1,29 +1,29 @@
{ config, inputs, pkgs, ... }:
{
imports = [
../programs/starship.nix
../programs/tmux.nix
../programs/wezterm.nix
../programs/zsh.nix
];
options = {};
config = {
starship.enable = true;
starship.enableZsh = true;
imports = [
../programs/starship.nix
../programs/tmux.nix
../programs/wezterm.nix
../programs/zsh.nix
];
options = { };
config = {
starship.enable = true;
starship.enableZsh = true;
tmux.enable = true;
tmux.shell = "\${pkgs.zsh}/bin/zsh";
tmux.enable = true;
tmux.shell = "\${pkgs.zsh}/bin/zsh";
wezterm.enable = true;
wezterm.integration.zsh = true;
wezterm.defaultProg = [
"zsh"
"--login"
"-c"
"tmux"
];
wezterm.enable = true;
wezterm.integration.zsh = true;
wezterm.defaultProg = [
"zsh"
"--login"
"-c"
"tmux"
];
zsh.enable = true;
};
zsh.enable = true;
};
}

View File

@@ -1,18 +1,18 @@
{ inputs, config, lib, pkgs, ...}:
{ inputs, config, lib, pkgs, ... }:
let
cfg = config.starship;
in
in
{
options.starship = {
enable = lib.mkEnableOption "Enable module";
enableZsh = lib.mkEnableOption "Enable Zsh Integration";
enableBash = lib.mkEnableOption "Enable Bash Integration";
};
config = lib.mkIf cfg.enable {
programs.starship.enable = true;
options.starship = {
enable = lib.mkEnableOption "Enable module";
enableZsh = lib.mkEnableOption "Enable Zsh Integration";
enableBash = lib.mkEnableOption "Enable Bash Integration";
};
config = lib.mkIf cfg.enable {
programs.starship.enable = true;
programs.starship.enableZshIntegration = lib.mkIf cfg.enableZsh true;
programs.starship.enableBashIntegration = lib.mkIf cfg.enableBash true;
};
programs.starship.enableZshIntegration = lib.mkIf cfg.enableZsh true;
programs.starship.enableBashIntegration = lib.mkIf cfg.enableBash true;
};
}

View File

@@ -1,79 +1,79 @@
{ inputs, config, pkgs, lib, ... }:
let
cfg = config.tmux;
cfg = config.tmux;
in
{
options.tmux = {
enable = lib.mkEnableOption "Enable Tmux module";
baseIndex = lib.mkOption {
type = lib.types.ints.unsigned;
default = 1;
};
prefix = lib.mkOption {
type = lib.types.str;
default = "C-Space";
};
shell = lib.mkOption {
type = lib.types.str;
default = "\${pkgs.bash}/bin/bash";
};
};
config = lib.mkIf cfg.enable {
programs.tmux.enable = true;
options.tmux = {
enable = lib.mkEnableOption "Enable Tmux module";
baseIndex = lib.mkOption {
type = lib.types.ints.unsigned;
default = 1;
};
prefix = lib.mkOption {
type = lib.types.str;
default = "C-Space";
};
shell = lib.mkOption {
type = lib.types.str;
default = "\${pkgs.bash}/bin/bash";
};
};
config = lib.mkIf cfg.enable {
programs.tmux.enable = true;
programs.tmux.baseIndex = cfg.baseIndex;
programs.tmux.baseIndex = cfg.baseIndex;
programs.tmux.keyMode = "vi";
programs.tmux.keyMode = "vi";
programs.tmux.mouse = true;
programs.tmux.mouse = true;
programs.tmux.terminal = "screen-256color";
programs.tmux.terminal = "screen-256color";
programs.tmux.prefix = cfg.prefix;
programs.tmux.prefix = cfg.prefix;
# TODO: package tmux plugins so tpm is not necessary
home.file."${config.xdg.configHome}/tmux/plugins/tpm" = {
source = inputs.tmux-plugin-manager;
};
# TODO: package tmux plugins so tpm is not necessary
home.file."${config.xdg.configHome}/tmux/plugins/tpm" = {
source = inputs.tmux-plugin-manager;
};
home.packages = with pkgs; [
entr # b0o/tmux-autoreload depends on it
];
home.packages = with pkgs; [
entr # b0o/tmux-autoreload depends on it
];
programs.tmux.extraConfig = ''
set -g @plugin 'b0o/tmux-autoreload'
set -g @plugin 'aserowy/tmux.nvim'
set -g @plugin 'guz013/frappuccino-tmux'
programs.tmux.extraConfig = ''
set -g @plugin 'b0o/tmux-autoreload'
set -g @plugin 'aserowy/tmux.nvim'
set -g @plugin 'guz013/frappuccino-tmux'
set -sg terminal-overrides ",*:RGB"
set -sg terminal-overrides ",*:RGB"
set -g renumber-windows on
set -g renumber-windows on
bind -T prefix / split-window -v -c "#''''{pane_current_path}"
bind -T prefix \\ split-window -h -c "#''''{pane_current_path}"
bind -T prefix / split-window -v -c "#''''{pane_current_path}"
bind -T prefix \\ split-window -h -c "#''''{pane_current_path}"
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_status_modules_right "application directory session"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_status_modules_right "application directory session"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{pane_current_path}"
set -g @catppuccin_directory_text "#{pane_current_path}"
run '${config.xdg.configHome}/tmux/plugins/tpm/tpm'
'';
};
run '${config.xdg.configHome}/tmux/plugins/tpm/tpm'
'';
};
}

View File

@@ -1,70 +1,70 @@
{ inputs, pkgs, lib, config, ... }:
let
cfg = config.wezterm;
cfg = config.wezterm;
in
{
options.wezterm = {
enable = lib.mkEnableOption "Enable Wezterm";
integration = {
zsh = lib.mkEnableOption "Enable Zsh Integration";
};
colorScheme = lib.mkOption {
type = lib.types.str;
default = "system";
};
defaultProg = lib.mkOption {
default = [];
};
};
config = lib.mkIf cfg.enable {
programs.wezterm.enable = true;
programs.wezterm.enableZshIntegration = lib.mkIf (cfg.integration.zsh) true;
options.wezterm = {
enable = lib.mkEnableOption "Enable Wezterm";
integration = {
zsh = lib.mkEnableOption "Enable Zsh Integration";
};
colorScheme = lib.mkOption {
type = lib.types.str;
default = "system";
};
defaultProg = lib.mkOption {
default = [ ];
};
};
config = lib.mkIf cfg.enable {
programs.wezterm.enable = true;
programs.wezterm.enableZshIntegration = lib.mkIf (cfg.integration.zsh) true;
programs.wezterm.extraConfig = ''
return {
enable_tab_bar = false;
color_scheme = "${cfg.colorScheme}",
default_prog = { ${lib.concatMapStrings (x: "'" + x + "',") cfg.defaultProg} },
}
'';
programs.wezterm.extraConfig = ''
return {
enable_tab_bar = false;
color_scheme = "${cfg.colorScheme}",
default_prog = { ${lib.concatMapStrings (x: "'" + x + "',") cfg.defaultProg} },
}
'';
programs.wezterm.colorSchemes = {
system = with config.colorScheme.colors; {
foreground = "#${base05}";
background = "#${base00}";
programs.wezterm.colorSchemes = {
system = with config.colorScheme.colors; {
foreground = "#${base05}";
background = "#${base00}";
cursor_fg = "#${base01}";
cursor_bg = "#${config.theme.accent}";
cursor_border = "#${config.theme.accent}";
cursor_fg = "#${base01}";
cursor_bg = "#${config.theme.accent}";
cursor_border = "#${config.theme.accent}";
selection_fg = "#${base04}";
selection_bg = "#${config.theme.accent}";
selection_fg = "#${base04}";
selection_bg = "#${config.theme.accent}";
split = "#${base04}";
split = "#${base04}";
ansi = [
"#${base03}"
"#${base08}"
"#${base0B}"
"#${base0A}"
"#${base0D}"
"#${base0E}"
"#${base0C}"
"#${base03}"
];
ansi = [
"#${base03}"
"#${base08}"
"#${base0B}"
"#${base0A}"
"#${base0D}"
"#${base0E}"
"#${base0C}"
"#${base03}"
];
brights = [
"#${base03}"
"#${base08}"
"#${base0B}"
"#${base0A}"
"#${base0D}"
"#${base0E}"
"#${base0C}"
"#${base03}"
];
};
};
};
brights = [
"#${base03}"
"#${base08}"
"#${base0B}"
"#${base0A}"
"#${base0D}"
"#${base0E}"
"#${base0C}"
"#${base03}"
];
};
};
};
}

View File

@@ -1,27 +1,27 @@
{ inputs, config, pkgs, lib, ... }:
let
cfg = config.zsh;
cfg = config.zsh;
in
{
options.zsh = {
enable = lib.mkEnableOption "Enable Zsh shell";
plugins = {
suggestions.enable = lib.mkOption {
type = lib.types.bool;
default = true;
};
completion.enable = lib.mkOption {
type = lib.types.bool;
default = true;
};
};
};
config = lib.mkIf cfg.enable {
programs.zsh.enable = true;
programs.zsh.oh-my-zsh.enable = true;
options.zsh = {
enable = lib.mkEnableOption "Enable Zsh shell";
plugins = {
suggestions.enable = lib.mkOption {
type = lib.types.bool;
default = true;
};
completion.enable = lib.mkOption {
type = lib.types.bool;
default = true;
};
};
};
config = lib.mkIf cfg.enable {
programs.zsh.enable = true;
programs.zsh.oh-my-zsh.enable = true;
programs.zsh.enableAutosuggestions = lib.mkIf (cfg.plugins.suggestions.enable) true;
programs.zsh.enableCompletion = lib.mkIf (cfg.plugins.completion.enable) true;
};
programs.zsh.enableAutosuggestions = lib.mkIf (cfg.plugins.suggestions.enable) true;
programs.zsh.enableCompletion = lib.mkIf (cfg.plugins.completion.enable) true;
};
}

View File

@@ -2,28 +2,28 @@
let
cfg = config.theme;
in
in
{
imports = [
inputs.nix-colors.homeManagerModules.default
];
options.theme = {
accent = lib.mkOption {
type = lib.types.str;
default = "cdd6f4";
description = "The accent color of Frappuccino";
};
accentBase = lib.mkOption {
type = lib.types.str;
default = "magenta";
description = "The base name for the accent color to be used in the terminal";
};
scheme = lib.mkOption {
type = lib.types.path;
default = ../../themes/frappuccino.yaml;
};
};
config = {
colorScheme = inputs.nix-colors.lib.schemeFromYAML "frappuccino" (builtins.readFile cfg.scheme);
};
imports = [
inputs.nix-colors.homeManagerModules.default
];
options.theme = {
accent = lib.mkOption {
type = lib.types.str;
default = "cdd6f4";
description = "The accent color of Frappuccino";
};
accentBase = lib.mkOption {
type = lib.types.str;
default = "magenta";
description = "The base name for the accent color to be used in the terminal";
};
scheme = lib.mkOption {
type = lib.types.path;
default = ../../themes/frappuccino.yaml;
};
};
config = {
colorScheme = inputs.nix-colors.lib.schemeFromYAML "frappuccino" (builtins.readFile cfg.scheme);
};
}