chore: format with nixpkgs-fmt
This commit is contained in:
12
flake.nix
12
flake.nix
@@ -28,12 +28,12 @@
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
./hosts/default/configuration.nix
|
./hosts/default/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
homeConfiguration."guz" = home-manager.lib.homeManagerConfiguration {
|
homeConfiguration."guz" = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
@@ -7,7 +6,8 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[
|
||||||
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
];
|
];
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
firefox
|
firefox
|
||||||
# thunderbird
|
# thunderbird
|
||||||
];
|
];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
neovim
|
neovim
|
||||||
git
|
git
|
||||||
gcc # Added temporally so my neovim config doesn't break
|
gcc # Added temporally so my neovim config doesn't break
|
||||||
wget
|
wget
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
@@ -14,18 +15,19 @@
|
|||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/a97b3b84-be9f-4f71-9798-79ca792738fe";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/a97b3b84-be9f-4f71-9798-79ca792738fe";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/88AB-2855";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/88AB-2855";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
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
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|||||||
@@ -43,9 +43,9 @@
|
|||||||
|
|
||||||
flatpak.enable = true;
|
flatpak.enable = true;
|
||||||
flatpak.packages = [
|
flatpak.packages = [
|
||||||
"flathub:app/nz.mega.MEGAsync//stable"
|
"flathub:app/nz.mega.MEGAsync//stable"
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
obsidian
|
obsidian
|
||||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
{ config, inputs, pkgs, ... }:
|
{ config, inputs, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../programs/starship.nix
|
../programs/starship.nix
|
||||||
../programs/tmux.nix
|
../programs/tmux.nix
|
||||||
../programs/wezterm.nix
|
../programs/wezterm.nix
|
||||||
../programs/zsh.nix
|
../programs/zsh.nix
|
||||||
];
|
];
|
||||||
options = {};
|
options = { };
|
||||||
config = {
|
config = {
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
starship.enableZsh = true;
|
starship.enableZsh = true;
|
||||||
|
|
||||||
tmux.enable = true;
|
tmux.enable = true;
|
||||||
tmux.shell = "\${pkgs.zsh}/bin/zsh";
|
tmux.shell = "\${pkgs.zsh}/bin/zsh";
|
||||||
|
|
||||||
wezterm.enable = true;
|
wezterm.enable = true;
|
||||||
wezterm.integration.zsh = true;
|
wezterm.integration.zsh = true;
|
||||||
wezterm.defaultProg = [
|
wezterm.defaultProg = [
|
||||||
"zsh"
|
"zsh"
|
||||||
"--login"
|
"--login"
|
||||||
"-c"
|
"-c"
|
||||||
"tmux"
|
"tmux"
|
||||||
];
|
];
|
||||||
|
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
{ inputs, config, lib, pkgs, ...}:
|
{ inputs, config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.starship;
|
cfg = config.starship;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.starship = {
|
options.starship = {
|
||||||
enable = lib.mkEnableOption "Enable module";
|
enable = lib.mkEnableOption "Enable module";
|
||||||
enableZsh = lib.mkEnableOption "Enable Zsh Integration";
|
enableZsh = lib.mkEnableOption "Enable Zsh Integration";
|
||||||
enableBash = lib.mkEnableOption "Enable Bash Integration";
|
enableBash = lib.mkEnableOption "Enable Bash Integration";
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.starship.enable = true;
|
programs.starship.enable = true;
|
||||||
|
|
||||||
programs.starship.enableZshIntegration = lib.mkIf cfg.enableZsh true;
|
programs.starship.enableZshIntegration = lib.mkIf cfg.enableZsh true;
|
||||||
programs.starship.enableBashIntegration = lib.mkIf cfg.enableBash true;
|
programs.starship.enableBashIntegration = lib.mkIf cfg.enableBash true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,79 +1,79 @@
|
|||||||
{ inputs, config, pkgs, lib, ... }:
|
{ inputs, config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.tmux;
|
cfg = config.tmux;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.tmux = {
|
options.tmux = {
|
||||||
enable = lib.mkEnableOption "Enable Tmux module";
|
enable = lib.mkEnableOption "Enable Tmux module";
|
||||||
baseIndex = lib.mkOption {
|
baseIndex = lib.mkOption {
|
||||||
type = lib.types.ints.unsigned;
|
type = lib.types.ints.unsigned;
|
||||||
default = 1;
|
default = 1;
|
||||||
};
|
};
|
||||||
prefix = lib.mkOption {
|
prefix = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "C-Space";
|
default = "C-Space";
|
||||||
};
|
};
|
||||||
shell = lib.mkOption {
|
shell = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "\${pkgs.bash}/bin/bash";
|
default = "\${pkgs.bash}/bin/bash";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.tmux.enable = true;
|
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
|
# TODO: package tmux plugins so tpm is not necessary
|
||||||
home.file."${config.xdg.configHome}/tmux/plugins/tpm" = {
|
home.file."${config.xdg.configHome}/tmux/plugins/tpm" = {
|
||||||
source = inputs.tmux-plugin-manager;
|
source = inputs.tmux-plugin-manager;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
entr # b0o/tmux-autoreload depends on it
|
entr # b0o/tmux-autoreload depends on it
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.tmux.extraConfig = ''
|
programs.tmux.extraConfig = ''
|
||||||
set -g @plugin 'b0o/tmux-autoreload'
|
set -g @plugin 'b0o/tmux-autoreload'
|
||||||
set -g @plugin 'aserowy/tmux.nvim'
|
set -g @plugin 'aserowy/tmux.nvim'
|
||||||
set -g @plugin 'guz013/frappuccino-tmux'
|
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 -v -c "#''''{pane_current_path}"
|
||||||
bind -T prefix \\ split-window -h -c "#''''{pane_current_path}"
|
bind -T prefix \\ split-window -h -c "#''''{pane_current_path}"
|
||||||
|
|
||||||
set -g @catppuccin_window_left_separator ""
|
set -g @catppuccin_window_left_separator ""
|
||||||
set -g @catppuccin_window_right_separator " "
|
set -g @catppuccin_window_right_separator " "
|
||||||
set -g @catppuccin_window_middle_separator " █"
|
set -g @catppuccin_window_middle_separator " █"
|
||||||
set -g @catppuccin_window_number_position "right"
|
set -g @catppuccin_window_number_position "right"
|
||||||
|
|
||||||
set -g @catppuccin_window_default_fill "number"
|
set -g @catppuccin_window_default_fill "number"
|
||||||
set -g @catppuccin_window_default_text "#W"
|
set -g @catppuccin_window_default_text "#W"
|
||||||
|
|
||||||
set -g @catppuccin_window_current_fill "number"
|
set -g @catppuccin_window_current_fill "number"
|
||||||
set -g @catppuccin_window_current_text "#W"
|
set -g @catppuccin_window_current_text "#W"
|
||||||
|
|
||||||
set -g @catppuccin_status_modules_right "application directory session"
|
set -g @catppuccin_status_modules_right "application directory session"
|
||||||
set -g @catppuccin_status_left_separator " "
|
set -g @catppuccin_status_left_separator " "
|
||||||
set -g @catppuccin_status_right_separator ""
|
set -g @catppuccin_status_right_separator ""
|
||||||
set -g @catppuccin_status_right_separator_inverse "no"
|
set -g @catppuccin_status_right_separator_inverse "no"
|
||||||
set -g @catppuccin_status_fill "icon"
|
set -g @catppuccin_status_fill "icon"
|
||||||
set -g @catppuccin_status_connect_separator "no"
|
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'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,70 +1,70 @@
|
|||||||
{ inputs, pkgs, lib, config, ... }:
|
{ inputs, pkgs, lib, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.wezterm;
|
cfg = config.wezterm;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.wezterm = {
|
options.wezterm = {
|
||||||
enable = lib.mkEnableOption "Enable Wezterm";
|
enable = lib.mkEnableOption "Enable Wezterm";
|
||||||
integration = {
|
integration = {
|
||||||
zsh = lib.mkEnableOption "Enable Zsh Integration";
|
zsh = lib.mkEnableOption "Enable Zsh Integration";
|
||||||
};
|
};
|
||||||
colorScheme = lib.mkOption {
|
colorScheme = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "system";
|
default = "system";
|
||||||
};
|
};
|
||||||
defaultProg = lib.mkOption {
|
defaultProg = lib.mkOption {
|
||||||
default = [];
|
default = [ ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.wezterm.enable = true;
|
programs.wezterm.enable = true;
|
||||||
programs.wezterm.enableZshIntegration = lib.mkIf (cfg.integration.zsh) true;
|
programs.wezterm.enableZshIntegration = lib.mkIf (cfg.integration.zsh) true;
|
||||||
|
|
||||||
programs.wezterm.extraConfig = ''
|
programs.wezterm.extraConfig = ''
|
||||||
return {
|
return {
|
||||||
enable_tab_bar = false;
|
enable_tab_bar = false;
|
||||||
color_scheme = "${cfg.colorScheme}",
|
color_scheme = "${cfg.colorScheme}",
|
||||||
default_prog = { ${lib.concatMapStrings (x: "'" + x + "',") cfg.defaultProg} },
|
default_prog = { ${lib.concatMapStrings (x: "'" + x + "',") cfg.defaultProg} },
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.wezterm.colorSchemes = {
|
programs.wezterm.colorSchemes = {
|
||||||
system = with config.colorScheme.colors; {
|
system = with config.colorScheme.colors; {
|
||||||
foreground = "#${base05}";
|
foreground = "#${base05}";
|
||||||
background = "#${base00}";
|
background = "#${base00}";
|
||||||
|
|
||||||
cursor_fg = "#${base01}";
|
cursor_fg = "#${base01}";
|
||||||
cursor_bg = "#${config.theme.accent}";
|
cursor_bg = "#${config.theme.accent}";
|
||||||
cursor_border = "#${config.theme.accent}";
|
cursor_border = "#${config.theme.accent}";
|
||||||
|
|
||||||
selection_fg = "#${base04}";
|
selection_fg = "#${base04}";
|
||||||
selection_bg = "#${config.theme.accent}";
|
selection_bg = "#${config.theme.accent}";
|
||||||
|
|
||||||
split = "#${base04}";
|
split = "#${base04}";
|
||||||
|
|
||||||
ansi = [
|
ansi = [
|
||||||
"#${base03}"
|
"#${base03}"
|
||||||
"#${base08}"
|
"#${base08}"
|
||||||
"#${base0B}"
|
"#${base0B}"
|
||||||
"#${base0A}"
|
"#${base0A}"
|
||||||
"#${base0D}"
|
"#${base0D}"
|
||||||
"#${base0E}"
|
"#${base0E}"
|
||||||
"#${base0C}"
|
"#${base0C}"
|
||||||
"#${base03}"
|
"#${base03}"
|
||||||
];
|
];
|
||||||
|
|
||||||
brights = [
|
brights = [
|
||||||
"#${base03}"
|
"#${base03}"
|
||||||
"#${base08}"
|
"#${base08}"
|
||||||
"#${base0B}"
|
"#${base0B}"
|
||||||
"#${base0A}"
|
"#${base0A}"
|
||||||
"#${base0D}"
|
"#${base0D}"
|
||||||
"#${base0E}"
|
"#${base0E}"
|
||||||
"#${base0C}"
|
"#${base0C}"
|
||||||
"#${base03}"
|
"#${base03}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
{ inputs, config, pkgs, lib, ... }:
|
{ inputs, config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.zsh;
|
cfg = config.zsh;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.zsh = {
|
options.zsh = {
|
||||||
enable = lib.mkEnableOption "Enable Zsh shell";
|
enable = lib.mkEnableOption "Enable Zsh shell";
|
||||||
plugins = {
|
plugins = {
|
||||||
suggestions.enable = lib.mkOption {
|
suggestions.enable = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
completion.enable = lib.mkOption {
|
completion.enable = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
programs.zsh.oh-my-zsh.enable = true;
|
programs.zsh.oh-my-zsh.enable = true;
|
||||||
|
|
||||||
programs.zsh.enableAutosuggestions = lib.mkIf (cfg.plugins.suggestions.enable) true;
|
programs.zsh.enableAutosuggestions = lib.mkIf (cfg.plugins.suggestions.enable) true;
|
||||||
programs.zsh.enableCompletion = lib.mkIf (cfg.plugins.completion.enable) true;
|
programs.zsh.enableCompletion = lib.mkIf (cfg.plugins.completion.enable) true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,28 +2,28 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.theme;
|
cfg = config.theme;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nix-colors.homeManagerModules.default
|
inputs.nix-colors.homeManagerModules.default
|
||||||
];
|
];
|
||||||
options.theme = {
|
options.theme = {
|
||||||
accent = lib.mkOption {
|
accent = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "cdd6f4";
|
default = "cdd6f4";
|
||||||
description = "The accent color of Frappuccino";
|
description = "The accent color of Frappuccino";
|
||||||
};
|
};
|
||||||
accentBase = lib.mkOption {
|
accentBase = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "magenta";
|
default = "magenta";
|
||||||
description = "The base name for the accent color to be used in the terminal";
|
description = "The base name for the accent color to be used in the terminal";
|
||||||
};
|
};
|
||||||
scheme = lib.mkOption {
|
scheme = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
default = ../../themes/frappuccino.yaml;
|
default = ../../themes/frappuccino.yaml;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
colorScheme = inputs.nix-colors.lib.schemeFromYAML "frappuccino" (builtins.readFile cfg.scheme);
|
colorScheme = inputs.nix-colors.lib.schemeFromYAML "frappuccino" (builtins.readFile cfg.scheme);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user