Compare commits
9 commits
main
...
tmux-under
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e1f408dbf | |||
| 82cd41cc54 | |||
| 4460f095a5 | |||
| 5492365d0a | |||
| 0a927c5cc0 | |||
| 5e5f63eb26 | |||
| 8b028ce19f | |||
| d4668416af | |||
| 88b943076d |
28 changed files with 297 additions and 184 deletions
68
flake.lock
generated
68
flake.lock
generated
|
|
@ -14,11 +14,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762618334,
|
||||
"narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=",
|
||||
"lastModified": 1754433428,
|
||||
"narHash": "sha256-NA/FT2hVhKDftbHSwVnoRTFhes62+7dxZbxj5Gxvghs=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "fcdea223397448d35d9b31f798479227e80183f6",
|
||||
"rev": "9edb1787864c4f59ae5074ad498b6272b3ec308d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -53,11 +53,11 @@
|
|||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1761588595,
|
||||
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
|
||||
"lastModified": 1747046372,
|
||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
|
||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -73,11 +73,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763759067,
|
||||
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
||||
"lastModified": 1756770412,
|
||||
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
||||
"rev": "4524271976b625a4a605beefd893f270620fd751",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -117,11 +117,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763988335,
|
||||
"narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=",
|
||||
"lastModified": 1755960406,
|
||||
"narHash": "sha256-RF7j6C1TmSTK9tYWO6CdEMtg6XZaUKcvZwOCD2SICZs=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce",
|
||||
"rev": "e891a93b193fcaf2fc8012d890dc7f0befe86ec2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -159,11 +159,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764361670,
|
||||
"narHash": "sha256-jgWzgpIaHbL3USIq0gihZeuy1lLf2YSfwvWEwnfAJUw=",
|
||||
"lastModified": 1756954499,
|
||||
"narHash": "sha256-Pg4xBHzvzNY8l9x/rLWoJMnIR8ebG+xeU+IyqThIkqU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "780be8ef503a28939cf9dc7996b48ffb1a3e04c6",
|
||||
"rev": "ed1a98c375450dfccf427adacd2bfd1a7b22eb25",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -175,11 +175,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1764242076,
|
||||
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
|
||||
"lastModified": 1756936398,
|
||||
"narHash": "sha256-/o1TTpMIICpjrMHBilL9lYm/r69uhdK1L8j1pfY6tWU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
|
||||
"rev": "47f28ad9378956563df9a884fd1b209b64336ba3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -196,19 +196,20 @@
|
|||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
],
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764449851,
|
||||
"narHash": "sha256-VnodC1+3KML8MYLLnK84E6U2Fz4ioNacOeQd1pMCSTw=",
|
||||
"lastModified": 1753980880,
|
||||
"narHash": "sha256-aj1pbYxL6N+XFqBHjB4B1QP0bnKRcg1AfpgT5zUFsW8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "b1781c0aa8935d8d1f35d228bcc7127fcebcd363",
|
||||
"rev": "16db3e61da7606984a05b4dfc33cd1d26d22fb22",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "main",
|
||||
"ref": "master",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
@ -240,6 +241,27 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733222881,
|
||||
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
type = "github";
|
||||
owner = "nix-community";
|
||||
repo = "NUR";
|
||||
ref = "main";
|
||||
ref = "master";
|
||||
inputs = {
|
||||
flake-parts.follows = "flake-parts";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ self, lib, ... }:
|
||||
{ self, ... }:
|
||||
let
|
||||
default-overlays = import "${self}/overlays";
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ let
|
|||
|
||||
# Expose my custom packages
|
||||
pkgs = _final: prev: {
|
||||
ambroisie = lib.recurseIntoAttrs (import "${self}/pkgs" { pkgs = prev; });
|
||||
ambroisie = prev.recurseIntoAttrs (import "${self}/pkgs" { pkgs = prev; });
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
terminalFeatures = {
|
||||
# HTerm uses `xterm-256color` as its `$TERM`, so use that here
|
||||
xterm-256color = { };
|
||||
# Terminal app uses `xterm.js`, not HTerm
|
||||
"xterm.js" = { };
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@
|
|||
terminalFeatures = {
|
||||
# HTerm uses `xterm-256color` as its `$TERM`, so use that here
|
||||
xterm-256color = { };
|
||||
# Terminal app uses `xterm.js`, not HTerm
|
||||
"xterm.js" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
# Network-Manager applet
|
||||
nm-applet.enable = true;
|
||||
# Terminal
|
||||
terminal.program = "alacritty";
|
||||
terminal.default = "alacritty";
|
||||
# Transmission remote
|
||||
trgui.enable = true;
|
||||
# Zathura document viewer
|
||||
|
|
|
|||
|
|
@ -83,9 +83,18 @@ in
|
|||
"servarr/autobrr/session-secret.age".publicKeys = all;
|
||||
"servarr/cross-seed/configuration.json.age".publicKeys = all;
|
||||
|
||||
"sso/auth-key.age".publicKeys = all;
|
||||
"sso/ambroisie/password-hash.age".publicKeys = all;
|
||||
"sso/ambroisie/totp-secret.age".publicKeys = all;
|
||||
"sso/auth-key.age" = {
|
||||
owner = "nginx-sso";
|
||||
publicKeys = all;
|
||||
};
|
||||
"sso/ambroisie/password-hash.age" = {
|
||||
owner = "nginx-sso";
|
||||
publicKeys = all;
|
||||
};
|
||||
"sso/ambroisie/totp-secret.age" = {
|
||||
owner = "nginx-sso";
|
||||
publicKeys = all;
|
||||
};
|
||||
|
||||
"tandoor-recipes/secret-key.age".publicKeys = all;
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,6 +1,9 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.delta;
|
||||
|
||||
configFormat = pkgs.formats.gitIni { };
|
||||
configPath = "${config.xdg.configHome}/delta/config";
|
||||
in
|
||||
{
|
||||
options.my.home.delta = with lib; {
|
||||
|
|
@ -14,14 +17,28 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.delta = {
|
||||
enable = true;
|
||||
assertions = [
|
||||
{
|
||||
# For its configuration
|
||||
assertion = cfg.enable -> cfg.git.enable;
|
||||
message = ''
|
||||
`config.my.home.delta` must enable `config.my.home.delta.git` to be
|
||||
properly configured.
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion = cfg.enable -> config.programs.git.enable;
|
||||
message = ''
|
||||
`config.my.home.delta` relies on `config.programs.git` to be
|
||||
enabled.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
inherit (cfg) package;
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
enableGitIntegration = cfg.git.enable;
|
||||
|
||||
options = {
|
||||
xdg.configFile."delta/config".source = configFormat.generate "delta-config" {
|
||||
delta = {
|
||||
features = "diff-highlight decorations";
|
||||
|
||||
# Less jarring style for `diff-highlight` emulation
|
||||
|
|
@ -45,5 +62,18 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.git = lib.mkIf cfg.git.enable {
|
||||
delta = {
|
||||
enable = true;
|
||||
inherit (cfg) package;
|
||||
};
|
||||
|
||||
includes = [
|
||||
{
|
||||
path = configPath;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.home.discord;
|
||||
|
||||
jsonFormat = pkgs.formats.json { };
|
||||
in
|
||||
{
|
||||
options.my.home.discord = with lib; {
|
||||
|
|
@ -10,15 +12,14 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.discord = {
|
||||
enable = true;
|
||||
home.packages = with pkgs; [
|
||||
cfg.package
|
||||
];
|
||||
|
||||
inherit (cfg) package;
|
||||
|
||||
settings = {
|
||||
xdg.configFile."discord/settings.json".source =
|
||||
jsonFormat.generate "discord.json" {
|
||||
# Do not keep me from using the app just to force an update
|
||||
SKIP_HOST_UPDATE = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
let
|
||||
cfg = config.my.home.firefox.tridactyl;
|
||||
|
||||
term = config.my.home.terminal.program;
|
||||
term = config.my.home.terminal.default;
|
||||
|
||||
vimCommandLine = {
|
||||
alacritty = ''-e "vim" "%f" "+normal!%lGzv%c|"'';
|
||||
|
|
|
|||
|
|
@ -21,19 +21,13 @@ in
|
|||
config.programs.git = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
|
||||
# Who am I?
|
||||
userEmail = mkMailAddress "bruno" "belanyi.fr";
|
||||
userName = "Bruno BELANYI";
|
||||
|
||||
inherit (cfg) package;
|
||||
|
||||
lfs.enable = true;
|
||||
|
||||
# There's more
|
||||
settings = {
|
||||
# Who am I?
|
||||
user = {
|
||||
email = mkMailAddress "bruno" "belanyi.fr";
|
||||
name = "Bruno BELANYI";
|
||||
};
|
||||
|
||||
alias = {
|
||||
aliases = {
|
||||
git = "!git";
|
||||
lol = "log --graph --decorate --pretty=oneline --abbrev-commit --topo-order";
|
||||
lola = "lol --all";
|
||||
|
|
@ -46,6 +40,10 @@ in
|
|||
root = "git rev-parse --show-toplevel";
|
||||
};
|
||||
|
||||
lfs.enable = true;
|
||||
|
||||
# There's more
|
||||
extraConfig = {
|
||||
# Makes it a bit more readable
|
||||
blame = {
|
||||
coloring = "repeatedLines";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,16 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.terminal;
|
||||
cfg = config.my.home.terminal.alacritty;
|
||||
inherit (config.my.home.terminal) colors;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf (cfg.program == "alacritty") {
|
||||
options.my.home.terminal.alacritty = with lib; {
|
||||
enable = lib.mkEnableOption "alacritty" // {
|
||||
default = config.my.home.terminal.default == "alacritty";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
|
||||
|
|
@ -14,36 +21,36 @@ in
|
|||
|
||||
colors = {
|
||||
primary = {
|
||||
background = cfg.colors.background;
|
||||
foreground = cfg.colors.foreground;
|
||||
background = colors.background;
|
||||
foreground = colors.foreground;
|
||||
|
||||
bright_foreground = cfg.colors.foregroundBold;
|
||||
bright_foreground = colors.foregroundBold;
|
||||
};
|
||||
|
||||
cursor = {
|
||||
cursor = cfg.colors.cursor;
|
||||
cursor = colors.cursor;
|
||||
};
|
||||
|
||||
normal = {
|
||||
black = cfg.colors.black;
|
||||
red = cfg.colors.red;
|
||||
green = cfg.colors.green;
|
||||
yellow = cfg.colors.yellow;
|
||||
blue = cfg.colors.blue;
|
||||
magenta = cfg.colors.magenta;
|
||||
cyan = cfg.colors.cyan;
|
||||
white = cfg.colors.white;
|
||||
black = colors.black;
|
||||
red = colors.red;
|
||||
green = colors.green;
|
||||
yellow = colors.yellow;
|
||||
blue = colors.blue;
|
||||
magenta = colors.magenta;
|
||||
cyan = colors.cyan;
|
||||
white = colors.white;
|
||||
};
|
||||
|
||||
bright = {
|
||||
black = cfg.colors.blackBold;
|
||||
red = cfg.colors.redBold;
|
||||
green = cfg.colors.greenBold;
|
||||
yellow = cfg.colors.yellowBold;
|
||||
blue = cfg.colors.blueBold;
|
||||
magenta = cfg.colors.magentaBold;
|
||||
cyan = cfg.colors.cyanBold;
|
||||
white = cfg.colors.whiteBold;
|
||||
black = colors.blackBold;
|
||||
red = colors.redBold;
|
||||
green = colors.greenBold;
|
||||
yellow = colors.yellowBold;
|
||||
blue = colors.blueBold;
|
||||
magenta = colors.magentaBold;
|
||||
cyan = colors.cyanBold;
|
||||
white = colors.whiteBold;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ in
|
|||
|
||||
options.my.home = with lib; {
|
||||
terminal = {
|
||||
program = mkOption {
|
||||
default = mkOption {
|
||||
type = with types; nullOr (enum [ "alacritty" "termite" ]);
|
||||
default = null;
|
||||
example = "termite";
|
||||
description = "Which terminal to use for home session";
|
||||
description = "Which default terminal to use for home session";
|
||||
};
|
||||
|
||||
colors = {
|
||||
|
|
@ -56,7 +56,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config.home.sessionVariables = lib.mkIf (cfg.program != null) {
|
||||
TERMINAL = cfg.program;
|
||||
config.home.sessionVariables = lib.mkIf (cfg.default != null) {
|
||||
TERMINAL = cfg.default;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,16 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.home.terminal;
|
||||
cfg = config.my.home.terminal.termite;
|
||||
inherit (config.my.home.terminal) colors;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf (cfg.program == "termite") {
|
||||
options.my.home.terminal.termite = with lib; {
|
||||
enable = lib.mkEnableOption "termite" // {
|
||||
default = config.my.home.terminal.default == "termite";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.termite = {
|
||||
enable = true;
|
||||
|
||||
|
|
@ -24,11 +31,11 @@ in
|
|||
|
||||
|
||||
# Colors
|
||||
backgroundColor = cfg.colors.background;
|
||||
cursorColor = cfg.colors.cursor;
|
||||
foregroundColor = cfg.colors.foreground;
|
||||
foregroundBoldColor = cfg.colors.foregroundBold;
|
||||
colorsExtra = with cfg.colors; ''
|
||||
backgroundColor = colors.background;
|
||||
cursorColor = colors.cursor;
|
||||
foregroundColor = colors.foreground;
|
||||
foregroundBoldColor = colors.foregroundBold;
|
||||
colorsExtra = with colors; ''
|
||||
# Normal colors
|
||||
color0 = ${black}
|
||||
color1 = ${red}
|
||||
|
|
|
|||
|
|
@ -6,13 +6,16 @@ let
|
|||
(config.my.home.wm.windowManager != null)
|
||||
];
|
||||
|
||||
mkTerminalFeature = opt: flag:
|
||||
mkTerminalFlag = tmuxVar: opt: flag:
|
||||
let
|
||||
mkFlag = term: ''set -as terminal-features ",${term}:${flag}"'';
|
||||
mkFlag = term: ''set -as ${tmuxVar} ",${term}:${flag}"'';
|
||||
enabledTerminals = lib.filterAttrs (_: v: v.${opt}) cfg.terminalFeatures;
|
||||
terminals = lib.attrNames enabledTerminals;
|
||||
in
|
||||
lib.concatMapStringsSep "\n" mkFlag terminals;
|
||||
|
||||
mkTerminalFeature = mkTerminalFlag "terminal-features";
|
||||
mkTerminalOverride = mkTerminalFlag "terminal-overrides";
|
||||
in
|
||||
{
|
||||
options.my.home.tmux = with lib; {
|
||||
|
|
@ -28,12 +31,14 @@ in
|
|||
hyperlinks = my.mkDisableOption "hyperlinks through OSC8";
|
||||
|
||||
trueColor = my.mkDisableOption "24-bit (RGB) color support";
|
||||
|
||||
underscoreStyle = my.mkDisableOption "underscore style/color support";
|
||||
};
|
||||
});
|
||||
|
||||
default = { ${config.my.home.terminal.program} = { }; };
|
||||
default = { ${config.my.home.terminal.default} = { }; };
|
||||
defaultText = literalExpression ''
|
||||
{ ''${config.my.home.terminal.program} = { }; };
|
||||
{ ''${config.my.home.terminal.default} = { }; };
|
||||
'';
|
||||
example = { xterm-256color = { }; };
|
||||
description = ''
|
||||
|
|
@ -54,6 +59,20 @@ in
|
|||
terminal = "tmux-256color"; # I want accurate termcap info
|
||||
aggressiveResize = true; # Automatic resize when switching client size
|
||||
|
||||
# FIXME
|
||||
# * Sixel support
|
||||
# * OSC 133 prompt integration
|
||||
# FIXME: when sensible-on-top is disabled: check if any of those are unset
|
||||
# * tmux bind-key $prefix_without_ctrl last-window
|
||||
# *
|
||||
# * tmux bind-key C-b send-prefix: included
|
||||
# * aggressive resize? done
|
||||
# * tmux bind-key C-p previous-window: done
|
||||
# * tmux bind-key C-n next-window: done
|
||||
# * C-r to refresh my config: done
|
||||
# * tmux set-option -g focus-events on: done
|
||||
|
||||
# FIXME: make PRs for `bind-key` description
|
||||
plugins = with pkgs.tmuxPlugins; builtins.filter (attr: attr != { }) [
|
||||
# Open high-lighted files in copy mode
|
||||
open
|
||||
|
|
@ -126,6 +145,11 @@ in
|
|||
${mkTerminalFeature "hyperlinks" "hyperlinks"}
|
||||
# Force 24-bit color for each relevant $TERM
|
||||
${mkTerminalFeature "trueColor" "RGB"}
|
||||
# Force underscore style/color for each relevant $TERM
|
||||
${mkTerminalFeature "underscoreStyle" "usstyle"}
|
||||
# FIXME: see https://github.com/folke/tokyonight.nvim#fix-undercurls-in-tmux for additional overrides
|
||||
# ${mkTerminalOverride "underscoreStyle" "Smulx=\\E[4::%p1%dm"}
|
||||
# ${mkTerminalOverride "underscoreStyle" "Setulc=\\E[58::2::::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m"}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
7
modules/home/vim/ftdetect/glsl.lua
Normal file
7
modules/home/vim/ftdetect/glsl.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- Use GLSL filetype for common shader file extensions
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
frag = "glsl",
|
||||
vert = "glsl",
|
||||
},
|
||||
})
|
||||
|
|
@ -81,6 +81,9 @@ set updatetime=250
|
|||
" Disable all mouse integrations
|
||||
set mouse=
|
||||
|
||||
" Set dark mode by default
|
||||
set background=dark
|
||||
|
||||
" Setup some overrides for gruvbox
|
||||
lua << EOF
|
||||
local gruvbox = require("gruvbox")
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
local lspconfig = require("lspconfig")
|
||||
local lsp = require("ambroisie.lsp")
|
||||
local utils = require("ambroisie.utils")
|
||||
|
||||
|
|
@ -24,27 +25,59 @@ vim.diagnostic.config({
|
|||
-- Inform servers we are able to do completion, snippets, etc...
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
-- Shared configuration
|
||||
vim.lsp.config("*", {
|
||||
-- C/C++
|
||||
if utils.is_executable("clangd") then
|
||||
lspconfig.clangd.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
local servers = {
|
||||
-- C/C++
|
||||
clangd = {},
|
||||
-- Haskell
|
||||
hls = {},
|
||||
-- Nix
|
||||
nil_ls = {},
|
||||
-- Python
|
||||
pyright = {},
|
||||
ruff = {},
|
||||
-- Rust
|
||||
rust_analyzer = {},
|
||||
-- Shell
|
||||
bashls = {
|
||||
-- Haskell
|
||||
if utils.is_executable("haskell-language-server-wrapper") then
|
||||
lspconfig.hls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
end
|
||||
|
||||
-- Nix
|
||||
if utils.is_executable("nil") then
|
||||
lspconfig.nil_ls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
end
|
||||
|
||||
-- Python
|
||||
if utils.is_executable("pyright") then
|
||||
lspconfig.pyright.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
end
|
||||
|
||||
if utils.is_executable("ruff") then
|
||||
lspconfig.ruff.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
end
|
||||
|
||||
-- Rust
|
||||
if utils.is_executable("rust-analyzer") then
|
||||
lspconfig.rust_analyzer.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
end
|
||||
|
||||
-- Shell
|
||||
if utils.is_executable("bash-language-server") then
|
||||
lspconfig.bashls.setup({
|
||||
filetypes = { "bash", "sh", "zsh" },
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
settings = {
|
||||
bashIde = {
|
||||
shfmt = {
|
||||
|
|
@ -55,17 +88,28 @@ local servers = {
|
|||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- Starlark
|
||||
starpls = {},
|
||||
-- Generic
|
||||
harper_ls = {},
|
||||
typos_lsp = {},
|
||||
}
|
||||
|
||||
for server, config in pairs(servers) do
|
||||
if not vim.tbl_isempty(config) then
|
||||
vim.lsp.config(server, config)
|
||||
end
|
||||
vim.lsp.enable(server)
|
||||
})
|
||||
end
|
||||
|
||||
-- Starlark
|
||||
if utils.is_executable("starpls") then
|
||||
lspconfig.starpls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
end
|
||||
|
||||
-- Generic
|
||||
if utils.is_executable("harper-ls") then
|
||||
lspconfig.harper_ls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
end
|
||||
|
||||
if utils.is_executable("typos-lsp") then
|
||||
lspconfig.typos_lsp.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ let
|
|||
isEnabled = config.my.home.wm.windowManager == "i3";
|
||||
|
||||
terminal =
|
||||
if config.my.home.terminal.program != null
|
||||
then config.my.home.terminal.program
|
||||
if config.my.home.terminal.default != null
|
||||
then config.my.home.terminal.default
|
||||
else "i3-sensible-terminal";
|
||||
|
||||
alt = "Mod1"; # `Alt` key
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ in
|
|||
programs.rofi = {
|
||||
enable = true;
|
||||
|
||||
terminal = config.my.home.terminal.program; # null by default
|
||||
terminal = config.my.home.terminal.default; # null by default
|
||||
|
||||
package = pkgs.rofi.override {
|
||||
plugins = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -8,10 +8,6 @@ in
|
|||
|
||||
launchTmux = mkEnableOption "auto launch tmux at shell start";
|
||||
|
||||
completionSync = {
|
||||
enable = mkEnableOption "zsh-completion-sync plugin";
|
||||
};
|
||||
|
||||
notify = {
|
||||
enable = mkEnableOption "zsh-done notification";
|
||||
|
||||
|
|
@ -23,7 +19,7 @@ in
|
|||
"direnv reload"
|
||||
"fg"
|
||||
"git (?!push|pull|fetch)"
|
||||
"home-manager (?!switch|build)"
|
||||
"home-manager (?!switch|build|news)"
|
||||
"htop"
|
||||
"less"
|
||||
"man"
|
||||
|
|
@ -72,7 +68,7 @@ in
|
|||
plugins = [
|
||||
{
|
||||
name = "fast-syntax-highlighting";
|
||||
file = "share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh";
|
||||
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
|
||||
src = pkgs.zsh-fast-syntax-highlighting;
|
||||
}
|
||||
{
|
||||
|
|
@ -122,18 +118,6 @@ in
|
|||
};
|
||||
}
|
||||
|
||||
(lib.mkIf cfg.completionSync.enable {
|
||||
programs.zsh = {
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-completion-sync";
|
||||
file = "share/zsh-completion-sync/zsh-completion-sync.plugin.zsh";
|
||||
src = pkgs.zsh-completion-sync;
|
||||
}
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.notify.enable {
|
||||
programs.zsh = {
|
||||
plugins = [
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ in
|
|||
|
||||
my.services.backup = {
|
||||
paths = [
|
||||
(lib.removePrefix "file://" config.services.homebox.settings.HBOX_STORAGE_CONN_STRING)
|
||||
config.services.homebox.settings.HBOX_STORAGE_DATA
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ in
|
|||
BASE_URL = "https://mealie.${config.networking.domain}";
|
||||
TZ = config.time.timeZone;
|
||||
ALLOw_SIGNUP = "false";
|
||||
TOKEN_TIME = 24 * 180; # 180 days
|
||||
};
|
||||
|
||||
# Automatic PostgreSQL provisioning
|
||||
|
|
@ -54,12 +53,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
my.services.backup = {
|
||||
paths = [
|
||||
"/var/lib/mealie"
|
||||
];
|
||||
};
|
||||
|
||||
services.fail2ban.jails = {
|
||||
mealie = ''
|
||||
enabled = true
|
||||
|
|
|
|||
|
|
@ -16,12 +16,6 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.nextcloud = {
|
||||
extraApps = {
|
||||
inherit (config.services.nextcloud.package.packages.apps) richdocuments;
|
||||
};
|
||||
};
|
||||
|
||||
services.collabora-online = {
|
||||
enable = true;
|
||||
inherit (cfg) port;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ in
|
|||
config = lib.mkIf cfg.enable {
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud32;
|
||||
package = pkgs.nextcloud31;
|
||||
hostName = "nextcloud.${config.networking.domain}";
|
||||
home = "/var/lib/nextcloud";
|
||||
maxUploadSize = cfg.maxSize;
|
||||
|
|
@ -62,16 +62,6 @@ in
|
|||
# Allow using the push service without hard-coding my IP in the configuration
|
||||
bendDomainToLocalhost = true;
|
||||
};
|
||||
|
||||
extraApps = {
|
||||
inherit (config.services.nextcloud.package.packages.apps)
|
||||
calendar
|
||||
contacts
|
||||
deck
|
||||
tasks
|
||||
;
|
||||
# notify_push is automatically installed by the module
|
||||
};
|
||||
};
|
||||
|
||||
# The service above configures the domain, no need for my wrapper
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
systemd.services."acme-order-renew-${domain}" = {
|
||||
systemd.services."acme-${domain}" = {
|
||||
serviceConfig = {
|
||||
Environment = [
|
||||
# Since I do a "weird" setup with a wildcard CNAME
|
||||
|
|
|
|||
|
|
@ -71,14 +71,10 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# Transmission wants to eat *all* my RAM if left to its own devices
|
||||
systemd.services.transmission = {
|
||||
serviceConfig = {
|
||||
# Transmission wants to eat *all* my RAM if left to its own devices
|
||||
MemoryMax = "33%";
|
||||
# Avoid errors due to high number of open files.
|
||||
LimitNOFILE = 1048576;
|
||||
# Longer stop timeout to finish all torrents
|
||||
TimeoutStopSec = "5m";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue