split out pkg installs to respective files
This commit is contained in:
parent
10dfbc3234
commit
89dc32e96a
8 changed files with 155 additions and 202 deletions
|
|
@ -1,7 +1,9 @@
|
||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
git
|
||||||
|
];
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "Noa Aarts";
|
userName = "Noa Aarts";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,19 @@
|
||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
# these are necessary for the config to function correctly
|
||||||
|
imports = [
|
||||||
|
./kitty.nix
|
||||||
|
./waybar.nix
|
||||||
|
./wofi.nix
|
||||||
|
];
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
hyprland
|
||||||
|
|
||||||
|
# I always want these with hyprland anyways
|
||||||
|
dunst
|
||||||
|
wl-clipboard
|
||||||
|
];
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
||||||
14
common/kitty.nix
Normal file
14
common/kitty.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
kitty
|
||||||
|
];
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
confirm_os_window_close = 0;
|
||||||
|
};
|
||||||
|
shellIntegration.enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
waybar
|
||||||
|
];
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,44 @@
|
||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
(writeShellScriptBin "wofi-launch" ''
|
||||||
|
${wofi}/bin/wofi --show drun
|
||||||
|
'')
|
||||||
|
(writeShellScriptBin "wofi-power" ''
|
||||||
|
lock="Lock"
|
||||||
|
logout="Logout"
|
||||||
|
poweroff="Poweroff"
|
||||||
|
reboot="Reboot"
|
||||||
|
sleep="Suspend"
|
||||||
|
|
||||||
|
selected_option=$(echo -e "$lock\n$logout\n$sleep\n$reboot\n$poweroff" | wofi --dmenu -i -p "Powermenu")
|
||||||
|
|
||||||
|
if [ "$selected_option" == "$lock" ]
|
||||||
|
then
|
||||||
|
echo "lock"
|
||||||
|
swaylock
|
||||||
|
elif [ "$selected_option" == "$logout" ]
|
||||||
|
then
|
||||||
|
echo "logout"
|
||||||
|
loginctl terminate-user `whoami`
|
||||||
|
elif [ "$selected_option" == "$poweroff" ]
|
||||||
|
then
|
||||||
|
echo "poweroff"
|
||||||
|
poweroff
|
||||||
|
elif [ "$selected_option" == "$reboot" ]
|
||||||
|
then
|
||||||
|
echo "reboot"
|
||||||
|
reboot
|
||||||
|
elif [ "$selected_option" == "$sleep" ]
|
||||||
|
then
|
||||||
|
echo "sleep"
|
||||||
|
suspend
|
||||||
|
else
|
||||||
|
echo "No match"
|
||||||
|
fi
|
||||||
|
'')
|
||||||
|
];
|
||||||
programs.wofi = {
|
programs.wofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
zsh
|
||||||
|
];
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable=true;
|
enable=true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
|
|
@ -21,12 +24,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.kitty = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
confirm_os_window_close = 0;
|
|
||||||
};
|
|
||||||
shellIntegration.enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,8 @@
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
../../common/wofi.nix
|
|
||||||
../../common/zsh.nix
|
../../common/zsh.nix
|
||||||
../../common/hyprland.nix
|
../../common/hyprland.nix
|
||||||
../../common/waybar.nix
|
|
||||||
../../common/git.nix
|
../../common/git.nix
|
||||||
../../common/nvim/nvim.nix
|
../../common/nvim/nvim.nix
|
||||||
];
|
];
|
||||||
|
|
@ -48,10 +46,6 @@
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
hyprland
|
|
||||||
dunst
|
|
||||||
waybar
|
|
||||||
wl-clipboard
|
|
||||||
|
|
||||||
dconf
|
dconf
|
||||||
(symlinkJoin {
|
(symlinkJoin {
|
||||||
|
|
@ -66,45 +60,8 @@
|
||||||
discord
|
discord
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
kitty
|
|
||||||
pipewire
|
pipewire
|
||||||
lsd
|
lsd
|
||||||
(writeShellScriptBin "wofi-launch" ''
|
|
||||||
${wofi}/bin/wofi --show drun
|
|
||||||
'')
|
|
||||||
(writeShellScriptBin "wofi-power" ''
|
|
||||||
lock="Lock"
|
|
||||||
logout="Logout"
|
|
||||||
poweroff="Poweroff"
|
|
||||||
reboot="Reboot"
|
|
||||||
sleep="Suspend"
|
|
||||||
|
|
||||||
selected_option=$(echo -e "$lock\n$logout\n$sleep\n$reboot\n$poweroff" | wofi --dmenu -i -p "Powermenu")
|
|
||||||
|
|
||||||
if [ "$selected_option" == "$lock" ]
|
|
||||||
then
|
|
||||||
echo "lock"
|
|
||||||
swaylock
|
|
||||||
elif [ "$selected_option" == "$logout" ]
|
|
||||||
then
|
|
||||||
echo "logout"
|
|
||||||
loginctl terminate-user `whoami`
|
|
||||||
elif [ "$selected_option" == "$poweroff" ]
|
|
||||||
then
|
|
||||||
echo "poweroff"
|
|
||||||
poweroff
|
|
||||||
elif [ "$selected_option" == "$reboot" ]
|
|
||||||
then
|
|
||||||
echo "reboot"
|
|
||||||
reboot
|
|
||||||
elif [ "$selected_option" == "$sleep" ]
|
|
||||||
then
|
|
||||||
echo "sleep"
|
|
||||||
suspend
|
|
||||||
else
|
|
||||||
echo "No match"
|
|
||||||
fi
|
|
||||||
'')
|
|
||||||
|
|
||||||
# Programming langs
|
# Programming langs
|
||||||
go
|
go
|
||||||
|
|
@ -148,8 +105,10 @@
|
||||||
TERM = "kitty";
|
TERM = "kitty";
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.userDirs.enable = true;
|
xdg.userDirs = {
|
||||||
xdg.userDirs.createDirectories = true;
|
enable = true;
|
||||||
|
createDirectories = true;
|
||||||
|
};
|
||||||
|
|
||||||
dconf = {
|
dconf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,165 +1,94 @@
|
||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
];
|
../../common/wofi.nix
|
||||||
# Home Manager needs a bit of information about you and the paths it should
|
../../common/zsh.nix
|
||||||
# manage.
|
../../common/hyprland.nix
|
||||||
home.username = "root";
|
../../common/waybar.nix
|
||||||
home.homeDirectory = "/root";
|
../../common/git.nix
|
||||||
|
../../common/nvim/nvim.nix
|
||||||
|
];
|
||||||
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
|
# manage.
|
||||||
|
home.username = "root";
|
||||||
|
home.homeDirectory = "/root";
|
||||||
|
|
||||||
# This value determines the Home Manager release that your configuration is
|
# This value determines the Home Manager release that your configuration is
|
||||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||||
# introduces backwards incompatible changes.
|
# introduces backwards incompatible changes.
|
||||||
#
|
#
|
||||||
# You should not change this value, even if you update Home Manager. If you do
|
# You should not change this value, even if you update Home Manager. If you do
|
||||||
# want to update the value, then make sure to first check the Home Manager
|
# want to update the value, then make sure to first check the Home Manager
|
||||||
# release notes.
|
# release notes.
|
||||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
home.packages = [
|
home.packages = with pkgs; [
|
||||||
];
|
file
|
||||||
|
unzip
|
||||||
|
zip
|
||||||
|
|
||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
dig
|
||||||
# plain files is through 'home.file'.
|
mtr
|
||||||
home.file = {
|
|
||||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
|
||||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
|
||||||
# # symlink to the Nix store copy.
|
|
||||||
# ".screenrc".source = dotfiles/screenrc;
|
|
||||||
|
|
||||||
# # You can also set the file content immediately.
|
kitty
|
||||||
# ".gradle/gradle.properties".text = ''
|
lsd
|
||||||
# org.gradle.console=verbose
|
];
|
||||||
# org.gradle.daemon.idletimeout=3600000
|
|
||||||
# '';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Home Manager can also manage your environment variables through
|
|
||||||
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
|
||||||
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
|
||||||
# either
|
|
||||||
#
|
|
||||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
|
||||||
#
|
|
||||||
# or
|
|
||||||
#
|
|
||||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
|
||||||
#
|
|
||||||
# or
|
|
||||||
#
|
|
||||||
# /etc/profiles/per-user/noa/etc/profile.d/hm-session-vars.sh
|
|
||||||
#
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "nvim";
|
|
||||||
TERM = "kitty";
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.userDirs.enable = true;
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
xdg.userDirs.createDirectories = true;
|
# plain files is through 'home.file'.
|
||||||
|
home.file = {
|
||||||
|
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||||
|
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||||
|
# # symlink to the Nix store copy.
|
||||||
|
# ".screenrc".source = dotfiles/screenrc;
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# # You can also set the file content immediately.
|
||||||
programs.home-manager.enable = true;
|
# ".gradle/gradle.properties".text = ''
|
||||||
|
# org.gradle.console=verbose
|
||||||
# TODO move to seperate file
|
# org.gradle.daemon.idletimeout=3600000
|
||||||
programs.zsh = {
|
# '';
|
||||||
enable=true;
|
|
||||||
shellAliases = {
|
|
||||||
ll = "lsd -l";
|
|
||||||
update = "sudo nixos-rebuild switch --flake /etc/nixos#default";
|
|
||||||
};
|
};
|
||||||
history = {
|
|
||||||
path = "${config.xdg.dataHome}/zsh/history";
|
# Home Manager can also manage your environment variables through
|
||||||
size = 10000;
|
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
||||||
|
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
||||||
|
# either
|
||||||
|
#
|
||||||
|
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# /etc/profiles/per-user/noa/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
TERM = "kitty";
|
||||||
};
|
};
|
||||||
oh-my-zsh = {
|
|
||||||
|
xdg.userDirs.enable = true;
|
||||||
|
xdg.userDirs.createDirectories = true;
|
||||||
|
|
||||||
|
dconf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [ "git" ];
|
settings = {
|
||||||
theme = "frisk";
|
"org/gnome/desktop/interface" = {
|
||||||
|
color-scheme = "prefer-dark";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
# TODO extend and move to seperate file
|
# Let Home Manager install and manage itself.
|
||||||
programs.git = {
|
programs.home-manager.enable = true;
|
||||||
enable = true;
|
|
||||||
userName = "Noa Aarts";
|
|
||||||
userEmail = "itepastra@gmail.com";
|
|
||||||
extraConfig = {
|
|
||||||
init = { defaultBranch = "main"; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# TODO move to seperate file
|
|
||||||
# TODO create neovim config
|
|
||||||
programs.nixvim = {
|
|
||||||
enable = true;
|
|
||||||
vimAlias = true;
|
|
||||||
|
|
||||||
# Configure neovim options...
|
|
||||||
options = {
|
|
||||||
relativenumber = true;
|
|
||||||
incsearch = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# ...mappings...
|
|
||||||
keymaps = [
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-s>";
|
|
||||||
action = ":w<CR>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<esc>";
|
|
||||||
action = ":noh<CR>";
|
|
||||||
options.silent = true;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "v";
|
|
||||||
key = ">";
|
|
||||||
action = ">gv";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "v";
|
|
||||||
key = "<";
|
|
||||||
action = "<gv";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
plugins = {
|
|
||||||
|
|
||||||
lsp = {
|
|
||||||
keymaps = {
|
|
||||||
silent = true;
|
|
||||||
diagnostic = {
|
|
||||||
"<leader>k" = "goto_prev";
|
|
||||||
"<leader>j" = "goto_next";
|
|
||||||
};
|
|
||||||
|
|
||||||
lspBuf = {
|
|
||||||
gd = "definition";
|
|
||||||
K = "hover";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# ... and even highlights and autocommands !
|
|
||||||
highlight.ExtraWhitespace.bg = "red";
|
|
||||||
match.ExtraWhitespace = "\\s\\+$";
|
|
||||||
autoCmd = [
|
|
||||||
{
|
|
||||||
event = "FileType";
|
|
||||||
pattern = "nix";
|
|
||||||
command = "setlocal tabstop=2 shiftwidth=2";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue