Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
16f5a0a9a5
22
common/frogarized/default.nix
Normal file
22
common/frogarized/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
let
|
||||||
|
generator = pkgs.writers.writePython3 "frogarized"
|
||||||
|
{
|
||||||
|
libraries = [ pkgs.python3Packages.colorspacious ];
|
||||||
|
}
|
||||||
|
(builtins.readFile ./frogarized.py);
|
||||||
|
frogarized_json = polarity: pkgs.runCommand "frogarized-${polarity}.json" { } "${generator} --polarity ${polarity} --output json > $out";
|
||||||
|
frogarized_nix = polarity: builtins.fromJSON (builtins.readFile (frogarized_json polarity));
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
stylix = {
|
||||||
|
base16Scheme = frogarized_nix config.stylix.polarity;
|
||||||
|
# On purpose also enable without a DE because stylix complains otherwise
|
||||||
|
image = builtins.fetchurl {
|
||||||
|
url = "https://get.wallhere.com/photo/sunlight-abstract-minimalism-green-simple-circle-light-leaf-wave-material-line-wing-computer-wallpaper-font-close-up-macro-photography-124350.png";
|
||||||
|
sha256 = "sha256:1zfq3f3v34i45mi72pkfqphm8kbhczsg260xjfl6dbydy91d7y93";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
112
common/frogarized/frogarized.py
Executable file
112
common/frogarized/frogarized.py
Executable file
|
@ -0,0 +1,112 @@
|
||||||
|
import argparse
|
||||||
|
import json
|
||||||
|
|
||||||
|
import colorspacious
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
# Original values for the Solarized color scheme,
|
||||||
|
# created by Ethan Schoonover (https://ethanschoonover.com/solarized/)
|
||||||
|
SOLARIZED_LAB = np.array(
|
||||||
|
[
|
||||||
|
[15, -12, -12],
|
||||||
|
[20, -12, -12],
|
||||||
|
[45, -7, -7],
|
||||||
|
[50, -7, -7],
|
||||||
|
[60, -6, -3],
|
||||||
|
[65, -5, -2],
|
||||||
|
[92, -0, 10],
|
||||||
|
[97, 0, 10],
|
||||||
|
[50, 65, 45],
|
||||||
|
[50, 50, 55],
|
||||||
|
[60, 10, 65],
|
||||||
|
[60, -20, 65],
|
||||||
|
[60, -35, -5],
|
||||||
|
[55, -10, -45],
|
||||||
|
[50, 15, -45],
|
||||||
|
[50, 65, -5],
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# I couldn't get a perfect translation of Solarized L*a*b values into sRGB,
|
||||||
|
# so here is upstream's translation for reference
|
||||||
|
SOLARIZED_RGB = np.array(
|
||||||
|
[
|
||||||
|
[0, 43, 54],
|
||||||
|
[7, 54, 66],
|
||||||
|
[88, 110, 117],
|
||||||
|
[101, 123, 131],
|
||||||
|
[131, 148, 150],
|
||||||
|
[147, 161, 161],
|
||||||
|
[238, 232, 213],
|
||||||
|
[253, 246, 227],
|
||||||
|
[220, 50, 47],
|
||||||
|
[203, 75, 22],
|
||||||
|
[181, 137, 0],
|
||||||
|
[133, 153, 0],
|
||||||
|
[42, 161, 152],
|
||||||
|
[38, 139, 210],
|
||||||
|
[108, 113, 196],
|
||||||
|
[211, 54, 130],
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Parse arguments
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
description="Generate a base16-theme based derived from Solarized"
|
||||||
|
)
|
||||||
|
parser.add_argument("--source", choices=["lab", "rgb"], default="lab")
|
||||||
|
parser.add_argument("--lightness_factor", type=float, default=1.0)
|
||||||
|
parser.add_argument("--chroma-factor", type=float, default=1.0)
|
||||||
|
parser.add_argument("--hue_shift", type=float, default=-75.0)
|
||||||
|
parser.add_argument("--polarity", choices=["dark", "light"], default="dark")
|
||||||
|
parser.add_argument(
|
||||||
|
"--output", choices=["json", "truecolor"], default="truecolor"
|
||||||
|
)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
# Convert source to JCh color space
|
||||||
|
if args.source == "lab":
|
||||||
|
solarized_jch = colorspacious.cspace_convert(
|
||||||
|
SOLARIZED_LAB, "CIELab", "JCh"
|
||||||
|
)
|
||||||
|
elif args.source == "rgb":
|
||||||
|
solarized_jch = colorspacious.cspace_convert(
|
||||||
|
SOLARIZED_RGB, "sRGB255", "JCh"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Build frogarized theme
|
||||||
|
jch_factor = [args.lightness_factor, args.chroma_factor, 1]
|
||||||
|
jch_shift = [0, 0, args.hue_shift]
|
||||||
|
frogarzied_jch = np.vstack(
|
||||||
|
[solarized_jch[:8] * jch_factor + jch_shift, solarized_jch[8:]]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Convert frogarized to RGB
|
||||||
|
frogarized_srgb = colorspacious.cspace_convert(
|
||||||
|
frogarzied_jch, "JCh", "sRGB255"
|
||||||
|
)
|
||||||
|
frogarized_rgb = np.uint8(np.rint(np.clip(frogarized_srgb, 0, 255)))
|
||||||
|
if args.polarity == "light":
|
||||||
|
frogarized_rgb = np.vstack([frogarized_rgb[7::-1], frogarized_rgb[8:]])
|
||||||
|
|
||||||
|
# Output
|
||||||
|
palette = dict()
|
||||||
|
for i in range(16):
|
||||||
|
rgb = frogarized_rgb[i]
|
||||||
|
r, g, b = rgb
|
||||||
|
hex = f"#{r:02x}{g:02x}{b:02x}"
|
||||||
|
palette[f"base{i:02X}"] = hex
|
||||||
|
if args.output == "truecolor":
|
||||||
|
print(f"\033[48;2;{r};{g};{b}m{hex}\033[0m") # ]]
|
||||||
|
# treesitter is silly and will consider brackets in strings
|
||||||
|
# as indentation, hence the comment above
|
||||||
|
if args.output == "json":
|
||||||
|
scheme = palette.copy()
|
||||||
|
scheme.update(
|
||||||
|
{
|
||||||
|
"slug": f"frogarized-{args.polarity}",
|
||||||
|
"scheme": f"Frogarized {args.polarity.title()}",
|
||||||
|
"author": "Geoffrey Frogeye (with work from Ethan Schoonover)",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
print(json.dumps(scheme, indent=4))
|
|
@ -1,4 +1,4 @@
|
||||||
{ ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./options.nix
|
./options.nix
|
||||||
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
networking.hostName = "curacao";
|
networking.hostName = "curacao";
|
||||||
boot = {
|
boot = {
|
||||||
initrd.luks.reusePassphrases = true;
|
|
||||||
loader = {
|
loader = {
|
||||||
efi.efiSysMountPoint = "/efi";
|
efi.efiSysMountPoint = "/efi";
|
||||||
};
|
};
|
||||||
|
|
149
flake.lock
149
flake.lock
|
@ -311,6 +311,56 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-formatter-pack": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nix-on-droid",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nmd": "nmd",
|
||||||
|
"nmt": "nmt"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1666720474,
|
||||||
|
"narHash": "sha256-iWojjDS1D19zpeZXbBdjWb9MiKmVVFQCqtJmtTXgPx8=",
|
||||||
|
"owner": "Gerschtli",
|
||||||
|
"repo": "nix-formatter-pack",
|
||||||
|
"rev": "14876cc8fe94a3d329964ecb073b4c988c7b61f5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Gerschtli",
|
||||||
|
"repo": "nix-formatter-pack",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-on-droid": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": [
|
||||||
|
"home-manager"
|
||||||
|
],
|
||||||
|
"nix-formatter-pack": "nix-formatter-pack",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap",
|
||||||
|
"nmd": "nmd_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1688144254,
|
||||||
|
"narHash": "sha256-8KL1l/7eP2Zm1aJjdVaSOk0W5kTnJo9kcgW03gqWuiI=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-on-droid",
|
||||||
|
"rev": "2301e01d48c90b60751005317de7a84a51a87eb6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-23.05",
|
||||||
|
"repo": "nix-on-droid",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixgl": {
|
"nixgl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
|
@ -348,11 +398,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705183652,
|
"lastModified": 1706098335,
|
||||||
"narHash": "sha256-rnfkyUH0x72oHfiSDhuCHDHg3gFgF+lF8zkkg5Zihsw=",
|
"narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "428544ae95eec077c7f823b422afae5f174dee4b",
|
"rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -361,6 +411,22 @@
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-for-bootstrap": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1686921029,
|
||||||
|
"narHash": "sha256-J1bX9plPCFhTSh6E3TWn9XSxggBh/zDD4xigyaIQBy8=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685801374,
|
"lastModified": 1685801374,
|
||||||
|
@ -386,17 +452,80 @@
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1702044539,
|
"lastModified": 1705700164,
|
||||||
"narHash": "sha256-TNmEd6MipLxsrWromxqNfU4y17MoBr15QF7iEOagPy8=",
|
"narHash": "sha256-YAWtzc+5KDOHDGz/NBB7ysIusXbYYKtsbDOsRhSWKYk=",
|
||||||
"owner": "nix-community",
|
"owner": "GeoffreyFrogeye",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "c96d7b46d05a78e695ed1c725d1596b65509b4f9",
|
"rev": "2e5f7781fccba0472277cad5d383d10d50772234",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "GeoffreyFrogeye",
|
||||||
|
"ref": "frogeye-23.11",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nmd": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1666190571,
|
||||||
|
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nmd",
|
||||||
|
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
|
||||||
|
"type": "gitlab"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nmd",
|
||||||
|
"type": "gitlab"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nmd_2": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1666190571,
|
||||||
|
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nmd",
|
||||||
|
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
|
||||||
|
"type": "gitlab"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nmd",
|
||||||
|
"type": "gitlab"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nmt": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1648075362,
|
||||||
|
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nmt",
|
||||||
|
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
|
||||||
|
"type": "gitlab"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nmt",
|
||||||
|
"type": "gitlab"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nur": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705693547,
|
||||||
|
"narHash": "sha256-/6rVfbj1oaycjvYJeZRqL+ApzNL2FNf6pmfWuk+9Bhs=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "NUR",
|
||||||
|
"rev": "868aa9b52241ad7c8cb89cdd207f8d0149ebf95b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "NUR",
|
||||||
"rev": "c96d7b46d05a78e695ed1c725d1596b65509b4f9",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -429,10 +558,12 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nix-on-droid": "nix-on-droid",
|
||||||
"nixgl": "nixgl",
|
"nixgl": "nixgl",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
|
"nur": "nur",
|
||||||
"stylix": "stylix"
|
"stylix": "stylix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,8 +25,9 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixvim = {
|
nixvim = {
|
||||||
url = "github:nix-community/nixvim/c96d7b46d05a78e695ed1c725d1596b65509b4f9";
|
url = "github:GeoffreyFrogeye/nixvim/frogeye-23.11";
|
||||||
# 24.05 Anything after this commit works
|
# 24.05 Ensure merged: https://github.com/nix-community/nixvim/pull/953
|
||||||
|
# url = "github:nix-community/nixvim";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixgl = {
|
nixgl = {
|
||||||
|
@ -81,6 +82,7 @@
|
||||||
./os
|
./os
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
stylix.nixosModules.stylix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nixOnDroidModules.dotfiles = {
|
nixOnDroidModules.dotfiles = {
|
||||||
|
|
|
@ -58,6 +58,11 @@
|
||||||
newestFile = ''${pkgs.findutils}/bin/find -type f -printf '%T+ %p\n' | sort | tail'';
|
newestFile = ''${pkgs.findutils}/bin/find -type f -printf '%T+ %p\n' | sort | tail'';
|
||||||
oldestFile = ''${pkgs.findutils}/bin/find -type f -printf '%T+ %p\n' | sort | head'';
|
oldestFile = ''${pkgs.findutils}/bin/find -type f -printf '%T+ %p\n' | sort | head'';
|
||||||
};
|
};
|
||||||
|
thefuck = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
lsd = {
|
lsd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
../common/frogarized
|
||||||
../options.nix
|
../options.nix
|
||||||
./brightness
|
./brightness
|
||||||
./common.nix
|
./common.nix
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
# On purpose also enable without a DE because stylix complains otherwise
|
|
||||||
stylix.image = builtins.fetchurl {
|
|
||||||
url = "https://get.wallhere.com/photo/sunlight-abstract-minimalism-green-simple-circle-light-leaf-wave-material-line-wing-computer-wallpaper-font-close-up-macro-photography-124350.png";
|
|
||||||
sha256 = "sha256:1zfq3f3v34i45mi72pkfqphm8kbhczsg260xjfl6dbydy91d7y93";
|
|
||||||
};
|
|
||||||
# This correctly sets the background on some occasions, below does the rest
|
# This correctly sets the background on some occasions, below does the rest
|
||||||
programs.autorandr.hooks.postswitch = {
|
programs.autorandr.hooks.postswitch = {
|
||||||
background = "${pkgs.feh}/bin/feh --no-fehbg --bg-fill ${config.stylix.image}";
|
background = "${pkgs.feh}/bin/feh --no-fehbg --bg-fill ${config.stylix.image}";
|
||||||
|
|
|
@ -108,6 +108,7 @@
|
||||||
inv = invidious;
|
inv = invidious;
|
||||||
nixos = "https://search.nixos.org/options?channel=${config.home.version.release}&query={}";
|
nixos = "https://search.nixos.org/options?channel=${config.home.version.release}&query={}";
|
||||||
nixpkgs = "https://search.nixos.org/packages?channel=${config.home.version.release}&query={}";
|
nixpkgs = "https://search.nixos.org/packages?channel=${config.home.version.release}&query={}";
|
||||||
|
noogle = "https://noogle.dev/q?term={}";
|
||||||
npm = "https://www.npmjs.com/search?q={}";
|
npm = "https://www.npmjs.com/search?q={}";
|
||||||
os = nixos;
|
os = nixos;
|
||||||
pkgs = nixpkgs;
|
pkgs = nixpkgs;
|
||||||
|
|
|
@ -144,6 +144,8 @@ in
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
gnome.gedit
|
gnome.gedit
|
||||||
|
xfce.thunar
|
||||||
|
nomacs
|
||||||
feh
|
feh
|
||||||
zbar
|
zbar
|
||||||
zathura
|
zathura
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
./common.nix
|
./common.nix
|
||||||
./go.nix
|
./go.nix
|
||||||
./node.nix
|
./node.nix
|
||||||
|
./prose.nix
|
||||||
./python.nix
|
./python.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
38
hm/dev/prose.nix
Normal file
38
hm/dev/prose.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Prose is a programming language, fight me
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.frogeye.dev.prose {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
hunspell
|
||||||
|
hunspellDicts.en_GB-ize
|
||||||
|
hunspellDicts.en_US
|
||||||
|
hunspellDicts.fr-moderne
|
||||||
|
hunspellDicts.nl_NL
|
||||||
|
# TODO libreoffice-extension-languagetool or libreoffice-extension-grammalecte-fr
|
||||||
|
];
|
||||||
|
};
|
||||||
|
programs.nixvim = {
|
||||||
|
autoCmd = [
|
||||||
|
# vim-easy-align: Align Markdown tables with |
|
||||||
|
{ event = "FileType"; pattern = "markdown"; command = "vmap <Bar> :EasyAlign*<Bar><Enter>"; }
|
||||||
|
];
|
||||||
|
extraPlugins = with pkgs.vimPlugins; lib.optionals config.programs.pandoc.enable [
|
||||||
|
vim-pandoc # Pandoc-specific stuff because there's no LSP for it
|
||||||
|
vim-pandoc-syntax
|
||||||
|
];
|
||||||
|
extraConfigVim = lib.optionalString config.programs.pandoc.enable ''
|
||||||
|
let g:pandoc#modules#disabled = ["folding"]
|
||||||
|
let g:pandoc#spell#enabled = 0
|
||||||
|
let g:pandoc#syntax#conceal#use = 0
|
||||||
|
'';
|
||||||
|
plugins.none-ls = {
|
||||||
|
enable = true;
|
||||||
|
sources = {
|
||||||
|
code_actions.ltrs.enable = true;
|
||||||
|
diagnostics.ltrs.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -34,12 +34,6 @@
|
||||||
# TODO Convert existing LaTeX documents into using Nix build system
|
# TODO Convert existing LaTeX documents into using Nix build system
|
||||||
# texlive is big and not that much used, sooo
|
# texlive is big and not that much used, sooo
|
||||||
pdftk
|
pdftk
|
||||||
hunspell
|
|
||||||
hunspellDicts.en_GB-ize
|
|
||||||
hunspellDicts.en_US
|
|
||||||
hunspellDicts.fr-moderne
|
|
||||||
hunspellDicts.nl_NL
|
|
||||||
# TODO libreoffice-extension-languagetool or libreoffice-extension-grammalecte-fr
|
|
||||||
|
|
||||||
] ++ lib.optionals config.frogeye.desktop.xorg [
|
] ++ lib.optionals config.frogeye.desktop.xorg [
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,10 @@
|
||||||
else
|
else
|
||||||
(
|
(
|
||||||
cd "${r.path}"
|
cd "${r.path}"
|
||||||
${pkgs.git}/bin/git diff --quiet || echo "Repository is dirty!"
|
${pkgs.git}/bin/git --no-optional-locks diff --quiet || echo "Repository is dirty!"
|
||||||
${pkgs.git}/bin/git pull || true
|
${pkgs.git}/bin/git pull || true
|
||||||
${pkgs.git}/bin/git push || true
|
# Only push if there's something to push. Also prevents from trying to push on repos where we don't have rights.
|
||||||
|
(${pkgs.git}/bin/git --no-optional-locks status --porcelain -b --ignore-submodules | grep ' \[ahead [0-9]\+\]' && ${pkgs.git}/bin/git push) || true
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
'')
|
'')
|
||||||
|
|
|
@ -34,6 +34,10 @@
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
|
pinentryFlavor = "gnome3";
|
||||||
|
# gnome3 is nicer, but requires gcr as a dbus package.
|
||||||
|
# Which is in my NixOS config, and on non-NixOS too.
|
||||||
|
# It will fall back to ncurses when running in non-graphics mode.
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
let
|
|
||||||
basetheme = "solarized";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
# Setting a custom base16 theme via nixvim is required so feline works, and
|
|
||||||
# because stylix makes a config that otherwise only works with dark
|
|
||||||
# polarity.
|
|
||||||
programs.nixvim.colorschemes.base16.colorscheme = "${basetheme}-${config.frogeye.polarity}";
|
|
||||||
|
|
||||||
stylix = {
|
stylix = {
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/${basetheme}-${config.frogeye.polarity}.yaml";
|
polarity = config.frogeye.polarity;
|
||||||
fonts = {
|
fonts = {
|
||||||
monospace = {
|
monospace = {
|
||||||
package = pkgs.nerdfonts.override {
|
package = pkgs.nerdfonts.override {
|
||||||
|
|
|
@ -44,6 +44,12 @@ in
|
||||||
showbreak = "↪";
|
showbreak = "↪";
|
||||||
};
|
};
|
||||||
plugins = {
|
plugins = {
|
||||||
|
# Underline all instances of the underlined word
|
||||||
|
cursorline = {
|
||||||
|
enable = true;
|
||||||
|
cursorline.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
# Catches attention when cursor changed position
|
# Catches attention when cursor changed position
|
||||||
specs = {
|
specs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -61,7 +67,6 @@ in
|
||||||
};
|
};
|
||||||
# indent = true; # Not very working last time I tried apparently
|
# indent = true; # Not very working last time I tried apparently
|
||||||
};
|
};
|
||||||
# TODO Investigate https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
|
||||||
indent-blankline.enable = true; # Show indent guides
|
indent-blankline.enable = true; # Show indent guides
|
||||||
rainbow-delimiters.enable = true; # Randomly colore paired brackets
|
rainbow-delimiters.enable = true; # Randomly colore paired brackets
|
||||||
|
|
||||||
|
|
|
@ -1,48 +1,159 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
programs.nixvim = {
|
programs = {
|
||||||
|
# https://www.reddit.com/r/neovim/comments/mbj8m5/how_to_setup_ctrlshiftkey_mappings_in_neovim_and/
|
||||||
|
alacritty.settings.key_bindings = [
|
||||||
|
{ key = "H"; mods = "Control|Shift"; chars = "\\x1b[72;5u"; }
|
||||||
|
{ key = "L"; mods = "Control|Shift"; chars = "\\x1b[76;5u"; }
|
||||||
|
] ++ (map
|
||||||
|
(n: { key = "Key${builtins.toString n}"; mods = "Control"; chars = "\\x1b[${builtins.toString (48+n)};5u"; })
|
||||||
|
(lib.lists.range 0 9));
|
||||||
|
# Ctrl+<number> doesn't get interpreted, but Ctrl+Shift+<number> does, so let's use that
|
||||||
|
nixvim = {
|
||||||
autoCmd = [
|
autoCmd = [
|
||||||
# Turn off relativenumber only for insert mode
|
# Turn off relativenumber only for insert mode
|
||||||
{ event = "InsertEnter"; pattern = "*"; command = "set norelativenumber"; }
|
{ event = "InsertEnter"; pattern = "*"; command = "set norelativenumber"; }
|
||||||
{ event = "InsertLeave"; pattern = "*"; command = "set relativenumber"; }
|
{ event = "InsertLeave"; pattern = "*"; command = "set relativenumber"; }
|
||||||
];
|
];
|
||||||
extraConfigLua = builtins.readFile ./feline.lua;
|
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
nvim-scrollview # Scroll bar
|
nvim-scrollview # Scroll bar
|
||||||
# Status line
|
|
||||||
feline-nvim # Customizable status line.
|
|
||||||
# TODO Abandonned. Maybe use lualine?
|
|
||||||
];
|
];
|
||||||
keymaps = [
|
keymaps =
|
||||||
|
let
|
||||||
|
options = { silent = true; };
|
||||||
|
in
|
||||||
|
[
|
||||||
# barbar
|
# barbar
|
||||||
{ key = "<C-H>"; action = "<Cmd>BufferPrevious<CR>"; options = { silent = true; }; }
|
{ key = "gb"; action = "<Cmd>BufferPick<CR>"; inherit options; }
|
||||||
{ key = "<C-L>"; action = "<Cmd>BufferNext<CR>"; options = { silent = true; }; }
|
{ key = "<C-H>"; action = "<Cmd>BufferPrevious<CR>"; inherit options; }
|
||||||
# TODO https://www.reddit.com/r/neovim/comments/mbj8m5/how_to_setup_ctrlshiftkey_mappings_in_neovim_and/
|
{ key = "<C-L>"; action = "<Cmd>BufferNext<CR>"; inherit options; }
|
||||||
{ key = "<Space><C-H>"; action = "<Cmd>BufferMovePrevious<CR>"; options = { silent = true; }; }
|
{ key = "<C-S-H>"; action = "<Cmd>BufferMovePrevious<CR>"; inherit options; }
|
||||||
{ key = "<Space><C-L>"; action = "<Cmd>BufferMoveNext<CR>"; options = { silent = true; }; }
|
{ key = "<C-S-L>"; action = "<Cmd>BufferMoveNext<CR>"; inherit options; }
|
||||||
# TODO gotos don't work
|
{ key = "<C-0>"; action = "<Cmd>BufferLast<CR>"; inherit options; }
|
||||||
{ key = "<C-1>"; action = "<Cmd>BufferGoto 1<CR>"; options = { silent = true; }; }
|
] ++ (map
|
||||||
{ key = "<C-2>"; action = "<Cmd>BufferGoto 2<CR>"; options = { silent = true; }; }
|
(n: { key = "<C-${builtins.toString n}>"; action = "<Cmd>BufferGoto ${builtins.toString n}<CR>"; inherit options; })
|
||||||
{ key = "<C-3>"; action = "<Cmd>BufferGoto 3<CR>"; options = { silent = true; }; }
|
(lib.lists.range 1 9));
|
||||||
{ key = "<C-4>"; action = "<Cmd>BufferGoto 4<CR>"; options = { silent = true; }; }
|
|
||||||
{ key = "<C-5>"; action = "<Cmd>BufferGoto 5<CR>"; options = { silent = true; }; }
|
|
||||||
{ key = "<C-6>"; action = "<Cmd>BufferGoto 6<CR>"; options = { silent = true; }; }
|
|
||||||
{ key = "<C-7>"; action = "<Cmd>BufferGoto 7<CR>"; options = { silent = true; }; }
|
|
||||||
{ key = "<C-8>"; action = "<Cmd>BufferGoto 8<CR>"; options = { silent = true; }; }
|
|
||||||
{ key = "<C-9>"; action = "<Cmd>BufferGoto 9<CR>"; options = { silent = true; }; }
|
|
||||||
{ key = "<C-0>"; action = "<Cmd>BufferLast<CR>"; options = { silent = true; }; }
|
|
||||||
{ key = "gb"; action = "<Cmd>BufferPick<CR>"; options = { silent = true; }; }
|
|
||||||
# TODO Other useful options?
|
|
||||||
];
|
|
||||||
options = {
|
options = {
|
||||||
title = true;
|
showmode = false;
|
||||||
number = true;
|
number = true;
|
||||||
relativenumber = true;
|
relativenumber = true;
|
||||||
|
title = true;
|
||||||
};
|
};
|
||||||
plugins = {
|
plugins = {
|
||||||
# Tabline
|
# Tabline
|
||||||
barbar.enable = true;
|
barbar.enable = true;
|
||||||
|
# TODO Reload make it use the preset colorscheme
|
||||||
|
# Status line
|
||||||
|
lualine = with config.lib.stylix.colors.withHashtag; let
|
||||||
|
normal = { fg = base05; bg = base01; };
|
||||||
|
inverted = { fg = base00; bg = base03; };
|
||||||
|
normal_ina = { fg = base02; bg = base01; };
|
||||||
|
inverted_ina = { fg = base00; bg = base02; };
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
enable = true;
|
||||||
|
inactiveSections = sections;
|
||||||
|
sections = {
|
||||||
|
lualine_a = [{
|
||||||
|
name = ''string.format('%d', vim.fn.line('$'))'';
|
||||||
|
}];
|
||||||
|
lualine_b = [
|
||||||
|
"mode"
|
||||||
|
];
|
||||||
|
lualine_c = [{
|
||||||
|
name = "filename";
|
||||||
|
color = {
|
||||||
|
__raw = ''
|
||||||
|
function(section)
|
||||||
|
return { fg = vim.bo.modified and '${base08}' or '${normal.fg}' }
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
extraConfig = {
|
||||||
|
path = 1; # Relative path
|
||||||
|
symbols = {
|
||||||
|
modified = "●";
|
||||||
|
newfile = "";
|
||||||
|
readonly = "";
|
||||||
|
unnamed = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
"location"];
|
||||||
|
lualine_x = [{
|
||||||
|
name = ''(next(vim.lsp.buf_get_clients()) == nil) and " " or ""'';
|
||||||
|
extraConfig.separator = { left = ""; right = ""; };
|
||||||
|
}] ++ (lib.mapAttrsToList
|
||||||
|
(diag_name: diag_color: {
|
||||||
|
name = "diagnostics";
|
||||||
|
extraConfig = {
|
||||||
|
color.bg = diag_color;
|
||||||
|
colored = false;
|
||||||
|
separator = { left = ""; right = ""; };
|
||||||
|
sections = [ diag_name ];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
{
|
||||||
|
error = base08;
|
||||||
|
warn = base0A;
|
||||||
|
hint = base0C;
|
||||||
|
info = base0B;
|
||||||
|
});
|
||||||
|
lualine_y = [{
|
||||||
|
name = "diff";
|
||||||
|
extraConfig = {
|
||||||
|
diff_color = {
|
||||||
|
added.fg = base0B;
|
||||||
|
modified.fg = base0A;
|
||||||
|
removed.fg = base08;
|
||||||
|
};
|
||||||
|
symbols = {
|
||||||
|
added = " ";
|
||||||
|
modified = " ";
|
||||||
|
removed = " ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
"branch"];
|
||||||
|
lualine_z = [
|
||||||
|
"filetype"
|
||||||
|
"fileformat"
|
||||||
|
"encoding"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
theme = (lib.mapAttrs
|
||||||
|
(mode_name: mode_color: {
|
||||||
|
a = inverted;
|
||||||
|
b = inverted // { bg = mode_color; gui = "bold"; };
|
||||||
|
c = normal;
|
||||||
|
x = inverted;
|
||||||
|
y = normal;
|
||||||
|
z = inverted // { bg = mode_color; };
|
||||||
|
})
|
||||||
|
{
|
||||||
|
normal = base0D;
|
||||||
|
insert = base0B;
|
||||||
|
visual = base0F;
|
||||||
|
replace = base08;
|
||||||
|
command = base0E;
|
||||||
|
}) // {
|
||||||
|
inactive = {
|
||||||
|
a = inverted_ina;
|
||||||
|
b = normal_ina // { bg = base00; gui = "bold"; };
|
||||||
|
c = normal_ina;
|
||||||
|
x = inverted_ina;
|
||||||
|
y = normal_ina;
|
||||||
|
z = normal_ina // { bg = base00; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Show context on top if scrolled out
|
||||||
|
treesitter-context = {
|
||||||
|
enable = true;
|
||||||
|
maxLines = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
vim = "nvim";
|
vim = "nvim";
|
||||||
};
|
};
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
|
# Required, otherwise light mode becomes a default dark theme.
|
||||||
|
colorschemes.base16.colorscheme = "solarized-${config.stylix.polarity}";
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
ignorecase = true;
|
ignorecase = true;
|
||||||
smartcase = true;
|
smartcase = true;
|
||||||
|
@ -50,13 +53,6 @@
|
||||||
gH = "command_history";
|
gH = "command_history";
|
||||||
gS = "search_history";
|
gS = "search_history";
|
||||||
gC = "commands";
|
gC = "commands";
|
||||||
gr = "lsp_references";
|
|
||||||
ge = "diagnostics";
|
|
||||||
# ga = "lsp_code_actions";
|
|
||||||
# gE = "lsp_workspace_diagnostics";
|
|
||||||
# TODO Above makes nvim crash on startup, action is not provided
|
|
||||||
gd = "lsp_definitions";
|
|
||||||
gs = "lsp_document_symbols";
|
|
||||||
};
|
};
|
||||||
defaults = {
|
defaults = {
|
||||||
vimgrep_arguments = [
|
vimgrep_arguments = [
|
||||||
|
@ -77,16 +73,14 @@
|
||||||
overrideGenericSorter = true;
|
overrideGenericSorter = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# TODO Go to any symbol in the current working directory, for when LSP doesn't support it.
|
||||||
|
# Or at least something to live_grep the curent word.
|
||||||
|
|
||||||
# Surrounding pairs
|
# Surrounding pairs
|
||||||
surround.enable = true; # Change surrounding pairs (e.g. brackets, quotes)
|
surround.enable = true; # Change surrounding pairs (e.g. brackets, quotes)
|
||||||
|
|
||||||
undotree.enable = true; # Navigate edition history
|
undotree.enable = true; # Navigate edition history
|
||||||
|
|
||||||
# Git
|
|
||||||
fugitive.enable = true; # Git basics
|
|
||||||
gitsigns.enable = true; # Show changed lines in the gutter
|
|
||||||
|
|
||||||
};
|
};
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
# Search/replace
|
# Search/replace
|
||||||
|
@ -96,62 +90,20 @@
|
||||||
# Surrounding pairs
|
# Surrounding pairs
|
||||||
targets-vim # Better interaction with surrounding pairs
|
targets-vim # Better interaction with surrounding pairs
|
||||||
|
|
||||||
# Registers
|
|
||||||
registers-nvim # Show register content when pressing "
|
|
||||||
# TODO Doesn't work. Didn't work on Arch either
|
|
||||||
|
|
||||||
# Tags
|
|
||||||
vim-gutentags # Generate tags
|
|
||||||
symbols-outline-nvim # Show a symbol panel on the right
|
|
||||||
# TODO Fails on startup. Same on Arch. Config issue?
|
|
||||||
|
|
||||||
# Git
|
|
||||||
fugitive-gitlab-vim # Open files in GitLab
|
|
||||||
# TODO Connect it!
|
|
||||||
|
|
||||||
# Language-specific
|
# Language-specific
|
||||||
tcomment_vim # Language-aware (un)commenting
|
tcomment_vim # Language-aware (un)commenting
|
||||||
] ++ lib.optionals config.frogeye.extra [
|
|
||||||
vim-LanguageTool # Check grammar for human languages
|
|
||||||
] ++ lib.optionals config.programs.pandoc.enable [
|
|
||||||
vim-pandoc # Pandoc-specific stuff because there's no LSP for it
|
|
||||||
vim-pandoc-syntax
|
|
||||||
] ++ lib.optionals config.frogeye.dev.ansible [
|
] ++ lib.optionals config.frogeye.dev.ansible [
|
||||||
ansible-vim # TODO Doesn't have snippets
|
ansible-vim
|
||||||
|
# Doesn't generate snippets, but those are for UltiSnip anyways
|
||||||
];
|
];
|
||||||
extraConfigLua = builtins.readFile ./symbols-outline-nvim.lua;
|
|
||||||
extraConfigVim = ''
|
extraConfigVim = ''
|
||||||
" GENERAL
|
|
||||||
|
|
||||||
" Avoid showing message extra message when using completion
|
" Avoid showing message extra message when using completion
|
||||||
set shortmess+=c
|
set shortmess+=c
|
||||||
|
|
||||||
command Reload source $MYVIMRC
|
|
||||||
|
|
||||||
" PLUGINS
|
|
||||||
|
|
||||||
" vim-gutentags
|
|
||||||
let g:gutentags_cache_dir = expand('~/.cache/nvim/tags')
|
|
||||||
'' + lib.optionalString config.frogeye.extra ''
|
|
||||||
" languagetool
|
|
||||||
let g:languagetool_cmd = "${pkgs.languagetool}/bin/languagetool-commandline"
|
|
||||||
" TODO Doesn't work
|
|
||||||
|
|
||||||
'' + lib.optionalString config.programs.pandoc.enable ''
|
|
||||||
" vim-pandox
|
|
||||||
let g:pandoc#modules#disabled = ["folding"]
|
|
||||||
let g:pandoc#spell#enabled = 0
|
|
||||||
let g:pandoc#syntax#conceal#use = 0
|
|
||||||
|
|
||||||
'';
|
'';
|
||||||
autoCmd = [
|
|
||||||
# vim-easy-align: Align Markdown tables
|
|
||||||
{ event = "FileType"; pattern = "markdown"; command = "vmap <Bar> :EasyAlign*<Bar><Enter>"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
userCommands = {
|
userCommands = {
|
||||||
# Reload = { command = "source $MYVIRMC"; };
|
Reload = { command = "source ${config.xdg.configHome}/nvim/init.lua"; force = false; };
|
||||||
# TODO Is not working, options is set to nil even though it shouldn't
|
# 24.05 force=false was for https://github.com/nix-community/nixvim/issues/954
|
||||||
};
|
};
|
||||||
|
|
||||||
keymaps = [
|
keymaps = [
|
||||||
|
@ -175,9 +127,6 @@
|
||||||
|
|
||||||
# PLUGINS
|
# PLUGINS
|
||||||
|
|
||||||
# symbols-outline-nvim
|
|
||||||
{ key = "<Space>s"; action = "<Cmd>SymbolsOutline<CR>"; options = { silent = true; }; }
|
|
||||||
|
|
||||||
# undotree
|
# undotree
|
||||||
{ key = "<Space>u"; action = "<Cmd>UndotreeToggle<CR>"; options = { silent = true; }; }
|
{ key = "<Space>u"; action = "<Cmd>UndotreeToggle<CR>"; options = { silent = true; }; }
|
||||||
|
|
||||||
|
@ -189,6 +138,7 @@
|
||||||
./code.nix
|
./code.nix
|
||||||
./completion.nix
|
./completion.nix
|
||||||
./decoration.nix
|
./decoration.nix
|
||||||
|
./git.nix
|
||||||
./lsp.nix
|
./lsp.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,165 +0,0 @@
|
||||||
vim.cmd([[
|
|
||||||
set noshowmode
|
|
||||||
set laststatus=2
|
|
||||||
]])
|
|
||||||
local base16_colors = require('base16-colorscheme').colors
|
|
||||||
local vi_mode_utils = require('feline.providers.vi_mode')
|
|
||||||
local lsp = require('feline.providers.lsp')
|
|
||||||
require('feline').setup({
|
|
||||||
default_bg = 'base01',
|
|
||||||
default_fg = 'base04',
|
|
||||||
theme = {
|
|
||||||
base00 = base16_colors.base00,
|
|
||||||
base01 = base16_colors.base01,
|
|
||||||
base02 = base16_colors.base02,
|
|
||||||
base03 = base16_colors.base03,
|
|
||||||
base04 = base16_colors.base04,
|
|
||||||
base05 = base16_colors.base05,
|
|
||||||
base06 = base16_colors.base06,
|
|
||||||
base07 = base16_colors.base07,
|
|
||||||
base08 = base16_colors.base08,
|
|
||||||
base09 = base16_colors.base09,
|
|
||||||
base0A = base16_colors.base0A,
|
|
||||||
base0B = base16_colors.base0B,
|
|
||||||
base0C = base16_colors.base0C,
|
|
||||||
base0D = base16_colors.base0D,
|
|
||||||
base0E = base16_colors.base0E,
|
|
||||||
base0F = base16_colors.base0F,
|
|
||||||
},
|
|
||||||
components = {
|
|
||||||
active = {
|
|
||||||
{
|
|
||||||
{
|
|
||||||
provider = function() return string.format(' %d ', vim.fn.line('$')) end,
|
|
||||||
-- If you can, make it depend on the actual bar size
|
|
||||||
left_sep = {
|
|
||||||
{str = 'block', fg = 'base05'}
|
|
||||||
},
|
|
||||||
hl = {
|
|
||||||
fg = 'base01',
|
|
||||||
bg = 'base04',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider = 'vi_mode',
|
|
||||||
hl = function()
|
|
||||||
return {
|
|
||||||
name = vi_mode_utils.get_mode_highlight_name(),
|
|
||||||
bg = vi_mode_utils.get_mode_color(),
|
|
||||||
fg = 'white',
|
|
||||||
style = 'bold',
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
left_sep = {'█'},
|
|
||||||
right_sep = {'█'},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider='',
|
|
||||||
hl = function()
|
|
||||||
return {
|
|
||||||
bg = vi_mode_utils.get_mode_color(),
|
|
||||||
fg = (vim.bo.modified and 'base09') or 'base0D',
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider = 'file_info',
|
|
||||||
type = 'relative',
|
|
||||||
hl = function()
|
|
||||||
return {
|
|
||||||
fg = 'base06',
|
|
||||||
bg = (vim.bo.modified and 'base09') or 'base0D',
|
|
||||||
style = 'bold',
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
left_sep = {'█'},
|
|
||||||
right_sep = {'█'},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider='',
|
|
||||||
hl = function()
|
|
||||||
return {
|
|
||||||
bg = 'base02',
|
|
||||||
fg = (vim.bo.modified and 'base09') or 'base0D',
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider = 'position',
|
|
||||||
hl = { fg = 'base05', bg = 'base02' },
|
|
||||||
right_sep = {'█'},
|
|
||||||
},
|
|
||||||
-- If it miraculously became easy to do, add LSP position here
|
|
||||||
{
|
|
||||||
provider='',
|
|
||||||
hl = { bg = 'base01', fg = 'base02' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{
|
|
||||||
provider='',
|
|
||||||
hl = { bg = 'base03', fg = 'base01', },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider='z',
|
|
||||||
enabled = function() return next(vim.lsp.buf_get_clients()) == nil end,
|
|
||||||
hl = { bg = 'base03', fg = 'base01', },
|
|
||||||
left_sep = '█',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider = 'diagnostic_errors',
|
|
||||||
enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.ERROR) end,
|
|
||||||
hl = { fg = 'red', bg = 'base03', },
|
|
||||||
left_sep = '█',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider = 'diagnostic_warnings',
|
|
||||||
enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.WARN) end,
|
|
||||||
hl = { fg = 'yellow', bg = 'base03', },
|
|
||||||
left_sep = '█',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider = 'diagnostic_hints',
|
|
||||||
enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.HINT) end,
|
|
||||||
hl = { fg = 'cyan', bg = 'base03', },
|
|
||||||
left_sep = '█',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider = 'diagnostic_info',
|
|
||||||
enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.INFO) end,
|
|
||||||
hl = { fg = 'skyblue', bg = 'base03', },
|
|
||||||
left_sep = '█',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider='█',
|
|
||||||
hl = { bg = 'base02', fg = 'base03', },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider = 'git_diff_added',
|
|
||||||
hl = { fg = 'green', bg = 'base02', },
|
|
||||||
left_sep = '█',
|
|
||||||
enabled = function() return vim.b.gitsigns_status_dict end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider = 'git_diff_changed',
|
|
||||||
hl = { fg = 'orange', bg = 'base02', },
|
|
||||||
left_sep = '█',
|
|
||||||
enabled = function() return vim.b.gitsigns_status_dict end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider = 'git_diff_removed',
|
|
||||||
hl = { fg = 'red', bg = 'base02', },
|
|
||||||
left_sep = '█',
|
|
||||||
enabled = function() return vim.b.gitsigns_status_dict end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provider = 'git_branch',
|
|
||||||
hl = { fg = 'base05', bg = 'base02', style = 'bold', },
|
|
||||||
right_sep = '█',
|
|
||||||
left_sep = '█',
|
|
||||||
enabled = function() return vim.b.gitsigns_status_dict end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
})
|
|
31
hm/vim/git.nix
Normal file
31
hm/vim/git.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
programs.nixvim = {
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = [ "n" ];
|
||||||
|
key = "gG";
|
||||||
|
action = ''<cmd>lua require"gitlinker".get_buf_range_url("n")<cr>'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = [ "v" ];
|
||||||
|
key = "gG";
|
||||||
|
action = ''<cmd>lua require"gitlinker".get_buf_range_url("v")<cr>'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
plugins = {
|
||||||
|
fugitive.enable = true; # Git basics
|
||||||
|
gitsigns.enable = true; # Show changed lines in the gutter
|
||||||
|
gitlinker = {
|
||||||
|
enable = true; # Copy URL of forge corresponding to cursor
|
||||||
|
callbacks = {
|
||||||
|
"code.techinc.nl" = "get_gitea_type_url";
|
||||||
|
"git.frogeye.fr" = "get_gitea_type_url";
|
||||||
|
};
|
||||||
|
mappings = null; # This option doesn't work, hence manual mappings
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -12,25 +12,28 @@
|
||||||
lsp_signature-nvim # Show argument definition when typing a function
|
lsp_signature-nvim # Show argument definition when typing a function
|
||||||
];
|
];
|
||||||
keymaps = [
|
keymaps = [
|
||||||
# barbar
|
{
|
||||||
{ key = "<C-H>"; action = "<Cmd>BufferPrevious<CR>"; options = { silent = true; }; }
|
mode = "n";
|
||||||
{ key = "<C-L>"; action = "<Cmd>BufferNext<CR>"; options = { silent = true; }; }
|
key = "<space>wl";
|
||||||
# TODO https://www.reddit.com/r/neovim/comments/mbj8m5/how_to_setup_ctrlshiftkey_mappings_in_neovim_and/
|
lua = true;
|
||||||
{ key = "<Space><C-H>"; action = "<Cmd>BufferMovePrevious<CR>"; options = { silent = true; }; }
|
action = ''
|
||||||
{ key = "<Space><C-L>"; action = "<Cmd>BufferMoveNext<CR>"; options = { silent = true; }; }
|
function()
|
||||||
# TODO gotos don't work
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
{ key = "<C-1>"; action = "<Cmd>BufferGoto 1<CR>"; options = { silent = true; }; }
|
end
|
||||||
{ key = "<C-2>"; action = "<Cmd>BufferGoto 2<CR>"; options = { silent = true; }; }
|
'';
|
||||||
{ key = "<C-3>"; action = "<Cmd>BufferGoto 3<CR>"; options = { silent = true; }; }
|
options.silent = true;
|
||||||
{ key = "<C-4>"; action = "<Cmd>BufferGoto 4<CR>"; options = { silent = true; }; }
|
}
|
||||||
{ key = "<C-5>"; action = "<Cmd>BufferGoto 5<CR>"; options = { silent = true; }; }
|
{
|
||||||
{ key = "<C-6>"; action = "<Cmd>BufferGoto 6<CR>"; options = { silent = true; }; }
|
mode = "n";
|
||||||
{ key = "<C-7>"; action = "<Cmd>BufferGoto 7<CR>"; options = { silent = true; }; }
|
key = "<space>f";
|
||||||
{ key = "<C-8>"; action = "<Cmd>BufferGoto 8<CR>"; options = { silent = true; }; }
|
lua = true;
|
||||||
{ key = "<C-9>"; action = "<Cmd>BufferGoto 9<CR>"; options = { silent = true; }; }
|
action = ''
|
||||||
{ key = "<C-0>"; action = "<Cmd>BufferLast<CR>"; options = { silent = true; }; }
|
function()
|
||||||
{ key = "gb"; action = "<Cmd>BufferPick<CR>"; options = { silent = true; }; }
|
vim.lsp.buf.format { async = true }
|
||||||
# TODO Other useful options?
|
end
|
||||||
|
'';
|
||||||
|
options.silent = true;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
plugins = {
|
plugins = {
|
||||||
# Language Server
|
# Language Server
|
||||||
|
@ -50,17 +53,18 @@
|
||||||
"<C-S-k>" = "signature_help";
|
"<C-S-k>" = "signature_help";
|
||||||
"<space>wa" = "add_workspace_folder";
|
"<space>wa" = "add_workspace_folder";
|
||||||
"<space>wr" = "remove_workspace_folder";
|
"<space>wr" = "remove_workspace_folder";
|
||||||
# "<space>wl" = "list_workspace_folder";
|
|
||||||
# TODO Full thing was function() print(vim.inspect(vim.lsp.buf.list_workspace_folder())) end but not sure I'm ever really using this
|
|
||||||
# Also makes nvim crash like this, so uncommented
|
|
||||||
"<space>D" = "type_definition";
|
"<space>D" = "type_definition";
|
||||||
"<space>rn" = "rename";
|
"<space>rn" = "rename";
|
||||||
"<space>f" = "format";
|
"<space>ca" = "code_action"; # Reference has a binding for visual mode, but it doesn't work
|
||||||
# TODO Full thing was function() vim.lsp.buf.format { async = true } end, so async while this isn't
|
|
||||||
# Maybe replace this with lsp-format?
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
telescope.keymaps = {
|
||||||
|
gr = "lsp_references";
|
||||||
|
ge = "diagnostics";
|
||||||
|
gd = "lsp_definitions";
|
||||||
|
gs = "lsp_document_symbols";
|
||||||
|
};
|
||||||
nvim-lightbulb = {
|
nvim-lightbulb = {
|
||||||
# Shows a lightbulb whenever a codeAction is available under the cursor
|
# Shows a lightbulb whenever a codeAction is available under the cursor
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
vim.g.symbols_outline = {
|
|
||||||
highlight_hovered_item = true,
|
|
||||||
show_guides = true,
|
|
||||||
auto_preview = true,
|
|
||||||
position = 'right',
|
|
||||||
show_numbers = false,
|
|
||||||
show_relative_numbers = false,
|
|
||||||
show_symbol_details = true,
|
|
||||||
keymaps = {
|
|
||||||
close = "<Esc>",
|
|
||||||
goto_location = "<Cr>",
|
|
||||||
focus_location = "o",
|
|
||||||
hover_symbol = "<C-space>",
|
|
||||||
rename_symbol = "r",
|
|
||||||
code_actions = "a",
|
|
||||||
},
|
|
||||||
lsp_blacklist = {},
|
|
||||||
}
|
|
||||||
-- TODO Should be hierarchical, doesn't seem to be :/
|
|
|
@ -40,6 +40,7 @@
|
||||||
node = lib.mkEnableOption "NodeJS dev stuff";
|
node = lib.mkEnableOption "NodeJS dev stuff";
|
||||||
perl = lib.mkEnableOption "Perl dev stuff";
|
perl = lib.mkEnableOption "Perl dev stuff";
|
||||||
php = lib.mkEnableOption "PHP dev stuff";
|
php = lib.mkEnableOption "PHP dev stuff";
|
||||||
|
prose = lib.mkEnableOption "Writing stuff";
|
||||||
python = lib.mkEnableOption "Python dev stuff";
|
python = lib.mkEnableOption "Python dev stuff";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -47,7 +48,7 @@
|
||||||
config = {
|
config = {
|
||||||
frogeye = {
|
frogeye = {
|
||||||
dev = {
|
dev = {
|
||||||
ansible = lib.mkDefault true;
|
prose = lib.mkDefault true;
|
||||||
python = lib.mkDefault true;
|
python = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../options.nix
|
../options.nix
|
||||||
|
../common/frogarized
|
||||||
./battery.nix
|
./battery.nix
|
||||||
./ccc
|
./ccc
|
||||||
./common.nix
|
./common.nix
|
||||||
|
@ -9,6 +10,7 @@
|
||||||
./gaming
|
./gaming
|
||||||
./geoffrey.nix
|
./geoffrey.nix
|
||||||
./printing
|
./printing
|
||||||
|
./style
|
||||||
./wireless.nix
|
./wireless.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,5 +41,8 @@
|
||||||
pulseaudio.enable = true;
|
pulseaudio.enable = true;
|
||||||
# TODO Try pipewire
|
# TODO Try pipewire
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# So we can use gnome3 pinentry flavour
|
||||||
|
services.dbus.packages = [ pkgs.gcr ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
users.geoffrey = { pkgs, ... }: {
|
users.geoffrey = { pkgs, ... }: {
|
||||||
frogeye = config.frogeye;
|
frogeye = lib.mkDefault config.frogeye;
|
||||||
|
# Propagating options that way doesn't seem to conserve priority info,
|
||||||
|
# this is not great. Hopefully mkDefault resolve conflicts.
|
||||||
};
|
};
|
||||||
# Makes VMs able to re-run
|
# Makes VMs able to re-run
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
|
|
25
os/style/bg.svg
Normal file
25
os/style/bg.svg
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1" height="1" enable-background="new" version="1.1" viewBox="0 0 1 1" xml:space="preserve">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="a" x1="559.8" x2="559.8" y1=".0125" y2="834.89" gradientTransform="matrix(.002 0 0 .002 -2962.3 128.19)" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#CCE474" offset="0"/>
|
||||||
|
<stop stop-color="#CBE372" offset=".21961"/>
|
||||||
|
<stop stop-color="#C8E26B" offset=".29804"/>
|
||||||
|
<stop stop-color="#C3DE60" offset=".35686"/>
|
||||||
|
<stop stop-color="#BBD94F" offset=".4"/>
|
||||||
|
<stop stop-color="#B1D339" offset=".43922"/>
|
||||||
|
<stop stop-color="#A4CB1E" offset=".47451"/>
|
||||||
|
<stop stop-color="#99C405" offset=".49804"/>
|
||||||
|
<stop stop-color="#A2CC18" offset=".54118"/>
|
||||||
|
<stop stop-color="#AAD329" offset=".59216"/>
|
||||||
|
<stop stop-color="#B0D834" offset=".6549"/>
|
||||||
|
<stop stop-color="#B3DB3B" offset=".74902"/>
|
||||||
|
<stop stop-color="#B4DC3D" offset="1"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<g transform="translate(559.29 -691.3)">
|
||||||
|
<g transform="matrix(.44657 0 0 .59891 763.59 614.53)">
|
||||||
|
<path d="m-2960.1 129.86v-1.6697h-2.2393v1.6697z" fill="url(#a)"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
19
os/style/default.nix
Normal file
19
os/style/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
boot = {
|
||||||
|
plymouth.enable = true;
|
||||||
|
initrd.systemd.enable = true;
|
||||||
|
};
|
||||||
|
stylix = {
|
||||||
|
homeManagerIntegration.autoImport = false; # Makes config reuse easier
|
||||||
|
polarity = "dark";
|
||||||
|
targets.plymouth.logo = pkgs.runCommand "flower.png" { } "${pkgs.inkscape}/bin/inkscape ${pkgs.substituteAll {
|
||||||
|
src = ./flower.svg;
|
||||||
|
color = config.lib.stylix.colors.withHashtag.base07;
|
||||||
|
}} -w 256 -o $out";
|
||||||
|
# UPST Default grub font is sansSerif, which doesn't work.
|
||||||
|
# Maybe because people patch mono with nerdfonts and that isn't compatible?
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
8
os/style/flower.svg
Normal file
8
os/style/flower.svg
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32.638" height="33.067" enable-background="new" version="1.1" viewBox="0 0 32.638 33.067" xml:space="preserve">
|
||||||
|
<g transform="translate(587.12 -740.77)">
|
||||||
|
<g transform="matrix(.57741 0 0 -.57741 -575.42 770.38)" fill="@color@">
|
||||||
|
<path d="m0 0c-0.977-2.42-2.724-3.975-5.139-3.018-2.419 0.957-3.087 3.466-2.009 7.53 2.051 6.483 8.06 10.28 14.171 15.72 2.007-7.532 4.018-15.062 1.968-21.548-0.205-3.289-3.595-4.748-5.24-4.662-2.415 0.957-3.187 1.824-3.751 5.978m-15.43 17.332c-3.287 0.177-4.829 1.911-4.729 3.555-0.669 2.508 1.951 4.84 4.466 5.531 6.68 1.284 13.925-1.586 21.172-4.454-6.111-5.439-11.448-11.744-17.254-12.254-3.389-1.463-6.577 0.359-7.25 2.872-0.668 2.506 0.204 3.284 3.595 4.75m8.001 22.651c-1.44 3.377-2.109 5.888-0.364 7.443 1.749 1.551 4.934-0.271 7.246-2.87 3.858-4.332 5.868-11.865 7.002-20.171-8.118 2.091-16.238 4.184-20.096 8.515-2.313 2.601-2.882 6.753-1.135 8.307 1.746 1.555 4.161 0.598 7.347-1.224m23.428 5.321c0.976 2.422 2.724 3.973 5.137 3.018 2.412-0.956 3.084-3.466 2.01-7.53-2.052-6.485-8.063-10.28-14.172-15.721-2.011 7.531-4.019 15.064-1.968 21.547 0.205 3.289 3.591 4.75 5.236 4.664 2.415-0.96 3.19-1.825 3.757-5.978m15.427-17.333c3.284-0.177 4.831-1.909 4.729-3.554 0.667-2.509-1.95-4.841-4.466-5.529-6.68-1.285-13.927 1.583-21.173 4.453 6.111 5.438 11.45 11.744 17.257 12.253 3.389 1.463 6.574-0.36 7.245-2.87 0.67-2.509-0.204-3.287-3.592-4.753m-8.002-22.651c1.439-3.378 2.113-5.885 0.368-7.442-1.747-1.552-4.935 0.27-7.251 2.87-3.857 4.332-5.865 11.864-6.999 20.173 8.117-2.094 16.237-4.185 20.095-8.518 2.313-2.599 2.883-6.754 1.136-8.309-1.746-1.554-4.161-0.595-7.349 1.226" fill="@color@" fill-rule="evenodd"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in a new issue