diff --git a/hosts/home/home.nix b/hosts/home/home.nix index f244d82..6d6a3cc 100644 --- a/hosts/home/home.nix +++ b/hosts/home/home.nix @@ -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"; } diff --git a/modules/home-manager/dotfiles.nix b/modules/home-manager/dotfiles.nix new file mode 100644 index 0000000..b44f19f --- /dev/null +++ b/modules/home-manager/dotfiles.nix @@ -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; + }; + }; +} diff --git a/modules/home-manager/shell.nix b/modules/home-manager/shell.nix new file mode 100644 index 0000000..d7b1340 --- /dev/null +++ b/modules/home-manager/shell.nix @@ -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; + }; + }; +}