Compare commits

...

28 commits

Author SHA1 Message Date
Leonardo Eugênio 4344704394 monolith: add forgejo runner 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 0cb501b43d sshd: disable until xz is secure 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 7ca6c3b681 sway: add more env vars to dbus activation 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 9bfd276bdc flake: update lockfile 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 28eca0de78 syncthing: way for tray 2024-04-06 20:53:27 -03:00
Leonardo Eugênio f4ac904d47 kdenlive: fix theme 2024-04-06 20:53:27 -03:00
Leonardo Eugênio b38bd123f4 theme: improve qt theming 2024-04-06 20:53:27 -03:00
Leonardo Eugênio a033fb50f9 syncthing: enable tray icon 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 81a20bfafe mangohud: install patch to fix keybind crash 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 3fc56ee4d9 gpg: simplify config 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 8fecbbd78d update 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 9b258af023 lsp: replace rnix-lsp with nil 2024-04-06 20:53:27 -03:00
Leonardo Eugênio bf19e2c79d update 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 251d52c56e btop: enable gpu monitoring 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 2d42832d13 update 2024-04-06 20:53:27 -03:00
Leonardo Eugênio d362dd864c kak-lsp: update config to new format 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 8f3d2cacb5 alacritty: update config 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 8da08f5bee update renamed xkb config 2024-04-06 20:53:27 -03:00
Leonardo Eugênio ac8038d53b update 2024-04-06 20:53:27 -03:00
Leonardo Eugênio a2d92f034b update 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 16342e203e update 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 51e3c38d59 sway: disable adaptive sync 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 0ab0c2c5d4 update 2024-04-06 20:53:27 -03:00
Leonardo Eugênio d4bf6aa8ff update 2024-04-06 20:53:27 -03:00
Leonardo Eugênio c520de0236 switch to nixpkgs unstable 2024-04-06 20:53:27 -03:00
Leonardo Eugênio 68a7125822 phantom: add script to update, fmt 2024-04-06 20:44:20 -03:00
Leonardo Eugênio d0dd646246 mastodon: clean up media more often 2024-04-06 20:38:46 -03:00
Leonardo Eugênio 5edca9c2c6 phandom: add forgejo server 2024-04-06 20:38:35 -03:00
29 changed files with 219 additions and 285 deletions

View file

@ -508,16 +508,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1706981411, "lastModified": 1710532761,
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=", "narHash": "sha256-SUXGZNrXX05YA9G6EmgupxhOr3swI1gcxLUeDMUhrEY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "652fda4ca6dafeb090943422c34ae9145787af37", "rev": "206f457fffdb9a73596a4cb2211a471bd305243d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -561,11 +560,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1710864211, "lastModified": 1710538160,
"narHash": "sha256-Uve1/UBnwD4M/9xD0E3XATnLrF8B5vL6MTBhX6Is+TE=", "narHash": "sha256-p5Wkl2rXjFftd+Nugiq71BgGAl4E9byYxKV0ahLTo+U=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "bcba3951f45f11245d424274130eb3a0ac790d93", "rev": "2a2da6082e5f1501731004b755d35a8dbb605fde",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -709,11 +708,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1710644923, "lastModified": 1710120787,
"narHash": "sha256-0fjbN5GYYDKPyPay0l8gYoH+tFfNqPPwP5sxxBreeA4=", "narHash": "sha256-tlLuB73OCOKtU2j83bQzSYFyzjJo3rjpITZE5MoofG8=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "e25efda85e39fcdc845e371971ac4384989c4295", "rev": "e76ff2df6bfd2abe06abd8e7b9f217df941c1b07",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -866,16 +865,16 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1710695816, "lastModified": 1710451336,
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "614b4613980a522ba49f0d194531beddbb7220d3", "rev": "d691274a972b3165335d261cc4671335f5c67de9",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
"ref": "nixos-23.11", "ref": "nixos-unstable",
"type": "indirect" "type": "indirect"
} }
}, },

