2024-01-02 17:17:59 +03:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
dotfiles = builtins.fetchGit {
|
|
|
|
url = "https://github.com/ivabus/dotfiles";
|
2024-03-02 14:38:42 +03:00
|
|
|
rev = "174e6d509ae52b6cfc1a637e5919149d2e93d671";
|
2024-01-02 17:17:59 +03:00
|
|
|
};
|
|
|
|
theme = builtins.fetchurl {
|
|
|
|
url =
|
|
|
|
"https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme";
|
|
|
|
};
|
|
|
|
highlighting = builtins.fetchGit {
|
|
|
|
url = "https://github.com/zsh-users/zsh-syntax-highlighting.git";
|
|
|
|
# Just install the latest and don't care about updating
|
|
|
|
ref = "master";
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
# Option to disable dotfiles for development
|
|
|
|
options.my.users.ivabus.dotfiles.enable =
|
|
|
|
lib.mkEnableOption "Enable automatic dotfiles installation";
|
|
|
|
config.my.users.ivabus.dotfiles.enable = lib.mkDefault true;
|
2024-01-06 18:46:56 +03:00
|
|
|
config.home-manager.users.ivabus = lib.mkIf
|
|
|
|
(config.my.users.ivabus.enable && config.my.users.ivabus.dotfiles.enable)
|
|
|
|
(lib.mkMerge [
|
|
|
|
{
|
2024-01-02 17:17:59 +03:00
|
|
|
home.file = {
|
|
|
|
".config" = {
|
|
|
|
source = "${dotfiles}/configs";
|
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
".config/zsh/themes/ivabus.zsh-theme" = { source = theme; };
|
|
|
|
".config/zsh/plugins/zsh-syntax-highlighting/" = {
|
|
|
|
source = highlighting;
|
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
".profile" = { source = "${dotfiles}/configs/.profile"; };
|
|
|
|
".zshrc" = { source = "${dotfiles}/configs/.zshrc"; };
|
|
|
|
};
|
2024-01-06 18:46:56 +03:00
|
|
|
}
|
|
|
|
(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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
]);
|
2024-01-02 17:17:59 +03:00
|
|
|
}
|