Style and default apps
This commit is contained in:
parent
bf8818fbb3
commit
68baae3092
@ -36,8 +36,6 @@
|
||||
# Environment variables
|
||||
environment.sessionVariables = {
|
||||
FLAKE = "/home/${userSettings.username}/.dotfiles";
|
||||
|
||||
DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||
};
|
||||
|
||||
# System level configuration
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
programs.vscode.userSettings = {
|
||||
"[python]" = {
|
||||
"editor.defaultFormatter" = "ms-python.black-formatter";
|
||||
"python.defaultInterpreterPath" = "${pkgs.python3}";
|
||||
"python.defaultInterpreterPath" = "${pkgs.python3}/bin/python";
|
||||
};
|
||||
};
|
||||
|
||||
@ -172,6 +172,12 @@
|
||||
})
|
||||
|
||||
(lib.mkIf config.program.vscode.markdown.enable {
|
||||
programs.vscode.userSettings = {
|
||||
"[markdown]" = {
|
||||
"editor.defaultFormatter" = "DavidAnson.vscode-markdownlint";
|
||||
};
|
||||
};
|
||||
|
||||
programs.vscode.extensions = with pkgs-stable.vscode-extensions; [
|
||||
yzhang.markdown-all-in-one
|
||||
davidanson.vscode-markdownlint
|
||||
|
||||
31
nixos/system/settings/default-applications.nix
Normal file
31
nixos/system/settings/default-applications.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
userSettings,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
default-applications.enable = lib.mkEnableOption "Enable default applications";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.default-applications.enable {
|
||||
environment.sessionVariables = {
|
||||
DEFAULT_BROWSER = "${pkgs."${userSettings.browser}"}/bin/${userSettings.browser}";
|
||||
TERMINAL = "${pkgs."${userSettings.terminal}"}/bin/${userSettings.terminal}";
|
||||
EDITOR = "${pkgs."${userSettings.editor}"}/bin/${userSettings.editor}";
|
||||
};
|
||||
|
||||
# Default applications configuration
|
||||
xdg.mime.enable = true;
|
||||
xdg.mime.defaultApplications = {
|
||||
"text/html" = "librewolf.desktop";
|
||||
"x-scheme-handler/http" = "librewolf.desktop";
|
||||
"x-scheme-handler/https" = "librewolf.desktop";
|
||||
"x-scheme-handler/about" = "librewolf.desktop";
|
||||
"x-scheme-handler/unknown" = "librewolf.desktop";
|
||||
"text/plain" = "nvim.desktop";
|
||||
"application/pdf" = "evince";
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -14,8 +14,6 @@
|
||||
enable = true;
|
||||
image = ../../../config/backgrounds/${userSettings.background};
|
||||
base16Scheme = "${pkgs-stable.base16-schemes}/share/themes/${userSettings.theme}.yaml"; # List all possible themes: $ nix build nixpkgs#base16-schemes && ls result/share/themes
|
||||
#base16Scheme = "${pkgs.base16-schemes}/share/themes/onedark.yaml";
|
||||
#base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-dark.yaml";
|
||||
polarity = "dark";
|
||||
autoEnable = true;
|
||||
|
||||
|
||||
@ -38,8 +38,6 @@
|
||||
# Environment variables
|
||||
environment.sessionVariables = {
|
||||
FLAKE = "/home/${userSettings.username}/dotfiles";
|
||||
|
||||
DEFAULT_BROWSER = "${pkgs.librewolf}/bin/librewolf";
|
||||
};
|
||||
|
||||
# System level configuration
|
||||
@ -82,18 +80,6 @@
|
||||
programs.kdeconnect.enable = true;
|
||||
programs.wireshark.enable = true;
|
||||
|
||||
# Default applications configuration
|
||||
xdg.mime.enable = true;
|
||||
xdg.mime.defaultApplications = {
|
||||
"text/html" = "librewolf.desktop";
|
||||
"x-scheme-handler/http" = "librewolf.desktop";
|
||||
"x-scheme-handler/https" = "librewolf.desktop";
|
||||
"x-scheme-handler/about" = "librewolf.desktop";
|
||||
"x-scheme-handler/unknown" = "librewolf.desktop";
|
||||
"text/plain" = "nvim.desktop";
|
||||
"application/pdf" = "evince";
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user