From 1a10199f80ff811a69ba64ef730d998ee8e9dd48 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 4 Mar 2024 14:57:03 -0800 Subject: create profiles for home-manager To make it easier to support multiple systems with this configuration, move the current configuration for my personal machine to a profile named `personal.nix`. When I add a work machine the profile can be named `work.nix` and all configurations related to that system will live there. --- home/darwin.nix | 45 ---------------------------------- hosts/mba/default.nix | 2 +- nix/profiles/home-manager/personal.nix | 45 ++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 46 deletions(-) delete mode 100644 home/darwin.nix create mode 100644 nix/profiles/home-manager/personal.nix diff --git a/home/darwin.nix b/home/darwin.nix deleted file mode 100644 index defd381..0000000 --- a/home/darwin.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ config, pkgs, ... }: -{ - home.stateVersion = "23.05"; - - imports = [ - ./dev.nix - ./firefox.nix - ./git.nix - ./ssh.nix - ./zsh.nix - ]; - - home.packages = with pkgs; [ - direnv - jless - jq - nixd - nix-direnv - nixfmt - nixpkgs-fmt - ripgrep - rnix-lsp - tree - ]; - - home.sessionVariables = { - EDITOR = "emacsclient -a="; - VISUAL = "emacsclient -a="; - LESS = "-FRSXM"; - LESSCHARSET = "utf-8"; - PAGER = "less"; - }; - - programs = { - direnv = { - enable = true; - nix-direnv.enable = true; - enableZshIntegration = true; - config = { - global.disable_stdin = true; - global.strict_env = true; - }; - }; - }; -} diff --git a/hosts/mba/default.nix b/hosts/mba/default.nix index 6efbddb..081e22a 100644 --- a/hosts/mba/default.nix +++ b/hosts/mba/default.nix @@ -21,5 +21,5 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.fcuny = import ../../home/darwin.nix; + home-manager.users.fcuny = import ../../nix/profiles/home-manager/personal.nix; } diff --git a/nix/profiles/home-manager/personal.nix b/nix/profiles/home-manager/personal.nix new file mode 100644 index 0000000..9072d63 --- /dev/null +++ b/nix/profiles/home-manager/personal.nix @@ -0,0 +1,45 @@ +{ config, pkgs, ... }: { + + home.stateVersion = "23.05"; + + imports = [ + ../../../home/dev.nix + ../../../home/firefox.nix + ../../../home/git.nix + ../../../home/ssh.nix + ../../../home/zsh.nix + ]; + + home.packages = with pkgs; [ + direnv + jless + jq + nixd + nix-direnv + nixfmt + nixpkgs-fmt + ripgrep + rnix-lsp + tree + ]; + + home.sessionVariables = { + EDITOR = "emacsclient -a="; + VISUAL = "emacsclient -a="; + LESS = "-FRSXM"; + LESSCHARSET = "utf-8"; + PAGER = "less"; + }; + + programs = { + direnv = { + enable = true; + nix-direnv.enable = true; + enableZshIntegration = true; + config = { + global.disable_stdin = true; + global.strict_env = true; + }; + }; + }; +} -- cgit 1.4.1