Completed luna config for real this time

This commit is contained in:
KoenDR06 2025-02-27 19:08:42 +00:00
parent 5ad8529721
commit 2c75ae213a
17 changed files with 357 additions and 62 deletions

View file

@ -41,7 +41,8 @@
apps = { apps = {
dev.enable = true; dev.enable = true;
visual.enable = true;
terminal.enable = true;
}; };
}; };
} }

14
misc/backup.sh Executable file
View file

@ -0,0 +1,14 @@
#!/run/current-system/sw/bin/zsh
cd /home/horseman
file=backups/$(date +%Y-%m-%d).tar
tar -cf $file Documents
if grep -q $(sha256sum $file) backups/sum; then
echo 'hashes match, quitting'
rm $file
exit 0
fi
echo $(sha256sum $file) > backups/sum
exit 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

3
misc/startup.sh Executable file
View file

@ -0,0 +1,3 @@
#!/run/current-system/sw/bin/zsh
sudo ethtool -s eno1 wol g

12
misc/switch-to-dark-theme.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
lookandfeeltool -a org.kde.breezedark.desktop
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript '
var allDesktops = desktops();
for (i = 0; i < allDesktops.length; i++) {
d = allDesktops[i];
d.wallpaperPlugin = "org.kde.image";
d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");
d.writeConfig("Image", "file:///home/horseman/nix-config/misc/nixos_wallpaper_dark_3840x2160.png");
}'

12
misc/switch-to-light-theme.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
lookandfeeltool -a org.kde.breeze.desktop
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript '
var allDesktops = desktops();
for (i = 0; i < allDesktops.length; i++) {
d = allDesktops[i];
d.wallpaperPlugin = "org.kde.image";
d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");
d.writeConfig("Image", "file:///home/horseman/nix-config/misc/nixos_wallpaper_light_3840x2160.png");
}'

View file

@ -1,7 +1,10 @@
{inputs, ...}: { {inputs, ...}: {
imports = [ imports = [
./terminal.nix
./visual.nix
./dev.nix ./dev.nix
./terminal.nix
./visual.nix
./visual/firefox.nix
]; ];
} }

View file

@ -8,6 +8,7 @@
}: let }: let
inherit (lib) mkEnableOption mkIf mkOption types; inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.horseman.apps.terminal; cfg = config.horseman.apps.terminal;
homeCfg = config.horseman;
in { in {
options = { options = {
horseman.apps.terminal = { horseman.apps.terminal = {
@ -16,9 +17,20 @@ in {
}; };
config = { config = {
home-manager.users.${homeCfg.username} = {
imports = [./terminal/neovim.nix];
};
services.lorri.enable = true; services.lorri.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnupg
neofetch
sops
sxiv
termdown
unzip
wakeonlan
]; ];
}; };
} }

View file

@ -0,0 +1,44 @@
lua << EOF
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}
EOF

View file

@ -0,0 +1,149 @@
{
config,
lib,
pkgs,
...
}: {
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
extraPackages = with pkgs; [
# LazyVim
lua-language-server
stylua
# Telescope
ripgrep
];
plugins = with pkgs.vimPlugins; [
lazy-nvim
];
extraLuaConfig = let
plugins = with pkgs.vimPlugins; [
# LazyVim
LazyVim
bufferline-nvim
cmp-buffer
cmp-nvim-lsp
cmp-path
cmp_luasnip
conform-nvim
dashboard-nvim
dressing-nvim
flash-nvim
friendly-snippets
gitsigns-nvim
indent-blankline-nvim
lualine-nvim
neo-tree-nvim
neoconf-nvim
neodev-nvim
noice-nvim
nui-nvim
nvim-cmp
nvim-lint
nvim-lspconfig
nvim-notify
nvim-spectre
nvim-treesitter
nvim-treesitter-context
nvim-treesitter-textobjects
nvim-ts-autotag
nvim-ts-context-commentstring
nvim-web-devicons
persistence-nvim
plenary-nvim
telescope-fzf-native-nvim
telescope-nvim
todo-comments-nvim
tokyonight-nvim
trouble-nvim
vim-illuminate
vim-startuptime
which-key-nvim
{
name = "LuaSnip";
path = luasnip;
}
{
name = "catppuccin";
path = catppuccin-nvim;
}
{
name = "mini.ai";
path = mini-nvim;
}
{
name = "mini.bufremove";
path = mini-nvim;
}
{
name = "mini.comment";
path = mini-nvim;
}
{
name = "mini.indentscope";
path = mini-nvim;
}
{
name = "mini.pairs";
path = mini-nvim;
}
{
name = "mini.surround";
path = mini-nvim;
}
];
mkEntryFromDrv = drv:
if lib.isDerivation drv
then {
name = "${lib.getName drv}";
path = drv;
}
else drv;
lazyPath = pkgs.linkFarm "lazy-plugins" (builtins.map mkEntryFromDrv plugins);
in ''
require("lazy").setup({
defaults = {
lazy = true,
},
dev = {
-- reuse files from pkgs.vimPlugins.*
path = "${lazyPath}",
patterns = { "." },
-- fallback to download
fallback = true,
},
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- The following configs are needed for fixing lazyvim on nix
-- force enable telescope-fzf-native.nvim
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
-- disable mason.nvim, use programs.neovim.extraPackages
{ "williamboman/mason-lspconfig.nvim", enabled = false },
{ "williamboman/mason.nvim", enabled = false },
-- import/override with your plugins
{ import = "plugins" },
-- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } },
},
})
'';
};
# https://github.com/nvim-treesitter/nvim-treesitter#i-get-query-error-invalid-node-type-at-position
xdg.configFile."nvim/parser".source = let
parsers = pkgs.symlinkJoin {
name = "treesitter-parsers";
paths =
(pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins:
with plugins; [
c
lua
]))
.dependencies;
};
in "${parsers}/parser";
}

View file

@ -8,6 +8,7 @@
}: let }: let
inherit (lib) mkEnableOption mkIf mkOption types; inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.horseman.apps.visual; cfg = config.horseman.apps.visual;
homeCfg = config.horseman;
in { in {
options = { options = {
horseman.apps.visual = { horseman.apps.visual = {
@ -16,7 +17,27 @@ in {
}; };
config = { config = {
horseman.apps.visual = {
firefox.enable = true;
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
alacritty
albert
bitwarden
discord-ptb
gnome-calculator
inkscape
keepassxc
krita
libreoffice
mullvad-vpn
parsec-bin
qbittorrent
reaper
solaar
spotify
vlc
]; ];
}; };
} }

View file

@ -1,8 +1,30 @@
{ {
inputs,
outputs,
lib,
config, config,
pkgs, pkgs,
... ...
}: { }: let
inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.horseman.apps.visual.firefox;
lock-false = {
Value = false;
Status = "locked";
};
lock-true = {
Value = true;
Status = "locked";
};
in {
options = {
horseman.apps.visual.firefox = {
enable = mkEnableOption "Firefox";
};
};
config = {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
policies = { policies = {
@ -63,4 +85,5 @@
}; };
}; };
}; };
};
} }

View file

@ -8,6 +8,7 @@
}: let }: let
inherit (lib) mkEnableOption mkIf mkOption types; inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.horseman.wm.plasma; cfg = config.horseman.wm.plasma;
homeCfg = config.horseman;
in { in {
options = { options = {
horseman.wm.plasma = { horseman.wm.plasma = {
@ -32,7 +33,7 @@ in {
konsole konsole
]; ];
home-manager.users.horseman = { home-manager.users.${homeCfg.username} = {
imports = [./config.nix]; imports = [./config.nix];
}; };
}; };