mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
refactor browser to program
This commit is contained in:
parent
2585388001
commit
9399b584f8
@ -18,7 +18,7 @@
|
|||||||
# Modules
|
# Modules
|
||||||
modules = {
|
modules = {
|
||||||
desktop = {
|
desktop = {
|
||||||
browser.enable = true;
|
enable = true;
|
||||||
gnome.enable = true;
|
gnome.enable = true;
|
||||||
};
|
};
|
||||||
devel = {
|
devel = {
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
# Modules
|
# Modules
|
||||||
modules = {
|
modules = {
|
||||||
desktop = {
|
desktop = {
|
||||||
browser.enable = true;
|
enable = true;
|
||||||
gnome.enable = true;
|
gnome.enable = true;
|
||||||
};
|
};
|
||||||
devel = {
|
devel = {
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
# Modules
|
# Modules
|
||||||
modules = {
|
modules = {
|
||||||
desktop = {
|
desktop = {
|
||||||
browser.enable = true;
|
enable = true;
|
||||||
gnome.enable = true;
|
gnome.enable = true;
|
||||||
};
|
};
|
||||||
devel = {
|
devel = {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
# Modules
|
# Modules
|
||||||
modules = {
|
modules = {
|
||||||
desktop = {
|
desktop = {
|
||||||
browser.enable = true;
|
enable = true;
|
||||||
gnome.enable = true;
|
gnome.enable = true;
|
||||||
};
|
};
|
||||||
devel = {
|
devel = {
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [ ./chrome.nix ./firefox.nix ];
|
|
||||||
}
|
|
@ -1,39 +1,47 @@
|
|||||||
{ config, lib, pkgs, user, inputs, ... }:
|
{ config, lib, pkgs, user, inputs, ... }:
|
||||||
{
|
|
||||||
imports = [ ./browser ./keyd.nix ./gnome.nix ];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
let cfg = config.modules.desktop;
|
||||||
bc # Arbitrary-precision arithmetic language.
|
in {
|
||||||
fzf # Command-line fuzzy finder for Unix-like operating systems.
|
imports = [
|
||||||
gamemode # Optimizes system performance for gaming by adjusting system settings.
|
./keyd.nix
|
||||||
vesktop # Voice, video, and text communication platform for communities and friends.
|
./gnome.nix
|
||||||
inkscape # Vector graphics editor for creating illustrations, icons, logos, diagrams, and more.
|
|
||||||
libreoffice-fresh # Office suite compatible with Microsoft Office.
|
|
||||||
xournal # Note-taking and sketching application.
|
|
||||||
mpv # Media player for playing audio and video files.
|
|
||||||
p7zip # Command-line file archiver with high compression ratio.
|
|
||||||
gimp # GNU Image Manipulation Program for editing and composing raster images.
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# xdg-desktop-portal settings
|
options.modules.desktop.enable = lib.mkEnableOption "desktop";
|
||||||
services.dbus.enable = true;
|
config = lib.mkIf cfg.enable {
|
||||||
xdg.mime = {
|
environment.systemPackages = with pkgs; [
|
||||||
enable = true;
|
bc # Arbitrary-precision arithmetic language.
|
||||||
defaultApplications = {
|
fzf # Command-line fuzzy finder for Unix-like operating systems.
|
||||||
"inode/directory" = [ "pcmanfm.desktop" ];
|
gamemode # Optimizes system performance for gaming by adjusting system settings.
|
||||||
"text/html" = [ "google-chrome.desktop" ];
|
vesktop # Voice, video, and text communication platform for communities and friends.
|
||||||
"x-scheme-handler/http" = [ "google-chrome.desktop" ];
|
inkscape # Vector graphics editor for creating illustrations, icons, logos, diagrams, and more.
|
||||||
"x-scheme-handler/https" = [ "google-chrome.desktop" ];
|
libreoffice-fresh # Office suite compatible with Microsoft Office.
|
||||||
"x-scheme-handler/ftp" = [ "google-chrome.desktop" ];
|
xournal # Note-taking and sketching application.
|
||||||
"x-scheme-handler/chrome" = [ "google-chrome.desktop" ];
|
mpv # Media player for playing audio and video files.
|
||||||
"x-scheme-handler/about" = [ "google-chrome.desktop" ];
|
p7zip # Command-line file archiver with high compression ratio.
|
||||||
"x-scheme-handler/unknown" = [ "google-chrome.desktop" ];
|
gimp # GNU Image Manipulation Program for editing and composing raster images.
|
||||||
"application/x-extension-htm" = [ "google-chrome.desktop" ];
|
];
|
||||||
"application/x-extension-html" = [ "google-chrome.desktop" ];
|
|
||||||
"application/x-extension-shtml" = [ "google-chrome.desktop" ];
|
# xdg-desktop-portal settings
|
||||||
"application/xhtml+xml" = [ "google-chrome.desktop" ];
|
services.dbus.enable = true;
|
||||||
"application/x-extension-xhtml" = [ "google-chrome.desktop" ];
|
xdg.mime = {
|
||||||
"application/x-extension-xht" = [ "google-chrome.desktop" ];
|
enable = true;
|
||||||
"application/pdf" = [ "google-chrome.desktop" ]; };
|
defaultApplications = {
|
||||||
|
"inode/directory" = [ "pcmanfm.desktop" ];
|
||||||
|
"text/html" = [ "google-chrome.desktop" ];
|
||||||
|
"x-scheme-handler/http" = [ "google-chrome.desktop" ];
|
||||||
|
"x-scheme-handler/https" = [ "google-chrome.desktop" ];
|
||||||
|
"x-scheme-handler/ftp" = [ "google-chrome.desktop" ];
|
||||||
|
"x-scheme-handler/chrome" = [ "google-chrome.desktop" ];
|
||||||
|
"x-scheme-handler/about" = [ "google-chrome.desktop" ];
|
||||||
|
"x-scheme-handler/unknown" = [ "google-chrome.desktop" ];
|
||||||
|
"application/x-extension-htm" = [ "google-chrome.desktop" ];
|
||||||
|
"application/x-extension-html" = [ "google-chrome.desktop" ];
|
||||||
|
"application/x-extension-shtml" = [ "google-chrome.desktop" ];
|
||||||
|
"application/xhtml+xml" = [ "google-chrome.desktop" ];
|
||||||
|
"application/x-extension-xhtml" = [ "google-chrome.desktop" ];
|
||||||
|
"application/x-extension-xht" = [ "google-chrome.desktop" ];
|
||||||
|
"application/pdf" = [ "google-chrome.desktop" ]; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
{ config, lib, pkgs, user, ... }:
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
|
||||||
let cfg = config.modules.desktop.browser;
|
let cfg1 = config.modules.desktop;
|
||||||
|
cfg2 = config.modules.programs.chrome;
|
||||||
in {
|
in {
|
||||||
# Enable option declared in firefox.nix
|
options.modules.programs.chrome = with lib; {
|
||||||
config = lib.mkIf cfg.enable {
|
enable = lib.mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (cfg1.enable && cfg2.enable) {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
google-chrome # Web browser developed by Google.
|
google-chrome # Web browser developed by Google.
|
||||||
];
|
];
|
||||||
@ -46,7 +53,7 @@ in {
|
|||||||
# Setup bookmarks
|
# Setup bookmarks
|
||||||
"BookmarkBarEnabled" = true;
|
"BookmarkBarEnabled" = true;
|
||||||
"ShowAppsShortcutInBookmarkBar" = false;
|
"ShowAppsShortcutInBookmarkBar" = false;
|
||||||
"ManagedBookmarks" = import ./bookmarks/chrome.nix;
|
"ManagedBookmarks" = import ./bookmarks.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./chrome
|
||||||
|
./firefox
|
||||||
./git.nix
|
./git.nix
|
||||||
./chezmoi.nix
|
./chezmoi.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
|
@ -1,10 +1,17 @@
|
|||||||
{ config, lib, pkgs, user, ... }:
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
|
||||||
let cfg = config.modules.desktop.browser;
|
let cfg1 = config.modules.desktop;
|
||||||
|
cfg2 = config.modules.programs.firefox;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.browser.enable = lib.mkEnableOption "browser";
|
options.modules.programs.firefox = with lib; {
|
||||||
config = lib.mkIf cfg.enable {
|
enable = lib.mkOption {
|
||||||
# Install applications for CAC
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (cfg1.enable && cfg2.enable) {
|
||||||
|
# Applications for CAC usage
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
opensc
|
opensc
|
||||||
pcsc-tools
|
pcsc-tools
|
||||||
@ -15,7 +22,7 @@ in {
|
|||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles.default = {
|
profiles.default = {
|
||||||
bookmarks = import ./bookmarks/firefox.nix;
|
bookmarks = import ./bookmarks.nix;
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
name = "default";
|
name = "default";
|
||||||
settings = {
|
settings = {
|
Loading…
x
Reference in New Issue
Block a user