View file

@ -1,8 +1,8 @@
{ {
description = "My system config"; description = "My system config";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11"; nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-23.11"; home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database = { nix-index-database = {
@ -76,17 +76,9 @@
overlays = old_overlays.all; overlays = old_overlays.all;
}; };
bootstrapPkgs = import inputs.nixpkgs nixpkgsConfig;
nixpkgs = bootstrapPkgs.applyPatches {
name = "patched-nixpkgs";
src = inputs.nixpkgs;
patches = lib.mapAttrsToList (k: v: ./patches/nixpkgs/${k})
(builtins.readDir ./patches/nixpkgs);
};
inherit (import ./user/variables.nix) desktop; inherit (import ./user/variables.nix) desktop;
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs nixpkgsConfig; pkgs = import inputs.nixpkgs nixpkgsConfig;
lib = inputs.nixpkgs.lib; lib = inputs.nixpkgs.lib;
packages = import ./pkgs { inherit pkgs inputs; }; packages = import ./pkgs { inherit pkgs inputs; };
@ -131,6 +123,7 @@
modules = [ modules = [
./hosts/monolith.nix ./hosts/monolith.nix
./system/monolith-gitlab-runner.nix ./system/monolith-gitlab-runner.nix
./system/monolith-forgejo-runner.nix
./system/nix-serve.nix ./system/nix-serve.nix
./system/steam.nix ./system/steam.nix
] ++ common_modules; ] ++ common_modules;

View file

@ -43,6 +43,7 @@ in
vaapiVdpau vaapiVdpau
rocm-opencl-icd rocm-opencl-icd
rocm-opencl-runtime rocm-opencl-runtime
rocmPackages.rocm-smi
]; ];
programs.corectrl.enable = true; programs.corectrl.enable = true;

View file

@ -12,6 +12,7 @@
./writefreely.nix ./writefreely.nix
./renawiki.nix ./renawiki.nix
./email.nix ./email.nix
./forgejo.nix
]; ];
# # Enable networking # # Enable networking

View file

@ -9,13 +9,21 @@
mailserver = { mailserver = {
enable = true; enable = true;
fqdn = "mail.lelgenio.xyz"; fqdn = "mail.lelgenio.xyz";
domains = [ "lelgenio.xyz" ]; domains = [
"lelgenio.xyz"
"git.lelgenio.xyz"
];
certificateScheme = "acme-nginx"; certificateScheme = "acme-nginx";
# Create passwords with
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
loginAccounts = { loginAccounts = {
"lelgenio@lelgenio.xyz" = { "lelgenio@lelgenio.xyz" = {
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS"; hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
aliases = [ "postmaster@lelgenio.xyz" ]; aliases = [ "postmaster@lelgenio.xyz" ];
}; };
"noreply@git.lelgenio.xyz" = {
hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0.";
};
}; };
}; };

56
hosts/phantom/forgejo.nix Normal file
View file

@ -0,0 +1,56 @@
{ lib, pkgs, config, ... }:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
in
{
services.nginx = {
virtualHosts.${cfg.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = true;
extraConfig = ''
client_max_body_size 512M;
'';
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
};
};
services.openssh = {
authorizedKeysFiles = [
"${config.services.forgejo.stateDir}/.ssh/authorized_keys"
];
# Recommended by forgejo: https://forgejo.org/docs/latest/admin/recommendations/#git-over-ssh
settings.AcceptEnv = "GIT_PROTOCOL";
};
services.forgejo = {
enable = true;
database.type = "postgres";
lfs.enable = true;
settings = {
service.DISABLE_REGISTRATION = true;
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
server = {
DOMAIN = "git.lelgenio.xyz";
HTTP_PORT = 3000;
ROOT_URL = "https://${srv.DOMAIN}/";
};
mailer = {
ENABLED = true;
SMTP_ADDR = "mail.lelgenio.xyz";
FROM = "noreply@git.lelgenio.xyz";
USER = "noreply@git.lelgenio.xyz";
};
};
mailerPasswordFile = config.age.secrets.phantom-forgejo-mailer-password.path;
};
age.secrets.phantom-forgejo-mailer-password = {
file = ../../secrets/phantom-forgejo-mailer-password.age;
mode = "400";
owner = "forgejo";
};
}

