5 Commits

8 changed files with 186 additions and 131 deletions

View File

@ -9,37 +9,37 @@ configuration may be difficult to translate to a non-Nix system.
## System Features ## System Features
| Feature | Program | Configuration | | Feature | Program | Configuration |
|----------------|-----------------------------------------------------|-----------------------------------------------| |----------------|-----------------------------------------------------|-----------------------------------------------------------------------------------|
| OS | [NixOS](https://nixos.org) | [Link](./modules/nixos) | | OS | [NixOS](https://nixos.org) | [Link](./platforms/nixos) |
| Display Server | [X11](https://www.x.org/wiki/) | [Link](./modules/nixos/graphical/xorg.nix) | | Display Server | [X11](https://www.x.org/wiki/) | [Link](./platforms/nixos/modules/nmasur/profiles/gui.nix) |
| Compositor | [Picom](https://github.com/yshui/picom) | [Link](./modules/nixos/graphical/picom.nix) | | Compositor | [Picom](https://github.com/yshui/picom) | [Link](./platforms/home-manager/modules/nmasur/presets/services/picom.nix) |
| Window Manager | [i3](https://i3wm.org/) | [Link](./modules/nixos/graphical/i3.nix) | | Window Manager | [i3](https://i3wm.org/) | [Link](./platforms/home-manager/modules/nmasur/presets/services/i3.nix) |
| Panel | [Polybar](https://polybar.github.io/) | [Link](./modules/nixos/graphical/polybar.nix) | | Panel | [Polybar](https://polybar.github.io/) | [Link](./platforms/home-manager/modules/nmasur/presets/services/polybar.nix) |
| Font | [Victor Mono](https://rubjo.github.io/victor-mono/) | [Link](./modules/nixos/graphical/fonts.nix) | | Font | [Victor Mono](https://rubjo.github.io/victor-mono/) | [Link](./platforms/home-manager/modules/nmasur/presets/fonts.nix) |
| Launcher | [Rofi](https://github.com/davatorium/rofi) | [Link](./modules/nixos/graphical/rofi.nix) | | Launcher | [Rofi](https://github.com/davatorium/rofi) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/rofi/default.nix) |
## User Features ## User Features
| Feature | Program | Configuration | | Feature | Program | Configuration |
|--------------|----------------------------------------------------------------------------------|----------------------------------------------------| |--------------|----------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
| Dotfiles | [Home-Manager](https://github.com/nix-community/home-manager) | [Link](./modules/common) | | Dotfiles | [Home-Manager](https://github.com/nix-community/home-manager) | [Link](./platforms/home-manager) |
| Terminal | [Kitty](https://sw.kovidgoyal.net/kitty/) | [Link](./modules/common/applications/kitty.nix) | | Terminal | [Ghostty](https://sw.kovidgoyal.net/kitty/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/ghostty.nix) |
| Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) | | Shell | [Fish](https://fishshell.com/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/fish.nix) |
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starship.nix) | | Shell Prompt | [Starship](https://starship.rs/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/starship.nix) |
| Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox/default.nix) | | Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox/default.nix) |
| Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix) | | Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/x86_64-linux/tempest/default.nix) |
| Text Editor | [Neovim](https://neovim.io/) | [Link](./modules/common/neovim/config) | | Text Editor | [Neovim](https://neovim.io/) | [Link](./pkgs/applications/editors/neovim/nmasur/neovim/package.nix) |
| Browser | [Firefox](https://www.mozilla.org/en-US/firefox/new/) | [Link](./modules/common/applications/firefox.nix) | | Browser | [Firefox](https://www.mozilla.org/en-US/firefox/new/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/firefox.nix) |
| E-Mail | [Aerc](https://aerc-mail.org/) | [Link](./modules/common/mail/aerc.nix) | | E-Mail | [Aerc](https://aerc-mail.org/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/aerc.nix) |
| File Manager | [Nautilus](https://wiki.gnome.org/action/show/Apps/Files) | [Link](./modules/common/applications/nautilus.nix) | | File Manager | [Nautilus](https://wiki.gnome.org/action/show/Apps/Files) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/nautilus.nix) |
| PDF Reader | [Zathura](https://pwmt.org/projects/zathura/) | [Link](./modules/common/applications/media.nix) | | PDF Reader | [Zathura](https://pwmt.org/projects/zathura/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/zathura.nix) |
| Video Player | [mpv](https://mpv.io/) | [Link](./modules/common/applications/media.nix) | | Video Player | [mpv](https://mpv.io/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/mpv.nix) |
## macOS Features ## macOS Features
| Feature | Program | Configuration | | Feature | Program | Configuration |
|----------|---------------------------------------------|--------------------------------------| |----------|---------------------------------------------|--------------------------------------|
| Keybinds | [Hammerspoon](https://www.hammerspoon.org/) | [Link](./modules/darwin/hammerspoon) | | Keybinds | [Hammerspoon](https://www.hammerspoon.org/) | [Link](./platforms/home-manager/modules/nmasur/presets/services/hammerspoon/) |
# Diagram # Diagram
@ -51,15 +51,16 @@ configuration may be difficult to translate to a non-Nix system.
This repo contains a few more elaborate elements of configuration. This repo contains a few more elaborate elements of configuration.
- [Neovim config](./modules/common/neovim/default.nix) generated with Nix2Vim - [Neovim config](./pkgs/applications/editors/neovim/nmasur/neovim/package.nix)
and source-controlled plugins, differing based on installed LSPs, for example. generated with Nix2Vim and source-controlled plugins,
- [Caddy JSON](./modules/nixos/services/caddy.nix) file (routes, etc.) based differing based on installed LSPs, for example. - [Caddy
dynamically on enabled services rendered with Nix. JSON](./platforms/nixos/modules/nmasur/presets/services/caddy.nix) file (routes,
- [Grafana config](./modules/nixos/services/grafana.nix) rendered with Nix. etc.) based dynamically on enabled services rendered with Nix. - [Grafana
- Custom [secrets deployment](./modules/nixos/services/secrets.nix) similar to config](./platforms/nixos/modules/nmasur/presets/services/grafana/grafana.nix)
agenix. rendered with Nix. - Custom [secrets
- Base16 [colorschemes](./colorscheme/) applied to multiple applications, deployment](./platforms/nixos/modules/secrets.nix) similar to agenix. - Base16
including Firefox userChrome. [colorschemes](./colorscheme/) applied to multiple applications, including
Firefox userChrome.
--- ---

View File

@ -32,7 +32,7 @@ in
userName = cfg.name; userName = cfg.name;
userEmail = cfg.email; userEmail = cfg.email;
extraConfig = { extraConfig = {
core.pager = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight | less -F"; core.pager = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight | less --no-init";
interactive.difffilter = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight"; interactive.difffilter = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight";
pager = { pager = {
branch = "false"; branch = "false";

View File

@ -35,6 +35,8 @@ in
enable = true; enable = true;
package = pkgs.helix; # pkgs.evil-helix
languages = { languages = {
language-server.nixd = { language-server.nixd = {
@ -45,19 +47,116 @@ in
command = "${pkgs.fish-lsp}/bin/fish-lsp"; command = "${pkgs.fish-lsp}/bin/fish-lsp";
}; };
language-server.yaml-language-server = {
command = lib.getExe pkgs.yaml-language-server;
};
language-server.marksman = {
command = lib.getExe pkgs.marksman;
};
language-server.terraform-ls = {
command = "${lib.getExe pkgs.terraform-ls} serve";
};
language-server.bash-language-server = {
command = lib.getExe (
pkgs.bash-language-server.overrideAttrs {
buildInputs = [
pkgs.shellcheck
pkgs.shfmt
];
}
);
};
language = [ language = [
{ {
name = "nix"; name = "nix";
auto-format = true; auto-format = true;
language-servers = [ "nixd" ]; language-servers = [ "nixd" ];
} }
{
name = "markdown";
auto-format = true;
language-servers = [ "marksman" ];
formatter = {
command = lib.getExe pkgs.mdformat;
args = [ "-" ];
};
}
{
name = "tfvars";
auto-format = true;
language-servers = [ "terraform-ls" ];
formatter = {
command = lib.getExe pkgs.terraform;
args = [
"fmt"
"-"
];
};
}
{
name = "hcl";
auto-format = true;
language-servers = [ "terraform-ls" ];
formatter = {
command = lib.getExe pkgs.terraform;
args = [
"fmt"
"-"
];
};
}
{
name = "bash";
auto-format = true;
}
]; ];
}; };
settings = { settings = {
theme = "base16"; theme = "base16";
keys.normal = {
# Enable and disable inlay hints
space.H = ":toggle lsp.display-inlay-hints";
# Extend selection above
X = "select_line_above";
# Move lines up or down
A-j = [
"extend_to_line_bounds"
"delete_selection"
"paste_after"
];
A-k = [
"extend_to_line_bounds"
"delete_selection"
"move_line_up"
"paste_before"
];
# Copy lines up or down
A-J = [
"extend_to_line_bounds"
"yank"
"paste_after"
];
A-K = [
"extend_to_line_bounds"
"yank"
"paste_before"
];
};
editor = { editor = {
# Change cursors depending on the mode # Change cursors depending on the mode
cursor-shape = { cursor-shape = {
insert = "bar"; insert = "bar";
@ -65,6 +164,11 @@ in
select = "underline"; select = "underline";
}; };
# Text width
soft-wrap = {
enable = true;
};
# View line numbers relative to the current cursors # View line numbers relative to the current cursors
line-number = "relative"; line-number = "relative";
@ -120,7 +224,7 @@ in
"string" = config.theme.colors.base0B; "string" = config.theme.colors.base0B;
"type" = config.theme.colors.base0A; "type" = config.theme.colors.base0A;
"variable" = config.theme.colors.base08; "variable" = config.theme.colors.base08;
"variable.other.member" = config.theme.colors.base0B; "variable.other.member" = config.theme.colors.base05;
"warning" = config.theme.colors.base09; "warning" = config.theme.colors.base09;
"markup.bold" = { "markup.bold" = {
fg = config.theme.colors.base0A; fg = config.theme.colors.base0A;
@ -226,10 +330,10 @@ in
bg = config.theme.colors.base01; bg = config.theme.colors.base01;
}; };
"ui.selection" = { "ui.selection" = {
bg = config.theme.colors.base02; bg = config.theme.colors.base01;
}; };
"ui.selection.primary" = { "ui.selection.primary" = {
bg = config.theme.colors.base03; bg = config.theme.colors.base02;
}; };
"ui.statusline" = { "ui.statusline" = {
fg = config.theme.colors.base04; fg = config.theme.colors.base04;

View File

@ -18,6 +18,7 @@ in
home.packages = [ pkgs.zellij-switch ]; home.packages = [ pkgs.zellij-switch ];
programs.fish = { programs.fish = {
shellAbbrs.z = "zellij";
functions = { functions = {
zellij-session = { zellij-session = {
# description = "Open a session in Zellij"; # description = "Open a session in Zellij";
@ -59,67 +60,42 @@ in
enableFishIntegration = true; enableFishIntegration = true;
enableZshIntegration = true; enableZshIntegration = true;
# Not yet available in unstable
# attachExistingSession = true;
# exitShellOnExit = true;
settings = { settings = {
# default_layout = "compact-top"; # default_layout = "compact-top";
# Remove border # Remove border
pane_frames = false; pane_frames = false;
# Scrollback # Scrollback
scrollback_editor = config.home.sessionVariables.EDITOR; scrollback_editor = config.home.sessionVariables.EDITOR;
keybinds = { # plugins = {
# autolock = {
# _props = { # _props = {
# clear-defaults = true; # location = "https://github.com/fresh2dev/zellij-autolock/releases/download/0.2.2/zellij-autolock.wasm";
# }; # };
unbind = { # is_enabled = {
_args = [ # _args = [ true ];
"Ctrl g" # };
"Ctrl h" # triggers = {
"Ctrl n" # _args = [ "vim|nvim|hx|git|fzf|zoxide|atuin|gh" ];
"Ctrl o" # };
"Ctrl p" # reaction_seconds = {
"Ctrl q" # _args = [ "0.3" ];
"Ctrl s" # };
"Alt i" # print_to_log = {
]; # _args = [ true ];
}; # };
# };
# };
# load_plugins = {
# autolock = { };
# };
keybinds = {
normal = { normal = {
"bind \"Alt l\"" = {
SwitchToMode = {
_args = [ "locked" ];
};
};
"bind \"Alt p\"" = {
SwitchToMode = {
_args = [ "pane" ];
};
};
"bind \"Alt t\"" = {
SwitchToMode = {
_args = [ "tab" ];
};
};
"bind \"Alt r\"" = {
SwitchToMode = {
_args = [ "resize" ];
};
};
"bind \"Alt m\"" = {
SwitchToMode = {
_args = [ "move" ];
};
};
"bind \"Alt k\"" = {
SwitchToMode = {
_args = [ "scroll" ];
};
};
"bind \"Alt o\"" = {
SwitchToMode = {
_args = [ "session" ];
};
};
"bind \"Alt q\"" = {
"Quit" = { };
}; };
shared = {
"bind \"Alt Shift p\"" = { "bind \"Alt Shift p\"" = {
"Run" = { "Run" = {
_args = [ _args = [
@ -130,42 +106,14 @@ in
close_on_exit = true; close_on_exit = true;
}; };
}; };
"bind \"Super t\"" = {
"NewTab" = { };
};
"bind \"Super Shift ]\"" = { "bind \"Super Shift ]\"" = {
"GoToPreviousTab" = { }; "GoToNextTab" = { };
}; };
"bind \"Super Shift [\"" = { "bind \"Super Shift [\"" = {
"GoToNextTab" = { };
};
"bind \"Ctrl Tab\"" = {
"GoToNextTab" = { };
};
"bind \"Ctrl Shift Tab\"" = {
"GoToPreviousTab" = { }; "GoToPreviousTab" = { };
}; };
"bind \"Alt Shift i\"" = { "bind \"Super t\"" = {
"MoveTab" = { "NewTab" = { };
_args = [ "Left" ];
};
};
"bind \"Alt Shift o\"" = {
"MoveTab" = {
_args = [ "Right" ];
};
};
};
locked = {
"bind \"Alt l\"" = {
SwitchToMode = {
_args = [ "Normal" ];
};
};
};
session = {
unbind = {
_args = [ "Alt o" ];
}; };
}; };

View File

@ -36,6 +36,7 @@ in
homebrew.casks = [ homebrew.casks = [
"scroll-reverser" # Different scroll style for mouse vs. trackpad "scroll-reverser" # Different scroll style for mouse vs. trackpad
"notunes" # Don't launch Apple Music with the play button "notunes" # Don't launch Apple Music with the play button
"topnotch" # Darkens the menu bar to complete black
]; ];
}; };

View File

@ -26,6 +26,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.calibre-web = { services.calibre-web = {
enable = true;
openFirewall = true; openFirewall = true;
options = { options = {
reverseProxyAuth.enable = false; reverseProxyAuth.enable = false;

View File

@ -17,7 +17,7 @@ in
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
package = pkgs.nextcloud30; # Required to specify package = pkgs.nextcloud31; # Required to specify
configureRedis = true; configureRedis = true;
datadir = "/data/nextcloud"; datadir = "/data/nextcloud";
database.createLocally = true; database.createLocally = true;
@ -42,10 +42,10 @@ in
calendar = config.services.nextcloud.package.packages.apps.calendar; calendar = config.services.nextcloud.package.packages.apps.calendar;
contacts = config.services.nextcloud.package.packages.apps.contacts; contacts = config.services.nextcloud.package.packages.apps.contacts;
# These apps are defined and pinned by overlay in flake. # These apps are defined and pinned by overlay in flake.
news = pkgs.nextcloudApps.news; # news = pkgs.nextcloudApps.news;
external = pkgs.nextcloudApps.external; # external = pkgs.nextcloudApps.external;
cookbook = pkgs.nextcloudApps.cookbook; # cookbook = pkgs.nextcloudApps.cookbook;
snappymail = pkgs.nextcloudApps.snappymail; # snappymail = pkgs.nextcloudApps.snappymail;
}; };
phpOptions = { phpOptions = {
"opcache.interned_strings_buffer" = "16"; "opcache.interned_strings_buffer" = "16";