XDG-mime fix modularity

This commit is contained in:
foglar 2024-11-22 10:30:09 +01:00
parent 66de9b18ca
commit 4796ec17c4
10 changed files with 101 additions and 57 deletions

View File

@ -29,6 +29,8 @@
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
EDITOR = "nvim"; EDITOR = "nvim";
FLAKE = "/home/foglar/dotfiles"; FLAKE = "/home/foglar/dotfiles";
DEFAULT_BROWSER = "${pkgs.librewolf}/bin/librewolf";
}; };
users.users.foglar = { users.users.foglar = {
@ -40,6 +42,17 @@
]; ];
}; };
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 # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

View File

@ -38,7 +38,6 @@
packages = "paru -Qe | fzf | wl-copy"; packages = "paru -Qe | fzf | wl-copy";
cdx = "zoxide query --interactive"; cdx = "zoxide query --interactive";
distrobox-enter = "distrobox-enter --root"; distrobox-enter = "distrobox-enter --root";
distrobox-create = "distrobox-create --root"; distrobox-create = "distrobox-create --root";
}; };
@ -67,16 +66,6 @@
XDG_PICTURES_DIR = "$HOME/Pictures/Screenshots/"; XDG_PICTURES_DIR = "$HOME/Pictures/Screenshots/";
}; };
#xdg.mimeApps = {
# enable = true;
# associations.added = {
# "application/pdf" = ["org.gnome.Evince.desktop"];
# };
# defaultApplications = {
# "application/pdf" = ["org.gnome.Evince.desktop"];
# };
#};
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }

View File

@ -25,7 +25,6 @@
plasma5Packages.kdeconnect-kde plasma5Packages.kdeconnect-kde
qbittorrent qbittorrent
vlc vlc
#tor-browser
openrocket openrocket
spotify spotify
spotube spotube

View File

@ -19,6 +19,7 @@
hashcat hashcat
tcpdump tcpdump
sqlmap sqlmap
tor-browser
]; ];
}; };
} }

View File

@ -1,10 +1,18 @@
{...}: {lib, ...}: {
{
imports = [ imports = [
./packages/docker.nix ./packages/docker.nix
./packages/programs.nix
./packages/steam.nix ./packages/steam.nix
./packages/tor.nix ./packages/tor.nix
./packages/virtual-machines.nix ./packages/virtual-machines.nix
]; ];
package = {
docker.enable = lib.mkDefault true;
steam.enable = lib.mkDefault true;
proxychains.enable = lib.mkDefault true;
tor.enable = lib.mkDefault true;
virt-manager.enable = lib.mkDefault true;
};
programs.kdeconnect.enable = true;
programs.wireshark.enable = true;
} }

View File

@ -1,4 +1,13 @@
{...}: { {
lib,
config,
...
}: {
options = {
package.docker.enable = lib.mkEnableOption "Enable Docker";
};
config = lib.mkIf config.package.docker.enable {
virtualisation.docker = { virtualisation.docker = {
enable = true; enable = true;
rootless = { rootless = {
@ -6,4 +15,5 @@
setSocketVariable = true; setSocketVariable = true;
}; };
}; };
};
} }

View File

@ -1,5 +0,0 @@
{...}:
{
programs.kdeconnect.enable = true;
programs.wireshark.enable = true;
}

View File

@ -1,9 +1,18 @@
{...}:
{ {
lib,
config,
...
}: {
options = {
package.steam.enable = lib.mkEnableOption "Enable Steam module";
};
config = lib.mkIf config.package.steam.enable {
programs.steam = { programs.steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
}; };
};
} }

View File

@ -1,5 +1,21 @@
{...}:
{ {
lib,
config,
...
}: {
options = {
package.tor.enable = lib.mkEnableOption "Enable Tor";
package.proxychains.enable = lib.mkEnableOption "Enable Proxychains";
};
config =
lib.mkIf config.package.tor.enable {
services.tor = {
enable = true;
};
services.tor.client.enable = true;
}
// lib.mkIf config.package.proxychains.enable {
programs.proxychains = { programs.proxychains = {
enable = true; enable = true;
chain.type = "dynamic"; chain.type = "dynamic";
@ -12,9 +28,5 @@
}; };
}; };
}; };
services.tor = {
enable = true;
}; };
services.tor.client.enable = true;
} }

View File

@ -1,5 +1,13 @@
{...}:
{ {
config,
lib,
...
}: {
options = {
package.virt-manager.enable = lib.mkEnableOption "Enable virt-manager";
};
config = lib.mkIf config.package.virt-manager.enable {
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
};
} }