feat: a bit more modularization of home.nix

This commit is contained in:
Yoru
2024-12-05 17:31:35 +01:00
parent 45b7136e4d
commit ab324d55ed
3 changed files with 42 additions and 36 deletions

View File

@@ -1,54 +1,23 @@
{ config, pkgs, lib, outputs, ... }:
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "yoru";
home.homeDirectory = "/home/yoru";
imports = [
../../modules/home-manager/dotfiles.nix
../../modules/home-manager/helix.nix
../../modules/home-manager/waybar.nix
../../modules/home-manager/shell.nix
../../modules/home-manager/kitty.nix
];
myHome.dotfiles.enable = true;
myHome.helix.enable = true;
myHome.waybar.enable = true;
myHome.kitty.enable = true;
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# 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
# release notes.
home.stateVersion = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = [
pkgs.neofetch
pkgs.aoc-cli
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
".config/hypr/hyprland.conf".source = ../../dotfiles/hyprland.conf;
# # 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.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
myHome.shell.enable = true;
programs.home-manager.enable = true;
programs.fish.enable = true;
home.stateVersion = "23.11";
}

View File

@@ -0,0 +1,16 @@
{
pkgs,
lib,
config,
...
}: {
options = {
myHome.dotfiles.enable = lib.mkEnableOption "enables dotfiles";
};
config = lib.mkIf config.myHome.dotfiles.enable {
home.file = {
".config/hypr/hyprland.conf".source = ../../dotfiles/hyprland.conf;
};
};
}

View File

@@ -0,0 +1,21 @@
{
pkgs,
lib,
config,
...
}: {
options = {
myHome.shell.enable = lib.mkEnableOption "enables shell stuff";
};
config = lib.mkIf config.myHome.shell.enable {
home.packages = [
pkgs.aoc-cli
pkgs.neofetch
pkgs.typst
];
programs.fish = {
enable = true;
};
};
}