View file

@ -6,5 +6,6 @@
smtp.fromAddress = "lelgenio@disroot.org"; smtp.fromAddress = "lelgenio@disroot.org";
streamingProcesses = 2; streamingProcesses = 2;
extraConfig.SINGLE_USER_MODE = "true"; extraConfig.SINGLE_USER_MODE = "true";
mediaAutoRemove.olderThanDays = 10;
}; };
} }

View file

@ -2,7 +2,7 @@
security.rtkit.enable = true; security.rtkit.enable = true;
services.openssh = { services.openssh = {
enable = true; enable = true;
ports = [ 9022 ]; ports = [ 9022 22 ];
settings = { settings = {
PasswordAuthentication = false; PasswordAuthentication = false;
KbdInteractiveAuthentication = false; KbdInteractiveAuthentication = false;

View file

@ -13,7 +13,8 @@ let
"1.1.1.1" "1.1.1.1"
"2606:4700:4700::1111" "2606:4700:4700::1111"
]; ];
in { in
{
networking.nameservers = mkDefault nameservers; networking.nameservers = mkDefault nameservers;
services.resolved = mkDefault { fallbackDns = nameservers; }; services.resolved = mkDefault { fallbackDns = nameservers; };
networking.dhcpcd.extraConfig = "noipv4ll"; networking.dhcpcd.extraConfig = "noipv4ll";
@ -21,7 +22,7 @@ in {
systemd.services.systemd-sysctl.enable = false; systemd.services.systemd-sysctl.enable = false;
systemd.services.systemd-oomd.enable = false; systemd.services.systemd-oomd.enable = false;
systemd.sockets."systemd-journald-audit".enable = false; systemd.sockets."systemd-journald-audit".enable = false;
systemd.mounts = [ {where = "/sys/kernel/debug"; enable = false;} ]; systemd.mounts = [{ where = "/sys/kernel/debug"; enable = false; }];
systemd.services.rpc-gssd.enable = false; systemd.services.rpc-gssd.enable = false;
# Due to our restrictions in /sys, the default systemd-udev-trigger fails # Due to our restrictions in /sys, the default systemd-udev-trigger fails

View file

@ -52,6 +52,14 @@
patches = old.patches patches = old.patches
++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ]; ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
}); });
mangohud = prev.mangohud.overrideAttrs (o: {
patches = o.patches ++ [
(prev.fetchpatch {
url = "https://github.com/flightlessmango/MangoHud/commit/95141de657e02577f1d3fab0ca12122bfb68bc56.patch";
hash = "sha256-a2tESliGBkfF7uYQn8TDgeFt07A9FOioI4VcTT7DC7A=";
})
];
});
}); });
variables = (final: prev: { variables = (final: prev: {

View file

@ -11,7 +11,7 @@
executable = true; executable = true;
text = '' text = ''
systemctl --user import-environment systemctl --user import-environment
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway SWAYSOCK
# systemctl --user stop pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr # systemctl --user stop pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
# systemctl --user start pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr # systemctl --user start pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
''; '';

View file

@ -1,27 +0,0 @@
From ac4d51306af54a088e29e2e5efcfac5dfe87d95c Mon Sep 17 00:00:00 2001
From: lelgenio <lelgenio@disroot.org>
Date: Fri, 4 Aug 2023 01:25:04 -0300
Subject: [PATCH] HACK: fix steam after generation switch
---
pkgs/build-support/build-fhsenv-bubblewrap/default.nix | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pkgs/build-support/build-fhsenv-bubblewrap/default.nix b/pkgs/build-support/build-fhsenv-bubblewrap/default.nix
index 3500e5e9216f..4d7ac0aa7618 100644
--- a/pkgs/build-support/build-fhsenv-bubblewrap/default.nix
+++ b/pkgs/build-support/build-fhsenv-bubblewrap/default.nix
@@ -152,6 +152,10 @@ let
fi
if [[ -L $i ]]; then
symlinks+=(--symlink "$(${coreutils}/bin/readlink "$i")" "$i")
+ elif [[ -f $i && -r $i ]]; then
+ SNAPSHOT=$(mktemp --dry-run)
+ cp "$i" "$SNAPSHOT"
+ ro_mounts+=(--ro-bind-try "$SNAPSHOT" "$i")
else
ro_mounts+=(--ro-bind-try "$i" "$i")
fi
--
2.42.0

Binary file not shown.

Binary file not shown.

View file

@ -5,9 +5,11 @@ in
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ]; "rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
"monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ]; "monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
"gitlab-runner-thoreb-telemetria-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ]; "gitlab-runner-thoreb-telemetria-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
"monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ];
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ]; "lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
"monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ]; "monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ];
"phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ]; "phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ];
"phantom-writefreely.age".publicKeys = [ main_ssh_public_key ]; "phantom-writefreely.age".publicKeys = [ main_ssh_public_key ];
"phantom-renawiki.age".publicKeys = [ main_ssh_public_key ]; "phantom-renawiki.age".publicKeys = [ main_ssh_public_key ];
"phantom-forgejo-mailer-password.age".publicKeys = [ main_ssh_public_key ];
} }

