From d108086e94718315692bdf09ff604d0ba16b63b1 Mon Sep 17 00:00:00 2001 From: sajenim Date: Fri, 7 Apr 2023 07:19:41 +0800 Subject: [PATCH] setup home-manager --- home-manager/home.nix | 40 ++++++++++++++++++++-------- home-manager/programs/discocss.nix | 12 +++++++++ home-manager/programs/git.nix | 9 +++++++ home-manager/programs/mangohud.nix | 13 +++++++++ home-manager/{ => programs}/nvim.nix | 4 +++ home-manager/{ => programs}/zsh.nix | 0 home-manager/services/picom.nix | 14 ++++++++++ 7 files changed, 81 insertions(+), 11 deletions(-) create mode 100644 home-manager/programs/discocss.nix create mode 100644 home-manager/programs/git.nix create mode 100644 home-manager/programs/mangohud.nix rename home-manager/{ => programs}/nvim.nix (94%) rename home-manager/{ => programs}/zsh.nix (100%) create mode 100644 home-manager/services/picom.nix diff --git a/home-manager/home.nix b/home-manager/home.nix index 1b03689..2248088 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -11,7 +11,14 @@ # inputs.nix-colors.homeManagerModules.default # You can also split up your configuration and import pieces of it here: - # ./nvim.nix + # Programs + ./programs/discocss.nix + ./programs/git.nix + ./programs/mangohud.nix + ./programs/nvim.nix + ./programs/zsh.nix + # Services + ./services/picom.nix ]; nixpkgs = { @@ -40,20 +47,31 @@ allowUnfreePredicate = (_: true); }; }; + + # Enable home-manager + programs.home-manager.enable = true; - # TODO: Set your username home = { - username = "your-username"; - homeDirectory = "/home/your-username"; + username = "sajenim"; + homeDirectory = "/home/sajenim"; + + sessionVariables = { + EDITOR = "nvim"; + }; + + packages = with pkgs; [ + wezterm + discord + spotify + unstable.prismlauncher + ]; }; - # Add stuff for your user as you see fit: - # programs.neovim.enable = true; - # home.packages = with pkgs; [ steam ]; - - # Enable home-manager and git - programs.home-manager.enable = true; - programs.git.enable = true; + # Setup user configuration + xdg.configFile = { + awesome = { source = ../config/awesome; recursive = true; }; + wezterm = { source = ../config/wezterm; recursive = true; }; + }; # Nicely reload system units when changing configs systemd.user.startServices = "sd-switch"; diff --git a/home-manager/programs/discocss.nix b/home-manager/programs/discocss.nix new file mode 100644 index 0000000..d1edc0e --- /dev/null +++ b/home-manager/programs/discocss.nix @@ -0,0 +1,12 @@ +{ inputs, outputs, lib, config, pkgs, ... }: + +{ + programs.discocss = { + enable = true; + discordAlias = false; + }; + + xdg.configFile = { + discocss = { source = ../../config/discocss; recursive = true; }; + }; +} diff --git a/home-manager/programs/git.nix b/home-manager/programs/git.nix new file mode 100644 index 0000000..461a6c7 --- /dev/null +++ b/home-manager/programs/git.nix @@ -0,0 +1,9 @@ +{ inputs, outputs, lib, config, pkgs, ... }: + +{ + programs.git = { + enable = true; + userName = "sajenim"; + userEmail = "its.jassy@pm.me"; + }; +} diff --git a/home-manager/programs/mangohud.nix b/home-manager/programs/mangohud.nix new file mode 100644 index 0000000..76aecdf --- /dev/null +++ b/home-manager/programs/mangohud.nix @@ -0,0 +1,13 @@ +{ inputs, outputs, lib, config, pkgs, ... }: + +{ + programs.mangohud = { + enable = true; + settings = { + gpu_temp = true; + gpu_core_clock = true; + cpu_temp = true; + cpu_mhz = true; + }; + }; +} diff --git a/home-manager/nvim.nix b/home-manager/programs/nvim.nix similarity index 94% rename from home-manager/nvim.nix rename to home-manager/programs/nvim.nix index 679da7c..1fceeb8 100644 --- a/home-manager/nvim.nix +++ b/home-manager/programs/nvim.nix @@ -49,4 +49,8 @@ nvim-web-devicons # Provides icons ]; }; + + xdg.configFile = { + nvim = { source = ../../config/nvim; recursive = true; }; + }; } diff --git a/home-manager/zsh.nix b/home-manager/programs/zsh.nix similarity index 100% rename from home-manager/zsh.nix rename to home-manager/programs/zsh.nix diff --git a/home-manager/services/picom.nix b/home-manager/services/picom.nix new file mode 100644 index 0000000..4663c2d --- /dev/null +++ b/home-manager/services/picom.nix @@ -0,0 +1,14 @@ +{ inputs, outputs, lib, config, pkgs, ... }: + +{ + services.picom = { + enable = true; + shadow = true; + settings = { + corner-radius = 5; + rounded-corners-exclude = [ + "window_type = 'dock'" + ]; + }; + }; +}