better organisation, zen browser config started

This commit is contained in:
greyweather committed 2026-07-03 18:29:29 +01:00
1 parent 4b7e91e5a1
commit 3750e95698
10 files changed
+162 -80

No files matched your search

+3 -1
View File
@@ -31,8 +31,10 @@ then, run `sudo nixos-rebuild switch` once to apply those changes.
reboot, to make sure that everything applied properly.
make sure to `cp /etc/nixos/hardware-configuration ~/nixos/hosts/<hostname>` to apply the generated hardware config for your system
finally, run `sudo nixos-rebuild switch --flake /home/grey/nixos#<hostname>` to apply the flake.
reboot again, and you should now land on your desktop/login screen!
now you have access to `nh os switch ~/nixos`, and shouldn't touch the global config ever again.
now you have access to `nh os switch ~/nixos`, and shouldn't touch the global config ever again.
Generated
+39 -12
View File
@@ -1,5 +1,27 @@
{
"nodes": {
"firefox-addons": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1783051357,
"narHash": "sha256-/PPRXThQ9aoc/stohHMtfrRr0y5TmZSFvWPgC18HjUk=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "b02e5efbe9b68e4de7322362ada265bffe43696a",
"type": "gitlab"
},
"original": {
"dir": "pkgs/firefox-addons",
"owner": "rycee",
"repo": "nur-expressions",
"type": "gitlab"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -7,15 +29,16 @@
]
},
"locked": {
"lastModified": 1783005591,
"narHash": "sha256-NcLHV5uBAeggDUE2wPbKszjfyaSLsoqaYt7izOphkZw=",
"lastModified": 1782704057,
"narHash": "sha256-G1I1gd32F7mp9LAe1DaZ4ZL7NX5gyiKwdCMwro1Vrck=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f469c79b955609d6a8fdd9e689be76a93b1621d7",
"rev": "868d0a692de703c2de98fab61968e4e310b7c28e",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-26.05",
"repo": "home-manager",
"type": "github"
}
@@ -42,16 +65,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1782723713,
"narHash": "sha256-oPXCU/SSUokcGaJREHibG1CBX3+s/W7orDWQOZDsEeQ=",
"lastModified": 1782847225,
"narHash": "sha256-JC9PjqKYG9ve5U8aDOLQipp3+KLANBHUvGdLZlxzdKI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b5aa0fbd538984f6e3d201be0005b4463d8b09f8",
"rev": "95ca1e203c0750115fd4a6f17d5a245dfe6b1edd",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
@@ -81,6 +104,7 @@
},
"root": {
"inputs": {
"firefox-addons": "firefox-addons",
"home-manager": "home-manager",
"nh": "nh",
"nixpkgs": "nixpkgs",
@@ -90,20 +114,23 @@
},
"zen-browser": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1782624757,
"narHash": "sha256-pqFaCAV+g8H+p0kE4vYn9ZgcEFvt644zGy7SyCdf9c8=",
"owner": "youwen5",
"lastModified": 1783063269,
"narHash": "sha256-XVOopPVgoWPlhuJajUYNTK/M9j/L/llD6vdH5JE9EKs=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "907465791e7064d86d37964dd95e23280dfb68da",
"rev": "b86380c97016a1c79f535f286a34c0f5b4270a1b",
"type": "github"
},
"original": {
"owner": "youwen5",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"type": "github"
}
+14 -4
View File
@@ -3,11 +3,11 @@
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
url = "github:nixos/nixpkgs/nixos-26.05";
};
home-manager = {
url = "github:nix-community/home-manager";
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
@@ -17,7 +17,13 @@
};
zen-browser = {
url = "github:youwen5/zen-browser-flake";
url = "github:0xc000022070/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
@@ -30,7 +36,7 @@
outputs = {self,nixpkgs,home-manager,plasma-manager,...}@inputs: {
nixosConfigurations = builtins.listToAttrs (map (name: {
inherit name;
name = name;
value = nixpkgs.lib.nixosSystem {
modules = [
./hosts/${name}
@@ -39,11 +45,15 @@
useGlobalPkgs = true;
useUserPackages = true;
users.grey = ./hosts/${name}/home.nix;
extraSpecialArgs = {
inherit inputs;
};
};
}
];
specialArgs = {
inherit inputs;
inherit name;
system = "x86-64-linux";
};
};
+6 -1
View File
@@ -7,5 +7,10 @@
inputs.home-manager.packages.${system}.default
];
home-manager.sharedModules = [ inputs.plasma-manager.homeManagerModules.plasma-manager ];
home-manager.backupFileExtension = ".bak";
home-manager.sharedModules = [
inputs.plasma-manager.homeManagerModules.plasma-manager
inputs.zen-browser.homeModules.beta
];
}
-56
View File
@@ -1,56 +0,0 @@
{
inputs,
pkgs,
lib,
...
}:
let
extension = shortId: guid: {
name = guid;
value = {
install_url = "https://addons.mozilla.org/en-GB/firefox/downloads/latest/${shortId}/latest.xpi";
installation_mode = "normal_installed";
};
};
prefs = {
# about:config
"extensions.autoDisableScopes" = 0;
"extensions.pocket.enabled" = false;
};
extensions = [
(extension "ublock-origin" "uBlock0@raymonhill.net")
];
in
{
environment.systemPackages = with pkgs; [
(pkgs.wrapFirefox
inputs.zen-browser.packages.${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 = {
Defeault = "ddg";
Add = [
{
Name = "nixpkgs packages";
URLTemplate = "https://search.nixos.org/packages?query={searchTerms}";
IconURL = "https://wiki.nixos.org/favicon.ico";
Alias = "@np";
}
];
};
};
}
)
];
}
File renamed without changes.
@@ -94,7 +94,7 @@
config = {
iconsOnly = true;
launchers = [
"applications:zen.desktop"
"applications:zen-beta.desktop"
"applications:thunderbird.desktop"
"applications:org.kde.dolphin.desktop"
"applications:equibop.desktop"
@@ -104,7 +104,7 @@
"applications:obsidian.desktop"
"applications:github-desktop.desktop"
"applications:unityhub.desktop"
"applications:org.godotengine.Godot4.7.desktop"
"applications:org.godotengine.Godot4.6.desktop"
"applications:code.desktop"
"applications:idea.desktop"
"applications:clion.desktop"
+91
View File
@@ -0,0 +1,91 @@
{
pkgs,
inputs,
...
}: let
firefox-addons = with pkgs; inputs.firefox-addons.packages.${system};
in {
programs.zen-browser = {
enable = true;
setAsDefaultBrowser = true;
nativeMessagingHosts = [
pkgs.firefoxpwa
];
policies = {
AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false;
DisableAppUpdate = true;
DisableFeedbackCommands = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
Preferences = {
"browser.startup.homepage" = {
Value = "about:blank";
Status = "locked";
};
};
};
profiles.default = {
settings = {
"zen.urlbar.behavior" = "float";
"zen.welcome-screen.seen" = true;
};
extensions.packages = with firefox-addons; [
adnauseam
bitwarden
indie-wiki-buddy
pwas-for-firefox
];
search = {
force = true;
default = "ddg";
engines = {
nixpkgs = {
name = "nixpkgs packages";
urls = [
{
template = "https://search.nixos.org/packages?query={searchTerms}";
}
];
icon = "https://wiki.nixos.org/favicon.ico";
definedAliases = ["@np"];
};
nixos-options = {
name = "NixOS options";
urls = [
{
template = "https://search.nixos.org/options?query={searchTerms}";
}
];
icon = "https://wiki.nixos.org/favicon.ico";
definedAliases = ["@no"];
};
nixos-wiki = {
name = "NixOS Wiki";
urls = [
{
template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
}
];
icon = "https://wiki.nixos.org/favicon.ico";
definedAliases = ["@nw"];
};
};
};
#keyboardShortcuts = [
# {
# id = "zen"
# }
#];
};
};
}
+2 -1
View File
@@ -12,7 +12,6 @@
../../flakes/nh.nix
../../flakes/plasma-desktop.nix
../../flakes/home-manager.nix
../../flakes/zen-browser.nix
];
nix.settings.experimental-features = [
@@ -80,6 +79,8 @@
environment.systemPackages = with pkgs; [
pkgs.pipewire
pkgs.git
pkgs.fzf
pkgs.jq
];
programs.zsh.enable = true;
+5 -3
View File
@@ -1,12 +1,14 @@
{
config,
pkgs,
inputs,
lib,
...
}: {
imports = [
./plasma.nix
./fastfetch.nix
./configs/plasma.nix
./configs/fastfetch.nix
./configs/zen-browser.nix
];
home.username = "grey";
@@ -14,7 +16,7 @@
home.stateVersion = "26.05";
home.packages = [
home.packages = with pkgs; [
pkgs.steam
pkgs.equibop
pkgs.prismlauncher