311 current 1970-01-01 01:00:00 23.11.20240514.9ddcaff 6.1.90 *

This commit is contained in:
Max Känner 2024-05-18 20:00:18 +02:00
parent 2283f4b660
commit bcc917a2da
6 changed files with 186 additions and 118 deletions

View File

@ -10,6 +10,8 @@
sway.enable = true; sway.enable = true;
sway.laptop = true; sway.laptop = true;
shell.enable = true;
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
home.username = "max"; home.username = "max";
@ -57,10 +59,6 @@
prusa-slicer prusa-slicer
]; ];
home.sessionVariables = {
EDITOR = "${pkgs.neovim}/bin/nvim";
};
xdg.enable = true; xdg.enable = true;
services.nextcloud-client.enable = true; services.nextcloud-client.enable = true;

View File

@ -1,4 +1,15 @@
{...}: { {
lib,
config,
...
}: let
cfg = config.shell.bat;
in {
options = {
shell.bat.enable = lib.mkEnableOption "bat, a cat replacement with syntax highlighting";
};
config = lib.mkIf cfg.enable {
programs.bat = { programs.bat = {
enable = true; enable = true;
config = { config = {
@ -7,4 +18,5 @@
style = "numbers,changes,header-filename,header-filesize"; style = "numbers,changes,header-filename,header-filesize";
}; };
}; };
};
} }

View File

@ -1,4 +1,16 @@
{pkgs, ...}: { {
lib,
config,
pkgs,
...
}: let
cfg = config.shell.btop;
in {
options = {
shell.btop.enable = lib.mkEnableOption "btop, a system monitor";
};
config = lib.mkIf cfg.enable {
programs.btop = { programs.btop = {
enable = true; enable = true;
settings = { settings = {
@ -34,4 +46,5 @@
selected_battery = "Auto"; selected_battery = "Auto";
}; };
}; };
};
} }

View File

@ -1,3 +1,20 @@
{...}: { {
imports = [./zsh.nix ./bat.nix ./btop.nix]; lib,
config,
...
}: let
cfg = config.shell;
in {
imports = [./zsh.nix ./bat.nix ./btop.nix ./neovim.nix];
options = {
shell.enable = lib.mkEnableOption "my shell environment";
};
config = lib.mkIf cfg.enable {
shell.zsh.enable = lib.mkDefault true;
shell.neovim.enable = lib.mkDefault true;
shell.btop.enable = lib.mkDefault true;
shell.bat.enable = lib.mkDefault true;
};
} }

View File

@ -0,0 +1,19 @@
{
lib,
config,
pkgs,
...
}: let
cfg = config.shell.neovim;
in {
options = {
shell.neovim.enable = lib.mkEnableOption "neovim";
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [neovim];
home.sessionVariables = {
EDITOR = "${pkgs.neovim}/bin/nvim";
};
};
}

View File

@ -1,4 +1,16 @@
{pkgs, ...}: { {
lib,
config,
pkgs,
...
}: let
cfg = config.shell.zsh;
in {
options = {
shell.zsh.enable = lib.mkEnableOption "Zsh, an advanced shell";
};
config = lib.mkIf cfg.enable {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableAutosuggestions = true; enableAutosuggestions = true;
@ -52,7 +64,6 @@
programs.starship = { programs.starship = {
enable = true; enable = true;
enableBashIntegration = true;
enableZshIntegration = true; enableZshIntegration = true;
settings = { settings = {
add_newline = false; add_newline = false;
@ -70,10 +81,8 @@
programs.zoxide = { programs.zoxide = {
enable = true; enable = true;
enableBashIntegration = true;
enableZshIntegration = true; enableZshIntegration = true;
options = ["--cmd cd"]; options = ["--cmd cd"];
}; };
};
home.packages = with pkgs; [neovim];
} }