Reduced the amount of IFD and started setting up wezterm
This commit is contained in:
parent
e2baf15fe6
commit
b030524e83
|
@ -43,7 +43,7 @@
|
||||||
"nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" },
|
"nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "0f94c5fded29c0024254259f3d8a0284bfb507ea" },
|
"nvim-lspconfig": { "branch": "master", "commit": "0f94c5fded29c0024254259f3d8a0284bfb507ea" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "a50723e35f57f89fb67019127a16d90f16edfef8" },
|
"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-treesitter-textobjects": { "branch": "master", "commit": "582cbb5a4cb50f6161cac8cc01f55aeaff6d836a" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "074e13f21f52bb45d654069bdadbcb6d7c2b65d0" },
|
"nvim-web-devicons": { "branch": "master", "commit": "074e13f21f52bb45d654069bdadbcb6d7c2b65d0" },
|
||||||
"nvim_context_vt": { "branch": "master", "commit": "e592a9142fbfe0878ce886cd0d745963604c61d2" },
|
"nvim_context_vt": { "branch": "master", "commit": "e592a9142fbfe0878ce886cd0d745963604c61d2" },
|
||||||
|
|
|
@ -87,10 +87,10 @@
|
||||||
overlays = import ./overlays;
|
overlays = import ./overlays;
|
||||||
|
|
||||||
# Reusable nixos modules
|
# Reusable nixos modules
|
||||||
nixosModules = import ./modules/nixos;
|
nixosModules = import ./modules/nixos // import ./modules/common;
|
||||||
|
|
||||||
# Reusable home-manager modules
|
# Reusable home-manager modules
|
||||||
homeManagerModules = import ./modules/home-manager;
|
homeManagerModules = import ./modules/home-manager // import ./modules/common;
|
||||||
|
|
||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild --flake .#...
|
# Available through 'nixos-rebuild --flake .#...
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# {{{ Start tmux if not already inside tmux
|
# {{{ Start tmux if not already inside tmux
|
||||||
if status is-interactive
|
if status is-interactive
|
||||||
and not set -q TMUX
|
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"
|
exec tmux attach -t Welcome || tmux || echo "Something went wrong trying to start tmux"
|
||||||
end
|
end
|
||||||
# }}}
|
# }}}
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
template = builtins.readFile ./template.yuck;
|
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
|
in
|
||||||
{
|
{
|
||||||
home.packages = [ pkgs.eww ];
|
home.packages = [ pkgs.eww ];
|
||||||
|
|
|
@ -14,7 +14,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
; Generated theme
|
; Generated theme
|
||||||
${builtins.readFile base16-polybar}
|
include-file = ${base16-polybar}
|
||||||
|
|
||||||
; Consistent fonts
|
; Consistent fonts
|
||||||
[fonts]
|
[fonts]
|
||||||
|
|
|
@ -12,6 +12,7 @@ in
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [ rofi ];
|
home.packages = with pkgs; [ rofi ];
|
||||||
|
|
||||||
|
xdg.configFile."rofi/base16.rasi".source = base16-rofi;
|
||||||
xdg.configFile."rofi/config.rasi".text = ''
|
xdg.configFile."rofi/config.rasi".text = ''
|
||||||
// Manual config
|
// Manual config
|
||||||
${builtins.readFile ./config.rasi}
|
${builtins.readFile ./config.rasi}
|
||||||
|
@ -22,6 +23,6 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
// Theme
|
// Theme
|
||||||
${builtins.readFile base16-rofi}
|
@import "base16"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -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";
|
||||||
|
}
|
63
home/adrielus/features/desktop/common/wezterm/wezterm.lua
Normal file
63
home/adrielus/features/desktop/common/wezterm/wezterm.lua
Normal 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
|
|
@ -13,7 +13,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
# Generated theme
|
# Generated theme
|
||||||
${builtins.readFile base16-zathura}
|
include ${base16-zathura}
|
||||||
|
|
||||||
# Open document in fit-width mode by default
|
# Open document in fit-width mode by default
|
||||||
set adjust-open "best-fit"
|
set adjust-open "best-fit"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
./common/rofi
|
./common/rofi
|
||||||
./common/polybar
|
./common/polybar
|
||||||
./common/eww
|
./common/eww
|
||||||
|
./common/wezterm
|
||||||
./common/alacritty.nix
|
./common/alacritty.nix
|
||||||
./common/feh.nix
|
./common/feh.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -65,16 +65,13 @@ let
|
||||||
# {{{ extraRuntime
|
# {{{ extraRuntime
|
||||||
extraRuntime = env: [
|
extraRuntime = env: [
|
||||||
# Snippets
|
# Snippets
|
||||||
(config.satellite-dev.path "dotfiles/vscode-snippets")
|
(config.satellite.dev.path "dotfiles/vscode-snippets")
|
||||||
|
|
||||||
# Base16 theme
|
# Base16 theme
|
||||||
(pkgs.writeTextDir
|
(pkgs.writeTextDir
|
||||||
"lua/nix/theme.lua"
|
"lua/nix/theme.lua"
|
||||||
''
|
config.satellite.colorscheme.lua
|
||||||
return {
|
)
|
||||||
name = "${config.lib.stylix.scheme.scheme}"
|
|
||||||
}
|
|
||||||
'')
|
|
||||||
|
|
||||||
# Provide hints as to what app we are in
|
# Provide hints as to what app we are in
|
||||||
# (Useful because neovide does not provide the info itself right away)
|
# (Useful because neovide does not provide the info itself right away)
|
||||||
|
@ -126,7 +123,7 @@ in
|
||||||
# Do not manage neovim via nix
|
# Do not manage neovim via nix
|
||||||
programs.neovim.enable = false;
|
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.sessionVariables.EDITOR = "nvim";
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
|
|
|
@ -27,5 +27,5 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables.QT_SCREEN_SCALE_FACTOR = 1.4; # Bigger text in qt apps
|
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
|
||||||
}
|
}
|
||||||
|
|
6
modules/common/default.nix
Normal file
6
modules/common/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# (https://nixos.wiki/wiki/Module).
|
||||||
|
|
||||||
|
{
|
||||||
|
# example = import ./example.nix;
|
||||||
|
lua-colorscheme = import ./lua-colorscheme.nix;
|
||||||
|
}
|
35
modules/common/lua-colorscheme.nix
Normal file
35
modules/common/lua-colorscheme.nix
Normal 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}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
{ lib, config, ... }: {
|
{ lib, config, ... }: {
|
||||||
options.satellite-dev = {
|
options.satellite.dev = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
@ -18,8 +18,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config.satellite-dev.path = path:
|
config.satellite.dev.path = path:
|
||||||
if config.satellite-dev.enable then
|
if config.satellite.dev.enable then
|
||||||
config.lib.file.mkOutOfStoreSymlink "${config.satellite-dev.root}/${path}"
|
config.lib.file.mkOutOfStoreSymlink "${config.satellite.dev.root}/${path}"
|
||||||
else "${../..}/${path}";
|
else "${../..}/${path}";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue