149 lines
3.4 KiB
Nix

{ pkgs, inputs, ... }:
{
imports = [
inputs.nixvim.homeManagerModules.nixvim
];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home = {
username = "martin";
homeDirectory = "/home/martin";
file = {
".config/wlogout/hibernate.svg".source = ./home/wlogout/hibernate.svg;
".config/wlogout/lock.svg".source = ./home/wlogout/lock.svg;
".config/wlogout/logout.svg".source = ./home/wlogout/logout.svg;
".config/wlogout/reboot.svg".source = ./home/wlogout/reboot.svg;
".config/wlogout/shutdown.svg".source = ./home/wlogout/shutdown.svg;
".config/wlogout/suspend.svg".source = ./home/wlogout/suspend.svg;
};
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
stateVersion = "24.11";
};
programs = {
git = {
enable = true;
userName = "Martin Berg Alstad";
userEmail = "git@martials.no";
};
# Let Home Manager install and manage itself.
home-manager.enable = true;
kitty.enable = true;
nixvim = {
enable = true;
clipboard.providers.wl-copy.enable = true;
opts = {
number = true; # Show line numbers
relativenumber = true; # Show relative line numbers
shiftwidth = 2; # Tab width should be 2
};
plugins = {
bufferline.enable = true;
conform-nvim = {
enable = true;
# TODO use nix fmt on save
settings = { };
};
lsp = {
enable = true;
servers = {
nixd.enable = true;
};
};
lualine.enable = true;
luasnip.enable = true;
cmp = {
enable = true;
autoEnableSources = true;
settings = {
sources = [
{ name = "nvim-lsp"; }
{ name = "path"; }
{ name = "buffer"; }
];
};
};
treesitter.enable = true;
web-devicons.enable = true;
};
};
starship = {
enable = true;
settings = (with builtins; fromTOML (readFile ./starship.toml)) // { };
};
# Lock desktop
swaylock.enable = true;
# Log out and shutdown menu
wlogout = {
enable = true;
layout = [
{
label = "lock";
action = "sh -c '(sleep 0.5s; swaylock)' & disown";
text = "Lock";
keybind = "l";
}
{
label = "hibernate";
action = "systemctl hibernate";
text = "Hibernate";
keybind = "h";
}
{
label = "logout";
action = "loginctl terminate-user $USER";
text = "Logout";
keybind = "e";
}
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
}
{
label = "suspend";
action = "systemctl suspend";
text = "Suspend";
keybind = "u";
}
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
keybind = "r";
}
];
style = ./home/wlogout/style.css;
};
};
services = {
gpg-agent = {
enable = true;
pinentryPackage = pkgs.pinentry-curses;
};
};
}