Improved things

This commit is contained in:
Jan Bulthuis 2024-07-19 13:59:26 +02:00
parent 47365d05f5
commit e1b1e7cc38
8 changed files with 97 additions and 12 deletions

View File

@ -15,7 +15,6 @@ in {
wget wget
curl curl
dig dig
nix-tree
procps procps
]; ];

View File

@ -9,6 +9,8 @@
./firefox/default.nix ./firefox/default.nix
./fontconfig/default.nix ./fontconfig/default.nix
./foot/default.nix ./foot/default.nix
./language/nix.nix
./language/rust.nix
./mako/default.nix ./mako/default.nix
./neovim/default.nix ./neovim/default.nix
./obsidian/default.nix ./obsidian/default.nix

View File

@ -12,6 +12,9 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# Set desktop type to wayland # Set desktop type to wayland
modules.desktop.wayland = true; modules.desktop.wayland = true;
# TODO: Move elsewhere and make keybindings more configurable
modules.rofi.enable = true;
# Change desktop to execute river # Change desktop to execute river
modules.desktop.initScript = '' modules.desktop.initScript = ''

View File

@ -0,0 +1,46 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.nix;
in {
options.modules.nix = {
enable = mkEnableOption "nix";
};
config = mkIf cfg.enable {
# Development packages
home.packages = with pkgs; [
nix-tree
nixfmt-rfc-style
nixd
];
# VSCode configuration
programs.vscode = {
extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
];
userSettings = {
"[nix]" = {
"editor.tabSize" = 2;
};
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nixd";
"nix.serverSettings" = {
nixd = {
formatting = {
command = [ "nixfmt" ];
};
};
};
};
};
# Neovim configuration
programs.nixvim = {
};
};
}

View File

@ -0,0 +1,39 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.rust;
in {
options.modules.rust = {
enable = mkEnableOption "rust";
};
config = mkIf cfg.enable {
# Development packages
home.packages = with pkgs; [
rustc
cargo
rust-analyzer
rustfmt
];
# VSCode configuration
programs.vscode = {
extensions = with pkgs.vscode-extensions; [
rust-lang.rust-analyzer
];
userSettings = {
"[rust]" = {
};
};
};
# Neovim configuration
programs.nixvim = {
plugins.rust-tools = {
enable = true;
};
};
};
}

View File

@ -169,10 +169,6 @@ in {
# enable = true; # enable = true;
#}; #};
plugins.rust-tools = {
enable = true;
};
plugins.vimtex = { plugins.vimtex = {
enable = true; enable = true;
texlivePackage = null; texlivePackage = null;

View File

@ -27,13 +27,9 @@ in {
programs.vscode = { programs.vscode = {
enable = true; enable = true;
mutableExtensionsDir = false;
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [
eamodio.gitlens eamodio.gitlens
# Language support
# TODO: Move to separate language modules
bbenoist.nix
rust-lang.rust-analyzer
]; ];
userSettings = { userSettings = {
@ -45,8 +41,9 @@ in {
"terminal.integrated.fontFamily" = mkForce "'${cfg.codeFont.name}', '${cfg.fallbackFont.name}'"; "terminal.integrated.fontFamily" = mkForce "'${cfg.codeFont.name}', '${cfg.fallbackFont.name}'";
"terminal.integrated.fontSize" = mkForce (cfg.codeFont.recommendedSize); # Convert pt to px "terminal.integrated.fontSize" = mkForce (cfg.codeFont.recommendedSize); # Convert pt to px
# Autoformatting # Formatting
"editor.formatOnSave" = true; "editor.formatOnSave" = true;
"editor.tabSize" = 4;
# Layout # Layout
"window.menuBarVisibility" = "hidden"; "window.menuBarVisibility" = "hidden";

View File

@ -29,7 +29,10 @@
discord.enable = true; discord.enable = true;
qutebrowser.enable = true; qutebrowser.enable = true;
neovim.enable = true; neovim.enable = true;
rofi.enable = true; # TODO: Remove this, should be enabled by other modules that require rofi.
# Programming languages
nix.enable = true;
rust.enable = true;
# Enable unfree # Enable unfree
unfree.enable = true; unfree.enable = true;