less
This commit is contained in:
parent
194cefe340
commit
ac7e310e00
9 changed files with 181 additions and 111 deletions
|
|
@ -3,6 +3,7 @@ inputs@{
|
|||
deploy-rs,
|
||||
self,
|
||||
pkgsForSystem,
|
||||
unstablePkgsForSystem,
|
||||
...
|
||||
}:
|
||||
|
||||
|
|
@ -63,6 +64,7 @@ rec {
|
|||
}:
|
||||
home-only: {
|
||||
pkgs = pkgsForSystem system;
|
||||
pkgs-unstable = unstablePkgsForSystem system;
|
||||
flakes = inputs;
|
||||
inherit inputs;
|
||||
inherit (inputs.secrets.packages.${system}) secrets;
|
||||
|
|
|
|||
25
flake.lock
generated
25
flake.lock
generated
|
|
@ -718,11 +718,11 @@
|
|||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773832951,
|
||||
"narHash": "sha256-qzWEWTC1l7aofSoYoW9Zckh/gNLK8pbjiUuRl9qRc7k=",
|
||||
"lastModified": 1774289893,
|
||||
"narHash": "sha256-si2LHcNiLuF01yOuaUs90p1U09hhaketA8tyanWwiP0=",
|
||||
"owner": "jdonszelmann",
|
||||
"repo": "homepage",
|
||||
"rev": "92cb1f2f367d52a64bf088f413aacb6446642794",
|
||||
"rev": "635f900ce31b7f901da33c6fa830a2e7c116552f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -1123,6 +1123,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1766185129,
|
||||
"narHash": "sha256-ldujgxS7lslpNf3oV2DHCEgNutfzEtMPv5O6l22XHNY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5d9ea8caac0dda3bc216047d29943b8a59e431b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5d9ea8caac0dda3bc216047d29943b8a59e431b7",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_10": {
|
||||
"locked": {
|
||||
"lastModified": 1757967192,
|
||||
|
|
@ -1458,7 +1474,7 @@
|
|||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
"nixpkgs-unstable"
|
||||
],
|
||||
"systems": "systems_10"
|
||||
},
|
||||
|
|
@ -1712,6 +1728,7 @@
|
|||
"niri": "niri",
|
||||
"niri-unstable": "niri-unstable",
|
||||
"nixpkgs": "nixpkgs_11",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nixvim": "nixvim",
|
||||
"noctalia": "noctalia",
|
||||
"p1n3appl3": "p1n3appl3",
|
||||
|
|
|
|||
28
flake.nix
28
flake.nix
|
|
@ -2,6 +2,7 @@
|
|||
description = "jana's server infrastructure";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/5d9ea8caac0dda3bc216047d29943b8a59e431b7";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
|
|
@ -29,7 +30,7 @@
|
|||
# home
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
};
|
||||
t.url = "github:jdonszelmann/t-rs";
|
||||
dumpasm.url = "github:jdonszelmann/dumpasm";
|
||||
|
|
@ -71,18 +72,21 @@
|
|||
vimium-options.url = "github:uimataso/vimium-nixos";
|
||||
};
|
||||
outputs =
|
||||
{ nixpkgs
|
||||
, flake-utils
|
||||
, sops-nix
|
||||
, vpn-confinement
|
||||
, deploy-rs
|
||||
, ...
|
||||
{
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
flake-utils,
|
||||
sops-nix,
|
||||
vpn-confinement,
|
||||
deploy-rs,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
custom = pkgs: import ./pkgs/custom.nix (inputs // { inherit pkgs; });
|
||||
pkgsForSystem =
|
||||
system:
|
||||
import nixpkgs {
|
||||
|
||||
pkgsForSystemShared =
|
||||
np: system:
|
||||
import np {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
|
|
@ -91,7 +95,9 @@
|
|||
})
|
||||
];
|
||||
};
|
||||
configs = import ./config.nix (inputs // { inherit pkgsForSystem; });
|
||||
pkgsForSystem = pkgsForSystemShared nixpkgs;
|
||||
unstablePkgsForSystem = pkgsForSystemShared nixpkgs-unstable;
|
||||
configs = import ./config.nix (inputs // { inherit pkgsForSystem unstablePkgsForSystem; });
|
||||
in
|
||||
(configs.configs [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
[
|
||||
./xdg.nix
|
||||
./ssh.nix
|
||||
./less.nix
|
||||
./nvim
|
||||
./fish
|
||||
./kanata
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ inputs@{ machine, ... }:
|
|||
|
||||
settings = {
|
||||
user = {
|
||||
email = config.programs.git.settings.user.email;
|
||||
name = config.programs.git.settings.user.name;
|
||||
inherit (config.programs.git.settings.user) email;
|
||||
inherit (config.programs.git.settings.user) name;
|
||||
};
|
||||
|
||||
ui = {
|
||||
paginate = "never";
|
||||
# paginate = "never";
|
||||
# pager = "${pkgs.delta}/bin/delta";
|
||||
# for delta
|
||||
# diff-formatter = ":git";
|
||||
|
|
@ -32,7 +32,6 @@ inputs@{ machine, ... }:
|
|||
default-command = [
|
||||
"log"
|
||||
"--reversed"
|
||||
"--no-pager"
|
||||
];
|
||||
merge-editor = [
|
||||
"${pkgs.meld}/bin/meld"
|
||||
|
|
@ -154,14 +153,26 @@ inputs@{ machine, ... }:
|
|||
"--from"
|
||||
"trunk()"
|
||||
];
|
||||
n = [ "edit" "@+" ];
|
||||
p = [ "edit" "@-" ];
|
||||
n = [
|
||||
"edit"
|
||||
"@+"
|
||||
];
|
||||
p = [
|
||||
"edit"
|
||||
"@-"
|
||||
];
|
||||
|
||||
gp = [ "git" "push" ];
|
||||
gp = [
|
||||
"git"
|
||||
"push"
|
||||
];
|
||||
t = tug;
|
||||
|
||||
d = "describe";
|
||||
dm = [ "describe" "-m" ];
|
||||
dm = [
|
||||
"describe"
|
||||
"-m"
|
||||
];
|
||||
e = "edit";
|
||||
s = "squash";
|
||||
si = "squash -i";
|
||||
|
|
|
|||
22
programs/less.nix
Normal file
22
programs/less.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
inputs@{ machine, ... }:
|
||||
{
|
||||
imports = machine.program {
|
||||
name = "less";
|
||||
inherit inputs;
|
||||
requirements = [ "cli" ];
|
||||
home-config =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ less ];
|
||||
|
||||
programs.less = {
|
||||
enable = true;
|
||||
config = ''
|
||||
#command
|
||||
#env
|
||||
LESS=--quit-if-one-screen --ignore-case --long-prompt --tabs=4 --redraw-on-quit --use-color --RAW-CONTROL-CHARS --chop-long-lines --exit-follow-on-close +F
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -5,10 +5,12 @@ inputs@{ machine, ... }:
|
|||
inherit inputs;
|
||||
requirements = [ "cli" ];
|
||||
home-config =
|
||||
{ pkgs
|
||||
, flakes
|
||||
, lib
|
||||
, ...
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
flakes,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
nvim_mime_types = [
|
||||
|
|
@ -50,6 +52,10 @@ inputs@{ machine, ... }:
|
|||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
packages = with pkgs-unstable; [
|
||||
tree-sitter
|
||||
];
|
||||
};
|
||||
|
||||
home.file.".local/share/applications/${desktop-entry-name}.desktop" = {
|
||||
|
|
@ -57,11 +63,9 @@ inputs@{ machine, ... }:
|
|||
};
|
||||
|
||||
xdg.mimeApps.associations.added = lib.mergeAttrsList (
|
||||
map
|
||||
(mime: {
|
||||
${mime} = [ "${desktop-entry-name}.desktop" ];
|
||||
})
|
||||
nvim_mime_types
|
||||
map (mime: {
|
||||
${mime} = [ "${desktop-entry-name}.desktop" ];
|
||||
}) nvim_mime_types
|
||||
);
|
||||
|
||||
imports = [
|
||||
|
|
@ -90,11 +94,10 @@ inputs@{ machine, ... }:
|
|||
performance = {
|
||||
byteCompileLua.enable = true;
|
||||
combinePlugins = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
|
||||
standalonePlugins = [
|
||||
# clashes with lualine
|
||||
"onedark.nvim"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
@ -103,7 +106,8 @@ inputs@{ machine, ... }:
|
|||
extraPackages = [ pkgs.imagemagick ];
|
||||
|
||||
# package = (import inputs.unstable { inherit (pkgs) system; }).neovim-unwrapped;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
# package = pkgs.neovim-unwrapped;
|
||||
package = with pkgs-unstable; neovim-unwrapped;
|
||||
|
||||
colorschemes.onedark = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
render-markdown = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "render-markdown";
|
||||
|
|
@ -127,17 +132,19 @@ in
|
|||
treesitter = {
|
||||
enable = true;
|
||||
|
||||
nixGrammars = false;
|
||||
nixGrammars = true;
|
||||
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||
nixvimInjections = false;
|
||||
# package = with pkgs-unstable; tree-sitter;
|
||||
|
||||
settings = {
|
||||
indent.enable = true;
|
||||
|
||||
ensure_installed = "all";
|
||||
ignore_install = [
|
||||
"wing"
|
||||
"brightscript"
|
||||
];
|
||||
# ensure_installed = "all";
|
||||
# ignore_install = [
|
||||
# "wing"
|
||||
# "brightscript"
|
||||
# ];
|
||||
|
||||
highlight.enable = true;
|
||||
|
||||
|
|
@ -435,8 +442,8 @@ in
|
|||
__unkeyed-1 = "filetype";
|
||||
}
|
||||
];
|
||||
lualine_y = [{ __unkeyed-1 = "progress"; }];
|
||||
lualine_z = [{ __unkeyed-1 = "location"; }];
|
||||
lualine_y = [ { __unkeyed-1 = "progress"; } ];
|
||||
lualine_z = [ { __unkeyed-1 = "location"; } ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -623,36 +630,37 @@ in
|
|||
};
|
||||
|
||||
options = {
|
||||
pipeline = config.lib.nixvim.mkRaw ''
|
||||
wilder.branch(
|
||||
wilder.cmdline_pipeline({
|
||||
language = 'python',
|
||||
fuzzy = 2,
|
||||
}),
|
||||
wilder.python_search_pipeline({
|
||||
pattern = wilder.python_fuzzy_pattern(),
|
||||
sorter = wilder.python_difflib_sorter(),
|
||||
engine = 're',
|
||||
}),
|
||||
wilder.substitute_pipeline({
|
||||
pipeline = wilder.python_search_pipeline({
|
||||
skip_cmdtype_check = 1,
|
||||
pattern = wilder.python_fuzzy_pattern({
|
||||
start_at_boundary = 0,
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
{
|
||||
wilder.check(function(ctx, x) return x == "" end),
|
||||
wilder.history(),
|
||||
},
|
||||
wilder.python_file_finder_pipeline({
|
||||
file_command = {'${pkgs.ripgrep}/bin/rg', '--files'},
|
||||
dir_command = {'${pkgs.fd}/bin/fd', '-td'},
|
||||
filters = {'cpsm_filter'},
|
||||
})
|
||||
)
|
||||
'';
|
||||
# pipeline = config.lib.nixvim.mkRaw "";
|
||||
#''
|
||||
# wilder.branch(
|
||||
# wilder.cmdline_pipeline({
|
||||
# language = 'python',
|
||||
# fuzzy = 2,
|
||||
# }),
|
||||
# wilder.python_search_pipeline({
|
||||
# pattern = wilder.python_fuzzy_pattern(),
|
||||
# sorter = wilder.python_difflib_sorter(),
|
||||
# engine = 're',
|
||||
# }),
|
||||
# wilder.substitute_pipeline({
|
||||
# pipeline = wilder.python_search_pipeline({
|
||||
# skip_cmdtype_check = 1,
|
||||
# pattern = wilder.python_fuzzy_pattern({
|
||||
# start_at_boundary = 0,
|
||||
# }),
|
||||
# }),
|
||||
# }),
|
||||
# {
|
||||
# wilder.check(function(ctx, x) return x == "" end),
|
||||
# wilder.history(),
|
||||
# },
|
||||
# wilder.python_file_finder_pipeline({
|
||||
# file_command = {'${pkgs.ripgrep}/bin/rg', '--files'},
|
||||
# dir_command = {'${pkgs.fd}/bin/fd', '-td'},
|
||||
# filters = {'cpsm_filter'},
|
||||
# })
|
||||
# )
|
||||
# '';
|
||||
|
||||
renderer = config.lib.nixvim.mkRaw ''
|
||||
(function()
|
||||
|
|
|
|||
|
|
@ -1,42 +1,41 @@
|
|||
inputs@{ machine, ... }: {
|
||||
imports =
|
||||
machine.program {
|
||||
name = "ssh";
|
||||
inherit inputs;
|
||||
requirements = [ "cli" ];
|
||||
home-config = _: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
fili = {
|
||||
user = "jana";
|
||||
hostname = "donsz.nl";
|
||||
};
|
||||
icecube = {
|
||||
hostname = "192.168.178.138";
|
||||
proxyJump = "fili";
|
||||
};
|
||||
ragdoll = {
|
||||
hostname = "192.168.178.138";
|
||||
proxyJump = "fili";
|
||||
};
|
||||
inputs@{ machine, ... }:
|
||||
{
|
||||
imports = machine.program {
|
||||
name = "ssh";
|
||||
inherit inputs;
|
||||
requirements = [ "cli" ];
|
||||
home-config = _: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
fili = {
|
||||
user = "jana";
|
||||
hostname = "donsz.nl";
|
||||
};
|
||||
icecube = {
|
||||
hostname = "192.168.178.138";
|
||||
proxyJump = "fili";
|
||||
};
|
||||
ragdoll = {
|
||||
hostname = "192.168.178.138";
|
||||
proxyJump = "fili";
|
||||
};
|
||||
|
||||
"*" = {
|
||||
forwardAgent = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
compression = false;
|
||||
addKeysToAgent = null;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = null;
|
||||
};
|
||||
"*" = {
|
||||
forwardAgent = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
compression = false;
|
||||
addKeysToAgent = null;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue