From c879c78d562b2d8abb327211ce586a86aaa9f19d Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Wed, 11 May 2022 21:29:47 +0300 Subject: [PATCH] feat: attempt at setting up vieb --- dotfiles/vieb/.viebrc | 26 ++++++++++++++++++++++++++ flake.nix | 4 ++++ modules/applications/chromium.nix | 11 +++++++++++ modules/applications/default.nix | 2 ++ modules/applications/vieb.nix | 10 ++++++++++ modules/themes/catppuccin/default.nix | 10 ++++++++-- modules/themes/themes.nix | 1 + paths.nix | 4 ++++ 8 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 dotfiles/vieb/.viebrc create mode 100644 modules/applications/chromium.nix create mode 100644 modules/applications/vieb.nix create mode 100644 paths.nix diff --git a/dotfiles/vieb/.viebrc b/dotfiles/vieb/.viebrc new file mode 100644 index 0000000..fb48be5 --- /dev/null +++ b/dotfiles/vieb/.viebrc @@ -0,0 +1,26 @@ +" Options +set adblocker=update +set downloadmethod=confirm +set mintabwidth=250 +set redirecttohttp +set tabreopenposition=previous +set windowtitle=title +set search=https://google.com/search?q= +set searchwords=w~https://www.wikipedia.org/w/index.php?title=Special:Search&search=%s + +" Mappings +nmap d +nmap u +nmap yy +nmap yf +nmap v +nmap O +nmap T buffer +nmap x +nmap X +nmap yt +nmap ? <:help> + +vmap c + +" extensions diff --git a/flake.nix b/flake.nix index 4621fb0..a755a0e 100644 --- a/flake.nix +++ b/flake.nix @@ -51,6 +51,10 @@ nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { inherit system; + specialArgs = { + paths = import ./paths.nix; + }; + modules = [ inputs.home-manager.nixosModules.home-manager inputs.kmonad.nixosModule diff --git a/modules/applications/chromium.nix b/modules/applications/chromium.nix new file mode 100644 index 0000000..dd0567d --- /dev/null +++ b/modules/applications/chromium.nix @@ -0,0 +1,11 @@ +{ pkgs, lib, ... }: +let + theme = pkgs.myThemes.current; + extensions = theme.chromium.extensions or [ ]; +in +{ + home-manager.users.adrielus.programs.chromium = { + enable = true; + extensions = lib.lists.map (id: { inherit id; }) extensions; + }; +} diff --git a/modules/applications/default.nix b/modules/applications/default.nix index aa5af52..91309bb 100644 --- a/modules/applications/default.nix +++ b/modules/applications/default.nix @@ -20,6 +20,8 @@ ./tmux.nix ./kmonad.nix ./direnv.nix + ./chromium.nix + ./vieb.nix ]; } diff --git a/modules/applications/vieb.nix b/modules/applications/vieb.nix new file mode 100644 index 0000000..0b23612 --- /dev/null +++ b/modules/applications/vieb.nix @@ -0,0 +1,10 @@ +{ pkgs, paths, ... }: +let vieb = "/home/adrielus/.config/Vieb"; in +{ + home-manager.users.adrielus = { + home.packages = [ pkgs.vieb ]; + systemd.user.tmpfiles.rules = [ + "L+ /home/adrielus/.viebrc - - - - ${paths.dotfiles}/vieb/.viebrc" + ]; + }; +} diff --git a/modules/themes/catppuccin/default.nix b/modules/themes/catppuccin/default.nix index 180a5db..cfac64e 100644 --- a/modules/themes/catppuccin/default.nix +++ b/modules/themes/catppuccin/default.nix @@ -1,8 +1,8 @@ -{ transparency ? 1, wallpaper }: { pkgs, ... }: +{ transparency ? 1, wallpaper, variant }: { pkgs, ... }: let githubTheme = pkgs.myVimPlugins.githubNvimTheme; # github theme for neovim - variant = "dark"; foreign = pkgs.callPackage (import ./foreign.nix) { }; + v = (a: b: if variant == "light" then a else b); in { wallpaper = wallpaper.foreign or "${foreign.wallpapers}/${wallpaper}"; @@ -33,6 +33,12 @@ in @import "${foreign.rofi}/.config/rofi/config.rasi" @import "${./rofi.rasi}"''; }; + chromium.extensions = [ + # https://github.com/catppuccin/chrome + (v + "cmpdlhmnmjhihmcfnigoememnffkimlk" + "bkkmolkhemgaeaeggcmfbghljjjoofoh") + ]; alacritty.settings = { import = [ "${foreign.alacritty}/catppuccin.yml" ]; window = { diff --git a/modules/themes/themes.nix b/modules/themes/themes.nix index fc94a48..6382c62 100644 --- a/modules/themes/themes.nix +++ b/modules/themes/themes.nix @@ -13,6 +13,7 @@ lib.lists.map (theme: pkgs.callPackage theme { }) [ wallpaper = "misc/rainbow.png"; # wallpaper.foreign = ./wallpapers/eye.png; transparency = 0.93; + variant = "light"; }) (githubVariant { variant = "light"; diff --git a/paths.nix b/paths.nix new file mode 100644 index 0000000..2b390b1 --- /dev/null +++ b/paths.nix @@ -0,0 +1,4 @@ +rec { + root = "~/Projects/nixos-config/"; + dotfiles = "${root}/dotfiles"; +}