feat: a bit more modularization of home.nix
This commit is contained in:
@@ -1,54 +1,23 @@
|
|||||||
{ config, pkgs, lib, outputs, ... }:
|
{ config, pkgs, lib, outputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Home Manager needs a bit of information about you and the paths it should
|
|
||||||
# manage.
|
|
||||||
home.username = "yoru";
|
home.username = "yoru";
|
||||||
home.homeDirectory = "/home/yoru";
|
home.homeDirectory = "/home/yoru";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
../../modules/home-manager/dotfiles.nix
|
||||||
../../modules/home-manager/helix.nix
|
../../modules/home-manager/helix.nix
|
||||||
../../modules/home-manager/waybar.nix
|
../../modules/home-manager/waybar.nix
|
||||||
|
../../modules/home-manager/shell.nix
|
||||||
../../modules/home-manager/kitty.nix
|
../../modules/home-manager/kitty.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
myHome.dotfiles.enable = true;
|
||||||
myHome.helix.enable = true;
|
myHome.helix.enable = true;
|
||||||
myHome.waybar.enable = true;
|
myHome.waybar.enable = true;
|
||||||
myHome.kitty.enable = true;
|
myHome.kitty.enable = true;
|
||||||
|
myHome.shell.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
|
|
||||||
# '';
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
programs.fish.enable = true;
|
home.stateVersion = "23.11";
|
||||||
}
|
}
|
||||||
|
|||||||
16
modules/home-manager/dotfiles.nix
Normal file
16
modules/home-manager/dotfiles.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
21
modules/home-manager/shell.nix
Normal file
21
modules/home-manager/shell.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user