chore: Formatting
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m26s
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m26s
This commit is contained in:
@@ -5,8 +5,7 @@
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
imports = [
|
||||
inputs.nix-index-database.homeModules.nix-index
|
||||
../modules
|
||||
@@ -34,7 +33,9 @@
|
||||
home = {
|
||||
username = device.user;
|
||||
homeDirectory =
|
||||
if device.isDarwin then lib.mkForce "/Users/${device.user}" else lib.mkForce "/home/${device.user}";
|
||||
if device.isDarwin
|
||||
then lib.mkForce "/Users/${device.user}"
|
||||
else lib.mkForce "/home/${device.user}";
|
||||
|
||||
file = {
|
||||
".config/fish/themes".source = pkgs.catppuccinThemes.fish + "/themes";
|
||||
@@ -60,7 +61,10 @@
|
||||
EDITOR = "nvim";
|
||||
SHELL = "${pkgs.bash}/bin/bash";
|
||||
CARGO_TARGET_DIR = "${config.xdg.cacheHome}/cargo/target";
|
||||
BROWSER = if device.isDarwin then "open" else "xdg-open";
|
||||
BROWSER =
|
||||
if device.isDarwin
|
||||
then "open"
|
||||
else "xdg-open";
|
||||
};
|
||||
sessionPath = [
|
||||
"${config.home.homeDirectory}/.cargo/bin"
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
pkgs,
|
||||
device,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
imports = [
|
||||
../../modules
|
||||
./aichat.nix
|
||||
@@ -48,8 +47,7 @@
|
||||
# ./template.nix
|
||||
# ./zellij.nix
|
||||
];
|
||||
home.packages =
|
||||
with pkgs;
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
_1password-cli
|
||||
alejandra
|
||||
@@ -85,6 +83,6 @@
|
||||
nerd-fonts.hasklug
|
||||
nerd-fonts.symbols-only
|
||||
]
|
||||
++ lib.optionals device.isLinux [ ]
|
||||
++ lib.optionals device.isDarwin [ ];
|
||||
++ lib.optionals device.isLinux []
|
||||
++ lib.optionals device.isDarwin [];
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
imports = [
|
||||
./goread.nix
|
||||
./hyprpaper.nix
|
||||
|
||||
@@ -2,23 +2,21 @@
|
||||
pkgs,
|
||||
# config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
mkMappings =
|
||||
mappings:
|
||||
[ ]
|
||||
}: let
|
||||
mkMappings = mappings:
|
||||
[]
|
||||
++ (pkgs.lib.optionals (builtins.hasAttr "normal" mappings) (mkMode mappings.normal "n"))
|
||||
++ (pkgs.lib.optionals (builtins.hasAttr "terminal" mappings) (mkMode mappings.terminal "t"))
|
||||
++ (pkgs.lib.optionals (builtins.hasAttr "insert" mappings) (mkMode mappings.insert "i"))
|
||||
++ (pkgs.lib.optionals (builtins.hasAttr "visual" mappings) (mkMode mappings.visual "v"))
|
||||
++ (pkgs.lib.optionals (builtins.hasAttr "global" mappings) (mkMode mappings.global ""));
|
||||
mkMode =
|
||||
mappings: mode:
|
||||
mkMode = mappings: mode:
|
||||
pkgs.lib.mapAttrsToList (key: value: {
|
||||
key = key;
|
||||
action = rawLua value;
|
||||
mode = mode;
|
||||
}) mappings;
|
||||
})
|
||||
mappings;
|
||||
border = [
|
||||
"╭"
|
||||
"─"
|
||||
@@ -34,8 +32,7 @@ let
|
||||
${lua}
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
opts = {
|
||||
completeopt = "menu,menuone,popup,noselect";
|
||||
expandtab = true;
|
||||
@@ -137,12 +134,12 @@ in
|
||||
# command = "nnoremap <buffer> F :Sqlfmt<cr>";
|
||||
# }
|
||||
{
|
||||
event = [ "BufWinLeave" ];
|
||||
event = ["BufWinLeave"];
|
||||
pattern = "?*";
|
||||
command = "mkview!";
|
||||
}
|
||||
{
|
||||
event = [ "BufWinEnter" ];
|
||||
event = ["BufWinEnter"];
|
||||
pattern = "?*";
|
||||
command = "silent! loadview!";
|
||||
}
|
||||
@@ -172,10 +169,10 @@ in
|
||||
end
|
||||
'';
|
||||
formatters_by_ft = {
|
||||
d2 = [ "d2" ];
|
||||
sql = [ "sleek" ];
|
||||
toml = [ "taplo" ];
|
||||
nix = [ "alejandra" ];
|
||||
d2 = ["d2"];
|
||||
sql = ["sleek"];
|
||||
toml = ["taplo"];
|
||||
nix = ["alejandra"];
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -217,8 +214,8 @@ in
|
||||
mini = {
|
||||
enable = true;
|
||||
modules = {
|
||||
ai = { };
|
||||
starter = { };
|
||||
ai = {};
|
||||
starter = {};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -394,28 +391,28 @@ in
|
||||
server = {
|
||||
on_attach =
|
||||
rawLua
|
||||
# lua
|
||||
''
|
||||
function(client, bufnr)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>a",
|
||||
function()
|
||||
vim.cmd.RustLsp('codeAction') -- supports rust-analyzer's grouping
|
||||
-- or vim.lsp.buf.codeAction() if you don't want grouping.
|
||||
end,
|
||||
{ silent = true, buffer = bufnr }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"K", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions
|
||||
function()
|
||||
vim.cmd.RustLsp({'hover', 'actions'})
|
||||
end,
|
||||
{ silent = true, buffer = bufnr }
|
||||
)
|
||||
end
|
||||
'';
|
||||
# lua
|
||||
''
|
||||
function(client, bufnr)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>a",
|
||||
function()
|
||||
vim.cmd.RustLsp('codeAction') -- supports rust-analyzer's grouping
|
||||
-- or vim.lsp.buf.codeAction() if you don't want grouping.
|
||||
end,
|
||||
{ silent = true, buffer = bufnr }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"K", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions
|
||||
function()
|
||||
vim.cmd.RustLsp({'hover', 'actions'})
|
||||
end,
|
||||
{ silent = true, buffer = bufnr }
|
||||
)
|
||||
end
|
||||
'';
|
||||
default_settings = {
|
||||
rust-analyzer = {
|
||||
inlayHints = {
|
||||
@@ -447,28 +444,25 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
dap =
|
||||
let
|
||||
vscode-lldb = pkgs.vscode-extensions.vadimcn.vscode-lldb;
|
||||
liblldb =
|
||||
if pkgs.stdenv.isLinux then
|
||||
"${vscode-lldb.lldb}/lib/liblldb.so"
|
||||
else if pkgs.stdenv.isDarwin then
|
||||
"${vscode-lldb.lldb}/lib/liblldb.dylib"
|
||||
else
|
||||
null;
|
||||
codelldb = "${vscode-lldb.adapter}/bin/codelldb";
|
||||
in
|
||||
{
|
||||
autoload_configurations = false;
|
||||
# adapter =
|
||||
# /*
|
||||
# lua
|
||||
# */
|
||||
# ''
|
||||
# require('rustaceanvim.config').get_codelldb_adapter("${codelldb}", "${liblldb}")
|
||||
# '';
|
||||
};
|
||||
dap = let
|
||||
vscode-lldb = pkgs.vscode-extensions.vadimcn.vscode-lldb;
|
||||
liblldb =
|
||||
if pkgs.stdenv.isLinux
|
||||
then "${vscode-lldb.lldb}/lib/liblldb.so"
|
||||
else if pkgs.stdenv.isDarwin
|
||||
then "${vscode-lldb.lldb}/lib/liblldb.dylib"
|
||||
else null;
|
||||
codelldb = "${vscode-lldb.adapter}/bin/codelldb";
|
||||
in {
|
||||
autoload_configurations = false;
|
||||
# adapter =
|
||||
# /*
|
||||
# lua
|
||||
# */
|
||||
# ''
|
||||
# require('rustaceanvim.config').get_codelldb_adapter("${codelldb}", "${liblldb}")
|
||||
# '';
|
||||
};
|
||||
tools = {
|
||||
float_win_config = {
|
||||
border = "rounded";
|
||||
@@ -516,7 +510,7 @@ in
|
||||
typeHints.enable = false;
|
||||
};
|
||||
check = {
|
||||
features = [ "default" ];
|
||||
features = ["default"];
|
||||
};
|
||||
files.exclude = [
|
||||
".cargo/"
|
||||
@@ -575,26 +569,26 @@ in
|
||||
settings = {
|
||||
autoEnableSources = true;
|
||||
sources = [
|
||||
{ name = "buffer"; }
|
||||
{ name = "buffer"; }
|
||||
{ name = "cmdline"; }
|
||||
{ name = "cmp-clippy"; }
|
||||
{ name = "cmp-cmdline-history"; }
|
||||
{ name = "crates"; }
|
||||
{ name = "dap"; }
|
||||
{name = "buffer";}
|
||||
{name = "buffer";}
|
||||
{name = "cmdline";}
|
||||
{name = "cmp-clippy";}
|
||||
{name = "cmp-cmdline-history";}
|
||||
{name = "crates";}
|
||||
{name = "dap";}
|
||||
# {name = "dictionary";}
|
||||
{ name = "fish"; }
|
||||
{ name = "git"; }
|
||||
{ name = "luasnip"; }
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "nvim_lua"; }
|
||||
{ name = "nvim_lsp_signature_help"; }
|
||||
{ name = "nvim_lsp_document_symbol"; }
|
||||
{ name = "path"; }
|
||||
{ name = "rg"; }
|
||||
{ name = "spell"; }
|
||||
{ name = "tmux"; }
|
||||
{ name = "treesitter"; }
|
||||
{name = "fish";}
|
||||
{name = "git";}
|
||||
{name = "luasnip";}
|
||||
{name = "nvim_lsp";}
|
||||
{name = "nvim_lua";}
|
||||
{name = "nvim_lsp_signature_help";}
|
||||
{name = "nvim_lsp_document_symbol";}
|
||||
{name = "path";}
|
||||
{name = "rg";}
|
||||
{name = "spell";}
|
||||
{name = "tmux";}
|
||||
{name = "treesitter";}
|
||||
];
|
||||
view = {
|
||||
entries = {
|
||||
@@ -788,8 +782,8 @@ in
|
||||
pkgs.tree-sitter-grammars.tree-sitter-norg-meta
|
||||
pkgs.tree-sitter-grammars.tree-sitter-nu
|
||||
];
|
||||
extraLuaPackages =
|
||||
luaPkgs: with luaPkgs; [
|
||||
extraLuaPackages = luaPkgs:
|
||||
with luaPkgs; [
|
||||
lua-utils-nvim
|
||||
nvim-nio
|
||||
pathlib-nvim
|
||||
|
||||
@@ -1,29 +1,33 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/1f72dde1-a713-4e69-a272-39a8324368c2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/1f72dde1-a713-4e69-a272-39a8324368c2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2CFD-2F25";
|
||||
fsType = "vfat";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/2CFD-2F25";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
imports = [
|
||||
./atuin.nix
|
||||
./authelia.nix
|
||||
|
||||
@@ -3,12 +3,11 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
virtualisation.docker.enable = true;
|
||||
sops = {
|
||||
# secrets."gitea/registration".owner = config.systemd.services.gitea-actions-mirai.serviceConfig.User;
|
||||
secrets."gitea/registration" = { };
|
||||
secrets."gitea/registration" = {};
|
||||
secrets."authelia/oidc/gitea/client_secret" = {
|
||||
owner = config.systemd.services.authelia-darksailor.serviceConfig.User;
|
||||
mode = "0440";
|
||||
@@ -128,8 +127,8 @@
|
||||
"email"
|
||||
"profile"
|
||||
];
|
||||
response_types = [ "code" ];
|
||||
grant_types = [ "authorization_code" ];
|
||||
response_types = ["code"];
|
||||
grant_types = ["authorization_code"];
|
||||
userinfo_signed_response_alg = "none";
|
||||
token_endpoint_auth_method = "client_secret_post";
|
||||
}
|
||||
@@ -141,35 +140,33 @@
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.gitea-oauth-setup =
|
||||
let
|
||||
name = "authelia";
|
||||
gitea_oauth_script = pkgs.writeShellApplication {
|
||||
name = "gitea_oauth2_script";
|
||||
runtimeInputs = [ config.services.gitea.package ];
|
||||
text = ''
|
||||
gitea admin auth delete --id "$(gitea admin auth list | grep "${name}" | cut -d "$(printf '\t')" -f1)"
|
||||
gitea admin auth add-oauth --provider=openidConnect --name=${name} --key="$CLIENT_ID" --secret="$CLIENT_SECRET" --auto-discover-url=https://auth.darksailor.dev/.well-known/openid-configuration --scopes='openid email profile'
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
description = "Configure Gitea OAuth with Authelia";
|
||||
after = [ "gitea.service" ];
|
||||
wants = [ "gitea.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = config.services.gitea.user;
|
||||
Group = config.services.gitea.group;
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "${lib.getExe gitea_oauth_script}";
|
||||
WorkingDirectory = config.services.gitea.stateDir;
|
||||
EnvironmentFile = config.sops.templates."GITEA_OAUTH_SETUP.env".path;
|
||||
};
|
||||
environment = {
|
||||
GITEA_WORK_DIR = config.services.gitea.stateDir;
|
||||
GITEA_CUSTOM = config.services.gitea.customDir;
|
||||
};
|
||||
systemd.services.gitea-oauth-setup = let
|
||||
name = "authelia";
|
||||
gitea_oauth_script = pkgs.writeShellApplication {
|
||||
name = "gitea_oauth2_script";
|
||||
runtimeInputs = [config.services.gitea.package];
|
||||
text = ''
|
||||
gitea admin auth delete --id "$(gitea admin auth list | grep "${name}" | cut -d "$(printf '\t')" -f1)"
|
||||
gitea admin auth add-oauth --provider=openidConnect --name=${name} --key="$CLIENT_ID" --secret="$CLIENT_SECRET" --auto-discover-url=https://auth.darksailor.dev/.well-known/openid-configuration --scopes='openid email profile'
|
||||
'';
|
||||
};
|
||||
in {
|
||||
description = "Configure Gitea OAuth with Authelia";
|
||||
after = ["gitea.service"];
|
||||
wants = ["gitea.service"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = config.services.gitea.user;
|
||||
Group = config.services.gitea.group;
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "${lib.getExe gitea_oauth_script}";
|
||||
WorkingDirectory = config.services.gitea.stateDir;
|
||||
EnvironmentFile = config.sops.templates."GITEA_OAUTH_SETUP.env".path;
|
||||
};
|
||||
environment = {
|
||||
GITEA_WORK_DIR = config.services.gitea.stateDir;
|
||||
GITEA_CUSTOM = config.services.gitea.customDir;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
{config, ...}: {
|
||||
services = {
|
||||
grafana = {
|
||||
enable = true;
|
||||
@@ -112,7 +111,7 @@
|
||||
settings.process_names = [
|
||||
{
|
||||
name = "{{.Comm}}";
|
||||
cmdline = [ ".*" ];
|
||||
cmdline = [".*"];
|
||||
}
|
||||
];
|
||||
};
|
||||
@@ -122,14 +121,14 @@
|
||||
job_name = "node";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "127.0.0.1:9100" ];
|
||||
targets = ["127.0.0.1:9100"];
|
||||
labels = {
|
||||
device = "mirai";
|
||||
type = "server";
|
||||
};
|
||||
}
|
||||
{
|
||||
targets = [ "tsuba:9100" ];
|
||||
targets = ["tsuba:9100"];
|
||||
labels = {
|
||||
device = "tsuba";
|
||||
type = "server";
|
||||
@@ -137,7 +136,7 @@
|
||||
};
|
||||
}
|
||||
{
|
||||
targets = [ "ryu:9100" ];
|
||||
targets = ["ryu:9100"];
|
||||
labels = {
|
||||
device = "ryu";
|
||||
type = "desktop";
|
||||
@@ -150,14 +149,14 @@
|
||||
job_name = "process";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "127.0.0.1:9256" ];
|
||||
targets = ["127.0.0.1:9256"];
|
||||
labels = {
|
||||
device = "mirai";
|
||||
type = "server";
|
||||
};
|
||||
}
|
||||
{
|
||||
targets = [ "tsuba:9256" ];
|
||||
targets = ["tsuba:9256"];
|
||||
labels = {
|
||||
device = "tsuba";
|
||||
type = "server";
|
||||
@@ -165,7 +164,7 @@
|
||||
};
|
||||
}
|
||||
{
|
||||
targets = [ "ryu:9256" ];
|
||||
targets = ["ryu:9256"];
|
||||
labels = {
|
||||
device = "ryu";
|
||||
type = "desktop";
|
||||
@@ -178,7 +177,7 @@
|
||||
job_name = "prometheus";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "127.0.0.1:9090" ];
|
||||
targets = ["127.0.0.1:9090"];
|
||||
labels = {
|
||||
device = "mirai";
|
||||
};
|
||||
|
||||
@@ -3,12 +3,11 @@
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
sops = {
|
||||
secrets."llama/api_key".owner = config.services.caddy.user;
|
||||
secrets."llama/user".owner = config.services.caddy.user;
|
||||
secrets."openai/api_key" = { };
|
||||
secrets."openai/api_key" = {};
|
||||
templates = {
|
||||
"LLAMA_API_KEY.env".content = ''
|
||||
LLAMA_API_KEY=${config.sops.placeholder."llama/api_key"}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
imports = [
|
||||
# ./rsyncd.nix
|
||||
# ./sunshine.nix
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
services = {
|
||||
prometheus = {
|
||||
exporters = {
|
||||
@@ -24,7 +23,7 @@
|
||||
settings.process_names = [
|
||||
{
|
||||
name = "{{.Comm}}";
|
||||
cmdline = [ ".*" ];
|
||||
cmdline = [".*"];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
services = {
|
||||
hardware.openrgb.enable = true;
|
||||
};
|
||||
|
||||
@@ -83,4 +83,3 @@
|
||||
|
||||
# Optional: Enable looking glass for low-latency VM display
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
imports = [
|
||||
./tailscale.nix
|
||||
./samba.nix
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
services = {
|
||||
prometheus = {
|
||||
exporters = {
|
||||
@@ -24,7 +23,7 @@
|
||||
settings.process_names = [
|
||||
{
|
||||
name = "{{.Comm}}";
|
||||
cmdline = [ ".*" ];
|
||||
cmdline = [".*"];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user