wow
This commit is contained in:
parent
a45fbb4560
commit
c40b87be20
18 changed files with 362 additions and 184 deletions
258
modules/home/firefox-devedition.nix
Normal file
258
modules/home/firefox-devedition.nix
Normal file
|
|
@ -0,0 +1,258 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
||||
|
||||
extensionUrl = "https://git.mizuki.guru/imnyang/thisiswindowsfigma/releases/download/v1.0.0/d168a70cb6a24fe4a478-1.0.0.xpi";
|
||||
extensionId = "figma-windows-ua-spoofer@imnyang.local";
|
||||
|
||||
profileName = "imnyang";
|
||||
darwinProfilePath = "Profiles/${profileName}";
|
||||
|
||||
firefoxSettings = {
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"browser.uidensity" = 0;
|
||||
"browser.theme.dark-private-windows" = false;
|
||||
};
|
||||
|
||||
userChrome = ''
|
||||
:root {
|
||||
--mizuki-bg: #fcf8f9;
|
||||
--mizuki-fg: #191017;
|
||||
--mizuki-muted: #707d8a;
|
||||
--mizuki-border: #f2e6ea;
|
||||
--mizuki-surface: #fdf7f9;
|
||||
--mizuki-hover: #8165700f;
|
||||
--mizuki-active: #8165701a;
|
||||
--mizuki-selection: #ecb7d5;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--mizuki-bg: #191017;
|
||||
--mizuki-fg: #fafafa;
|
||||
--mizuki-muted: #a9a9b1;
|
||||
--mizuki-border: #2c1f2d;
|
||||
--mizuki-surface: #191017;
|
||||
--mizuki-hover: #2c1f2d80;
|
||||
--mizuki-active: #2c1f2d;
|
||||
--mizuki-selection: #604562;
|
||||
}
|
||||
}
|
||||
|
||||
#navigator-toolbox,
|
||||
#TabsToolbar,
|
||||
#nav-bar,
|
||||
#PersonalToolbar,
|
||||
#sidebar-box,
|
||||
#sidebar-header {
|
||||
background-color: var(--mizuki-bg) !important;
|
||||
color: var(--mizuki-fg) !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
border-bottom: 1px solid var(--mizuki-border) !important;
|
||||
}
|
||||
|
||||
#urlbar-background,
|
||||
#searchbar {
|
||||
background-color: var(--mizuki-surface) !important;
|
||||
border-color: var(--mizuki-border) !important;
|
||||
color: var(--mizuki-fg) !important;
|
||||
}
|
||||
|
||||
#urlbar[focused] > #urlbar-background,
|
||||
#searchbar:focus-within {
|
||||
border-color: var(--mizuki-selection) !important;
|
||||
box-shadow: 0 0 0 1px var(--mizuki-selection) !important;
|
||||
}
|
||||
|
||||
.tab-background {
|
||||
border-radius: 10px 10px 0 0 !important;
|
||||
}
|
||||
|
||||
.tab-background[selected] {
|
||||
background-color: var(--mizuki-active) !important;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not([selected]):hover .tab-background,
|
||||
toolbarbutton:hover,
|
||||
#urlbar:hover > #urlbar-background {
|
||||
background-color: var(--mizuki-hover) !important;
|
||||
}
|
||||
|
||||
toolbarbutton[open],
|
||||
toolbarbutton[checked],
|
||||
toolbarbutton:active {
|
||||
background-color: var(--mizuki-active) !important;
|
||||
}
|
||||
|
||||
#TabsToolbar .tabbrowser-tab,
|
||||
#urlbar-input,
|
||||
#identity-icon-label,
|
||||
toolbarbutton {
|
||||
color: var(--mizuki-fg) !important;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:not([selected]) .tab-label,
|
||||
#sidebar-title {
|
||||
color: var(--mizuki-muted) !important;
|
||||
}
|
||||
'';
|
||||
|
||||
userContent = ''
|
||||
@-moz-document url("about:home"), url("about:newtab"), url("about:privatebrowsing") {
|
||||
body,
|
||||
.outer-wrapper,
|
||||
.activity-stream {
|
||||
background: #fcf8f9 !important;
|
||||
color: #191017 !important;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body,
|
||||
.outer-wrapper,
|
||||
.activity-stream {
|
||||
background: #191017 !important;
|
||||
color: #fafafa !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
userJs = lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (name: value: ''user_pref(${builtins.toJSON name}, ${builtins.toJSON value});'') firefoxSettings
|
||||
) + "\n";
|
||||
in
|
||||
lib.mkMerge [
|
||||
(lib.mkIf isLinux {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox-devedition;
|
||||
|
||||
policies = {
|
||||
DisableAppUpdate = true;
|
||||
ExtensionSettings = {
|
||||
${extensionId} = {
|
||||
installation_mode = "force_installed";
|
||||
install_url = extensionUrl;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
profiles.${profileName} = {
|
||||
id = 0;
|
||||
name = profileName;
|
||||
path = "${profileName}.default";
|
||||
isDefault = true;
|
||||
|
||||
settings = firefoxSettings;
|
||||
inherit userChrome userContent;
|
||||
};
|
||||
};
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = [ "firefox-devedition.desktop" ];
|
||||
"x-scheme-handler/http" = [ "firefox-devedition.desktop" ];
|
||||
"x-scheme-handler/https" = [ "firefox-devedition.desktop" ];
|
||||
"x-scheme-handler/about" = [ "firefox-devedition.desktop" ];
|
||||
"x-scheme-handler/unknown" = [ "firefox-devedition.desktop" ];
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf isDarwin {
|
||||
home.activation.configureFirefoxDeveloperEdition = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
firefox_dir="$HOME/Library/Application Support/Firefox"
|
||||
profiles_ini="$firefox_dir/profiles.ini"
|
||||
|
||||
mkdir -p "$firefox_dir/Profiles"
|
||||
|
||||
profile_info=""
|
||||
if [ -f "$profiles_ini" ]; then
|
||||
profile_info=$(
|
||||
awk '
|
||||
function flush() {
|
||||
if (in_profile && path != "") {
|
||||
if (is_default == "1") {
|
||||
print is_relative "|" path
|
||||
found = 1
|
||||
exit
|
||||
}
|
||||
if (first == "") {
|
||||
first = is_relative "|" path
|
||||
}
|
||||
}
|
||||
}
|
||||
BEGIN { in_profile = 0; is_relative = "1" }
|
||||
/^\\[Profile[0-9]+\\]$/ { flush(); in_profile = 1; path = ""; is_default = "0"; is_relative = "1"; next }
|
||||
/^\\[/ { flush(); in_profile = 0; next }
|
||||
in_profile && /^Path=/ { path = substr($0, 6); next }
|
||||
in_profile && /^Default=1$/ { is_default = "1"; next }
|
||||
in_profile && /^IsRelative=/ { is_relative = substr($0, 12); next }
|
||||
END {
|
||||
if (!found) {
|
||||
flush()
|
||||
}
|
||||
if (!found && first != "") {
|
||||
print first
|
||||
}
|
||||
}
|
||||
' "$profiles_ini"
|
||||
)
|
||||
fi
|
||||
|
||||
if [ -n "$profile_info" ]; then
|
||||
is_relative="''${profile_info%%|*}"
|
||||
profile_path="''${profile_info#*|}"
|
||||
if [ "$is_relative" = "1" ]; then
|
||||
profile_dir="$firefox_dir/$profile_path"
|
||||
else
|
||||
profile_dir="$profile_path"
|
||||
fi
|
||||
else
|
||||
profile_dir="$firefox_dir/${darwinProfilePath}"
|
||||
cat > "$profiles_ini" <<'EOF'
|
||||
[Profile0]
|
||||
Name=${profileName}
|
||||
IsRelative=1
|
||||
Path=${darwinProfilePath}
|
||||
Default=1
|
||||
|
||||
[General]
|
||||
StartWithLastProfile=1
|
||||
Version=2
|
||||
EOF
|
||||
fi
|
||||
|
||||
mkdir -p "$profile_dir/chrome"
|
||||
cp ${pkgs.writeText "firefox-devedition-user.js" userJs} "$profile_dir/user.js"
|
||||
cp ${pkgs.writeText "firefox-devedition-userChrome.css" userChrome} "$profile_dir/chrome/userChrome.css"
|
||||
cp ${pkgs.writeText "firefox-devedition-userContent.css" userContent} "$profile_dir/chrome/userContent.css"
|
||||
'';
|
||||
|
||||
home.file = {
|
||||
"Library/Preferences/org.mozilla.firefoxdeveloperedition.plist".text = ''
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>EnterprisePoliciesEnabled</key>
|
||||
<true/>
|
||||
<key>DisableAppUpdate</key>
|
||||
<true/>
|
||||
<key>ExtensionSettings</key>
|
||||
<dict>
|
||||
<key>${extensionId}</key>
|
||||
<dict>
|
||||
<key>installation_mode</key>
|
||||
<string>force_installed</string>
|
||||
<key>install_url</key>
|
||||
<string>${extensionUrl}</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
'';
|
||||
};
|
||||
})
|
||||
]
|
||||
|
|
@ -86,7 +86,7 @@ with pkgs;
|
|||
))
|
||||
|
||||
inputs.notion-desktop.packages.${stdenv.hostPlatform.system}.default
|
||||
inputs.notion-calendar-electron.packages.${stdenv.hostPlatform.system}.default
|
||||
# inputs.notion-calendar-electron.packages.${stdenv.hostPlatform.system}.default
|
||||
inputs.codex-app.packages.${stdenv.buildPlatform.system}.codex-desktop
|
||||
|
||||
proton-vpn
|
||||
|
|
@ -98,8 +98,6 @@ with pkgs;
|
|||
|
||||
code-cursor
|
||||
|
||||
microsoft-edge
|
||||
|
||||
galaxy-buds-client
|
||||
|
||||
# another
|
||||
|
|
|
|||
17
modules/mizukios/features/_1password.nix
Normal file
17
modules/mizukios/features/_1password.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs._1password.enable = true;
|
||||
programs._1password-gui = {
|
||||
enable = true;
|
||||
polkitPolicyOwners = [ "imnyang" ];
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"1password/custom_allowed_browsers" = {
|
||||
text = ''
|
||||
firefox-devedition
|
||||
'';
|
||||
mode = "0755";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -8,23 +8,6 @@ let
|
|||
nrr = import ./packages/nrr.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
programs._1password.enable = true;
|
||||
programs._1password-gui = {
|
||||
enable = true;
|
||||
polkitPolicyOwners = [ "imnyang" ];
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"1password/custom_allowed_browsers" = {
|
||||
text = ''
|
||||
microsoft-edge
|
||||
firefox-devedition
|
||||
'';
|
||||
mode = "0755";
|
||||
};
|
||||
};
|
||||
|
||||
# 시스템 전역 패키지 (데스크탑/개발용)
|
||||
environment.systemPackages = with pkgs; [
|
||||
nr
|
||||
nrr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue