From b1f126168ed920f8cb10aa29e869c4b3c538ed64 Mon Sep 17 00:00:00 2001 From: xenia Date: Thu, 19 Oct 2023 00:10:11 +0200 Subject: [PATCH] Split hoem into home and laptop --- flake.nix | 12 +++++++++++- home.nix | 15 --------------- laptop.nix | 24 ++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 laptop.nix diff --git a/flake.nix b/flake.nix index 2e5f14ec..971ba56b 100644 --- a/flake.nix +++ b/flake.nix @@ -39,18 +39,28 @@ unambig-path = unambig-path.packages.${system}.unambig-path; inherit pkgs xdg-runtime-dir; }; + mkLaptop = {system, pkgs} : import ./laptop.nix { + inherit pkgs xdg-runtime-dir; + }; + mkMac = {system, pkgs, laptop} : import ./mac.nix { + emacs = laptop.programs.emacs.package; + inherit pkgs xdg-runtime-dir; + }; in { homeConfigurations."xenia" = let system = "aarch64-darwin"; pkgs = mkPkgs system; home = mkHome { inherit system pkgs; }; + laptop = mkLaptop { inherit system pkgs; }; + mac = mkMac { inherit system pkgs laptop; }; in home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ home - ( import ./mac.nix { emacs = home.programs.emacs.package; inherit pkgs xdg-runtime-dir; } ) + laptop + mac ]; }; diff --git a/home.nix b/home.nix index 6c579596..11c77fc8 100644 --- a/home.nix +++ b/home.nix @@ -1,7 +1,6 @@ { pkgs, xdg-runtime-dir, kak-pkg, unispect, ansi-utils, unambig-path }: let - alacritty = import ./alacritty/alacritty.nix pkgs; kak = import ./kak.nix { kak = kak-pkg; inherit pkgs; }; extras = import ./extras.nix pkgs; @@ -47,9 +46,6 @@ in rec { # # Other stuff kak-lsp - discord-canary - # libreoffice-bin - fira-code ibm-plex # nix-tree ]; @@ -60,19 +56,8 @@ in rec { # Let Home Manager install and manage itself. programs.home-manager.enable = true; - programs.alacritty = alacritty; programs.kakoune = kak; - programs.emacs = { - package = pkgs.emacs; - enable = true; - extraPackages = epkgs: with epkgs; [ - vterm bind-key rust-mode lsp-mode company meow agda2-mode haskell-mode - terraform-mode nix-mode insert-kaomoji - ]; - extraConfig = builtins.readFile ./dotfiles/init.el; - }; - programs.zsh = { enable = true; package = pkgs.zsh; diff --git a/laptop.nix b/laptop.nix new file mode 100644 index 00000000..34ae0a4b --- /dev/null +++ b/laptop.nix @@ -0,0 +1,24 @@ +{ pkgs, xdg-runtime-dir }: + +let + alacritty = import ./alacritty/alacritty.nix pkgs; +in rec { + home.packages = with pkgs; [ + discord-canary + # libreoffice-bin + fira-code ibm-plex + ]; + + programs.alacritty = alacritty; + + programs.emacs = { + package = pkgs.emacs; + enable = true; + extraPackages = epkgs: with epkgs; [ + vterm bind-key rust-mode lsp-mode company meow agda2-mode haskell-mode + terraform-mode nix-mode insert-kaomoji + ]; + extraConfig = builtins.readFile ./dotfiles/init.el; + }; + +}