refactor *started*
This commit is contained in:
parent
d0413cb830
commit
db2103a37d
103 changed files with 1008 additions and 786 deletions
20
home/modules/connectivity/bluetooth/default.nix
Normal file
20
home/modules/connectivity/bluetooth/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
bluetooth = {
|
||||
enable = lib.mkEnableOption "enable bluetooth";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.bluetooth.enable {
|
||||
home.packages = with pkgs; [
|
||||
bluez
|
||||
bluetuith
|
||||
];
|
||||
};
|
||||
}
|
||||
15
home/modules/connectivity/default.nix
Normal file
15
home/modules/connectivity/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./internet
|
||||
./bluetooth
|
||||
./mounts
|
||||
./social-media
|
||||
];
|
||||
}
|
||||
16
home/modules/connectivity/internet/default.nix
Normal file
16
home/modules/connectivity/internet/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./librewolf.nix
|
||||
./zen-browser.nix
|
||||
./tor.nix
|
||||
./mail.nix
|
||||
./rss.nix
|
||||
];
|
||||
}
|
||||
21
home/modules/connectivity/internet/librewolf.nix
Normal file
21
home/modules/connectivity/internet/librewolf.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
internet.browsers = {
|
||||
librewolf = {
|
||||
enable = lib.mkEnableOption "enable librewolf";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.internet.browsers.librewolf.enable {
|
||||
home.packages = with pkgs; [
|
||||
librewolf
|
||||
];
|
||||
};
|
||||
}
|
||||
34
home/modules/connectivity/internet/mail.nix
Normal file
34
home/modules/connectivity/internet/mail.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
internet = {
|
||||
mail.enable = lib.mkEnableOption "enable e-mail";
|
||||
mail.providers.protonmail.enable = lib.mkEnableOption "enable protonmail";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
programs = {
|
||||
thunderbird = lib.mkIf config.internet.mail.enable {
|
||||
enable = true;
|
||||
profiles."default" = {
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
services = {
|
||||
protonmail-bridge = lib.mkIf config.internet.mail.providers.protonmail.enable {
|
||||
enable = true;
|
||||
package = pkgs.protonmail-bridge;
|
||||
extraPackages = with pkgs; [
|
||||
gnome-keyring
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
19
home/modules/connectivity/internet/rss.nix
Normal file
19
home/modules/connectivity/internet/rss.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
internet = {
|
||||
rss.enable = lib.mkEnableOption "enable rss";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
home.packages = with pkgs; [
|
||||
(lib.mkIf (config.internet.rss.enable) newsflash)
|
||||
];
|
||||
};
|
||||
}
|
||||
21
home/modules/connectivity/internet/tor.nix
Normal file
21
home/modules/connectivity/internet/tor.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
internet = {
|
||||
tor.enable = lib.mkEnableOption "enable tor";
|
||||
browsers.tor-browser.enable = lib.mkEnableOption "enable tor-browser";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
home.packages = with pkgs; [
|
||||
(lib.mkIf (config.internet.browsers.tor-browser.enable) tor-browser)
|
||||
(lib.mkIf (config.internet.tor.enable) oniux)
|
||||
];
|
||||
};
|
||||
}
|
||||
98
home/modules/connectivity/internet/zen-browser.nix
Normal file
98
home/modules/connectivity/internet/zen-browser.nix
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
extension = shortId: guid: {
|
||||
name = guid;
|
||||
value = {
|
||||
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
||||
installation_mode = "normal_installed";
|
||||
};
|
||||
};
|
||||
|
||||
prefs = {
|
||||
# Check these out at about:config
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"extensions.pocket.enabled" = false;
|
||||
"general.autoScroll" = true;
|
||||
"general.smoothScroll" = true;
|
||||
"middlemouse.contentLoadURL" = false;
|
||||
"devtools.debugger.remote-enabled" = true;
|
||||
"devtools.chrome.enabled" = true;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"browser.ml.enable" = false;
|
||||
"browser.ml.chat.enabled" = false;
|
||||
"browser.ml.chat.menu" = false;
|
||||
"browser.ml.chat.page" = false;
|
||||
"browser.ml.chat.page.footerBadge" = false;
|
||||
"browser.ml.chat.page.menuBadge" = false;
|
||||
"browser.ml.linkPreview.enabled" = false;
|
||||
"browser.ml.pageAssist.enabled" = false;
|
||||
"browser.tabs.groups.smart.enabled" = false;
|
||||
"browser.tabs.groups.smart.userEnabled" = false;
|
||||
"extensions.ml.enabled" = false;
|
||||
"browser.search.visualSearch.featureGate" = false;
|
||||
# ...
|
||||
};
|
||||
|
||||
extensions = [
|
||||
# To add additional extensions, find it on addons.mozilla.org, find
|
||||
# the short ID in the url (like https://addons.mozilla.org/en-US/firefox/addon/!SHORT_ID!/)
|
||||
# Then go to https://addons.mozilla.org/api/v5/addons/addon/!SHORT_ID!/ to get the guid
|
||||
(extension "adnauseam" "adnauseam@rednoise.org")
|
||||
(extension "floccus" "floccus@handmadeideas.org")
|
||||
(extension "bitwarden-password-manager" "{446900e4-71c2-419f-a6a7-df9c091e268b}")
|
||||
(extension "simplelogin" "addon@simplelogin")
|
||||
(extension "localcdn-fork-of-decentraleyes" "{b86e4813-687a-43e6-ab65-0bde4ab75758}")
|
||||
(extension "catppuccin-web-file-icons" "{bbb880ce-43c9-47ae-b746-c3e0096c5b76}")
|
||||
(extension "peertube-companion" "peertube-companion@booteille")
|
||||
(extension "peertubeify" "{01175c8e-4506-4263-bad9-d3ddfd4f5a5f}")
|
||||
(extension "peertube-picks" "{937c0767-0608-41e2-917a-8bf06601275a}")
|
||||
# ...
|
||||
];
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
internet.browsers = {
|
||||
zen-browser = {
|
||||
enable = lib.mkEnableOption "enable zen-browser";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.internet.browsers.zen-browser.enable {
|
||||
home.packages = [
|
||||
(pkgs.wrapFirefox
|
||||
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser-unwrapped
|
||||
{
|
||||
extraPrefs = lib.concatLines (
|
||||
lib.mapAttrsToList (
|
||||
name: value: ''lockPref(${lib.strings.toJSON name}, ${lib.strings.toJSON value});''
|
||||
) prefs
|
||||
);
|
||||
extraPolicies = {
|
||||
DisableTelemetry = true;
|
||||
ExtensionSettings = builtins.listToAttrs extensions;
|
||||
|
||||
SearchEngines = {
|
||||
Default = "MartyTF's Series of Tubes";
|
||||
Add = [
|
||||
{
|
||||
Name = "MartyTF's Series of Tubes";
|
||||
URLTemplate = "https://search.marty.tf/?q={searchTerms}";
|
||||
IconURL = "https://wiki.nixos.org/favicon.ico";
|
||||
Alias = "@sgx";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
12
home/modules/connectivity/mounts/default.nix
Normal file
12
home/modules/connectivity/mounts/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./sshfs.nix
|
||||
];
|
||||
}
|
||||
28
home/modules/connectivity/mounts/sshfs.nix
Normal file
28
home/modules/connectivity/mounts/sshfs.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
};
|
||||
config = {
|
||||
programs.sftpman = {
|
||||
enable = true;
|
||||
mounts = {
|
||||
marty-server = {
|
||||
host = "marty-server";
|
||||
user = "marty";
|
||||
mountOptions = [
|
||||
"/mnt/Server"
|
||||
];
|
||||
mountPoint = "/";
|
||||
};
|
||||
};
|
||||
package = pkgs.sshfs;
|
||||
defaultSshKey = "~/.ssh/id_ed25519";
|
||||
};
|
||||
};
|
||||
}
|
||||
15
home/modules/connectivity/social-media/default.nix
Normal file
15
home/modules/connectivity/social-media/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./messaging
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
fedistar
|
||||
];
|
||||
}
|
||||
31
home/modules/connectivity/social-media/messaging/default.nix
Normal file
31
home/modules/connectivity/social-media/messaging/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
messaging = {
|
||||
enable = lib.mkEnableOption "enable all messaging";
|
||||
element.enable = lib.mkEnableOption "enable element";
|
||||
signal.enable = lib.mkEnableOption "enable signal";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
messaging = lib.mkIf config.messaging.enable {
|
||||
element.enable = lib.mkDefault true;
|
||||
signal.enable = lib.mkDefault true;
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
(lib.mkIf (config.messaging.signal.enable) signal-desktop)
|
||||
];
|
||||
programs = {
|
||||
element-desktop = lib.mkIf config.messaging.element.enable {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue