1
Fork 0

Reduced the amount of IFD and started setting up wezterm

This commit is contained in:
Matei Adriel 2023-04-01 21:29:47 +02:00
parent e2baf15fe6
commit b030524e83
No known key found for this signature in database
15 changed files with 131 additions and 19 deletions

View file

@ -43,7 +43,7 @@
"nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" },
"nvim-lspconfig": { "branch": "master", "commit": "0f94c5fded29c0024254259f3d8a0284bfb507ea" },
"nvim-tree.lua": { "branch": "master", "commit": "a50723e35f57f89fb67019127a16d90f16edfef8" },
"nvim-treesitter": { "branch": "master", "commit": "25b656a4b771ee7d440e506280b9ae546d6f7233" },
"nvim-treesitter": { "branch": "master", "commit": "ee1d6182801204c397534ac69c37f83283ba69e3" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "582cbb5a4cb50f6161cac8cc01f55aeaff6d836a" },
"nvim-web-devicons": { "branch": "master", "commit": "074e13f21f52bb45d654069bdadbcb6d7c2b65d0" },
"nvim_context_vt": { "branch": "master", "commit": "e592a9142fbfe0878ce886cd0d745963604c61d2" },

View file

@ -87,10 +87,10 @@
overlays = import ./overlays;
# Reusable nixos modules
nixosModules = import ./modules/nixos;
nixosModules = import ./modules/nixos // import ./modules/common;
# Reusable home-manager modules
homeManagerModules = import ./modules/home-manager;
homeManagerModules = import ./modules/home-manager // import ./modules/common;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#...

View file

@ -1,6 +1,7 @@
# {{{ Start tmux if not already inside tmux
if status is-interactive
and not set -q TMUX
and not set -q NO_TMUX
exec tmux attach -t Welcome || tmux || echo "Something went wrong trying to start tmux"
end
# }}}

View file

@ -4,7 +4,7 @@ let
template = builtins.readFile ./template.yuck;
};
widgets = config.satellite-dev.path "home/adrielus/features/desktop/common/eww/widgets";
widgets = config.satellite.dev.path "home/adrielus/features/desktop/common/eww/widgets";
in
{
home.packages = [ pkgs.eww ];

View file

@ -14,7 +14,7 @@ in
enable = true;
extraConfig = ''
; Generated theme
${builtins.readFile base16-polybar}
include-file = ${base16-polybar}
; Consistent fonts
[fonts]

View file

@ -12,6 +12,7 @@ in
{
home.packages = with pkgs; [ rofi ];
xdg.configFile."rofi/base16.rasi".source = base16-rofi;
xdg.configFile."rofi/config.rasi".text = ''
// Manual config
${builtins.readFile ./config.rasi}
@ -22,6 +23,6 @@ in
}
// Theme
${builtins.readFile base16-rofi}
@import "base16"
'';
}

View file

@ -0,0 +1,8 @@
{ pkgs, config, ... }: {
home.packages = [ pkgs.wezterm ];
# Create link to config
xdg.configFile."wezterm/colorscheme.lua".text = config.satellite.colorscheme.lua;
xdg.configFile."wezterm/wezterm.lua".source =
config.satellite.dev.path "home/adrielus/features/desktop/common/wezterm/wezterm.lua";
}

View file

@ -0,0 +1,63 @@
-- {{{ Import stuff & create config object
local wezterm = require("wezterm")
local colorscheme = require("colorscheme") -- injected by nix!
-- This table will hold the configuration.
local config = {}
-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
config = wezterm.config_builder()
end
-- }}}
local font_size = 20.0
-- {{{ Theming
config.colors = wezterm.color.load_base16_scheme(colorscheme.source)
-- {{{ Window frame
config.window_frame = {
font = wezterm.font({ family = colorscheme.fonts.monospace }),
font_size = font_size,
active_titlebar_bg = colorscheme.base00,
inactive_titlebar_bg = colorscheme.base00,
}
-- }}}
-- {{{ Tab bar colors
config.colors.tab_bar = {
background = colorscheme.base02,
active_tab = {
bg_color = colorscheme.base0A,
fg_color = colorscheme.base00,
},
inactive_tab = {
bg_color = colorscheme.base02,
fg_color = colorscheme.base05,
},
inactive_tab_hover = {
bg_color = colorscheme.base01,
fg_color = colorscheme.base05,
},
new_tab = {
bg_color = colorscheme.base02,
fg_color = colorscheme.base05,
},
new_tab_hover = {
bg_color = colorscheme.base02,
fg_color = colorscheme.base05,
italic = true,
},
}
-- }}}
-- }}}
-- {{{ Main config options
config.adjust_window_size_when_changing_font_size = false -- Makes it work with fixed window sizes.
config.automatically_reload_config = true
config.font_size = font_size
config.use_fancy_tab_bar = false
-- }}}
-- and finally, return the configuration to wezterm
return config

