From 1285945aa1bb5bc2618d14b855db5cd5ff71d514 Mon Sep 17 00:00:00 2001 From: junikimm717 Date: Sat, 16 Apr 2022 08:03:26 -0400 Subject: [PATCH] added home.nix as a module --- configuration.nix | 2 +- dotfiles/{.cwmrc => cwmrc} | 0 dotfiles/{.xinitrc => xinitrc} | 0 dotfiles/{.zshrc => zshrc} | 1 - home.nix | 131 ++++++++++++++++++--------------- 5 files changed, 72 insertions(+), 62 deletions(-) rename dotfiles/{.cwmrc => cwmrc} (100%) rename dotfiles/{.xinitrc => xinitrc} (100%) rename dotfiles/{.zshrc => zshrc} (99%) diff --git a/configuration.nix b/configuration.nix index 19e3674..09c1b25 100644 --- a/configuration.nix +++ b/configuration.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ./home.nix ]; # Use the GRUB 2 boot loader. @@ -85,7 +86,6 @@ "e" = "exit"; "sy" = "systemctl"; "cp" = "cp -r"; - "vc" = "nvim ~/.config/nvim/init.vim"; }; programs.zsh.ohMyZsh.plugins = [ "git" "command-not-found" ]; programs.zsh.syntaxHighlighting.enable = true; diff --git a/dotfiles/.cwmrc b/dotfiles/cwmrc similarity index 100% rename from dotfiles/.cwmrc rename to dotfiles/cwmrc diff --git a/dotfiles/.xinitrc b/dotfiles/xinitrc similarity index 100% rename from dotfiles/.xinitrc rename to dotfiles/xinitrc diff --git a/dotfiles/.zshrc b/dotfiles/zshrc similarity index 99% rename from dotfiles/.zshrc rename to dotfiles/zshrc index b0eb7b3..4128d1e 100644 --- a/dotfiles/.zshrc +++ b/dotfiles/zshrc @@ -16,4 +16,3 @@ resetcursor() { printf '\033]50;CursorShape=1\x7' } export PS1="$(resetcursor)$PS1" - diff --git a/home.nix b/home.nix index 579d0a6..67d84f7 100644 --- a/home.nix +++ b/home.nix @@ -1,72 +1,83 @@ { config, pkgs, ... }: - +let + home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; +in { - # Home Manager needs a bit of information about you and the - # paths it should manage. - home.username = "junikim"; - home.homeDirectory = "/home/junikim"; + imports = [ + (import "${home-manager}/nixos") + ]; - # 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 can update Home Manager without changing this value. See - # the Home Manager release notes for a list of state version - # changes in each release. - home.stateVersion = "22.05"; + home-manager.users.junikim = { + # Home Manager needs a bit of information about you and the + # paths it should manage. + home.username = "junikim"; + home.homeDirectory = "/home/junikim"; - # Let Home Manager install and manage itself. - programs.home-manager.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 can update Home Manager without changing this value. See + # the Home Manager release notes for a list of state version + # changes in each release. + home.stateVersion = "22.05"; - programs.starship = { - enable = true; - }; - home.packages = with pkgs; [ - vim xclip neofetch tmux - fff - nodejs shellcheck - dash - wget brave - cwm polybarFull kitty nitrogen dmenu picom - nfs-utils gcc gnumake pulsemixer - ]; + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; + + programs.starship = { + enable = true; + }; - programs.neovim = { - enable = true; - plugins = with pkgs.vimPlugins; [ - coc-nvim - neovim-sensible - vim-airline - vim-airline-themes - vim-nix + home.packages = with pkgs; [ + vim xclip neofetch tmux + fff + nodejs shellcheck + dash + wget brave + cwm polybarFull kitty nitrogen dmenu picom + nfs-utils gcc gnumake pulsemixer ]; - extraConfig = builtins.readFile ./dotfiles/init.vim; - }; - programs.git = { - package = pkgs.git; - enable = true; - userName = "Juni Kim"; - userEmail = "junikimm717@gmail.com"; - }; + programs.neovim = { + enable = true; + plugins = with pkgs.vimPlugins; [ + coc-nvim + neovim-sensible + vim-airline + vim-airline-themes + vim-nix + ]; + extraConfig = builtins.readFile ./dotfiles/init.vim; + }; + + programs.git = { + enable = true; + userName = "Juni Kim"; + userEmail = "junikimm717@gmail.com"; + }; - programs.zsh.oh-my-zsh.enable = true; - programs.zsh.oh-my-zsh.theme = "robbyrussell"; - + programs.zsh = { + oh-my-zsh = { + enable = true; + theme = "robbyrussell"; + }; + shellInit = builtins.readFile ./dotfiles/zshrc + }; - home.file = { - #".config/nvim/init.vim".source = ./dotfiles/init.vim; - ".config/polybar" = { - source = ./dotfiles/polybar; - recursive = true; + home.file = { + #".config/nvim/init.vim".source = ./dotfiles/init.vim; + ".config/polybar" = { + source = ./dotfiles/polybar; + recursive = true; + }; + ".config/kitty/kitty.conf".source = ./dotfiles/kitty.conf; + ".config/picom/picom.conf".source = ./dotfiles/picom.conf; + ".cwmrc".source = ./dotfiles/cwmrc; + "cwm.sh".source = ./dotfiles/cwm.sh; + ".xinitrc".source = ./dotfiles/xinitrc; + ".tmux.conf".source = ./dotfiles/tmux.conf; }; - ".config/kitty/kitty.conf".source = ./dotfiles/kitty.conf; - ".config/picom/picom.conf".source = ./dotfiles/picom.conf; - ".cwmrc".source = ./dotfiles/.cwmrc; - "cwm.sh".source = ./dotfiles/cwm.sh; - ".xinitrc".source = ./dotfiles/.xinitrc; - ".zshrc".source = ./dotfiles/.zshrc; - ".tmux.conf".source = ./dotfiles/tmux.conf; - }; + } }