Compare commits
No commits in common. "1995ae585539fe2247cf3abb895360d20ece90ab" and "321c4e011b7f0f7fd3afd87dae938380e59aad79" have entirely different histories.
1995ae5855
...
321c4e011b
5 changed files with 239 additions and 145 deletions
|
|
@ -21,6 +21,7 @@
|
||||||
"${inputs.self}/modules/home/devtool/neovim.nix"
|
"${inputs.self}/modules/home/devtool/neovim.nix"
|
||||||
"${inputs.self}/modules/home/devtool/ghostty.nix"
|
"${inputs.self}/modules/home/devtool/ghostty.nix"
|
||||||
"${inputs.self}/modules/home/devtool/zed.nix"
|
"${inputs.self}/modules/home/devtool/zed.nix"
|
||||||
|
"${inputs.self}/modules/home/firefox-devedition.nix"
|
||||||
./config/git.nix
|
./config/git.nix
|
||||||
./config/shell.nix
|
./config/shell.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@
|
||||||
"signal"
|
"signal"
|
||||||
"zoom"
|
"zoom"
|
||||||
|
|
||||||
|
# Browsers
|
||||||
|
"firefox@developer-edition"
|
||||||
|
|
||||||
# Productivity and design
|
# Productivity and design
|
||||||
"camo-studio"
|
"camo-studio"
|
||||||
"proton-drive"
|
"proton-drive"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ nixpkgs.lib.nixosSystem {
|
||||||
# ./services/attic.nix
|
# ./services/attic.nix
|
||||||
./services/caddy.nix
|
./services/caddy.nix
|
||||||
./services/forgejo-runner.nix
|
./services/forgejo-runner.nix
|
||||||
./services/limbo.nix
|
|
||||||
./services/stream.nix
|
./services/stream.nix
|
||||||
# ./services/harmonia.nix
|
# ./services/harmonia.nix
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
systemd.services.limbo = {
|
|
||||||
description = "Minecraft Limbo Server";
|
|
||||||
after = [ "network-online.target" ];
|
|
||||||
wants = [ "network-online.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
User = "imnyang";
|
|
||||||
Group = "users";
|
|
||||||
WorkingDirectory = "/home/imnyang/minecraft/limbo";
|
|
||||||
ExecStart = "/home/imnyang/minecraft/limbo/pico_limbo --config /home/imnyang/minecraft/limbo/server.toml";
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = 5;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +1,15 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
||||||
|
|
||||||
extensionUrl = "https://git.mizuki.guru/imnyang/thisiswindowsfigma/releases/download/v1.0.0/d168a70cb6a24fe4a478-1.0.0.xpi";
|
extensionUrl = "https://git.mizuki.guru/imnyang/thisiswindowsfigma/releases/download/v1.0.0/d168a70cb6a24fe4a478-1.0.0.xpi";
|
||||||
extensionId = "figma-windows-ua-spoofer@imnyang.local";
|
extensionId = "figma-windows-ua-spoofer@imnyang.local";
|
||||||
in
|
|
||||||
{
|
|
||||||
programs.firefox = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.firefox-devedition;
|
|
||||||
|
|
||||||
policies = {
|
profileName = "imnyang";
|
||||||
DisableAppUpdate = true;
|
darwinProfilePath = "Profiles/${profileName}";
|
||||||
ExtensionSettings = {
|
|
||||||
${extensionId} = {
|
|
||||||
installation_mode = "force_installed";
|
|
||||||
install_url = extensionUrl;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
profiles.imnyang = {
|
firefoxSettings = {
|
||||||
id = 0;
|
|
||||||
name = "imnyang";
|
|
||||||
isDefault = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||||
"browser.uidensity" = 0;
|
"browser.uidensity" = 0;
|
||||||
"browser.theme.dark-private-windows" = false;
|
"browser.theme.dark-private-windows" = false;
|
||||||
|
|
@ -134,6 +119,35 @@ in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -144,4 +158,101 @@ in
|
||||||
"x-scheme-handler/about" = [ "firefox-devedition.desktop" ];
|
"x-scheme-handler/about" = [ "firefox-devedition.desktop" ];
|
||||||
"x-scheme-handler/unknown" = [ "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>
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue