refactor
This commit is contained in:
parent
66c05f9093
commit
45d6f4b0f3
205 changed files with 9040 additions and 342 deletions
18
modules/nixos/cli-apps/flake/default.nix
Normal file
18
modules/nixos/cli-apps/flake/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
inputs@{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let
|
||||
cfg = config.plusultra.cli-apps.flake;
|
||||
in
|
||||
{
|
||||
options.plusultra.cli-apps.flake = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable flake.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
snowfallorg.flake
|
||||
];
|
||||
};
|
||||
}
|
47
modules/nixos/cli-apps/neovim/default.nix
Normal file
47
modules/nixos/cli-apps/neovim/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
inputs @ { options
|
||||
, config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
with lib;
|
||||
with lib.plusultra; let
|
||||
cfg = config.plusultra.cli-apps.neovim;
|
||||
in
|
||||
{
|
||||
options.plusultra.cli-apps.neovim = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable neovim.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
# FIXME: As of today (2022-12-09), `page` no longer works with my Neovim
|
||||
# configuration. Either something in my configuration is breaking it or `page` is busted.
|
||||
# page
|
||||
plusultra.neovim
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
# PAGER = "page";
|
||||
# MANPAGER =
|
||||
# "page -C -e 'au User PageDisconnect sleep 100m|%y p|enew! |bd! #|pu p|set ft=man'";
|
||||
PAGER = "less";
|
||||
MANPAGER = "less";
|
||||
NPM_CONFIG_PREFIX = "$HOME/.npm-global";
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
plusultra.home = {
|
||||
configFile = {
|
||||
"dashboard-nvim/.keep".text = "";
|
||||
};
|
||||
|
||||
extraOptions = {
|
||||
# Use Neovim for Git diffs.
|
||||
programs.zsh.shellAliases.vimdiff = "nvim -d";
|
||||
programs.bash.shellAliases.vimdiff = "nvim -d";
|
||||
programs.fish.shellAliases.vimdiff = "nvim -d";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
31
modules/nixos/cli-apps/prisma/default.nix
Normal file
31
modules/nixos/cli-apps/prisma/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let
|
||||
cfg = config.plusultra.cli-apps.prisma;
|
||||
in
|
||||
{
|
||||
options.plusultra.cli-apps.prisma = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to install Prisma";
|
||||
pkgs = {
|
||||
npm = mkOpt package pkgs.nodePackages.prisma "The NPM package to install";
|
||||
engines = mkOpt package pkgs.prisma-engines
|
||||
"The package to get prisma engines from";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.pkgs.npm ];
|
||||
|
||||
plusultra.home.extraOptions = {
|
||||
programs.zsh.initExtra = ''
|
||||
export PRISMA_MIGRATION_ENGINE_BINARY="${cfg.pkgs.engines}/bin/migration-engine"
|
||||
export PRISMA_QUERY_ENGINE_BINARY="${cfg.pkgs.engines}/bin/query-engine"
|
||||
export PRISMA_QUERY_ENGINE_LIBRARY="${cfg.pkgs.engines}/lib/libquery_engine.node"
|
||||
export PRISMA_INTROSPECTION_ENGINE_BINARY="${cfg.pkgs.engines}/bin/introspection-engine"
|
||||
export PRISMA_FMT_BINARY="${cfg.pkgs.engines}/bin/prisma-fmt"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
16
modules/nixos/cli-apps/proton/default.nix
Normal file
16
modules/nixos/cli-apps/proton/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let
|
||||
cfg = config.plusultra.cli-apps.proton;
|
||||
in
|
||||
{
|
||||
options.plusultra.cli-apps.proton = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable Proton.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ proton-caller ];
|
||||
};
|
||||
}
|
20
modules/nixos/cli-apps/thaw/default.nix
Normal file
20
modules/nixos/cli-apps/thaw/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
with lib;
|
||||
with lib.plusultra; let
|
||||
cfg = config.plusultra.cli-apps.thaw;
|
||||
in
|
||||
{
|
||||
options.plusultra.cli-apps.thaw = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable thaw.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
snowfallorg.thaw
|
||||
];
|
||||
};
|
||||
}
|
5
modules/nixos/cli-apps/tmux/config/continuum.tmux
Normal file
5
modules/nixos/cli-apps/tmux/config/continuum.tmux
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Enable saving sessions.
|
||||
set -g @continuum-restore 'on'
|
||||
|
||||
# Save every 30 minutes.
|
||||
set -g @continuum-save-interval '30'
|
15
modules/nixos/cli-apps/tmux/config/extrakto.tmux
Normal file
15
modules/nixos/cli-apps/tmux/config/extrakto.tmux
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Create a vertical split to show search & results to keep
|
||||
# the content visible.
|
||||
set -g @extrakto_split_direction "v"
|
||||
|
||||
# Override the way that Extrakto copies text. By default
|
||||
# it was trying to use xclip and would not properly pick
|
||||
# up on $XDG_SESSION_TYPE being wayland. Instead, use
|
||||
# Tmux's built-in clipboard functionality.
|
||||
set -g @extrakto_clip_tool_run "tmux_osc52"
|
||||
|
||||
# FIXME: The current version of Extrakto in
|
||||
# NixPkgs is out of date and does not support wayland.
|
||||
# This overrides the clipping tool to ensure that it works
|
||||
# under wayland.
|
||||
set -g @extrakto_clip_tool "wl-copy"
|
2
modules/nixos/cli-apps/tmux/config/fzf.tmux
Normal file
2
modules/nixos/cli-apps/tmux/config/fzf.tmux
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Change default keybinding.
|
||||
TMUX_FZF_LAUNCH_KEY="C-f"
|
38
modules/nixos/cli-apps/tmux/config/general.tmux
Normal file
38
modules/nixos/cli-apps/tmux/config/general.tmux
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Lower delay waiting for chord after escape key press.
|
||||
set -g escape-time 0
|
||||
|
||||
# Change the prefix from C-b to C-s to make it easier to type.
|
||||
set -g prefix C-s
|
||||
unbind C-b
|
||||
bind C-s send-prefix
|
||||
|
||||
# Start window numbers at 1 rather than 0.
|
||||
set -g base-index 1
|
||||
|
||||
# Use h, j, k, l for movement between panes.
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# Fix colors being wrong in programs like Neovim.
|
||||
set-option -ga terminal-overrides ",xterm-256color:Tc"
|
||||
|
||||
# Expand the left status to accomodate longer session names.
|
||||
set-option -g status-left-length 20
|
||||
|
||||
# One of the plugins binds C-l, make sure we have accces to it.
|
||||
unbind C-l
|
||||
bind -n C-l send-keys C-l
|
||||
|
||||
# Don't require a prompt to detach from the current session.
|
||||
unbind -n M-E
|
||||
bind -n M-E detach-client
|
||||
|
||||
# Reload tmux configuration from ~/.config/tmux/tmux.conf instead
|
||||
# of Tilish's default of ~/.tmux.conf.
|
||||
unbind -n M-C
|
||||
bind -n M-C source-file "~/.config/tmux/tmux.conf"
|
||||
|
||||
# Use M-z to zoom and unzoom panes.
|
||||
bind -n M-z resize-pane -Z
|
21
modules/nixos/cli-apps/tmux/config/navigator.tmux
Normal file
21
modules/nixos/cli-apps/tmux/config/navigator.tmux
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Smart pane switching with awareness of Vim splits.
|
||||
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||
|
||||
bind-key -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'select-pane -L'
|
||||
bind-key -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'select-pane -D'
|
||||
bind-key -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'select-pane -U'
|
||||
bind-key -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'select-pane -R'
|
||||
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
|
||||
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
|
||||
"bind-key -n 'M-\\' if-shell \"$is_vim\" 'send-keys M-\\' 'select-pane -l'"
|
||||
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
|
||||
"bind-key -n 'M-\\' if-shell \"$is_vim\" 'send-keys M-\\\\' 'select-pane -l'"
|
||||
|
||||
bind-key -T copy-mode-vi 'M-h' select-pane -L
|
||||
bind-key -T copy-mode-vi 'M-j' select-pane -D
|
||||
bind-key -T copy-mode-vi 'M-k' select-pane -U
|
||||
bind-key -T copy-mode-vi 'M-l' select-pane -R
|
||||
bind-key -T copy-mode-vi 'M-p' select-pane -l
|
||||
|
37
modules/nixos/cli-apps/tmux/config/nord.tmux
Normal file
37
modules/nixos/cli-apps/tmux/config/nord.tmux
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
# Copyright (C) 2017-present Arctic Ice Studio <development@arcticicestudio.com>
|
||||
# Copyright (C) 2017-present Sven Greb <development@svengreb.de>
|
||||
# Copyright (C) 2022-present Jake Hamilton <jake.hamilton@hey.com>
|
||||
|
||||
# Project: Nord tmux
|
||||
# Repository: https://github.com/arcticicestudio/nord-tmux
|
||||
# License: MIT
|
||||
|
||||
#+----------------+
|
||||
#+ Plugin Support +
|
||||
#+----------------+
|
||||
#+--- tmux-prefix-highlight ---+
|
||||
set -g @prefix_highlight_output_prefix "#[fg=brightcyan]#[bg=black]#[nobold]#[noitalics]#[nounderscore]#[bg=brightcyan]#[fg=black]"
|
||||
set -g @prefix_highlight_output_suffix ""
|
||||
set -g @prefix_highlight_copy_mode_attr "fg=brightcyan,bg=black,bold"
|
||||
|
||||
#+--------+
|
||||
#+ Status +
|
||||
#+--------+
|
||||
#+--- Bars ---+
|
||||
set -g status-left "#[fg=brightblack,bg=black]#[fg=white,bg=brightblack,bold] #S #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g status-right "#{prefix_highlight}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack,nobold] #H #[fg=brightblack,bg=black,nobold]"
|
||||
|
||||
#+--- Windows ---+
|
||||
set -g window-status-format "#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] #I#[fg=white,bg=brightblack,nobold,noitalics,nounderscore]: #W #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g window-status-current-format "#[fg=#5e81ac,bg=black]#[fg=white,bg=#5e81ac,bold,noitalics,nounderscore] #I#[fg=white,bg=#5e81ac,bold,noitalics,nounderscore]: #W #[fg=#5e81ac,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g window-status-separator " "
|
||||
|
||||
# Center the window list (yes, this value has to be written as "centre").
|
||||
set -g status-justify centre
|
||||
|
||||
#+----------------+
|
||||
#+ Windows +
|
||||
#+----------------+
|
||||
#+--- Bars ---+
|
||||
set -g pane-active-border-style "bg=default fg=blue"
|
12
modules/nixos/cli-apps/tmux/config/tilish.tmux
Normal file
12
modules/nixos/cli-apps/tmux/config/tilish.tmux
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Integrate Tmux and Neovim movement.
|
||||
set -g @tilish-navigator "on"
|
||||
|
||||
# Default to splitting once vertically and then splitting horizontally
|
||||
# after that.
|
||||
select-layout "main-vertical"
|
||||
select-layout -E
|
||||
set -g @tilish-default "main-vertical"
|
||||
|
||||
|
||||
bind-key -n "M-q" kill-pane
|
||||
|
20
modules/nixos/cli-apps/tmux/default.nix
Normal file
20
modules/nixos/cli-apps/tmux/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
with lib;
|
||||
with lib.plusultra; let
|
||||
cfg = config.plusultra.cli-apps.tmux;
|
||||
in
|
||||
{
|
||||
options.plusultra.cli-apps.tmux = {
|
||||
enable = mkEnableOption "Tmux";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
plusultra.tmux
|
||||
];
|
||||
};
|
||||
}
|
20
modules/nixos/cli-apps/wine/default.nix
Normal file
20
modules/nixos/cli-apps/wine/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let
|
||||
cfg = config.plusultra.cli-apps.wine;
|
||||
in
|
||||
{
|
||||
options.plusultra.cli-apps.wine = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable Wine.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
winePackages.unstable
|
||||
winetricks
|
||||
wine64Packages.unstable
|
||||
];
|
||||
};
|
||||
}
|
17
modules/nixos/cli-apps/wshowkeys/default.nix
Normal file
17
modules/nixos/cli-apps/wshowkeys/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let
|
||||
cfg = config.plusultra.cli-apps.wshowkeys;
|
||||
in
|
||||
{
|
||||
options.plusultra.cli-apps.wshowkeys = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable wshowkeys.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
plusultra.user.extraGroups = [ "input" ];
|
||||
environment.systemPackages = with pkgs; [ wshowkeys ];
|
||||
};
|
||||
}
|
17
modules/nixos/cli-apps/yubikey/default.nix
Normal file
17
modules/nixos/cli-apps/yubikey/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let
|
||||
cfg = config.plusultra.cli-apps.yubikey;
|
||||
in
|
||||
{
|
||||
options.plusultra.cli-apps.yubikey = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable Yubikey.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.yubikey-agent.enable = true;
|
||||
environment.systemPackages = with pkgs; [ yubikey-manager ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue