global: enable NUR + common/dotfiles: rise Firefox

Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
Ivan Bushchik 2024-01-06 18:46:56 +03:00
parent 97332e32d5
commit d97a20f739
No known key found for this signature in database
GPG key ID: 2F16FBF3262E090C
3 changed files with 114 additions and 11 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, nur, ... }:
let let
my = import ../.; my = import ../.;
@ -20,6 +20,8 @@ in {
}; };
}; };
nixpkgs.overlays = [ nur.overlay ];
documentation = { documentation = {
doc.enable = false; doc.enable = false;
info.enable = false; info.enable = false;

View file

@ -19,9 +19,10 @@ in {
options.my.users.ivabus.dotfiles.enable = options.my.users.ivabus.dotfiles.enable =
lib.mkEnableOption "Enable automatic dotfiles installation"; lib.mkEnableOption "Enable automatic dotfiles installation";
config.my.users.ivabus.dotfiles.enable = lib.mkDefault true; config.my.users.ivabus.dotfiles.enable = lib.mkDefault true;
config.home-manager = lib.mkIf config.home-manager.users.ivabus = lib.mkIf
(config.my.users.ivabus.enable && config.my.users.ivabus.dotfiles.enable) ({ (config.my.users.ivabus.enable && config.my.users.ivabus.dotfiles.enable)
users.ivabus = { (lib.mkMerge [
{
home.file = { home.file = {
".config" = { ".config" = {
source = "${dotfiles}/configs"; source = "${dotfiles}/configs";
@ -35,6 +36,88 @@ in {
".profile" = { source = "${dotfiles}/configs/.profile"; }; ".profile" = { source = "${dotfiles}/configs/.profile"; };
".zshrc" = { source = "${dotfiles}/configs/.zshrc"; }; ".zshrc" = { source = "${dotfiles}/configs/.zshrc"; };
}; };
}; }
}); (lib.mkIf config.my.roles.graphical.enable {
# NixOS only things
programs.firefox = {
enable = true;
profiles.default = {
id = 0;
name = "default";
isDefault = true;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
stylus
];
search = {
force = true;
engines = {
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}];
icon =
"''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Wiki" = {
urls = [{
template =
"https://nixos.wiki/index.php?search={searchTerms}";
}];
icon =
"''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@nw" ];
};
};
};
userChrome = ''
.titlebar-buttonbox-container, .titlebar-spacer, #alltabs-button {
display:none;
}'';
bookmarks = [
{
name = "NixOS Search";
url = "https://search.nixos.org";
}
{
name = "GitHub";
url = "https://github.com";
}
{
name = "YouTube";
url = "https://youtube.com";
}
{
name = "VK";
url = "https://vk.com";
}
{
name = "Mastodon";
url = "https://social.treehouse.systems";
}
# I go to school, you know?
{
name = "ЭД";
url = "https://dnevnik2.petersburgedu.ru";
}
];
settings = {
"intl.accept_languages" = [ "ru-RU" "ru" "en-US" "en" ];
"font.language.group" = "x-cyrillic";
};
};
};
})
]);
} }

View file

@ -5,6 +5,8 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -12,23 +14,33 @@
apple-silicon-support.url = "github:tpwrules/nixos-apple-silicon"; apple-silicon-support.url = "github:tpwrules/nixos-apple-silicon";
nixos-hardware.url = "github:nixos/nixos-hardware";
rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.url = "github:oxalica/rust-overlay";
}; };
outputs = { self, nixpkgs, home-manager, rust-overlay, apple-silicon-support outputs = { self, nixpkgs, home-manager, rust-overlay, nixos-hardware
, ... }@inputs: { , apple-silicon-support, nur, ... }@inputs: {
# Stella = Unchartevice 6540 (Ryzen 3 3250U, 16GB RAM) # Stella = Unchartevice 6540 (Ryzen 3 3250U, 16GB RAM)
nixosConfigurations."stella" = nixpkgs.lib.nixosSystem { nixosConfigurations."stella" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = inputs; specialArgs = inputs;
modules = [ home-manager.nixosModules.home-manager ./machines/stella ]; modules = [
nur.nixosModules.nur
home-manager.nixosModules.home-manager
./machines/stella
];
}; };
# Vetus = iMac 27" 2017, i5, 64 GB RAM # Vetus = iMac 27" 2017, i5, 64 GB RAM
nixosConfigurations."vetus" = nixpkgs.lib.nixosSystem { nixosConfigurations."vetus" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = inputs; specialArgs = inputs;
modules = [ home-manager.nixosModules.home-manager ./machines/vetus ]; modules = [
nur.nixosModules.nur
home-manager.nixosModules.home-manager
./machines/vetus
];
}; };
# Celerrime = MacBook Air M2 # Celerrime = MacBook Air M2
@ -36,6 +48,7 @@
system = "aarch64-linux"; system = "aarch64-linux";
specialArgs = inputs; specialArgs = inputs;
modules = [ modules = [
nur.nixosModules.nur
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
apple-silicon-support.nixosModules.apple-silicon-support apple-silicon-support.nixosModules.apple-silicon-support
./machines/celerrime ./machines/celerrime
@ -46,7 +59,11 @@
nixosConfigurations."cursor" = nixpkgs.lib.nixosSystem { nixosConfigurations."cursor" = nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
specialArgs = inputs; specialArgs = inputs;
modules = [ home-manager.nixosModules.home-manager ./machines/cursor ]; modules = [
nur.nixosModules.nur
home-manager.nixosModules.home-manager
./machines/cursor
];
}; };
# Raspberry Pi 4B 2GB RAM # Raspberry Pi 4B 2GB RAM
@ -55,6 +72,7 @@
specialArgs = inputs; specialArgs = inputs;
modules = [ modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
nur.nixosModules.nur
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
./machines/rubusidaeus ./machines/rubusidaeus
]; ];