stylix changes

This commit is contained in:
Charlie Root 2024-07-10 23:10:52 +02:00
commit 46665f83d1
6 changed files with 53 additions and 51 deletions

View file

@ -10,7 +10,6 @@ in {
../modules ../modules
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
inputs.stylix.nixosModules.stylix
]; ];
}; };
hermit = lib.nixosSystem rec { hermit = lib.nixosSystem rec {
@ -22,7 +21,6 @@ in {
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
inputs.lix-module.nixosModules.default inputs.lix-module.nixosModules.default
inputs.stylix.nixosModules.stylix
inputs.nixos-hardware.nixosModules.dell-xps-15-7590-nvidia inputs.nixos-hardware.nixosModules.dell-xps-15-7590-nvidia
]; ];
}; };

View file

@ -89,7 +89,6 @@
}; };
helix.enable = true; helix.enable = true;
kakoune.enable = true; kakoune.enable = true;
# nixvim.enable = false; # broken at the moment
neovim.enable = true; neovim.enable = true;
}; };
services = { services = {

View file

@ -1,3 +1,4 @@
# credits to raf, his repo is in the README.md!
{ {
pkgs, pkgs,
config, config,
@ -28,7 +29,7 @@ in {
imports = concatLists [ imports = concatLists [
# neovim-flake home-manager module # neovim-flake home-manager module
[nvf.nixosModules.default] [nvf.nixosModules.default]
# construct this entore directory as a module # construct this entire directory as a module
# which means all default.nix files will be imported automtically # which means all default.nix files will be imported automtically
(mkNeovimModule {path = ./.;}) (mkNeovimModule {path = ./.;})
]; ];

View file

@ -20,74 +20,74 @@ opt.cursorline = true
opt.whichwrap:append('<,>,h,l,[,]') opt.whichwrap:append('<,>,h,l,[,]')
opt.list = true opt.list = true
-- haracters to fill the statuslines, vertical separators and special -- characters to fill the statuslines, vertical separators and special
-- lines in the window.opt.whichwrap:append('<,>,h,l,[,]') -- lines in the window.opt.whichwrap:append('<,>,h,l,[,]')
opt.fillchars:append({ opt.fillchars:append({
-- replace window border with slightly thicker characters -- replace window border with slightly thicker characters
-- although taking a bit of more space, it helps me better -- although taking a bit of more space, it helps me better
-- identify the window borders -- identify the window borders
horiz = '', horiz = '',
horizup = '', horizup = '',
horizdown = '', horizdown = '',
vert = '', vert = '',
vertleft = '', vertleft = '',
vertright = '', vertright = '',
verthoriz = '', verthoriz = '',
eob = ' ', -- suppress end of buffer lines (~) eob = ' ', -- suppress end of buffer lines (~)
diff = '', -- deleted lines of the 'diff' option diff = '', -- deleted lines of the 'diff' option
msgsep = '', msgsep = '',
-- replace fold chars -- replace fold chars
fold = ' ', fold = ' ',
foldopen = '', foldopen = '',
foldclose = '', foldclose = '',
}) })
-- List chars that would b shown on all modes -- List chars that would b shown on all modes
-- better kept simple, because it gets REALLY -- better kept simple, because it gets REALLY
-- noisy in an average buffer -- noisy in an average buffer
local normal_listchars = { local normal_listchars = {
extends = '', -- Alternatives: … ,» extends = '', -- Alternatives: … ,»
precedes = '', -- Alternatives: … ,« precedes = '', -- Alternatives: … ,«
} }
opt.listchars = normal_listchars opt.listchars = normal_listchars
-- Show listchars while in Insert mode. -- Show listchars while in Insert mode.
local insert_listchars = { local insert_listchars = {
eol = nil, eol = nil,
tab = '▎·', tab = '▎·',
lead = '·', lead = '·',
space = '·', space = '·',
trail = '.', trail = '.',
multispace = '', multispace = '',
nbsp = '¤', nbsp = '¤',
} }
-- Show listchars while in Insert mode. -- Show listchars while in Insert mode.
vim.api.nvim_create_augroup('InsertModeListChars', { clear = true }) vim.api.nvim_create_augroup('InsertModeListChars', { clear = true })
vim.api.nvim_create_autocmd({ 'InsertEnter', 'InsertLeavePre' }, { vim.api.nvim_create_autocmd({ 'InsertEnter', 'InsertLeavePre' }, {
group = 'InsertModeListChars', group = 'InsertModeListChars',
pattern = '*', pattern = '*',
callback = function(args) callback = function(args)
if vim.tbl_contains({ 'quickfix', 'prompt' }, args.match) then if vim.tbl_contains({ 'quickfix', 'prompt' }, args.match) then
return return
end end
if args.event == 'InsertEnter' then if args.event == 'InsertEnter' then
vim.opt_local.listchars = insert_listchars vim.opt_local.listchars = insert_listchars
else else
vim.opt_local.listchars = normal_listchars vim.opt_local.listchars = normal_listchars
end end
-- check if ibl is enabled -- check if ibl is enabled
-- @diagnostic disable-next-line: no-unknown, unused-local -- @diagnostic disable-next-line: no-unknown, unused-local
local status_ok, ibl = pcall(require, 'ibl') local status_ok, ibl = pcall(require, 'ibl')
if not status_ok then if not status_ok then
return return
end end
require('ibl').debounced_refresh(0) require('ibl').debounced_refresh(0)
end, end,
}) })

View file

@ -47,6 +47,8 @@ in {
preventJunkFiles = true; preventJunkFiles = true;
useSystemClipboard = true; useSystemClipboard = true;
tabWidth = 4;
autoIndent = true;
spellcheck = { spellcheck = {
enable = true; enable = true;
# TODO add de # TODO add de

View file

@ -1,5 +1,6 @@
{ {
config, config,
inputs,
pkgs, pkgs,
lib, lib,
... ...
@ -9,6 +10,7 @@
inherit (config.modules.theming.stylix.cursor) size; inherit (config.modules.theming.stylix.cursor) size;
inherit (config.modules.theming.stylix.fontsizes) terminal popups applications; inherit (config.modules.theming.stylix.fontsizes) terminal popups applications;
in { in {
imports = [inputs.stylix.nixosModules.stylix];
options.modules.theming.stylix = { options.modules.theming.stylix = {
enable = lib.mkEnableOption "stylix"; enable = lib.mkEnableOption "stylix";
scheme = lib.mkOption { scheme = lib.mkOption {
@ -93,7 +95,7 @@ in {
applications = 0.9; applications = 0.9;
popups = 0.9; popups = 0.9;
desktop = 0.9; desktop = 0.9;
terminal = 0.85; terminal = 1.0;
}; };
targets = { targets = {
console.enable = true; console.enable = true;