12
switch-phantom Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
nix fmt
git diff
nixos-rebuild switch --flake .#phantom \
--update-input nixpkgs \
--no-write-lock-file \
--build-host phantom \
--target-host phantom \
"$@"

View file

@ -11,6 +11,8 @@
./nix.nix ./nix.nix
]; ];
boot.kernelPackages = pkgs.linuxPackages_latest;
zramSwap.enable = true; zramSwap.enable = true;
programs.adb.enable = true; programs.adb.enable = true;
@ -38,9 +40,9 @@
# services.xserver.displayManager.autologin.user = "lelgenio"; # services.xserver.displayManager.autologin.user = "lelgenio";
# Configure keymap in X11 # Configure keymap in X11
services.xserver = { services.xserver.xkb = {
layout = "us"; layout = "us";
xkbVariant = "colemak"; variant = "colemak";
}; };
console.keyMap = "colemak"; console.keyMap = "colemak";
# Enable CUPS to print documents. # Enable CUPS to print documents.
@ -57,7 +59,7 @@
security.rtkit.enable = true; security.rtkit.enable = true;
services.openssh = { services.openssh = {
enable = true; enable = false;
ports = [ 9022 ]; ports = [ 9022 ];
settings = { settings = {
PermitRootLogin = "no"; PermitRootLogin = "no";

View file

@ -16,7 +16,7 @@ in {
gimp gimp
inkscape inkscape
krita krita
kdenlive kdePackages.kdenlive
pitivi pitivi
blender-hip blender-hip
libreoffice libreoffice

View file

@ -0,0 +1,19 @@
{ pkgs, config, ... }: {
services.gitea-actions-runner = {
package = pkgs.forgejo-actions-runner;
instances.default = {
enable = true;
name = "monolith";
url = "https://git.lelgenio.xyz";
tokenFile = config.age.secrets.monolith-forgejo-runner-token.path;
labels = [
# provide a debian base with nodejs for actions
"debian-latest:docker://node:18-bullseye"
# fake the ubuntu name, because node provides no ubuntu builds
"ubuntu-latest:docker://node:18-bullseye"
# provide native execution on the host
#"native:host"
];
};
};
}

View file

@ -6,9 +6,13 @@
../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age; ../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file = secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file =
../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age; ../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
secrets.monolith-forgejo-runner-token.file =
../secrets/monolith-forgejo-runner-token.age;
secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file =
../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age; ../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
secrets.monolith-nix-serve-privkey.file = secrets.monolith-nix-serve-privkey.file =
../secrets/monolith-nix-serve-privkey.age; ../secrets/monolith-nix-serve-privkey.age;
secrets.phantom-forgejo-mailer-password.file =
../secrets/phantom-forgejo-mailer-password.age;
}; };
} }

View file

@ -31,8 +31,8 @@ in
cyan = "${color.normal.cyan}"; cyan = "${color.normal.cyan}";
white = "${color.normal.white}"; white = "${color.normal.white}";
}; };
};
draw_bold_text_with_bright_colors = false; draw_bold_text_with_bright_colors = false;
};
window = { window = {
opacity = theme.opacity / 100.0; opacity = theme.opacity / 100.0;
dynamic_padding = true; dynamic_padding = true;
@ -65,7 +65,7 @@ in
}]; }];
}; };
mouse = { hide_when_typing = true; }; mouse = { hide_when_typing = true; };
key_bindings = [ keyboard.bindings = [
{ {
key = lib.toUpper key.up; key = lib.toUpper key.up;
mode = "Vi|~Search"; mode = "Vi|~Search";

View file

@ -69,7 +69,6 @@ in {
programs = { programs = {
zoxide.enable = true; zoxide.enable = true;
eza.enable = true; eza.enable = true;
eza.enableAliases = true;
direnv.enable = true; direnv.enable = true;
direnv.nix-direnv.enable = true; direnv.nix-direnv.enable = true;
}; };

View file

@ -36,6 +36,8 @@
libsForQt5.qt5ct libsForQt5.qt5ct
libsForQt5.qtstyleplugin-kvantum libsForQt5.qtstyleplugin-kvantum
qt6Packages.qt6ct
qt6Packages.qtstyleplugin-kvantum
]; ];
home.sessionVariables = { QT_QPA_PLATFORMTHEME = "qt5ct"; }; home.sessionVariables = { QT_QPA_PLATFORMTHEME = "qt5ct"; };

View file

@ -4,7 +4,7 @@
enable = true; enable = true;
defaultCacheTtl = 604800; defaultCacheTtl = 604800;
maxCacheTtl = 604800; maxCacheTtl = 604800;
pinentryFlavor = "gtk2"; pinentryPackage = pkgs.pinentry-curses;
extraConfig = '' extraConfig = ''
allow-preset-passphrase allow-preset-passphrase
''; '';

View file

@ -70,7 +70,9 @@
comma comma
# System monitors # System monitors
btop (btop.override {
cudaSupport = true;
})
amdgpu_top amdgpu_top
inxi inxi
dmidecode dmidecode

View file

@ -7,7 +7,7 @@ verbosity = 2
# set to 0 to disable # set to 0 to disable
timeout = 1800 # seconds = 30 minutes timeout = 1800 # seconds = 30 minutes
[language.angular] [language_server.angular]
filetypes = ["angular"] filetypes = ["angular"]
roots = [".angular", ".git"] roots = [".angular", ".git"]
command = "node" command = "node"
@ -20,134 +20,80 @@ args = [
"--stdio", "--stdio",
] ]
[language.bash] [language_server.bash-language-server]
filetypes = ["sh"] filetypes = ["sh"]
roots = [".git", ".hg"] roots = [".git", ".hg"]
command = "bash-language-server" command = "bash-language-server"
args = ["start"] args = ["start"]
[language.c_cpp] [language_server.clangd]
filetypes = ["c", "cpp"] filetypes = ["c", "cpp"]
roots = [ "compile_commands.json", ".clangd", ".git" ] roots = ["compile_commands.json", ".clangd", ".git", ".hg"]
command = "clangd" command = "clangd"
[language.crystal] [language_server.css-language-server]
filetypes = ["crystal"]
roots = ["shard.yml"]
command = "scry"
[language.css]
filetypes = ["css"] filetypes = ["css"]
roots = ["package.json"] roots = ["package.json", ".git", ".hg"]
command = "vscode-css-languageserver" command = "vscode-css-languageserver"
args = ["--stdio"] args = ["--stdio"]
[language.less] [language_server.less-language-server]
filetypes = ["less"] filetypes = ["less"]
roots = ["package.json", ".git"] roots = ["package.json", ".git", ".hg"]
command = "vscode-css-languageserver" command = "vscode-css-languageserver"
args = ["--stdio"] args = ["--stdio"]
[language.d] [language_server.html-language-server]
filetypes = ["d", "di"]
roots = [".git", "dub.sdl", "dub.json"]
command = "dls"
[language.dart]
# start shell to find path to dart analysis server source
filetypes = ["dart"]
roots = ["pubspec.yaml", ".git"]
command = "sh"
args = ["-c", "dart $(dirname $(which dart))/snapshots/analysis_server.dart.snapshot --lsp"]
[language.elm]
filetypes = ["elm"]
roots = ["elm.json"]
command = "elm-language-server"
args = ["--stdio"]
# [language.elm.initialization_options]
# runtime = "node"
# elmPath = "elm"
# elmFormatPath = "elm-format"
# elmTestPath = "elm-test"
[language.go]
filetypes = ["go"]
roots = ["Gopkg.toml", "go.mod", ".git", ".hg"]
command = "gopls"
offset_encoding = "utf-8"
[language.haskell]
filetypes = ["haskell"]
roots = ["Setup.hs", "stack.yaml", "*.cabal"]
command = "haskell-language-server-wrapper"
args = ["--lsp"]
[language.html]
filetypes = ["html"] filetypes = ["html"]
roots = ["package.json"] roots = ["package.json"]
command = "vscode-html-languageserver" command = "vscode-html-languageserver"
args = ["--stdio"] args = ["--stdio"]
settings_section = "_"
[language_server.html-language-server.settings._]
# quotePreference = "single"
# javascript.format.semicolons = "insert"
[language.javascript] [language_server.typescript-language-server]
filetypes = ["javascript"] filetypes = ["javascript", "typescript"]
roots = [".flowconfig"] roots = ["package.json", "tsconfig.json", "jsconfig.json", ".git", ".hg"]
command = "flow"
args = ["lsp"]
[language.typescript]
filetypes = ["typescript"]
roots = ["package.json"]
command = "typescript-language-server" command = "typescript-language-server"
args = ["--stdio"] args = ["--stdio"]
settings_section = "_"
[language_server.typescript-language-server.settings._]
# quotePreference = "double"
# typescript.format.semicolons = "insert"
[language.json] [language_server.json-language-server]
filetypes = ["json"] filetypes = ["json"]
roots = ["package.json"] roots = ["package.json"]
command = "vscode-json-languageserver" command = "vscode-json-languageserver"
args = ["--stdio"] args = ["--stdio"]
[language.latex] [language_server.nil]
filetypes = ["latex"]
roots = [".git"]
command = "texlab"
[language.nim]
filetypes = ["nim"]
roots = ["*.nimble", ".git"]
command = "nimlsp"
[language.nix]
filetypes = ["nix"] filetypes = ["nix"]
command = "nil" command = "nil"
roots = ["flake.nix", "shell.nix", ".git"] roots = ["flake.nix", "shell.nix", ".git"]
[language.nix.settings.nil] [language_server.nil.settings.nil]
formatting.command = [ "nixpkgs-fmt" ] formatting.command = [ "nixpkgs-fmt" ]
[language.ocaml] [language_server.intelephense]
filetypes = ["ocaml"]
roots = ["Makefile", "opam", "*.opam", "dune"]
command = "ocaml-language-server"
args = ["--stdio"]
[language.php]
filetypes = ["php"] filetypes = ["php"]
roots = [".htaccess", "composer.json"] roots = [".htaccess", "composer.json"]
command = "intelephense" command = "intelephense"
args = ["--stdio"] args = ["--stdio"]
settings_section = "intelephense" settings_section = "intelephense"
[language.php.settings] [language_server.intelephense.settings.intelephense]
intelephense.format.braces = "k&r" storagePath = "/tmp/intelephense"
intelephense.storagePath = "/tmp/intelephense"
intelephense.environment.includePaths = [ format.braces = "k&r"
environment.includePaths = [
"./vendor", "./vendor",
"./vendor/autoload", "./vendor/autoload",
"./vendor/laravel/framework/", "./vendor/laravel/framework/",
"./vendor/laravel/framework/src/", "./vendor/laravel/framework/src/",
"./vendor/laravel/framework/src/Illuminate/" "./vendor/laravel/framework/src/Illuminate/"
] ]
intelephense.files.exclude = [ files.exclude = [
"**/.git/**", "**/.git/**",
"**/.svn/**", "**/.svn/**",
"**/.hg/**", "**/.hg/**",
@ -159,42 +105,9 @@ intelephense.files.exclude = [
"**/resources/views/**" "**/resources/views/**"
] ]
[language.python] [language_server.rust-analyzer]
filetypes = ["python"]
roots = ["requirements.txt", "setup.py", ".git", ".hg"]
command = "pyls"
offset_encoding = "utf-8"
[language.reason]
filetypes = ["reason"]
roots = ["package.json", "Makefile", ".git", ".hg"]
command = "ocaml-language-server"
args = ["--stdio"]
[language.ruby]
filetypes = ["ruby"]
roots = ["Gemfile"]
command = "solargraph"
args = ["stdio"]
# [language.rust]
# filetypes = ["rust"]
# roots = ["Cargo.toml"]
# command = "sh"
# args = [
# "-c",
# """
# if path=$(rustup which rls 2>/dev/null); then
# "$path"
# else
# rls
# fi
# """,
# ]
[language.rust]
filetypes = ["rust"] filetypes = ["rust"]
roots = ["rust-toolchain.toml", "rust-toolchain", "Cargo.toml"] roots = ["Cargo.toml"]
command = "sh" command = "sh"
args = [ args = [
"-c", "-c",
@ -206,99 +119,37 @@ args = [
fi fi
""", """,
] ]
[language.rust.settings.rust-analyzer] [language_server.rust-analyzer.settings.rust-analyzer]
## this can use too much space and processing power # See https://rust-analyzer.github.io/manual.html#configuration
# checkOnSave.extraArgs = ["--target-dir", "./target/check"] # cargo.features = []
checkOnSave.command = "clippy" checkOnSave.command = "clippy"
hoverActions.enable = false # kak-lsp doesn't support this at the moment hoverActions.enable = false # kak-lsp doesn't support this at the moment
# procMacro.enable = true
# cargo.loadOutDirsFromCheck = true
# rustfmt.rangeFormatting.enable = true
# rustfmt.extraArgs = ["+nightly"]
[language.terraform] [language_server.godot]
filetypes = ["terraform"]
roots = ["*.tf"]
command = "terraform-ls"
args = ["serve"]
[language.godot]
filetypes = ["gd", "gdscript", "gdscript3"] filetypes = ["gd", "gdscript", "gdscript3"]
roots = ["project.godot", ".git/"] roots = ["project.godot", ".git/"]
command = "nc" command = "nc"
args = [ "localhost", "6008"] args = [ "localhost", "6008"]
[language.clojure] # Semantic tokens support
filetypes = ["clojure"] # See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens
roots = ["project.clj", ".git/"] # for the default list of tokens and modifiers.
command = "clojure-lsp" # However, many language servers implement their own values.
args = [] # Make sure to check the output of `lsp-capabilities` and each server's documentation and source code as well.
# Examples:
# - TypeScript: https://github.com/microsoft/vscode-languageserver-node/blob/main/client/src/common/semanticTokens.ts
# - Rust Analyzer: https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs
[semantic_tokens]
[semantic_scopes] faces = [
# Map textmate scopes to kakoune faces for semantic highlighting {face="documentation", token="comment", modifiers=["documentation"]},
# the underscores are translated to dots, and indicate nesting. {face="comment", token="comment"},
# That is, if variable_other_field is omitted, it will try the face for {face="function", token="function"},
# variable_other and then variable {face="keyword", token="keyword"},
# {face="module", token="namespace"},
# To see a list of available scopes in the debug buffer, run lsp-semantic-available-scopes {face="operator", token="operator"},
variable = "variable" {face="string", token="string"},
entity_name_function = "function" {face="type", token="type"},
entity_name_type = "type" {face="default+d", token="variable", modifiers=["readonly"]},
variable_other_enummember = "variable" {face="default+d", token="variable", modifiers=["constant"]},
entity_name_namespace = "module" {face="variable", token="variable"},
]
[semantic_modifiers]
documentation = "documentation"
readonly = "default+d"
[[semantic_tokens]]
token = "comment"
face = "documentation"
modifiers = ["documentation"]
[[semantic_tokens]]
token = "comment"
face = "comment"
[[semantic_tokens]]
token = "function"
face = "function"
[[semantic_tokens]]
token = "keyword"
face = "keyword"
[[semantic_tokens]]
token = "namespace"
face = "module"
[[semantic_tokens]]
token = "operator"
face = "operator"
[[semantic_tokens]]
token = "string"
face = "string"
[[semantic_tokens]]
token = "type"
face = "type"
[[semantic_tokens]]
token = "variable"
face = "default+d"
modifiers = ["readonly"]
[[semantic_tokens]]
token = "variable"
face = "default+d"
modifiers = ["constant"]
[[semantic_tokens]]
token = "variable"
face = "variable"

View file

@ -52,7 +52,7 @@ in
}; };
output = { output = {
"*" = { "*" = {
adaptive_sync = "on"; adaptive_sync = "off";
bg = "${theme.background} fill"; bg = "${theme.background} fill";
mode = "1920x1080@144.000Hz"; mode = "1920x1080@144.000Hz";
}; };

View file

@ -33,12 +33,10 @@ lib.mkIf (desktop == "sway")
in in
{ gtk4 = shared; gtk3 = shared; } { gtk4 = shared; gtk3 = shared; }
); );
# qt = { qt = {
# enable = true; enable = true;
# platformTheme = "gtk"; platformTheme = "qtct";
# # style.package = pkgs.libsForQt5.qtstyleplugins; };
# # style.name = "gtk2";
# };
dconf.settings = { dconf.settings = {
"org/gnome/desktop/interface" = { "org/gnome/desktop/interface" = {
@ -79,10 +77,11 @@ lib.mkIf (desktop == "sway")
}; };
}; };
home.sessionVariables = { QT_QPA_PLATFORMTHEME = "gtk3"; };
home.packages = with pkgs; [ home.packages = with pkgs; [
libsForQt5.qt5ct libsForQt5.qt5ct
libsForQt5.qtstyleplugin-kvantum libsForQt5.qtstyleplugin-kvantum
qt6Packages.qt6ct
qt6Packages.qtstyleplugin-kvantum
pkgs.bibata-cursors pkgs.bibata-cursors
pkgs.orchis_theme_compact pkgs.orchis_theme_compact

View file

@ -1,8 +1,9 @@
{ config, pkgs, lib, inputs, ... }: { ... }: {
let inherit (pkgs.uservars) key theme color accent font;
in {
services.syncthing = { services.syncthing = {
enable = true; enable = true;
# tray.enable = true; tray = {
enable = true;
command = "syncthingtray --wait";
};
}; };
} }