From 02458fec219b9f3a34e20c32cd136e03866ff2c7 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Sun, 5 May 2024 13:12:48 -0500 Subject: [PATCH] made home-manager configs one line in the flake.nix. --- flake.nix | 18 +-------- hosts/gabe-archlaptop.nix | 70 +++++++++++++++++++------------- hosts/gabe-gv-workstation.nix | 76 ++++++++++++++++++++--------------- 3 files changed, 87 insertions(+), 77 deletions(-) diff --git a/flake.nix b/flake.nix index 0e8d5b5..9c3ff54 100644 --- a/flake.nix +++ b/flake.nix @@ -53,22 +53,8 @@ # Standalone home-manager configuration entrypoint # Available through 'home-manager --flake .#your-username@your-hostname' homeConfigurations = { - "gabe@archlaptop" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance - extraSpecialArgs = {inherit inputs outputs;}; - modules = [ - ./hosts/gabe-archlaptop.nix - nixvim.homeManagerModules.nixvim - ]; - }; - "gabe@gv-workstation" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance - extraSpecialArgs = {inherit inputs outputs;}; - modules = [ - ./hosts/gabe-gv-workstation.nix - nixvim.homeManagerModules.nixvim - ]; - }; + "gabe@archlaptop" = import ./hosts/gabe-archlaptop.nix {inherit inputs outputs;}; + "gabe@gv-workstation" = import ./hosts/gabe-gv-workstation.nix {inherit inputs outputs;}; }; }; } diff --git a/hosts/gabe-archlaptop.nix b/hosts/gabe-archlaptop.nix index ab3a3c5..aa2694c 100644 --- a/hosts/gabe-archlaptop.nix +++ b/hosts/gabe-archlaptop.nix @@ -1,35 +1,47 @@ { - config, - pkgs, - lib, + inputs, + outputs, ... -}: { - # machine specific options - home = { - enable-speech = true; - nvim = { - enable-lsp = true; - enable-treesitter = true; - }; - git = { - profile = { - name = "Gabe Venberg"; - email = "gabevenberg@gmail.com"; +}: +inputs.home-manager.lib.homeManagerConfiguration { + pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance + extraSpecialArgs = {inherit inputs outputs;}; + modules = [ + ({ + config, + pkgs, + lib, + ... + }: { + # machine specific options + home = { + enable-speech = true; + nvim = { + enable-lsp = true; + enable-treesitter = true; + }; + git = { + profile = { + name = "Gabe Venberg"; + email = "gabevenberg@gmail.com"; + }; + workProfile.enable = false; + }; }; - workProfile.enable = false; - }; - }; - targets.genericLinux.enable = true; - home.username = "gabe"; - home.homeDirectory = /home/gabe; - imports = [ - ../modules/home-manager/terminal - ../modules/home-manager/nvim - ../modules/home-manager - ../modules/home-manager/syncthing.nix - ../modules/home-manager/beets.nix - ../modules/home-manager/mpd/mpd.nix - ../modules/home-manager/email.nix + targets.genericLinux.enable = true; + home.username = "gabe"; + home.homeDirectory = /home/gabe; + imports = [ + ../modules/home-manager/terminal + ../modules/home-manager/nvim + ../modules/home-manager + ../modules/home-manager/syncthing.nix + ../modules/home-manager/beets.nix + ../modules/home-manager/mpd/mpd.nix + ../modules/home-manager/email.nix + ]; + }) + inputs.nixvim.homeManagerModules.nixvim ]; } diff --git a/hosts/gabe-gv-workstation.nix b/hosts/gabe-gv-workstation.nix index 6e91e11..a0f008a 100644 --- a/hosts/gabe-gv-workstation.nix +++ b/hosts/gabe-gv-workstation.nix @@ -1,38 +1,50 @@ { - config, - pkgs, - lib, + inputs, + outputs, ... -}: { - # machine specific options - home = { - enable-speech = true; - nvim = { - enable-lsp = true; - enable-treesitter = true; - }; - git = { - profile = { - name = "Gabe Venberg"; - email = "gabevenberg@gmail.com"; +}: +inputs.home-manager.lib.homeManagerConfiguration { + pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance + extraSpecialArgs = {inherit inputs outputs;}; + modules = [ + inputs.nixvim.homeManagerModules.nixvim + ({ + config, + pkgs, + lib, + ... + }: { + # machine specific options + home = { + enable-speech = true; + nvim = { + enable-lsp = true; + enable-treesitter = true; + }; + git = { + profile = { + name = "Gabe Venberg"; + email = "gabevenberg@gmail.com"; + }; + workProfile = { + enable = true; + email = "venberggabe@johndeere.com"; + }; + }; }; - workProfile = { - enable = true; - email = "venberggabe@johndeere.com"; - }; - }; - }; - targets.genericLinux.enable = true; - home.username = "gabe"; - home.homeDirectory = /home/gabe; - imports = [ - ../modules/home-manager/terminal - ../modules/home-manager/nvim - ../modules/home-manager - ../modules/home-manager/syncthing.nix - ../modules/home-manager/email.nix - ../modules/home-manager/beets.nix - ../modules/home-manager/mpd/mpd.nix + targets.genericLinux.enable = true; + home.username = "gabe"; + home.homeDirectory = /home/gabe; + imports = [ + ../modules/home-manager/terminal + ../modules/home-manager/nvim + ../modules/home-manager + ../modules/home-manager/syncthing.nix + ../modules/home-manager/email.nix + ../modules/home-manager/beets.nix + ../modules/home-manager/mpd/mpd.nix + ]; + }) ]; }