Updates
This commit is contained in:
parent
5a4b306097
commit
14b2b85b0b
8413
flake.lock
8413
flake.lock
File diff suppressed because it is too large
Load Diff
203
flake.nix
203
flake.nix
|
|
@ -1,61 +1,41 @@
|
||||||
{
|
{
|
||||||
description = "My Nix Configs";
|
description = "My Nix Configs";
|
||||||
|
|
||||||
outputs = {
|
outputs =
|
||||||
self,
|
{ self
|
||||||
nixpkgs,
|
, nixpkgs
|
||||||
flake-utils,
|
, flake-utils
|
||||||
...
|
, ...
|
||||||
}: let
|
}:
|
||||||
inherit (self) inputs outputs;
|
let
|
||||||
|
inherit (self) inputs outputs;
|
||||||
|
|
||||||
flakeLib = import ./lib;
|
flakeLib = import ./lib;
|
||||||
|
|
||||||
vars = rec {
|
vars = rec {
|
||||||
name = "Patrick Neff";
|
name = "Patrick Neff";
|
||||||
username = "odie";
|
username = "odie";
|
||||||
homeDirectory = "/home/${username}";
|
homeDirectory = "/home/${username}";
|
||||||
locale = "de_DE.UTF-8";
|
locale = "de_DE.UTF-8";
|
||||||
email = "odie86@gmail.com";
|
email = "odie86@gmail.com";
|
||||||
timeZone = "Europe/Berlin";
|
timeZone = "Europe/Berlin";
|
||||||
sshKeys = [
|
sshKeys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByWNNmKhjVk5VEjk3aSKosOXzglCbiq7q8IQ8mA0qQe odie"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByWNNmKhjVk5VEjk3aSKosOXzglCbiq7q8IQ8mA0qQe odie"
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1QZO6fF2RLcmjMKdG1eZi0RLw3joa+VBXaKvfmA7Tg odie"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1QZO6fF2RLcmjMKdG1eZi0RLw3joa+VBXaKvfmA7Tg odie"
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINs89u4Kvwlmq67eV+H/n+x9M8gsKDxQU+dCPSEb2vJe odie"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINs89u4Kvwlmq67eV+H/n+x9M8gsKDxQU+dCPSEb2vJe odie"
|
||||||
];
|
];
|
||||||
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";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
overlays = import ./overlays { inherit inputs; };
|
||||||
overlays = [
|
in
|
||||||
inputs.nixvim.overlays.default
|
|
||||||
inputs.nur.overlay
|
|
||||||
inputs.nixgl.overlay
|
|
||||||
outputs.overlays.kodi
|
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
overlays = {
|
|
||||||
kodi = final: prev: {
|
|
||||||
kodi-standalone =
|
|
||||||
final.kodi-wayland.withPackages
|
|
||||||
(kodiPkgs:
|
|
||||||
with kodiPkgs; [
|
|
||||||
youtube
|
|
||||||
pvr-iptvsimple
|
|
||||||
keymap
|
|
||||||
inputstream-adaptive
|
|
||||||
inputstream-ffmpegdirect
|
|
||||||
requests-cache
|
|
||||||
inputstreamhelper
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
base = import ./modules/nixos/base;
|
base = import ./modules/nixos/base;
|
||||||
desktop = import ./modules/nixos/desktop;
|
desktop = import ./modules/nixos/desktop;
|
||||||
|
|
@ -66,11 +46,12 @@
|
||||||
server = import ./modules/nixos/server;
|
server = import ./modules/nixos/server;
|
||||||
};
|
};
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
flakeLib.mkNixosConfiguration {
|
flakeLib.mkNixosConfiguration
|
||||||
inherit inputs nixpkgs outputs vars flakeLib overlays;
|
{
|
||||||
system = "x86_64-linux";
|
inherit inputs nixpkgs outputs vars flakeLib overlays;
|
||||||
hostName = "vm";
|
system = "x86_64-linux";
|
||||||
}
|
hostName = "vm";
|
||||||
|
}
|
||||||
// flakeLib.mkNixosConfiguration {
|
// flakeLib.mkNixosConfiguration {
|
||||||
inherit inputs nixpkgs outputs vars flakeLib overlays;
|
inherit inputs nixpkgs outputs vars flakeLib overlays;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
@ -86,7 +67,7 @@
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
hostName = "wanaheim";
|
hostName = "wanaheim";
|
||||||
}
|
}
|
||||||
// {};
|
// { };
|
||||||
homeManagerModules = {
|
homeManagerModules = {
|
||||||
base = import ./modules/home-manager/base;
|
base = import ./modules/home-manager/base;
|
||||||
desktop = import ./modules/home-manager/desktop;
|
desktop = import ./modules/home-manager/desktop;
|
||||||
|
|
@ -98,14 +79,15 @@
|
||||||
binary-cache = import ./modules/home-manager/binary-cache;
|
binary-cache = import ./modules/home-manager/binary-cache;
|
||||||
};
|
};
|
||||||
homeConfigurations =
|
homeConfigurations =
|
||||||
flakeLib.mkHomeConfiguration {
|
flakeLib.mkHomeConfiguration
|
||||||
inherit inputs outputs nixpkgs flakeLib overlays;
|
{
|
||||||
vars = vars // {hostName = "wanaheim";};
|
inherit inputs outputs nixpkgs flakeLib overlays;
|
||||||
system = "x86_64-linux";
|
vars = vars // { hostName = "wanaheim"; };
|
||||||
}
|
system = "x86_64-linux";
|
||||||
|
}
|
||||||
// flakeLib.mkHomeConfiguration {
|
// flakeLib.mkHomeConfiguration {
|
||||||
inherit inputs outputs nixpkgs flakeLib overlays;
|
inherit inputs outputs nixpkgs flakeLib overlays;
|
||||||
vars = vars // {hostName = "asgard";};
|
vars = vars // { hostName = "asgard"; };
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
}
|
}
|
||||||
// flakeLib.mkHomeConfiguration {
|
// flakeLib.mkHomeConfiguration {
|
||||||
|
|
@ -118,16 +100,24 @@
|
||||||
};
|
};
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
};
|
};
|
||||||
|
templates = {
|
||||||
|
empty = {
|
||||||
|
path = ./templates/empty;
|
||||||
|
};
|
||||||
|
go = {
|
||||||
|
path = ./templates/go;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
// flake-utils.lib.eachDefaultSystem (system: {
|
// flake-utils.lib.eachDefaultSystem (system: {
|
||||||
packages = {
|
packages = {
|
||||||
neovim-ide = import ./pkgs/nixvim {inherit inputs system flakeLib nixpkgs vars;};
|
neovim-ide = import ./pkgs/nixvim { inherit inputs system flakeLib nixpkgs vars overlays; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
# System
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
treesitter-grammars.url = "github:viperML/tree-sitter";
|
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
nix-colors.url = "github:misterio77/nix-colors";
|
nix-colors.url = "github:misterio77/nix-colors";
|
||||||
systems.url = "github:nix-systems/default";
|
systems.url = "github:nix-systems/default";
|
||||||
|
|
@ -137,18 +127,6 @@
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixgl = {
|
|
||||||
url = "github:nix-community/nixGL";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
nixvim = {
|
|
||||||
url = "github:nix-community/nixvim";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
neovim-nightly-overlay = {
|
|
||||||
url = "github:nix-community/neovim-nightly-overlay";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
flake-utils = {
|
flake-utils = {
|
||||||
url = "github:numtide/flake-utils";
|
url = "github:numtide/flake-utils";
|
||||||
inputs.systems.follows = "systems";
|
inputs.systems.follows = "systems";
|
||||||
|
|
@ -157,6 +135,72 @@
|
||||||
url = "github:nix-community/NixOS-WSL";
|
url = "github:nix-community/NixOS-WSL";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
nixgl = {
|
||||||
|
url = "github:nix-community/nixGL";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
flakelight = {
|
||||||
|
url = "github:nix-community/flakelight";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Neovim
|
||||||
|
nixvim = {
|
||||||
|
url = "github:nix-community/nixvim";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
neovim-nightly-overlay = {
|
||||||
|
url = "github:nix-community/neovim-nightly-overlay";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nvim-spell-de-utf8-dictionary = {
|
||||||
|
url = "http://ftp.vim.org/vim/runtime/spell/de.utf-8.spl";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nvim-spell-de-utf8-suggestions = {
|
||||||
|
url = "http://ftp.vim.org/vim/runtime/spell/de.utf-8.sug";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nvim-spell-de-latin1-dictionary = {
|
||||||
|
url = "http://ftp.vim.org/vim/runtime/spell/de.latin1.spl";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nvim-spell-de-latin1-suggestions = {
|
||||||
|
url = "http://ftp.vim.org/vim/runtime/spell/de.latin1.sug";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
guihua = {
|
||||||
|
url = "github:ray-x/guihua.lua";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
neorg-overlay = {
|
||||||
|
url = "github:nvim-neorg/nixpkgs-neorg-overlay";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
flake-utils.follows = "flake-utils";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
|
treesitter-grammars = {
|
||||||
|
url = "github:ratson/nix-treesitter";
|
||||||
|
inputs.flakelight.follows = "flakelight";
|
||||||
|
};
|
||||||
|
|
||||||
|
norg.url = "github:nvim-neorg/tree-sitter-norg/dev";
|
||||||
|
norg-meta.url = "github:nvim-neorg/tree-sitter-norg-meta";
|
||||||
|
neorg = {
|
||||||
|
url = "github:nvim-neorg/neorg";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
neorg-telescope = {
|
||||||
|
url = "github:nvim-neorg/neorg-telescope";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Misc
|
||||||
csleeptimer = {
|
csleeptimer = {
|
||||||
url = "git+ssh://gitea@git.niederkassel.neff-steindesign.de/odie/csleeptimer.git";
|
url = "git+ssh://gitea@git.niederkassel.neff-steindesign.de/odie/csleeptimer.git";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
|
@ -165,12 +209,5 @@
|
||||||
systems.follows = "systems";
|
systems.follows = "systems";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
neorg-overlay = {
|
|
||||||
url = "github:nvim-neorg/nixpkgs-neorg-overlay";
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.follows = "nixpkgs";
|
|
||||||
flake-utils.follows = "flake-utils";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
_: {
|
{lib, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./gitea
|
./gitea
|
||||||
./neovim-ide
|
./neovim-ide
|
||||||
|
./ghidra
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
lazygit.enable = true;
|
lazygit.enable = lib.mkDefault true;
|
||||||
gitea-cli.enable = true;
|
gitea-cli.enable = lib.mkDefault true;
|
||||||
neovim-ide.enable = true;
|
neovim-ide.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
programs.ghidra.enable = lib.mkEnableOption "ghidra";
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.programs.ghidra.enable {
|
||||||
|
home.packages = [
|
||||||
|
pkgs.ghidra
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,16 +1,28 @@
|
||||||
|
{ outputs
|
||||||
|
, inputs
|
||||||
|
, pkgs
|
||||||
|
, config
|
||||||
|
, lib
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
outputs,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
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 = [ outputs.packages.${pkgs.system}.neovim-ide ];
|
||||||
|
|
||||||
|
sessionPath = [
|
||||||
|
"/home/odie/go/bin"
|
||||||
|
];
|
||||||
|
|
||||||
|
file = {
|
||||||
|
"${config.xdg.configHome}/nvim/spell/de.utf-8.spl".source = inputs.nvim-spell-de-utf8-dictionary;
|
||||||
|
"${config.xdg.configHome}/nvim/spell/de.utf-8.sug".source = inputs.nvim-spell-de-utf8-suggestions;
|
||||||
|
"${config.xdg.configHome}/nvim/spell/de.latin1.spl".source = inputs.nvim-spell-de-latin1-dictionary;
|
||||||
|
"${config.xdg.configHome}/nvim/spell/de.latin1.sug".source = inputs.nvim-spell-de-latin1-suggestions;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{lib, ...}: {
|
{ lib, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./fonts
|
./fonts
|
||||||
./sound
|
./sound
|
||||||
|
|
@ -20,5 +20,11 @@
|
||||||
upower.enable = lib.mkDefault true;
|
upower.enable = lib.mkDefault true;
|
||||||
gvfs.enable = lib.mkDefault true;
|
gvfs.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme = "qt5ct";
|
||||||
|
style= "kvantum";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,4 @@ lib.mkIf config.desktop.enable {
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
wireplumber.enable = true;
|
wireplumber.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
sound.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
{
|
{ lib
|
||||||
lib,
|
, config
|
||||||
config,
|
, vars
|
||||||
vars,
|
, pkgs
|
||||||
pkgs,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./i18n.nix
|
./i18n.nix
|
||||||
|
|
@ -29,18 +28,18 @@
|
||||||
vicious
|
vicious
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
libinput = {
|
};
|
||||||
enable = true;
|
libinput = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
# disabling mouse acceleration
|
# disabling mouse acceleration
|
||||||
mouse = {
|
mouse = {
|
||||||
accelProfile = "flat";
|
accelProfile = "flat";
|
||||||
};
|
};
|
||||||
|
|
||||||
# disabling touchpad acceleration
|
# disabling touchpad acceleration
|
||||||
touchpad = {
|
touchpad = {
|
||||||
accelProfile = "flat";
|
accelProfile = "flat";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,12 @@ let
|
||||||
pattern,
|
pattern,
|
||||||
indentSize ? 4,
|
indentSize ? 4,
|
||||||
expandTab ? true,
|
expandTab ? true,
|
||||||
|
spell ? false,
|
||||||
}: let
|
}: let
|
||||||
|
spell =
|
||||||
|
if expandTab
|
||||||
|
then "true"
|
||||||
|
else "false";
|
||||||
expandtab =
|
expandtab =
|
||||||
if expandTab
|
if expandTab
|
||||||
then "true"
|
then "true"
|
||||||
|
|
@ -19,6 +24,7 @@ let
|
||||||
setlocal.expandtab = ${expandtab}
|
setlocal.expandtab = ${expandtab}
|
||||||
setlocal.shiftwidth = ${builtins.toString indentSize}
|
setlocal.shiftwidth = ${builtins.toString indentSize}
|
||||||
setlocal.tabstop = ${builtins.toString indentSize}
|
setlocal.tabstop = ${builtins.toString indentSize}
|
||||||
|
setlocal.spell = ${spell}
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -39,5 +45,9 @@ in {
|
||||||
expandTab = false;
|
expandTab = false;
|
||||||
indentSize = 4;
|
indentSize = 4;
|
||||||
})
|
})
|
||||||
|
(mkFileTypeOptions {
|
||||||
|
pattern = ["*.norg"];
|
||||||
|
spell = true;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{inputs, pkgs, ...}: {
|
{ inputs, pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./colorscheme.nix
|
./colorscheme.nix
|
||||||
./options.nix
|
./options.nix
|
||||||
|
|
@ -9,8 +9,62 @@
|
||||||
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.neovim;
|
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
|
performance = {
|
||||||
|
byteCompileLua = {
|
||||||
|
enable = true;
|
||||||
|
configs = true;
|
||||||
|
initLua = true;
|
||||||
|
nvimRuntime = true;
|
||||||
|
plugins = true;
|
||||||
|
};
|
||||||
|
combinePlugins = {
|
||||||
|
enable = false;
|
||||||
|
standalonePlugins = [
|
||||||
|
"nvim-treesitter"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
#package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.neovim;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
fd
|
||||||
|
ripgrep
|
||||||
|
iferr
|
||||||
|
fswatch
|
||||||
|
reftools
|
||||||
|
libxcrypt
|
||||||
|
xz
|
||||||
|
icu74
|
||||||
|
nixpkgs-fmt
|
||||||
|
python3Packages.six
|
||||||
|
|
||||||
|
asm-lsp
|
||||||
|
|
||||||
|
|
||||||
|
];
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
{
|
||||||
|
plugin = go-nvim;
|
||||||
|
config = ''lua require("go").setup()'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = nvim-dap-go;
|
||||||
|
config = ''lua require("dap-go").setup()'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = telescope-dap-nvim;
|
||||||
|
config = ''lua require("telescope").load_extension("dap")'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = neorg-telescope;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = pkgs.vimUtils.buildVimPlugin {
|
||||||
|
name = "guihua";
|
||||||
|
src = inputs.guihua;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{ lib
|
||||||
pkgs,
|
, ...
|
||||||
lib,
|
}:
|
||||||
...
|
let
|
||||||
}: let
|
|
||||||
indentSize = 4;
|
indentSize = 4;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
programs.nixvim.ai = {
|
programs.nixvim.ai = {
|
||||||
enable = lib.mkEnableOption "AI functions";
|
enable = lib.mkEnableOption "AI functions";
|
||||||
|
|
@ -41,7 +41,7 @@ in {
|
||||||
visualbell = true;
|
visualbell = true;
|
||||||
errorbells = false;
|
errorbells = false;
|
||||||
#textwidth = 80;
|
#textwidth = 80;
|
||||||
colorcolumn = [80];
|
colorcolumn = [ 80 ];
|
||||||
cursorline = true;
|
cursorline = true;
|
||||||
undofile = true;
|
undofile = true;
|
||||||
backup = true;
|
backup = true;
|
||||||
|
|
@ -50,8 +50,7 @@ in {
|
||||||
mousemoveevent = true;
|
mousemoveevent = true;
|
||||||
timeoutlen = 300;
|
timeoutlen = 300;
|
||||||
list = true;
|
list = true;
|
||||||
#spell = true;
|
spelllang = [ "de" "en_us" ];
|
||||||
#spelllang = ["de" "en_us"];
|
|
||||||
helplang = "de";
|
helplang = "de";
|
||||||
laststatus = 3;
|
laststatus = 3;
|
||||||
conceallevel = 0;
|
conceallevel = 0;
|
||||||
|
|
@ -59,41 +58,7 @@ in {
|
||||||
signcolumn = "yes";
|
signcolumn = "yes";
|
||||||
foldlevel = 999;
|
foldlevel = 999;
|
||||||
};
|
};
|
||||||
extraPackages = with pkgs; [
|
|
||||||
fd
|
|
||||||
ripgrep
|
|
||||||
iferr
|
|
||||||
fswatch
|
|
||||||
reftools
|
|
||||||
golines
|
|
||||||
richgo
|
|
||||||
gofumpt
|
|
||||||
govulncheck
|
|
||||||
mockgen
|
|
||||||
ginkgo
|
|
||||||
gotestsum
|
|
||||||
libxcrypt
|
|
||||||
xz
|
|
||||||
icu74
|
|
||||||
alejandra
|
|
||||||
vscode-extensions.ms-vscode.cpptools
|
|
||||||
nixpkgs-fmt
|
|
||||||
asm-lsp
|
|
||||||
];
|
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
|
||||||
{
|
|
||||||
plugin = go-nvim;
|
|
||||||
config = ''lua require("go").setup()'';
|
|
||||||
}
|
|
||||||
{
|
|
||||||
plugin = nvim-dap-go;
|
|
||||||
config = ''lua require("dap-go").setup()'';
|
|
||||||
}
|
|
||||||
{
|
|
||||||
plugin = telescope-dap-nvim;
|
|
||||||
config = ''lua require("telescope").load_extension("dap")'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
vim.opt.undodir = vim.fn.stdpath("state") .. "/undo"
|
vim.opt.undodir = vim.fn.stdpath("state") .. "/undo"
|
||||||
vim.opt.backupdir = vim.fn.stdpath("state") .. "/backup"
|
vim.opt.backupdir = vim.fn.stdpath("state") .. "/backup"
|
||||||
|
|
@ -127,6 +92,9 @@ in {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraConfigLuaPre = ''
|
extraConfigLuaPre = ''
|
||||||
|
vim.opt.runtimepath:prepend(',~/.config/nvim')
|
||||||
|
vim.opt.runtimepath:append(',~/.config/nvim/after')
|
||||||
|
|
||||||
local colors = require("catppuccin.palettes").get_palette("mocha")
|
local colors = require("catppuccin.palettes").get_palette("mocha")
|
||||||
local pickers = require("telescope.pickers")
|
local pickers = require("telescope.pickers")
|
||||||
local finders = require("telescope.finders")
|
local finders = require("telescope.finders")
|
||||||
|
|
|
||||||
|
|
@ -9,15 +9,9 @@
|
||||||
};
|
};
|
||||||
adapters = {
|
adapters = {
|
||||||
executables = {
|
executables = {
|
||||||
lldb = {
|
gdb = {
|
||||||
command = "${pkgs.llvmPackages.lldb}/bin/lldb-vscode";
|
command = "${pkgs.gdb}/bin/gdb";
|
||||||
};
|
args = ["--interpreter=dap" "--eval-command" "set pretty print on"];
|
||||||
};
|
|
||||||
servers.codelldb = rec {
|
|
||||||
port = 13000;
|
|
||||||
executable = {
|
|
||||||
command = "${pkgs.vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb";
|
|
||||||
args = ["--port" (builtins.toString port)];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -28,10 +22,10 @@
|
||||||
{
|
{
|
||||||
name = "Launch";
|
name = "Launch";
|
||||||
request = "launch";
|
request = "launch";
|
||||||
type = "codelldb";
|
type = "gdb";
|
||||||
cwd = "\${workspaceFolder}";
|
cwd = "\${workspaceFolder}";
|
||||||
stopOnEntry = false;
|
stopOnEntry = false;
|
||||||
runInTerminal = false;
|
runInTerminal = true;
|
||||||
program = {
|
program = {
|
||||||
__raw = ''
|
__raw = ''
|
||||||
get_program
|
get_program
|
||||||
|
|
@ -41,10 +35,10 @@
|
||||||
{
|
{
|
||||||
name = "Launch with Arguments";
|
name = "Launch with Arguments";
|
||||||
request = "launch";
|
request = "launch";
|
||||||
type = "codelldb";
|
type = "gdb";
|
||||||
cwd = "\${workspaceFolder}";
|
cwd = "\${workspaceFolder}";
|
||||||
stopOnEntry = false;
|
stopOnEntry = false;
|
||||||
runInTerminal = false;
|
runInTerminal = true;
|
||||||
program = {
|
program = {
|
||||||
__raw = ''
|
__raw = ''
|
||||||
get_program
|
get_program
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
./treesitter.nix
|
./treesitter.nix
|
||||||
./trouble.nix
|
./trouble.nix
|
||||||
./undotree.nix
|
./undotree.nix
|
||||||
|
./notify.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
plugins = {
|
plugins = {
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, config, lib, ... }: {
|
||||||
plugins.lualine = {
|
plugins.lualine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
sections = {
|
settings = {
|
||||||
lualine_a = ["" "mode"];
|
sections = {
|
||||||
lualine_b = [
|
lualine_a = [ "" "mode" ];
|
||||||
"branch"
|
lualine_b = [
|
||||||
"diff"
|
"branch"
|
||||||
];
|
"diff"
|
||||||
lualine_c = [
|
];
|
||||||
{
|
lualine_c = [
|
||||||
name = "filetype";
|
{
|
||||||
extraConfig = {icon_only = true;};
|
__unkeyed-1 = "filetype";
|
||||||
}
|
icon_only = true;
|
||||||
"filename"
|
}
|
||||||
"diagnostics"
|
"filename"
|
||||||
{
|
"diagnostics"
|
||||||
name = "lsp_progress";
|
{
|
||||||
extraConfig = {
|
__unkeyed-1 = "lsp_progress";
|
||||||
display_components = [
|
display_components = [
|
||||||
"lsp_client_name"
|
"lsp_client_name"
|
||||||
[
|
[
|
||||||
|
|
@ -27,73 +27,75 @@
|
||||||
];
|
];
|
||||||
colors = {
|
colors = {
|
||||||
use = true;
|
use = true;
|
||||||
lsp_client_name = { __raw = "colors.sapphire"; };
|
lsp_client_name = lib.nixvim.mkRaw "colors.sapphire";
|
||||||
percentage = { __raw = "colors.blue"; };
|
percentage = lib.nixvim.mkRaw "colors.blue";
|
||||||
spinner = { __raw = "colors.blue"; };
|
spinner = lib.nixvim.mkRaw "colors.blue";
|
||||||
title = { __raw = "colors.subtext1"; };
|
title = lib.nixvim.mkRaw "colors.subtext1";
|
||||||
message = { __raw = "colors.subtext0"; };
|
message = lib.nixvim.mkRaw "colors.subtext0";
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
}
|
];
|
||||||
];
|
lualine_x = [ "" ];
|
||||||
lualine_x = [""];
|
lualine_y = [
|
||||||
lualine_y = [
|
"encoding"
|
||||||
"encoding"
|
"fileformat"
|
||||||
"fileformat"
|
];
|
||||||
];
|
lualine_z = [
|
||||||
lualine_z = [
|
"progress"
|
||||||
"progress"
|
];
|
||||||
];
|
};
|
||||||
};
|
winbar = {
|
||||||
winbar = {
|
lualine_x = [
|
||||||
lualine_x = [
|
{
|
||||||
{
|
__unkeyed-1 = "filename";
|
||||||
name = "filename";
|
path = 1;
|
||||||
extraConfig = {path = 1;};
|
}
|
||||||
}
|
{
|
||||||
{
|
__unkeyed-1 = "filetype";
|
||||||
name = "filetype";
|
icon_only = true;
|
||||||
extraConfig = {icon_only = true;};
|
}
|
||||||
}
|
];
|
||||||
];
|
};
|
||||||
};
|
inactive_winbar = {
|
||||||
inactiveWinbar = {
|
lualine_x = [
|
||||||
lualine_x = [
|
"diagnostics"
|
||||||
"diagnostics"
|
{
|
||||||
{
|
__unkeyed-1 = "filename";
|
||||||
name = "filename";
|
path = 1;
|
||||||
extraConfig = {path = 1;};
|
}
|
||||||
}
|
{
|
||||||
{
|
__unkeyed-1 = "filetype";
|
||||||
name = "filetype";
|
icon_only = true;
|
||||||
extraConfig = {icon_only = true;};
|
}
|
||||||
}
|
];
|
||||||
];
|
};
|
||||||
};
|
extensions = [ "fugitive" "lazy" "man" "neo-tree" "nvim-dap-ui" "quickfix" ];
|
||||||
extensions = ["fugitive" "lazy" "man" "neo-tree" "nvim-dap-ui" "quickfix"];
|
options = {
|
||||||
componentSeparators = {
|
theme = "catppuccin";
|
||||||
left = "";
|
component_separators = {
|
||||||
right = "";
|
left = "";
|
||||||
};
|
right = "";
|
||||||
sectionSeparators = {
|
};
|
||||||
left = "";
|
section_separators = {
|
||||||
right = "";
|
left = "";
|
||||||
};
|
right = "";
|
||||||
theme = "catppuccin";
|
};
|
||||||
disabledFiletypes = {
|
};
|
||||||
statusline = [];
|
disabled_filetypes = {
|
||||||
winbar = [
|
statusline = [ ];
|
||||||
"help"
|
winbar = [
|
||||||
"lazy"
|
"help"
|
||||||
"neo-tree"
|
"lazy"
|
||||||
"dapui_stacks"
|
"neo-tree"
|
||||||
"dapui_watches"
|
"dapui_stacks"
|
||||||
"dapui_breakpoints"
|
"dapui_watches"
|
||||||
"dapui_scopes"
|
"dapui_breakpoints"
|
||||||
"dapui_console"
|
"dapui_scopes"
|
||||||
"dap-repl"
|
"dapui_console"
|
||||||
"fugitive"
|
"dap-repl"
|
||||||
];
|
"fugitive"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
|
|
||||||
|
|
@ -1,52 +1,40 @@
|
||||||
{vars, ...}: {
|
{vars, lib, inputs, ...}: {
|
||||||
plugins.neorg = {
|
plugins.neorg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
modules = {
|
modules = {
|
||||||
"core.defaults" = {
|
"core.defaults" = lib.nixvim.emptyTable;
|
||||||
__empty = null;
|
|
||||||
};
|
|
||||||
"core.concealer" = {
|
|
||||||
config = {
|
|
||||||
init_open_folds = "auto";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"core.dirman" = {
|
"core.dirman" = {
|
||||||
config = {
|
config = {
|
||||||
inherit (vars.notes) workspaces;
|
inherit (vars.notes) workspaces;
|
||||||
default_workspace = "general";
|
default_workspace = "general";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"core.concealer" = {
|
||||||
|
config = {
|
||||||
|
init_open_folds = "auto";
|
||||||
|
};
|
||||||
|
};
|
||||||
"core.completion" = {
|
"core.completion" = {
|
||||||
config = {
|
config = {
|
||||||
engine = "nvim-cmp";
|
engine = "nvim-cmp";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"core.summary" = {
|
|
||||||
__empty = null;
|
|
||||||
};
|
|
||||||
"core.tangle" = {
|
|
||||||
__empty = null;
|
|
||||||
};
|
|
||||||
"core.export" = {
|
"core.export" = {
|
||||||
config = {
|
config = {
|
||||||
export_dir = "~/Sync/notes-export";
|
export_dir = "~/Sync/notes-export";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"core.export.markdown" = {
|
|
||||||
__empty = null;
|
|
||||||
};
|
|
||||||
"core.esupports.metagen" = {
|
"core.esupports.metagen" = {
|
||||||
config = {
|
config = {
|
||||||
type = "auto";
|
type = "auto";
|
||||||
author = vars.name;
|
author = vars.name;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"core.integrations.telescope" = {
|
"core.export.markdown" = lib.nixvim.emptyTable;
|
||||||
__empty = null;
|
"core.summary" = lib.nixvim.emptyTable;
|
||||||
};
|
"core.tangle" = lib.nixvim.emptyTable;
|
||||||
"core.ui.calendar" = {
|
"core.integrations.telescope" = lib.nixvim.emptyTable;
|
||||||
__empty = null;
|
"core.ui.calendar" = lib.nixvim.emptyTable;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
keymaps = [
|
keymaps = [
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
formatting = {
|
formatting = {
|
||||||
phpcbf.enable = true;
|
phpcbf.enable = true;
|
||||||
goimports.enable = true;
|
goimports.enable = true;
|
||||||
asmfmt.enable = true;
|
#asmfmt.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ lib, ... }: {
|
||||||
|
plugins.notify = {
|
||||||
|
enable = true;
|
||||||
|
render = lib.nixvim.mkRaw "'wrapped-compact'";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -4,9 +4,13 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
indent.enable = true;
|
indent.enable = true;
|
||||||
|
highlight.enable = true;
|
||||||
};
|
};
|
||||||
folding = true;
|
folding = true;
|
||||||
grammarPackages = [ inputs.treesitter-grammars.packages.${pkgs.system}.nvim-grammar-bundle ];
|
nixGrammars = true;
|
||||||
|
grammarPackages = [
|
||||||
|
inputs.treesitter-grammars.packages.${pkgs.system}.default
|
||||||
|
];
|
||||||
};
|
};
|
||||||
treesitter-context.enable = true;
|
treesitter-context.enable = true;
|
||||||
ts-autotag.enable = true;
|
ts-autotag.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ inputs, ... }: [
|
||||||
|
(import ./neorg.nix { inherit inputs; })
|
||||||
|
(import ./kodi.nix { })
|
||||||
|
inputs.neovim-nightly-overlay.overlays.default
|
||||||
|
inputs.nixvim.overlays.default
|
||||||
|
inputs.nur.overlay
|
||||||
|
inputs.nixgl.overlay
|
||||||
|
]
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
_: final: prev: {
|
||||||
|
kodi-standalone =
|
||||||
|
final.kodi-wayland.withPackages
|
||||||
|
(kodiPkgs:
|
||||||
|
with kodiPkgs; [
|
||||||
|
youtube
|
||||||
|
pvr-iptvsimple
|
||||||
|
keymap
|
||||||
|
inputstream-adaptive
|
||||||
|
inputstream-ffmpegdirect
|
||||||
|
requests-cache
|
||||||
|
inputstreamhelper
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
{inputs,...}: final: prev:
|
||||||
|
let
|
||||||
|
inherit (inputs) norg norg-meta neorg neorg-telescope;
|
||||||
|
inherit (final.lib) attrValues elem filter filterAttrs isDerivation;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
vimPlugins = prev.vimPlugins.extend (f: p: {
|
||||||
|
nvim-treesitter =
|
||||||
|
let
|
||||||
|
norgGrammars = {
|
||||||
|
tree-sitter-norg = norg.defaultPackage.${final.system};
|
||||||
|
tree-sitter-norg-meta = norg-meta.defaultPackage.${final.system};
|
||||||
|
};
|
||||||
|
builtGrammars = (filterAttrs (_: isDerivation) p.nvim-treesitter.builtGrammars) // norgGrammars;
|
||||||
|
allGrammars = attrValues builtGrammars;
|
||||||
|
withPlugins = grammarFn:
|
||||||
|
p.nvim-treesitter.withPlugins (
|
||||||
|
_:
|
||||||
|
let
|
||||||
|
plugins = grammarFn builtGrammars;
|
||||||
|
in
|
||||||
|
plugins ++ (filter (p: !(elem p plugins)) (attrValues norgGrammars))
|
||||||
|
);
|
||||||
|
withAllGrammars = withPlugins (_: allGrammars);
|
||||||
|
in
|
||||||
|
p.nvim-treesitter.overrideAttrs (a: {
|
||||||
|
passthru = a.passthru // {
|
||||||
|
inherit builtGrammars allGrammars withPlugins withAllGrammars;
|
||||||
|
grammarPlugins = a.passthru.grammarPlugins // {
|
||||||
|
norg = norgGrammars.tree-sitter-norg;
|
||||||
|
norg-meta = norgGrammars.tree-sitter-norg-meta;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
lua-utils-nvim = final.vimUtils.buildVimPlugin {
|
||||||
|
inherit (prev.luaPackages.lua-utils-nvim) pname version src;
|
||||||
|
};
|
||||||
|
pathlib-nvim = final.vimUtils.buildVimPlugin {
|
||||||
|
inherit (prev.luaPackages.pathlib-nvim) pname version src;
|
||||||
|
};
|
||||||
|
neorg = final.vimUtils.buildVimPlugin {
|
||||||
|
pname = "neorg";
|
||||||
|
version = neorg.rev;
|
||||||
|
src = neorg;
|
||||||
|
dependencies = [
|
||||||
|
#(f.nvim-treesitter.withPlugins (_: [ ]))
|
||||||
|
f.lua-utils-nvim
|
||||||
|
f.nui-nvim
|
||||||
|
f.nvim-nio
|
||||||
|
f.pathlib-nvim
|
||||||
|
f.plenary-nvim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
neorg-telescope = final.vimUtils.buildVimPlugin {
|
||||||
|
pname = "neorg-telescope";
|
||||||
|
version = neorg-telescope.rev;
|
||||||
|
src = neorg-telescope;
|
||||||
|
dependencies = [
|
||||||
|
f.telescope-nvim
|
||||||
|
f.neorg
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -4,15 +4,12 @@
|
||||||
inputs,
|
inputs,
|
||||||
flakeLib,
|
flakeLib,
|
||||||
vars,
|
vars,
|
||||||
|
overlays,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
nixvim' = inputs.nixvim.legacyPackages.${system};
|
nixvim' = inputs.nixvim.legacyPackages.${system};
|
||||||
pkgs = flakeLib.mkPkgs {
|
pkgs = flakeLib.mkPkgs {
|
||||||
inherit system nixpkgs;
|
inherit system nixpkgs overlays;
|
||||||
overlays = [
|
|
||||||
inputs.neovim-nightly-overlay.overlays.default
|
|
||||||
inputs.neorg-overlay.overlays.default
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
module = {
|
module = {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,10 @@
|
||||||
outputs.homeManagerModules.development
|
outputs.homeManagerModules.development
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
ghidra.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
go
|
go
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{ outputs
|
||||||
outputs,
|
, vars
|
||||||
vars,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
outputs.nixosModules.home-manager
|
outputs.nixosModules.home-manager
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
{ pkgs ? (
|
||||||
|
let
|
||||||
|
inherit (builtins) fetchTree fromJSON readFile;
|
||||||
|
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix gitignore;
|
||||||
|
in
|
||||||
|
import (fetchTree nixpkgs.locked) {
|
||||||
|
overlays = [
|
||||||
|
(import "${fetchTree gomod2nix.locked}/overlay.nix")
|
||||||
|
(final: prev: (import "${fetchTree gitignore.locked}/default.nix") {
|
||||||
|
inherit (prev) lib;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
|
)
|
||||||
|
, gitignoreSource ? pkgs.gitignoreSource
|
||||||
|
, name
|
||||||
|
, version
|
||||||
|
}:
|
||||||
|
pkgs.mkDerivation {
|
||||||
|
inherit version;
|
||||||
|
pname = name;
|
||||||
|
pwd = ./.;
|
||||||
|
src = gitignoreSource ./.;
|
||||||
|
modules = ./gomod2nix.toml;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
{
|
||||||
|
outputs =
|
||||||
|
{ self
|
||||||
|
, nixpkgs
|
||||||
|
, flake-utils
|
||||||
|
, gitignore
|
||||||
|
, git-hooks
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
name = "project";
|
||||||
|
version = "0.0.0";
|
||||||
|
in
|
||||||
|
{ }
|
||||||
|
// flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [
|
||||||
|
gitignore.overlay
|
||||||
|
];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells.default = pkgs.callPackage ./shell.nix {
|
||||||
|
inherit (self.outputs.checks.${system}) pre-commit-check;
|
||||||
|
inherit name version;
|
||||||
|
};
|
||||||
|
packages.default = pkgs.callPackage ./. { inherit name version; };
|
||||||
|
checks = {
|
||||||
|
pre-commit-check = git-hooks.lib.${system}.run {
|
||||||
|
src = ./.;
|
||||||
|
hooks = {
|
||||||
|
nixpkgs-fmt.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
formatter = pkgs.nixpkgs-fmt;
|
||||||
|
});
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
systems.url = "github:nix-systems/x86_64-linux";
|
||||||
|
flake-utils = {
|
||||||
|
url = "github:numtide/flake-utils";
|
||||||
|
inputs.systems.follows = "systems";
|
||||||
|
};
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs
|
||||||
|
, name
|
||||||
|
, pre-commit-check
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
pkgs.mkShell {
|
||||||
|
inherit (pre-commit-check) shellHook;
|
||||||
|
buildInputs = pre-commit-check.enabledPackages;
|
||||||
|
name = "${name}-dev";
|
||||||
|
packages = [ ];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
# Direnv
|
||||||
|
.direnv
|
||||||
|
|
||||||
|
# Created by https://www.toptal.com/developers/gitignore/api/go
|
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=go
|
||||||
|
|
||||||
|
### Go ###
|
||||||
|
# If you prefer the allow list template instead of the deny list, see community template:
|
||||||
|
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
||||||
|
#
|
||||||
|
# Binaries for programs and plugins
|
||||||
|
*.exe
|
||||||
|
*.exe~
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# Test binary, built with `go test -c`
|
||||||
|
*.test
|
||||||
|
|
||||||
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
|
*.out
|
||||||
|
|
||||||
|
# Dependency directories (remove the comment below to include it)
|
||||||
|
vendor/
|
||||||
|
|
||||||
|
# Go workspace file
|
||||||
|
go.work
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/go
|
||||||
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ pkgs ? (
|
||||||
|
let
|
||||||
|
inherit (builtins) fetchTree fromJSON readFile;
|
||||||
|
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix gitignore;
|
||||||
|
in
|
||||||
|
import (fetchTree nixpkgs.locked) {
|
||||||
|
overlays = [
|
||||||
|
(import "${fetchTree gomod2nix.locked}/overlay.nix")
|
||||||
|
(final: prev: (import "${fetchTree gitignore.locked}/default.nix") {
|
||||||
|
inherit (prev) lib;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
|
)
|
||||||
|
, buildGoApplication ? pkgs.buildGoApplication
|
||||||
|
, gitignoreSource ? pkgs.gitignoreSource
|
||||||
|
, name
|
||||||
|
, version
|
||||||
|
}:
|
||||||
|
buildGoApplication {
|
||||||
|
inherit version;
|
||||||
|
pname = name;
|
||||||
|
pwd = ./.;
|
||||||
|
src = gitignoreSource ./.;
|
||||||
|
modules = ./gomod2nix.toml;
|
||||||
|
ldflags = [
|
||||||
|
"-w -s"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
{
|
||||||
|
outputs =
|
||||||
|
{ self
|
||||||
|
, nixpkgs
|
||||||
|
, flake-utils
|
||||||
|
, gomod2nix
|
||||||
|
, gitignore
|
||||||
|
, git-hooks
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
name = "project";
|
||||||
|
version = "0.0.0";
|
||||||
|
in
|
||||||
|
{ }
|
||||||
|
// flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [
|
||||||
|
gomod2nix.overlays.default
|
||||||
|
gitignore.overlay
|
||||||
|
];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells.default = pkgs.callPackage ./shell.nix {
|
||||||
|
inherit (self.outputs.checks.${system}) pre-commit-check;
|
||||||
|
inherit name version;
|
||||||
|
};
|
||||||
|
packages.default = pkgs.callPackage ./. { inherit name version; };
|
||||||
|
checks = {
|
||||||
|
pre-commit-check = git-hooks.lib.${system}.run {
|
||||||
|
src = ./.;
|
||||||
|
hooks = {
|
||||||
|
nixpkgs-fmt.enable = true;
|
||||||
|
gofmt.enable = true;
|
||||||
|
govet.enable = true;
|
||||||
|
golangci-lint.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
formatter = pkgs.nixpkgs-fmt;
|
||||||
|
});
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
systems.url = "github:nix-systems/x86_64-linux";
|
||||||
|
flake-utils = {
|
||||||
|
url = "github:numtide/flake-utils";
|
||||||
|
inputs.systems.follows = "systems";
|
||||||
|
};
|
||||||
|
gomod2nix = {
|
||||||
|
url = "github:marksisson/gomod2nix?ref=patches/fix-mkgoenv-to-allow-passing-more-attributes";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
|
};
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
{ pkgs
|
||||||
|
, name
|
||||||
|
, mkGoEnv
|
||||||
|
, gomod2nix
|
||||||
|
, pre-commit-check
|
||||||
|
, go
|
||||||
|
, gotools
|
||||||
|
, go-tools
|
||||||
|
, delve
|
||||||
|
, golines
|
||||||
|
, richgo
|
||||||
|
, gotestsum
|
||||||
|
, golangci-lint
|
||||||
|
, gotests
|
||||||
|
, gomodifytags
|
||||||
|
, gofumpt
|
||||||
|
, govulncheck
|
||||||
|
, mockgen
|
||||||
|
, ginkgo
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
goEnv = mkGoEnv {
|
||||||
|
inherit go;
|
||||||
|
pwd = ./.;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
pkgs.mkShell {
|
||||||
|
inherit (pre-commit-check) shellHook;
|
||||||
|
buildInputs = pre-commit-check.enabledPackages;
|
||||||
|
name = "${name}-dev";
|
||||||
|
packages = [
|
||||||
|
goEnv
|
||||||
|
gomod2nix
|
||||||
|
gotools
|
||||||
|
go-tools
|
||||||
|
golines
|
||||||
|
richgo
|
||||||
|
gotestsum
|
||||||
|
gotests
|
||||||
|
delve
|
||||||
|
golangci-lint
|
||||||
|
gomodifytags
|
||||||
|
gofumpt
|
||||||
|
govulncheck
|
||||||
|
mockgen
|
||||||
|
ginkgo
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue