diff --git a/leanix/configuration.nix b/leanix/configuration.nix index f65c234..c171ca6 100644 --- a/leanix/configuration.nix +++ b/leanix/configuration.nix @@ -36,8 +36,6 @@ # Environment variables environment.sessionVariables = { FLAKE = "/home/${userSettings.username}/.dotfiles"; - - DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox"; }; # System level configuration diff --git a/nixos/home/packages/programming/code.nix b/nixos/home/packages/programming/code.nix index 7240770..b56f527 100644 --- a/nixos/home/packages/programming/code.nix +++ b/nixos/home/packages/programming/code.nix @@ -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 diff --git a/nixos/system/settings/default-applications.nix b/nixos/system/settings/default-applications.nix new file mode 100644 index 0000000..aaae708 --- /dev/null +++ b/nixos/system/settings/default-applications.nix @@ -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"; + }; + }; +} diff --git a/nixos/system/settings/style.nix b/nixos/system/settings/style.nix index f119f5f..761ffe1 100644 --- a/nixos/system/settings/style.nix +++ b/nixos/system/settings/style.nix @@ -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; diff --git a/zenith/configuration.nix b/zenith/configuration.nix index da51acb..b60ebdb 100644 --- a/zenith/configuration.nix +++ b/zenith/configuration.nix @@ -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;