updates
This commit is contained in:
parent
88a3411f76
commit
e6b5e6dc7a
|
|
@ -1,23 +1,31 @@
|
||||||
zle -N up-line-or-beginning-search
|
|
||||||
zle -N down-line-or-beginning-search
|
|
||||||
|
|
||||||
zstyle ':completion:*' completer _extensions _complete _approximate
|
zstyle ':completion:*' completer _extensions _complete _approximate
|
||||||
zstyle ':completion:*' use-cache on
|
#zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache"
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
zstyle ':completion:*' menu select
|
||||||
|
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||||
|
zstyle ':completion:complete:*' gain-privileges 1
|
||||||
|
#zstyle ':completion:*' use-cache on
|
||||||
|
#zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache"
|
||||||
|
zstyle ':completion:*:git-checkout:*' sort false
|
||||||
|
zstyle ':completion:*:descriptions' format '[%d]'
|
||||||
|
#zstyle ':completion:*' group-name ''
|
||||||
|
|
||||||
|
#zstyle ':completion:*' file-list all
|
||||||
|
|
||||||
zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f'
|
zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f'
|
||||||
zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f'
|
zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f'
|
||||||
zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f'
|
#zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f'
|
||||||
zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f'
|
#zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f'
|
||||||
zstyle ':completion:*' menu select
|
|
||||||
zstyle ':completion:*' group-name ''
|
#zstyle ':fzf-tab:*' fzf-command ftb-tmux-popup
|
||||||
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
|
|
||||||
zstyle ':completion:*' file-list all
|
zstyle ':fzf-tab:complete:(cd|lsd|eza|nvim|vim|vi):*' fzf-preview 'eza -1 --color=always --icons=always $realpath'
|
||||||
zstyle ':completion:complete:*' gain-privileges 1
|
zstyle ':fzf-tab:*' fzf-min-height 20
|
||||||
# disable sort when completing `git checkout`
|
#zstyle ':fzf-tab:*' popup-min-size 80 12
|
||||||
zstyle ':completion:*:git-checkout:*' sort false
|
#zstyle ':fzf-tab:*' popup-pad 0 0
|
||||||
# set descriptions format to enable group support
|
|
||||||
zstyle ':completion:*:descriptions' format '[%d]'
|
zle -N up-line-or-beginning-search
|
||||||
|
zle -N down-line-or-beginning-search
|
||||||
|
|
||||||
zmodload zsh/complist
|
zmodload zsh/complist
|
||||||
bindkey -M menuselect 'h' vi-backward-char
|
bindkey -M menuselect 'h' vi-backward-char
|
||||||
|
|
|
||||||
78
flake.lock
78
flake.lock
|
|
@ -183,11 +183,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725234343,
|
"lastModified": 1726153070,
|
||||||
"narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=",
|
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "567b938d64d4b4112ee253b9274472dc3a346eb6",
|
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -225,11 +225,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722555600,
|
"lastModified": 1726153070,
|
||||||
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
|
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
|
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -383,11 +383,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724857454,
|
"lastModified": 1725513492,
|
||||||
"narHash": "sha256-Qyl9Q4QMTLZnnBb/8OuQ9LSkzWjBU1T5l5zIzTxkkhk=",
|
"narHash": "sha256-tyMUA6NgJSvvQuzB7A1Sf8+0XCHyfSPRx/b00o6K0uo=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "4509ca64f1084e73bc7a721b20c669a8d4c5ebe6",
|
"rev": "7570de7b9b504cfe92025dd1be797bf546f66528",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -485,11 +485,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726142087,
|
"lastModified": 1726308872,
|
||||||
"narHash": "sha256-uT4TRd3PgreUD5sJaNioVfMemdyWFLoPHqN4AFszGmw=",
|
"narHash": "sha256-d4vwO5N4RsLnCY7k5tY9xbdYDWQsY3RDMeUoIa4ms2A=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "da8406a6ff556b86dc368e96ca8bd81b2704a91a",
|
"rev": "6c1a461a444e6ccb3f3e42bb627b510c3a722a57",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -506,11 +506,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724435763,
|
"lastModified": 1726308872,
|
||||||
"narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
|
"narHash": "sha256-d4vwO5N4RsLnCY7k5tY9xbdYDWQsY3RDMeUoIa4ms2A=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
|
"rev": "6c1a461a444e6ccb3f3e42bb627b510c3a722a57",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -595,11 +595,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726113560,
|
"lastModified": 1726299205,
|
||||||
"narHash": "sha256-6pXnXYAKIkAQWzfbSBMTDlw2moyvSqZiR6QltTCi4jw=",
|
"narHash": "sha256-v4DneIggoLBdypeghj4rMzYngKZ1FgDtYKaYDBkfShk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "e2aaa29736ba7200012470f818f9111e41b77c1a",
|
"rev": "2da0565b4fa221f7a62e9cafa019cd00b99fdb9e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -611,11 +611,11 @@
|
||||||
"neovim-src": {
|
"neovim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726086728,
|
"lastModified": 1726271736,
|
||||||
"narHash": "sha256-cW8RaE7XDx95GMhWF01fGe9j1thysEMiovnDGzCH7jk=",
|
"narHash": "sha256-n2kXazdrh5+IvCZFrUq4z27n+OX70S6UPHxAI0pBg0w=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "98ba65b8be8cb2dde839502357e70916c4a3e37a",
|
"rev": "67d6b6f27ed3016a2daf6037879d77becc2cfa8f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -651,11 +651,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724561770,
|
"lastModified": 1726188813,
|
||||||
"narHash": "sha256-zv8C9RNa86CIpyHwPIVO/k+5TfM8ZbjGwOOpTe1grls=",
|
"narHash": "sha256-Vop/VRi6uCiScg/Ic+YlwsdIrLabWUJc57dNczp0eBc=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "ac5694a0b855a981e81b4d9f14052e3ff46ca39e",
|
"rev": "21fe31f26473c180390cfa81e3ea81aca0204c80",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -724,11 +724,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725983898,
|
"lastModified": 1726062873,
|
||||||
"narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=",
|
"narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43",
|
"rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -812,11 +812,11 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726133505,
|
"lastModified": 1726335481,
|
||||||
"narHash": "sha256-5Q7Io0J98z7UOswrruOuO/jJNduSB3PKFw/sDz0NX1A=",
|
"narHash": "sha256-mVVi8++ti/cApXgLLHxVUruZGDNe+rlRqacvul9BcQE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "4697b96a0124944929ecefa09d488c7997419e43",
|
"rev": "908721cdbd25efb05d0975ada5d980e89bba64fa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -868,11 +868,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726152386,
|
"lastModified": 1726339530,
|
||||||
"narHash": "sha256-7TOsJCHL/7ZCeV6sSsLwSn8I1iKG0c+d6nWdNqyMM0o=",
|
"narHash": "sha256-AMoQBwy+KLVRDYffKSwsSnbkmvzfkuO0uLfWQWoXeaM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "398549de21055089cb9445cf7f666390f61930da",
|
"rev": "d0a76d184032e1f97cc6fe162c4b207b699ba143",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -890,11 +890,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724584782,
|
"lastModified": 1726208959,
|
||||||
"narHash": "sha256-7FfHv7b1jwMPSu9SPY9hdxStk8E6EeSwzqdvV69U4BM=",
|
"narHash": "sha256-Bq2YtXyHhDpBrqDlJysQgbhvauyiYTQXt7d6xxZdRck=",
|
||||||
"owner": "NuschtOS",
|
"owner": "NuschtOS",
|
||||||
"repo": "search",
|
"repo": "search",
|
||||||
"rev": "5a08d691de30b6fc28d58ce71a5e420f2694e087",
|
"rev": "4267d5c5b51591a9553eefbd12172da050ee3433",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1032,11 +1032,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724833132,
|
"lastModified": 1725271838,
|
||||||
"narHash": "sha256-F4djBvyNRAXGusJiNYInqR6zIMI3rvlp6WiKwsRISos=",
|
"narHash": "sha256-VcqxWT0O/gMaeWTTjf1r4MOyG49NaNxW4GHTO3xuThE=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "3ffd842a5f50f435d3e603312eefa4790db46af5",
|
"rev": "9fb342d14b69aefdf46187f6bb80a4a0d97007cd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
19
flake.nix
19
flake.nix
|
|
@ -26,7 +26,7 @@
|
||||||
];
|
];
|
||||||
domain = "odie.home.arpa";
|
domain = "odie.home.arpa";
|
||||||
notes = rec {
|
notes = rec {
|
||||||
root = "${homeDirectory}/Notes/";
|
root = "${homeDirectory}/Notes";
|
||||||
workspaces = {
|
workspaces = {
|
||||||
general = "${root}/general";
|
general = "${root}/general";
|
||||||
games = "${root}/games";
|
games = "${root}/games";
|
||||||
|
|
@ -53,7 +53,16 @@
|
||||||
hostName = "vm";
|
hostName = "vm";
|
||||||
}
|
}
|
||||||
// flakeLib.mkNixosConfiguration {
|
// flakeLib.mkNixosConfiguration {
|
||||||
inherit inputs nixpkgs outputs vars flakeLib overlays;
|
inherit inputs nixpkgs outputs flakeLib overlays;
|
||||||
|
vars = vars // {
|
||||||
|
notes = rec {
|
||||||
|
root = "/mnt/c/Users/odie/Sync/norg";
|
||||||
|
workspaces = {
|
||||||
|
general = "${root}/general";
|
||||||
|
games = "${root}/games";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
hostName = "wsl-dev";
|
hostName = "wsl-dev";
|
||||||
}
|
}
|
||||||
|
|
@ -107,6 +116,12 @@
|
||||||
go = {
|
go = {
|
||||||
path = ./templates/go;
|
path = ./templates/go;
|
||||||
};
|
};
|
||||||
|
rust = {
|
||||||
|
path = ./templates/rust;
|
||||||
|
};
|
||||||
|
cpp = {
|
||||||
|
path = ./templates/cpp;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// flake-utils.lib.eachDefaultSystem (system: {
|
// flake-utils.lib.eachDefaultSystem (system: {
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,5 @@
|
||||||
mkPkgs = import ./mkPkgs.nix;
|
mkPkgs = import ./mkPkgs.nix;
|
||||||
mkNixosConfiguration = import ./mkNixosConfiguration.nix;
|
mkNixosConfiguration = import ./mkNixosConfiguration.nix;
|
||||||
mkHomeConfiguration = import ./mkHomeConfiguration.nix;
|
mkHomeConfiguration = import ./mkHomeConfiguration.nix;
|
||||||
|
mkNixvim = import ./mkNixvim.nix;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ inputs
|
||||||
|
, pkgs
|
||||||
|
, vars
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
nixvim' = inputs.nixvim.legacyPackages.${pkgs.system};
|
||||||
|
module = {
|
||||||
|
inherit pkgs;
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs vars;
|
||||||
|
};
|
||||||
|
module = import ../modules/nixvim;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
nixvim'.makeNixvimWithModule module
|
||||||
|
|
@ -1,17 +1,23 @@
|
||||||
{ outputs
|
{ inputs
|
||||||
, inputs
|
|
||||||
, pkgs
|
, pkgs
|
||||||
, config
|
, config
|
||||||
, lib
|
, lib
|
||||||
|
, vars
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
flakeLib = import ../../../../lib;
|
||||||
|
neovim-ide = flakeLib.mkNixvim {
|
||||||
|
inherit pkgs inputs vars;
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
programs.neovim-ide.enable = lib.mkEnableOption "neovim-ide";
|
programs.neovim-ide.enable = lib.mkEnableOption "neovim-ide";
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.programs.neovim-ide.enable {
|
config = lib.mkIf config.programs.neovim-ide.enable {
|
||||||
home = {
|
home = {
|
||||||
packages = [ outputs.packages.${pkgs.system}.neovim-ide ];
|
packages = [ neovim-ide ];
|
||||||
|
|
||||||
sessionPath = [
|
sessionPath = [
|
||||||
"/home/odie/go/bin"
|
"/home/odie/go/bin"
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,16 @@
|
||||||
fzf.enable = mkDefault true;
|
fzf.enable = mkDefault true;
|
||||||
git.enable = mkDefault true;
|
git.enable = mkDefault true;
|
||||||
lf.enable = mkDefault true;
|
lf.enable = mkDefault true;
|
||||||
lsd.enable = mkDefault true;
|
#lsd.enable = mkDefault true;
|
||||||
|
eza.enable = mkDefault true;
|
||||||
ssh.enable = mkDefault true;
|
ssh.enable = mkDefault true;
|
||||||
starship.enable = mkDefault true;
|
starship.enable = mkDefault true;
|
||||||
tmux.enable = mkDefault true;
|
tmux.enable = mkDefault true;
|
||||||
zoxide.enable = mkDefault true;
|
zoxide.enable = mkDefault true;
|
||||||
zsh.enable = mkDefault true;
|
zsh.enable = mkDefault true;
|
||||||
tldr.enable = mkDefault true;
|
tldr.enable = mkDefault true;
|
||||||
|
|
||||||
|
dircolors.enable = mkDefault true;
|
||||||
|
dircolors.enableZshIntegration = mkDefault true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, config, ... }: lib.mkIf config.programs.direnv.enable {
|
{ lib, config, ... }: lib.mkIf config.programs.direnv.enable {
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
config = {
|
config = {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
{lib, config, ...}: lib.mkIf config.programs.eza.enable {
|
||||||
|
programs = {
|
||||||
|
eza = {
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
defaultOptions = [
|
defaultOptions = [
|
||||||
"--height 40%"
|
"--height 40%"
|
||||||
"--border"
|
"--border"
|
||||||
|
"--tmux"
|
||||||
];
|
];
|
||||||
tmux = {
|
tmux = {
|
||||||
enableShellIntegration = true;
|
enableShellIntegration = true;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{ pkgs, config, lib, ... }: lib.mkIf config.programs.lf.enable {
|
{ pkgs, config, lib, ... }: lib.mkIf config.programs.lf.enable {
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
chafa
|
#chafa
|
||||||
#ctpv
|
ctpv
|
||||||
];
|
];
|
||||||
file = {
|
file = {
|
||||||
".config/lf/icons" = {
|
".config/lf/icons" = {
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,8 @@
|
||||||
zsh = {
|
zsh = {
|
||||||
defaultKeymap = "emacs";
|
defaultKeymap = "emacs";
|
||||||
dotDir = ".config/zsh";
|
dotDir = ".config/zsh";
|
||||||
shellAliases = {
|
|
||||||
j = "z";
|
|
||||||
ji = "zi";
|
|
||||||
};
|
|
||||||
initExtra = builtins.readFile ../../../../configs/home-manager/zsh/zshrc.zsh;
|
initExtra = builtins.readFile ../../../../configs/home-manager/zsh/zshrc.zsh;
|
||||||
|
initExtraBeforeCompInit = builtins.readFile ../../../../configs/home-manager/zsh/zshrc_before_compinit.zsh;
|
||||||
autosuggestion.enable = true;
|
autosuggestion.enable = true;
|
||||||
completionInit = ''
|
completionInit = ''
|
||||||
autoload -U compinit bashcompinit
|
autoload -U compinit bashcompinit
|
||||||
|
|
@ -15,8 +12,8 @@
|
||||||
bashcompinit'';
|
bashcompinit'';
|
||||||
history = {
|
history = {
|
||||||
path = "${config.xdg.cacheHome}/zsh_history";
|
path = "${config.xdg.cacheHome}/zsh_history";
|
||||||
save = 100000;
|
save = 10000;
|
||||||
size = 100000;
|
size = 10000;
|
||||||
share = true;
|
share = true;
|
||||||
extended = true;
|
extended = true;
|
||||||
};
|
};
|
||||||
|
|
@ -29,18 +26,18 @@
|
||||||
"^[[A"
|
"^[[A"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
zplug = {
|
antidote = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [
|
plugins = [
|
||||||
{ name = "zdharma-continuum/fast-syntax-highlighting"; }
|
"Aloxaf/fzf-tab"
|
||||||
{ name = "nix-community/nix-zsh-completions"; }
|
"zdharma-continuum/fast-syntax-highlighting"
|
||||||
{ name = "zsh-users/zsh-completions"; }
|
"nix-community/nix-zsh-completions"
|
||||||
|
"zsh-users/zsh-completions"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
envExtra = ''
|
shellAliases = {
|
||||||
export DIRENV_LOG_FORMAT=$'\033[2mdirenv: %s\033[0m'
|
eza = "eza --color=always --git --icons=always";
|
||||||
export DOOMWADDIR=$HOME/Games/doom/IWADs
|
};
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
{vars, ...}: {
|
{ vars, ... }: {
|
||||||
home = {
|
home = {
|
||||||
inherit (vars) username homeDirectory;
|
inherit (vars) username homeDirectory;
|
||||||
language.base = vars.locale;
|
language.base = vars.locale;
|
||||||
stateVersion = "23.11";
|
stateVersion = "23.11";
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
EDITOR = "vim";
|
EDITOR = "vim";
|
||||||
|
DIRENV_LOG_FORMAT = "$(tput setaf 7)$(tput dim)%s$(tput sgr0)";
|
||||||
|
DOOMWADDIR = "$HOME/Games/doom/IWADs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,22 @@ _: {
|
||||||
expr = true;
|
expr = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
key = "<M-h>";
|
||||||
|
action = ":vertical resize -1<CR>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<M-l>";
|
||||||
|
action = ":vertical resize +1<CR>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<M-j>";
|
||||||
|
action = ":resize +1<CR>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<M-k>";
|
||||||
|
action = ":resize -1<CR>";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
key = "<M-K>";
|
key = "<M-K>";
|
||||||
action = ":m -2<CR>";
|
action = ":m -2<CR>";
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,7 @@ in
|
||||||
dap.listeners.before.event_exited.dapui_config = function()
|
dap.listeners.before.event_exited.dapui_config = function()
|
||||||
dapui.close()
|
dapui.close()
|
||||||
end
|
end
|
||||||
|
require('dap.ext.vscode').load_launchjs()
|
||||||
|
|
||||||
|
|
||||||
require('lspconfig').asm_lsp.setup({})
|
require('lspconfig').asm_lsp.setup({})
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
debuggers = { c = "lldb"; };
|
||||||
|
in
|
||||||
|
{
|
||||||
plugins.dap = {
|
plugins.dap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extensions = {
|
extensions = {
|
||||||
|
|
@ -10,8 +14,17 @@
|
||||||
adapters = {
|
adapters = {
|
||||||
executables = {
|
executables = {
|
||||||
gdb = {
|
gdb = {
|
||||||
|
id = "gdb";
|
||||||
command = "${pkgs.gdb}/bin/gdb";
|
command = "${pkgs.gdb}/bin/gdb";
|
||||||
args = ["--interpreter=dap" "--eval-command" "set pretty print on"];
|
args = [ "--interpreter=dap" "--quiet" "--eval-command" "set pretty print on" ];
|
||||||
|
};
|
||||||
|
cppdbg = {
|
||||||
|
id = "cppdbg";
|
||||||
|
command = "${pkgs.vscode-extensions.ms-vscode.cpptools}/share/vscode/extensions/ms-vscode.cpptools/debugAdapters/bin/OpenDebugAD7";
|
||||||
|
};
|
||||||
|
lldb = {
|
||||||
|
id = "lldb";
|
||||||
|
command = "${pkgs.llvmPackages.lldb}/bin/lldb-dap";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -22,9 +35,9 @@
|
||||||
{
|
{
|
||||||
name = "Launch";
|
name = "Launch";
|
||||||
request = "launch";
|
request = "launch";
|
||||||
type = "gdb";
|
type = debuggers.c;
|
||||||
cwd = "\${workspaceFolder}";
|
cwd = "\${workspaceFolder}";
|
||||||
stopOnEntry = false;
|
stopOnEntry = true;
|
||||||
runInTerminal = true;
|
runInTerminal = true;
|
||||||
program = {
|
program = {
|
||||||
__raw = ''
|
__raw = ''
|
||||||
|
|
@ -35,9 +48,9 @@
|
||||||
{
|
{
|
||||||
name = "Launch with Arguments";
|
name = "Launch with Arguments";
|
||||||
request = "launch";
|
request = "launch";
|
||||||
type = "gdb";
|
type = debuggers.c;
|
||||||
cwd = "\${workspaceFolder}";
|
cwd = "\${workspaceFolder}";
|
||||||
stopOnEntry = false;
|
stopOnEntry = true;
|
||||||
runInTerminal = true;
|
runInTerminal = true;
|
||||||
program = {
|
program = {
|
||||||
__raw = ''
|
__raw = ''
|
||||||
|
|
@ -62,6 +75,7 @@
|
||||||
key = "<leader>db";
|
key = "<leader>db";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[dap] Toggle Breakpoint";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -69,6 +83,7 @@
|
||||||
key = "<leader>du";
|
key = "<leader>du";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[dap] Toggle UI";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -76,6 +91,7 @@
|
||||||
key = "<leader>dc";
|
key = "<leader>dc";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[dap] Continue / Run Debug";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -83,6 +99,7 @@
|
||||||
key = "<leader>dC";
|
key = "<leader>dC";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[dap] Rerun Last";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -90,6 +107,7 @@
|
||||||
key = "<leader>do";
|
key = "<leader>do";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[dap] Step over";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -97,6 +115,7 @@
|
||||||
key = "<leader>di";
|
key = "<leader>di";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[dap] Step in";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -104,6 +123,7 @@
|
||||||
key = "<leader>dO";
|
key = "<leader>dO";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[dap] Step out";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -111,6 +131,7 @@
|
||||||
key = "<leader>dT";
|
key = "<leader>dT";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[dap] Terminate Process";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -118,6 +139,7 @@
|
||||||
key = "<leader>dr";
|
key = "<leader>dr";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[dap] Toggle REPL";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./cmp.nix
|
./cmp.nix
|
||||||
./codeium.nix
|
./codeium.nix
|
||||||
|
|
@ -28,6 +28,16 @@
|
||||||
todo-comments.enable = true;
|
todo-comments.enable = true;
|
||||||
transparent.enable = true;
|
transparent.enable = true;
|
||||||
which-key.enable = true;
|
which-key.enable = true;
|
||||||
|
zen-mode.enable = true;
|
||||||
|
web-devicons.enable = true;
|
||||||
|
lazygit.enable = true;
|
||||||
|
|
||||||
|
cmake-tools = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
cmake_build_directory = "build/\${variant:buildtype}";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPlugins = with pkgs.vimPlugins;
|
extraPlugins = with pkgs.vimPlugins;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
plugins.lsp.servers = {
|
||||||
|
clangd.enable = true;
|
||||||
|
#ccls.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
plugins.lsp.servers.cmake = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -5,11 +5,11 @@
|
||||||
./html.nix
|
./html.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
./rust.nix
|
./rust.nix
|
||||||
|
./c.nix
|
||||||
|
./cmake.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
plugins.lsp.servers = {
|
plugins.lsp.servers = {
|
||||||
clangd.enable = true;
|
|
||||||
cmake.enable = true;
|
|
||||||
eslint.enable = true;
|
eslint.enable = true;
|
||||||
htmx.enable = true;
|
htmx.enable = true;
|
||||||
jsonls.enable = true;
|
jsonls.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, config, lib, ... }: {
|
{ pkgs, lib, ... }: {
|
||||||
plugins.lualine = {
|
plugins.lualine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -80,7 +80,6 @@
|
||||||
left = "";
|
left = "";
|
||||||
right = "";
|
right = "";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
statusline = [ ];
|
statusline = [ ];
|
||||||
winbar = [
|
winbar = [
|
||||||
|
|
@ -98,6 +97,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
lualine-lsp-progress
|
lualine-lsp-progress
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@
|
||||||
action = "<cmd>Neotree toggle<CR>";
|
action = "<cmd>Neotree toggle<CR>";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[neotree] Toggle File Tree";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{vars, lib, inputs, ...}: {
|
{ vars, lib, ... }: {
|
||||||
plugins.neorg = {
|
plugins.neorg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
modules = {
|
modules = {
|
||||||
|
|
@ -30,9 +30,23 @@
|
||||||
author = vars.name;
|
author = vars.name;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"core.todo-introspector" = lib.nixvim.emptyTable;
|
||||||
|
"core.qol.todo_items" = {
|
||||||
|
config = {
|
||||||
|
create_todo_parents = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
"core.presenter" = {
|
||||||
|
config = {
|
||||||
|
zen_mode = "zen-mode";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"core.integrations.nvim-cmp" = lib.nixvim.emptyTable;
|
||||||
"core.export.markdown" = lib.nixvim.emptyTable;
|
"core.export.markdown" = lib.nixvim.emptyTable;
|
||||||
"core.summary" = lib.nixvim.emptyTable;
|
"core.summary" = lib.nixvim.emptyTable;
|
||||||
"core.tangle" = lib.nixvim.emptyTable;
|
"core.tangle" = lib.nixvim.emptyTable;
|
||||||
|
"core.text-objects" = lib.nixvim.emptyTable;
|
||||||
"core.integrations.telescope" = lib.nixvim.emptyTable;
|
"core.integrations.telescope" = lib.nixvim.emptyTable;
|
||||||
"core.ui.calendar" = lib.nixvim.emptyTable;
|
"core.ui.calendar" = lib.nixvim.emptyTable;
|
||||||
};
|
};
|
||||||
|
|
@ -41,18 +55,58 @@
|
||||||
{
|
{
|
||||||
key = "<leader>ni";
|
key = "<leader>ni";
|
||||||
action = ":Neorg index<CR>";
|
action = ":Neorg index<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "[neorg] Index";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
key = "<leader>nt";
|
key = "<localleader>nt";
|
||||||
action = ":Neorg toc<CR>";
|
action = ":Neorg toc<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "[neorg] TOC";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
key = "<leader>nw";
|
key = "<localleader>nw";
|
||||||
action = ":Telescope neorg switch-workspace<CR>";
|
action = ":Telescope neorg switch-workspace<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "[neorg] Switch Workspace";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
key = "<leader>nc";
|
key = "<localleader>nc";
|
||||||
action = ":Neorg toggle-concealer<CR>";
|
action = ":Neorg toggle-concealer<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "[neorg] Toggle Concealer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<localleader>npn";
|
||||||
|
action = "<Plug>(neorg.presenter.next-page)";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "[neorg] Presenter Next Page";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<localleader>pp";
|
||||||
|
action = "<Plug>(neorg.presenter.previous-page)";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "[neorg] Presenter Previous Page";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<localleader>pc";
|
||||||
|
action = "<Plug>(neorg.presenter.close)";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "[neorg] Presenter Close";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,25 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
sources = {
|
sources = {
|
||||||
code_actions = {
|
code_actions = {
|
||||||
|
gitrebase.enable = true;
|
||||||
|
gitsigns.enable = true;
|
||||||
statix.enable = true;
|
statix.enable = true;
|
||||||
};
|
};
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
statix.enable = true;
|
statix.enable = true;
|
||||||
commitlint.enable = true;
|
commitlint.enable = true;
|
||||||
cppcheck.enable = true;
|
cppcheck = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
args = [
|
||||||
|
"--enable=warning,style,performance,portability"
|
||||||
|
"--template=gcc"
|
||||||
|
"--check-level=exhaustive"
|
||||||
|
"$FILENAME"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
cmake_lint.enable = true;
|
||||||
};
|
};
|
||||||
formatting = {
|
formatting = {
|
||||||
phpcbf.enable = true;
|
phpcbf.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@
|
||||||
action = "<cmd>Trouble workspace-diagnostics toggle<CR>";
|
action = "<cmd>Trouble workspace-diagnostics toggle<CR>";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[trouble] Toggle workspace diagnostics";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -35,6 +36,7 @@
|
||||||
action = "<cmd>TroubleToggle quickfix toggle<CR>";
|
action = "<cmd>TroubleToggle quickfix toggle<CR>";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[trouble] Toggle quickfix diagnostics";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
action = "<cmd>UndotreeToggle<CR>";
|
action = "<cmd>UndotreeToggle<CR>";
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
desc = "[undotree] Toggle";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
{
|
|
||||||
nixpkgs,
|
|
||||||
system,
|
|
||||||
inputs,
|
|
||||||
flakeLib,
|
|
||||||
vars,
|
|
||||||
overlays,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
nixvim' = inputs.nixvim.legacyPackages.${system};
|
|
||||||
pkgs = flakeLib.mkPkgs {
|
|
||||||
inherit system nixpkgs overlays;
|
|
||||||
};
|
|
||||||
module = {
|
|
||||||
inherit pkgs;
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs vars;
|
|
||||||
};
|
|
||||||
module = import ../../modules/nixvim;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
nixvim'.makeNixvimWithModule module
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, cmake
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "testing_app";
|
||||||
|
|
||||||
|
version = "0.0.0";
|
||||||
|
|
||||||
|
src = lib.cleanSource ./.;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake ];
|
||||||
|
buildInputs = [ ];
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
mv src/testing_app/testing_app $out/bin
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
systems.url = "github:nix-systems/x86_64-linux";
|
||||||
|
flake-utils = {
|
||||||
|
url = "github:numtide/flake-utils";
|
||||||
|
inputs.systems.follows = "systems";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
outputs =
|
||||||
|
{ flake-utils
|
||||||
|
, nixpkgs
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
};
|
||||||
|
pkg = pkgs.callPackage ./. { };
|
||||||
|
shell = pkgs.callPackage ./shell.nix { inherit pkg; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells.default = shell;
|
||||||
|
packages.default = pkg;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs
|
||||||
|
, pkg
|
||||||
|
, gdb
|
||||||
|
, lldb
|
||||||
|
, python3Packages
|
||||||
|
, cmakeCurses
|
||||||
|
, ...
|
||||||
|
}: pkgs.mkShell {
|
||||||
|
name = "shell";
|
||||||
|
inputsFrom = [ pkg ];
|
||||||
|
packages = [ lldb gdb python3Packages.six cmakeCurses ];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
{
|
||||||
|
outputs = inputs: with inputs;
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [ cargo2nix.overlays.default rust-overlay.overlays.default ];
|
||||||
|
};
|
||||||
|
rustPkgs = pkgs.rustBuilder.makePackageSet {
|
||||||
|
rustToolchain =pkgs.rust-bin.stable.latest.default;
|
||||||
|
packageFun = import ./Cargo.nix;
|
||||||
|
};
|
||||||
|
|
||||||
|
inherit (self.outputs.checks.${system}) pre-commit-check;
|
||||||
|
|
||||||
|
workspaceShell = rustPkgs.workspaceShell {
|
||||||
|
inherit (pre-commit-check) shellHook;
|
||||||
|
buildInputs = pre-commit-check.enabledPackages;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages = rec {
|
||||||
|
hello-world = rustPkgs.workspace.cargo_test_flake { };
|
||||||
|
default = hello-world;
|
||||||
|
};
|
||||||
|
checks = {
|
||||||
|
pre-commit-check = git-hooks.lib.${system}.run {
|
||||||
|
src = ./.;
|
||||||
|
hooks = {
|
||||||
|
nixpkgs-fmt.enable = true;
|
||||||
|
cargo-check.enable = true;
|
||||||
|
clippy.enable = true;
|
||||||
|
rustfmt.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
formatter = pkgs.nixpkgs-fmt;
|
||||||
|
devShells = {
|
||||||
|
default = workspaceShell;
|
||||||
|
inherit (inputs.cargo2nix.outputs.devShells.${system}) bootstrap;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
cargo2nix = {
|
||||||
|
url = "github:cargo2nix/cargo2nix";
|
||||||
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
git-hooks = {
|
||||||
|
url = "github:cachix/git-hooks.nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.gitignore.follows = "gitignore";
|
||||||
|
};
|
||||||
|
gitignore = {
|
||||||
|
url = "github:hercules-ci/gitignore.nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
rust-overlay = {
|
||||||
|
url = "github:oxalica/rust-overlay";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue