feat: full refactoring - work in progress...
This commit is contained in:
11
modules/home-manager/bundles/default.nix
Normal file
11
modules/home-manager/bundles/default.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./desktop-apps.nix
|
||||
./myhypr.nix
|
||||
./shell.nix
|
||||
./work-apps.nix
|
||||
];
|
||||
}
|
||||
20
modules/home-manager/bundles/desktop-apps.nix
Normal file
20
modules/home-manager/bundles/desktop-apps.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myHome.bundle.desktop-apps.enable = lib.mkEnableOption "enable desktop-apps bundle";
|
||||
config = lib.mkIf config.myHome.bundle.desktop-apps.enable {
|
||||
myHome.programs.kitty.enable = true;
|
||||
home.packages = map lib.lowPrio [
|
||||
pkgs.bottles
|
||||
pkgs.ungoogled-chromium
|
||||
pkgs.xfce.thunar
|
||||
pkgs.xfce.thunar-archive-plugin
|
||||
pkgs.xfce.thunar-volman
|
||||
pkgs.vial
|
||||
];
|
||||
};
|
||||
}
|
||||
19
modules/home-manager/bundles/myhypr.nix
Normal file
19
modules/home-manager/bundles/myhypr.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myHome.bundle.myhypr.enable = lib.mkEnableOption "enable hypr bundle";
|
||||
config = lib.mkIf config.myHome.bundle.myhypr.enable {
|
||||
myHome.services.hyprland.enable = true;
|
||||
myHome.services.waybar.enable = true;
|
||||
home.packages = map lib.lowPrio [
|
||||
pkgs.mako
|
||||
pkgs.swayidle
|
||||
pkgs.swaylock
|
||||
pkgs.swaybg
|
||||
];
|
||||
};
|
||||
}
|
||||
79
modules/home-manager/bundles/shell.nix
Normal file
79
modules/home-manager/bundles/shell.nix
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myHome.bundle.shell.enable = lib.mkEnableOption "enable shell bundle";
|
||||
|
||||
config = lib.mkIf config.myHome.bundle.shell.enable {
|
||||
home.packages = with pkgs; [
|
||||
commitizen
|
||||
pre-commit
|
||||
curl
|
||||
devenv
|
||||
git
|
||||
just
|
||||
killall
|
||||
lazyjj
|
||||
neofetch
|
||||
p7zip
|
||||
ripgrep
|
||||
tree
|
||||
typst
|
||||
unrar
|
||||
unzip
|
||||
wget
|
||||
yt-dlp
|
||||
];
|
||||
programs = {
|
||||
awscli.enable = true;
|
||||
bat = {
|
||||
enable = true;
|
||||
extraPackages = [ pkgs.bat-extras.batman ];
|
||||
};
|
||||
btop = {
|
||||
enable = true;
|
||||
settings.vim_keys = true;
|
||||
};
|
||||
direnv.enable = true;
|
||||
eza = {
|
||||
enable = true;
|
||||
extraOptions = [ "--group-directories-first" ];
|
||||
git = true;
|
||||
icons = "auto";
|
||||
};
|
||||
nix-your-shell = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
fish = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ls = "eza";
|
||||
cat = "bat";
|
||||
l = "eza -lh";
|
||||
ll = "eza -lh";
|
||||
la = "eza -lah";
|
||||
man = "batman";
|
||||
".." = "cd ..";
|
||||
};
|
||||
interactiveShellInit = ''
|
||||
fish_vi_key_bindings
|
||||
'';
|
||||
};
|
||||
starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
fzf.enable = true;
|
||||
gh.enable = true;
|
||||
gpg.enable = true;
|
||||
jujutsu.enable = true;
|
||||
lazygit.enable = true;
|
||||
ripgrep.enable = true;
|
||||
yazi.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
16
modules/home-manager/bundles/work-apps.nix
Normal file
16
modules/home-manager/bundles/work-apps.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myHome.bundle.work-apps.enable = lib.mkEnableOption "enable work-apps bundle";
|
||||
config = lib.mkIf config.myHome.bundle.work-apps.enable {
|
||||
home.packages = map lib.lowPrio [
|
||||
pkgs.tailscale-systray
|
||||
pkgs.slack
|
||||
pkgs.openvpn
|
||||
];
|
||||
};
|
||||
}
|
||||
15
modules/home-manager/default.nix
Normal file
15
modules/home-manager/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./bundles
|
||||
./programs
|
||||
./services
|
||||
|
||||
# ./dotfiles.nix
|
||||
# ./helix.nix
|
||||
# ./kitty.nix
|
||||
# ./shell.nix
|
||||
];
|
||||
}
|
||||
10
modules/home-manager/programs/default.nix
Normal file
10
modules/home-manager/programs/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./helix.nix
|
||||
./kitty.nix
|
||||
./nvim.nix
|
||||
];
|
||||
}
|
||||
0
modules/home-manager/programs/fish.nix
Normal file
0
modules/home-manager/programs/fish.nix
Normal file
@@ -3,15 +3,9 @@
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myHome.helix;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
myHome.helix.enable = lib.mkEnableOption "enables helix";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
options.myHome.programs.helix.enable = lib.mkEnableOption "enables helix";
|
||||
config = lib.mkIf config.myHome.programs.helix.enable {
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
@@ -3,15 +3,10 @@
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.myHome.kitty;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
myHome.kitty.enable = lib.mkEnableOption "enables kitty";
|
||||
};
|
||||
options.myHome.programs.kitty.enable = lib.mkEnableOption "enables kitty";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
config = lib.mkIf config.myHome.programs.kitty.enable {
|
||||
programs.kitty = lib.mkForce {
|
||||
enable = true;
|
||||
keybindings = {
|
||||
29
modules/home-manager/programs/nvim.nix
Normal file
29
modules/home-manager/programs/nvim.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myHome.programs.nvim.enable = lib.mkEnableOption "enables neovim";
|
||||
|
||||
config = lib.mkIf config.myHome.programs.nvim.enable {
|
||||
home.packages = with pkgs; [
|
||||
lua
|
||||
lua52Packages.luarocks
|
||||
ghostscript
|
||||
tectonic
|
||||
mermaid-cli
|
||||
lazygit
|
||||
];
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
viAlias = true;
|
||||
};
|
||||
home.file.".config/nvim" = {
|
||||
source = ../../../dotfiles/nvim;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
10
modules/home-manager/services/default.nix
Normal file
10
modules/home-manager/services/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./nix.nix
|
||||
./waybar.nix
|
||||
];
|
||||
}
|
||||
51
modules/home-manager/services/hyprland.nix
Normal file
51
modules/home-manager/services/hyprland.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myNixOS.feature.hyprland.enable = lib.mkEnableOption "enables hyprland";
|
||||
|
||||
config = lib.mkIf config.myNixOS.feature.hyprland.enable {
|
||||
home.file.".config/hypr" = {
|
||||
source = ../../../dotfiles/hypr;
|
||||
recursive = true;
|
||||
};
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
hyprland.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
libnotify
|
||||
xclip
|
||||
wl-clipboard
|
||||
hyprpaper
|
||||
libnotify
|
||||
hyprpicker
|
||||
slurp
|
||||
grim
|
||||
rofi
|
||||
];
|
||||
|
||||
services = {
|
||||
picom.enable = true;
|
||||
xserver.enable = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal
|
||||
];
|
||||
configPackages = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
pkgs.xdg-desktop-portal
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
42
modules/home-manager/services/nix.nix
Normal file
42
modules/home-manager/services/nix.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.myHome.services.nix.enable = lib.mkEnableOption "enable nix configuration";
|
||||
config = lib.mkIf config.myHome.services.nix.enable {
|
||||
home.sessionVariables = {
|
||||
FLAKE = "${config.home.homeDirectory}/nixos/";
|
||||
NH_FLAKE = "${config.home.homeDirectory}/nixos/";
|
||||
};
|
||||
systemPackages = map lib.lowPrio [
|
||||
pkgs.nh
|
||||
pkgs.nil
|
||||
pkgs.nixfmt-rfc-style
|
||||
];
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
trusted-users = [
|
||||
"root"
|
||||
];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
# dates = "weekly";
|
||||
};
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
extraOptions = ''
|
||||
extra-substituters = https://devenv.cachix.org
|
||||
extra-trusted-public-keys = devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -8,11 +8,9 @@ let
|
||||
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
myHome.waybar.enable = lib.mkEnableOption "enables waybar";
|
||||
};
|
||||
options.myHome.services.waybar.enable = lib.mkEnableOption "enables waybar";
|
||||
|
||||
config = lib.mkIf config.myHome.waybar.enable {
|
||||
config = lib.mkIf config.myHome.services.waybar.enable {
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
package = pkgs.swaynotificationcenter;
|
||||
@@ -30,10 +28,6 @@ in
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
# systemd = {
|
||||
# enable = false;
|
||||
# target = "graphical-session.target";
|
||||
# };
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
myHome.shell.enable = lib.mkEnableOption "enables shell stuff";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.myHome.shell.enable {
|
||||
home.packages = with pkgs; [
|
||||
aoc-cli
|
||||
just
|
||||
neofetch
|
||||
typst
|
||||
];
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
};
|
||||
programs.nix-your-shell = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ls = "eza --icons";
|
||||
cat = "bat";
|
||||
ll = "eza -lh --icons --grid --group-directories-first";
|
||||
la = "eza -lah --icons --grid --group-directories-first";
|
||||
".." = "cd ..";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user