View file

@ -13,7 +13,7 @@ in
enable = true;
extraConfig = ''
# Generated theme
${builtins.readFile base16-zathura}
include ${base16-zathura}
# Open document in fit-width mode by default
set adjust-open "best-fit"

View file

@ -3,6 +3,7 @@
./common/rofi
./common/polybar
./common/eww
./common/wezterm
./common/alacritty.nix
./common/feh.nix
];

View file

@ -65,16 +65,13 @@ let
# {{{ extraRuntime
extraRuntime = env: [
# Snippets
(config.satellite-dev.path "dotfiles/vscode-snippets")
(config.satellite.dev.path "dotfiles/vscode-snippets")
# Base16 theme
(pkgs.writeTextDir
"lua/nix/theme.lua"
''
return {
name = "${config.lib.stylix.scheme.scheme}"
}
'')
config.satellite.colorscheme.lua
)
# Provide hints as to what app we are in
# (Useful because neovide does not provide the info itself right away)
@ -126,7 +123,7 @@ in
# Do not manage neovim via nix
programs.neovim.enable = false;
home.file.".config/nvim".source = config.satellite-dev.path "dotfiles/neovim";
xdg.configFile.nvim.source = config.satellite.dev.path "dotfiles/neovim";
home.sessionVariables.EDITOR = "nvim";
home.packages = [

View file

@ -27,5 +27,5 @@
];
home.sessionVariables.QT_SCREEN_SCALE_FACTOR = 1.4; # Bigger text in qt apps
satellite-dev.enable = true; # Simlink some stuff outside the store
satellite.dev.enable = true; # Simlink some stuff outside the store
}

View file

@ -0,0 +1,6 @@
# (https://nixos.wiki/wiki/Module).
{
# example = import ./example.nix;
lua-colorscheme = import ./lua-colorscheme.nix;
}

View file

@ -0,0 +1,35 @@
# Lua file containing the current colorscheme.
{ lib, config, ... }: {
options.satellite.colorscheme.lua = lib.mkOption {
type = lib.types.lines;
description = "Lua file containing the current colorscheme";
};
config.satellite.colorscheme.lua = ''
return {
name = "${config.lib.stylix.scheme.scheme}",
base00 = "${config.lib.stylix.scheme.base00}",
base01 = "${config.lib.stylix.scheme.base01}",
base02 = "${config.lib.stylix.scheme.base02}",
base03 = "${config.lib.stylix.scheme.base03}",
base04 = "${config.lib.stylix.scheme.base04}",
base05 = "${config.lib.stylix.scheme.base05}",
base06 = "${config.lib.stylix.scheme.base06}",
base07 = "${config.lib.stylix.scheme.base07}",
base08 = "${config.lib.stylix.scheme.base07}",
base09 = "${config.lib.stylix.scheme.base09}",
base0A = "${config.lib.stylix.scheme.base0A}",
base0B = "${config.lib.stylix.scheme.base0B}",
base0C = "${config.lib.stylix.scheme.base0C}",
base0D = "${config.lib.stylix.scheme.base0D}",
base0E = "${config.lib.stylix.scheme.base0E}",
base0F = "${config.lib.stylix.scheme.base0F}",
-- TODO: check if this works with the genetic algorithm
source = "${config.stylix.base16Scheme}",
fonts = {
normal = "${config.stylix.fonts.sansSerif.name}",
monospace = "${config.stylix.fonts.monospace.name}"
}
}
'';
}

View file

@ -1,5 +1,5 @@
{ lib, config, ... }: {
options.satellite-dev = {
options.satellite.dev = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
@ -18,8 +18,8 @@
};
};
config.satellite-dev.path = path:
if config.satellite-dev.enable then
config.lib.file.mkOutOfStoreSymlink "${config.satellite-dev.root}/${path}"
config.satellite.dev.path = path:
if config.satellite.dev.enable then
config.lib.file.mkOutOfStoreSymlink "${config.satellite.dev.root}/${path}"
else "${../..}/${path}";
}