move common completely
This commit is contained in:
parent
23aa68d0fa
commit
26f8150f49
12 changed files with 0 additions and 516 deletions
|
@ -1,106 +0,0 @@
|
|||
{ lib, pkgs, inputs, config, ... }: {
|
||||
imports =
|
||||
[ ./users ./modules inputs.vault-secrets.nixosModules.vault-secrets ];
|
||||
|
||||
vault-secrets =
|
||||
let
|
||||
inherit (config.networking) domain hostName;
|
||||
server = if domain == "olympus" then "vault" else "vault-0";
|
||||
in
|
||||
lib.mkIf (domain == "olympus" || domain == "hades") {
|
||||
vaultPrefix = "${domain}_secrets/nixos";
|
||||
vaultAddress = "http://${server}.${domain}:8200/";
|
||||
approlePrefix = "${domain}-${hostName}";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
sharedModules = [ ./hm-modules inputs.nixvim.homeManagerModules.nixvim ];
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.backend = lib.mkDefault "podman";
|
||||
|
||||
# Clean /tmp on boot.
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = lib.mkDefault "Europe/Amsterdam";
|
||||
|
||||
# Systemd OOMd
|
||||
# Fedora enables these options by default. See the 10-oomd-* files here:
|
||||
# https://src.fedoraproject.org/rpms/systemd/tree/acb90c49c42276b06375a66c73673ac3510255
|
||||
systemd.oomd = {
|
||||
enableRootSlice = true;
|
||||
enableUserServices = true;
|
||||
};
|
||||
|
||||
# security.polkit.enable = lib.mkDefault true;
|
||||
boot.tmp.useTmpfs = lib.mkDefault true;
|
||||
|
||||
# Nix Settings
|
||||
nix = {
|
||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
package = pkgs.nixUnstable;
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
trusted-users = [ "root" "vivian" ];
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://nixpkgs-review-bot.cachix.org"
|
||||
"https://colmena.cachix.org"
|
||||
# "https://cache.garnix.io"
|
||||
"https://cachix.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"nixpkgs-review-bot.cachix.org-1:eppgiDjPk7Hkzzz7XlUesk3rcEHqNDozGOrcLc8IqwE="
|
||||
"colmena.cachix.org-1:7BzpDnjjH8ki2CT3f6GdOk7QAzPOl+1t3LvTLXqYcSg="
|
||||
# "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||
];
|
||||
};
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = [ "weekly" ];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
randomizedDelaySec = "3h";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Limit the systemd journal to 100 MB of disk or the
|
||||
# last 7 days of logs, whichever happens first.
|
||||
services.journald.extraConfig = ''
|
||||
SystemMaxUse=100M
|
||||
MaxFileSec=7day
|
||||
'';
|
||||
|
||||
# Enable SSH
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = lib.mkDefault false;
|
||||
PermitRootLogin = lib.mkDefault "no";
|
||||
};
|
||||
};
|
||||
|
||||
# Debloat
|
||||
documentation = {
|
||||
enable = lib.mkForce false;
|
||||
doc.enable = lib.mkForce false;
|
||||
man.enable = lib.mkForce false;
|
||||
info.enable = lib.mkForce false;
|
||||
nixos.enable = lib.mkForce false;
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
# Common Desktop Config
|
||||
This is where I store the NixOS config that is common between
|
||||
my laptop and desktop
|
||||
|
||||
## Files
|
||||
* `./default.nix`: Contains common systemwide configuration
|
||||
* See also my NixOS [modules](../modules), specifically gnome
|
||||
* `./home.nix`: Contains common user-level configuration
|
||||
* See also my Home-Manager [modules](../hm-modules)
|
|
@ -1,116 +0,0 @@
|
|||
{ pkgs, lib, inputs, ... }: {
|
||||
# Bootloader.
|
||||
boot = {
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
loader = {
|
||||
systemd-boot.enable = lib.mkDefault true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
efi.efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
|
||||
initrd = {
|
||||
systemd.enable = true;
|
||||
verbose = false;
|
||||
};
|
||||
};
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
hardware.keyboard.qmk.enable = true;
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.vivian = import ./home.nix;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
};
|
||||
services = {
|
||||
|
||||
# Enable my config for the gnome desktop environment
|
||||
v.gnome.enable = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
printing.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "nl_NL.UTF-8";
|
||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||
LC_MONETARY = "nl_NL.UTF-8";
|
||||
LC_NAME = "nl_NL.UTF-8";
|
||||
LC_NUMERIC = "nl_NL.UTF-8";
|
||||
LC_PAPER = "nl_NL.UTF-8";
|
||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||
LC_TIME = "nl_NL.UTF-8";
|
||||
};
|
||||
|
||||
# Global Packages
|
||||
environment.systemPackages = with pkgs; [ wireguard-tools sbctl podman-compose ];
|
||||
|
||||
# programs.virt-manager = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
|
||||
virtualisation = {
|
||||
podman.enable = true;
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu.package = pkgs.qemu_kvm;
|
||||
};
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
material-design-icons
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
dejavu_fonts
|
||||
(nerdfonts.override {
|
||||
fonts =
|
||||
[ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ];
|
||||
})
|
||||
];
|
||||
programs = {
|
||||
steam = {
|
||||
|
||||
enable = true;
|
||||
# Open ports in the firewall for Steam Remote Play
|
||||
remotePlay.openFirewall = true;
|
||||
package = pkgs.steam.override {
|
||||
extraPkgs = pkgs: with pkgs; [ gamescope mangohud ];
|
||||
};
|
||||
};
|
||||
|
||||
gamemode.enable = true;
|
||||
|
||||
adb.enable = true;
|
||||
};
|
||||
networking = {
|
||||
# Networking
|
||||
networkmanager.enable = true;
|
||||
firewall.checkReversePath = false;
|
||||
firewall.enable = false;
|
||||
};
|
||||
}
|
|
@ -1,96 +0,0 @@
|
|||
{ pkgs, inputs, config, ... }:
|
||||
let
|
||||
tex = pkgs.texlive.combine {
|
||||
inherit (pkgs.texlive) scheme-full;
|
||||
dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; };
|
||||
};
|
||||
my-python-packages = ps: with ps; [ pandas requests numpy ];
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
(python3.withPackages my-python-packages)
|
||||
btop
|
||||
calibre
|
||||
celluloid
|
||||
cinny-desktop
|
||||
element-desktop
|
||||
fusee-launcher
|
||||
fractal-next
|
||||
foliate
|
||||
gcc
|
||||
gimp
|
||||
helix
|
||||
inputs.attic.packages.${pkgs.system}.attic
|
||||
inputs.comma.packages.${pkgs.system}.default
|
||||
inputs.webcord.packages.${pkgs.system}.default
|
||||
jetbrains.clion
|
||||
jetbrains.rust-rover
|
||||
kdenlive
|
||||
libreoffice-fresh
|
||||
mattermost-desktop
|
||||
mullvad-vpn
|
||||
neofetch
|
||||
nixfmt
|
||||
nixpkgs-review
|
||||
plex-media-player
|
||||
plexamp
|
||||
spotify
|
||||
qmk
|
||||
solo2-cli
|
||||
tex
|
||||
unzip
|
||||
yt-dlp
|
||||
];
|
||||
|
||||
# Enable my own hm modules
|
||||
themes.v.catppuccin.enable = true;
|
||||
programs = {
|
||||
v = {
|
||||
vscode.enable = true;
|
||||
nvim.enable = true;
|
||||
rust.enable = true;
|
||||
};
|
||||
|
||||
riff = {
|
||||
enable = true;
|
||||
direnv = true;
|
||||
};
|
||||
|
||||
firefox.enable = true;
|
||||
|
||||
chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
};
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
sessionVariables = { DIRENV_LOG_FORMAT = ""; };
|
||||
};
|
||||
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
profiles.default = { isDefault = true; };
|
||||
};
|
||||
};
|
||||
|
||||
# Syncthing
|
||||
services.syncthing.enable = true;
|
||||
xdg.userDirs = let home = config.home.homeDirectory;
|
||||
in {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "${home}/.desktop";
|
||||
documents = "${home}/cloud/Documents";
|
||||
download = "${home}/dl";
|
||||
music = "${home}/cloud/Music";
|
||||
pictures = "${home}/cloud/Pictures";
|
||||
publicShare = "${home}/.publicShare";
|
||||
templates = "${home}/.templates";
|
||||
videos = "${home}/cloud/Videos";
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
_: {
|
||||
# See also: https://blog.xirion.net/posts/nixos-proxmox-lxc/
|
||||
|
||||
# Supress systemd services that don't work (correctly) on LXC
|
||||
systemd.suppressedSystemUnits = [
|
||||
"dev-mqueue.mount"
|
||||
"sys-kernel-debug.mount"
|
||||
"sys-fs-fuse-connections.mount"
|
||||
];
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/157449#issuecomment-1459299764
|
||||
boot.specialFileSystems."/run".options = [ "rshared" ];
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.themes.v.catppuccin;
|
||||
in {
|
||||
options.themes.v.catppuccin = { enable = mkEnableOption "catppuccin"; };
|
||||
config =
|
||||
let
|
||||
theme = "Catppuccin-Pink-Dark";
|
||||
cursorTheme = config.home.pointerCursor.name;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
home.pointerCursor = {
|
||||
name = "Bibata_Ghost";
|
||||
size = 24;
|
||||
package = pkgs.bibata-cursors-translucent;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = theme;
|
||||
package = pkgs.catppuccin-gtk;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme.override { color = "violet"; };
|
||||
};
|
||||
cursorTheme = {
|
||||
name = cursorTheme;
|
||||
inherit (config.home.pointerCursor) package size;
|
||||
};
|
||||
};
|
||||
|
||||
programs.vscode = {
|
||||
userSettings."workbench.colorTheme" = "Catppuccin Frappé";
|
||||
extensions = [ pkgs.vscode-extensions.catppuccin.catppuccin-vsc ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{ ... }: {
|
||||
imports = [ ./catppuccin.nix ./nvim.nix ./riff.nix ./vscode.nix ./git.nix ./rust.nix ];
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.programs.v.git;
|
||||
in {
|
||||
options.programs.v.git = { enable = mkEnableOption "git"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
userName = "Vivian";
|
||||
userEmail = "vivian@0x76.dev";
|
||||
lfs.enable = true;
|
||||
extraConfig = {
|
||||
push.autoSetupRemote = true;
|
||||
init.defaultBranch = "main";
|
||||
# Git merge driver that always grabs upstream changes
|
||||
# Useful for e.g. lock files
|
||||
merge.ours = {
|
||||
name = "Overwrite Upstream Changes";
|
||||
driver = "cp -f '%A' '%B'";
|
||||
};
|
||||
};
|
||||
|
||||
difftastic.enable = true;
|
||||
};
|
||||
|
||||
home.file.".config/git/attributes".text = ''
|
||||
flake.lock merge=ours
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,190 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.programs.v.nvim;
|
||||
in with lib; {
|
||||
options.programs.v.nvim = { enable = mkEnableOption "nvim"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
vimAlias = true;
|
||||
luaLoader.enable = true;
|
||||
|
||||
globals.mapleader = " ";
|
||||
|
||||
options.number = true;
|
||||
|
||||
clipboard = { providers.wl-copy.enable = true; };
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ff";
|
||||
action = "require('telescope.builtin').find_files";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fg";
|
||||
action = "require('telescope.builtin').live_grep";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-_>";
|
||||
action = "require('Comment.api').toggle.linewise.current";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<C-_>";
|
||||
action = ''
|
||||
function()
|
||||
local esc = vim.api.nvim_replace_termcodes(
|
||||
'<ESC>', true, false, true
|
||||
)
|
||||
vim.api.nvim_feedkeys(esc, 'nx', false)
|
||||
require('Comment.api').toggle.linewise(vim.fn.visualmode())
|
||||
end
|
||||
'';
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "g=";
|
||||
action = "vim.lsp.buf.format";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "t";
|
||||
action = ":FloatermToggle myfloat<CR>";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "<ESC>";
|
||||
action = "function() vim.cmd(':FloatermToggle myfloat') end";
|
||||
lua = true;
|
||||
}
|
||||
];
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
FixCursorHold-nvim
|
||||
luasnip
|
||||
plenary-nvim
|
||||
neotest
|
||||
neotest-plenary
|
||||
neotest-rust
|
||||
];
|
||||
|
||||
colorschemes.catppuccin = {
|
||||
enable = true;
|
||||
flavour = "frappe";
|
||||
};
|
||||
|
||||
extraConfigLua = ''
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("neotest-plenary"),
|
||||
require("neotest-rust") {
|
||||
args = { "--no-capture" },
|
||||
}
|
||||
},
|
||||
})
|
||||
'';
|
||||
|
||||
plugins = {
|
||||
bufferline.enable = true;
|
||||
none-ls = {
|
||||
enable = true;
|
||||
sources = {
|
||||
formatting.nixpkgs_fmt.enable = true;
|
||||
code_actions.shellcheck.enable = true;
|
||||
code_actions.statix.enable = true;
|
||||
diagnostics = {
|
||||
statix.enable = true;
|
||||
deadnix.enable = true;
|
||||
shellcheck.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
nix.enable = true;
|
||||
treesitter = {
|
||||
enable = true;
|
||||
nixGrammars = true;
|
||||
disabledLanguages = [ "latex" ];
|
||||
};
|
||||
surround.enable = true;
|
||||
fugitive.enable = true;
|
||||
gitgutter.enable = true;
|
||||
lualine = {
|
||||
enable = true;
|
||||
theme = "catppuccin";
|
||||
};
|
||||
telescope = {
|
||||
enable = true;
|
||||
extensions.fzf-native.enable = true;
|
||||
extensions.fzf-native.fuzzy = true;
|
||||
};
|
||||
comment-nvim = { enable = true; };
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
nil_ls.enable = true;
|
||||
rust-analyzer = {
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
};
|
||||
pyright.enable = true;
|
||||
elixirls.enable = true;
|
||||
clangd.enable = true;
|
||||
yamlls.enable = true;
|
||||
};
|
||||
};
|
||||
trouble.enable = true;
|
||||
lspkind.enable = true;
|
||||
|
||||
vimtex.enable = true;
|
||||
|
||||
floaterm.enable = true;
|
||||
|
||||
nvim-cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{
|
||||
name = "luasnip";
|
||||
option = { show_autosnippets = true; };
|
||||
}
|
||||
{ name = "cmp-spell"; }
|
||||
{ name = "cmp-rg"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
snippet.expand = "luasnip";
|
||||
mappingPresets = [ "insert" "cmdline" ];
|
||||
mapping = {
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<Tab>" = {
|
||||
modes = [ "i" "s" ];
|
||||
action = ''
|
||||
function(fallback)
|
||||
local luasnip = require('luasnip')
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
with lib;
|
||||
let cfg = config.programs.riff;
|
||||
in {
|
||||
options.programs.riff = {
|
||||
enable = mkEnableOption "riff";
|
||||
direnv = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable direnv support
|
||||
'';
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ inputs.riff.packages.${pkgs.system}.riff ];
|
||||
|
||||
xdg.configFile."direnv/lib/riff.sh" = mkIf cfg.direnv {
|
||||
executable = true;
|
||||
text = ''
|
||||
use_riff() {
|
||||
watch_file Cargo.toml watch_file Cargo.lock
|
||||
eval "$(riff --offline print-dev-env)"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
with lib;
|
||||
let cfg = config.programs.v.rust;
|
||||
in {
|
||||
options.programs.v.rust = { enable = mkEnableOption "rust"; };
|
||||
config = mkIf cfg.enable {
|
||||
home = {
|
||||
packages = with pkgs; [ rustup cargo-nextest cargo-msrv cargo-dist cargo-cross];
|
||||
|
||||
file = {
|
||||
".cargo/config.toml".text = ''
|
||||
[registries.crates-io]
|
||||
protocol = "sparse"
|
||||
|
||||
[build]
|
||||
rustc-wrapper = "${pkgs.sccache}/bin/sccache"
|
||||
|
||||
[profile.rust-analyzer]
|
||||
inherits = "dev"
|
||||
'';
|
||||
};
|
||||
|
||||
sessionPath = [ "$HOME/.cargo/bin" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.programs.v.vscode;
|
||||
in {
|
||||
options.programs.v.vscode = { enable = mkEnableOption "vscode"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode;
|
||||
userSettings = {
|
||||
"ltex.language" = "en-GB";
|
||||
"latex-workshop.linting.chktex.enabled" = true;
|
||||
"latex-workshop.latex.clean.subfolder.enabled" = true;
|
||||
"latex-workshop.latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%";
|
||||
"editor.fontFamily" =
|
||||
"'DejaVuSansMono Nerd Font', 'monospace', monospace";
|
||||
"keyboard.dispatch" = "keyCode";
|
||||
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
|
||||
"rust-analyzer.check.extraArgs" = ["--profile" "rust-analyzer"];
|
||||
"rust-analyzer.check.command" = "clippy";
|
||||
"terminal.integrated.defaultProfile.linux" = "zsh";
|
||||
"nix.enableLanguageServer" = true; # Enable LSP.
|
||||
"nix.serverPath" = "${pkgs.nil}/bin/nil";
|
||||
"[nix]" = { "editor.defaultFormatter" = "brettm12345.nixfmt-vscode"; };
|
||||
"[python]" = { "editor.formatOnType" = true; };
|
||||
"debug.allowBreakpointsEverywhere" = true;
|
||||
"C_Cpp.clang_format_fallbackStyle" =
|
||||
"{ BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0}";
|
||||
"crates.compatibleDecorator" = "✓";
|
||||
"crates.errorDecorator" = "✗";
|
||||
"crates.incompatibleDecorator" = "🛇";
|
||||
# Don't index unecessary things
|
||||
"files.exclude" = {
|
||||
"**/.vscode" = true;
|
||||
"**/.git" = true;
|
||||
"**/.svn" = true;
|
||||
"**/.hg" = true;
|
||||
"**/.deps" = true;
|
||||
"**/CVS" = true;
|
||||
"**/.DS_Store" = true;
|
||||
"/bin" = true;
|
||||
"/boot" = true;
|
||||
"/cdrom" = true;
|
||||
"/dev" = true;
|
||||
"/proc" = true;
|
||||
"/etc" = true;
|
||||
"/nix" = true;
|
||||
};
|
||||
};
|
||||
extensions = with pkgs.vscode-extensions;
|
||||
with pkgs.v.vscode-extensions; [
|
||||
brettm12345.nixfmt-vscode
|
||||
codezombiech.gitignore
|
||||
editorconfig.editorconfig
|
||||
foxundermoon.shell-format
|
||||
james-yu.latex-workshop
|
||||
jnoortheen.nix-ide
|
||||
matklad.rust-analyzer
|
||||
mkhl.direnv
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode.cpptools
|
||||
platformio.platformio-ide
|
||||
redhat.vscode-yaml
|
||||
redhat.vscode-xml
|
||||
tamasfe.even-better-toml
|
||||
valentjn.vscode-ltex
|
||||
vscodevim.vim
|
||||
vadimcn.vscode-lldb
|
||||
xaver.clang-format
|
||||
sumneko.lua
|
||||
davidlday.languagetool-linter
|
||||
serayuzgur.crates
|
||||
skellock.just
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue