From 65caad8950f53116876d0ba9b5bd850e3c1b41b4 Mon Sep 17 00:00:00 2001 From: iFargle Date: Fri, 25 Aug 2023 19:07:54 +0900 Subject: [PATCH] +doom-emacs --- flake.nix | 13 +++++++------ home-manager/common/software/cli/doom-emacs.nix | 6 ++++++ lib/default.nix | 17 ++++++++--------- 3 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 home-manager/common/software/cli/doom-emacs.nix diff --git a/flake.nix b/flake.nix index a54a8395..41bfb0d9 100644 --- a/flake.nix +++ b/flake.nix @@ -1,16 +1,17 @@ { description = "NixOS System Config"; inputs = { - nixpkgs.url = "nixpkgs/nixos-unstable"; # NixOS packages - home-manager.url = "github:nix-community/home-manager/master"; # Manage dotfiles in a home directory + nixpkgs.url = "nixpkgs/nixos-unstable"; + home-manager.url = "github:nix-community/home-manager/master"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; - lanzaboote.url = "github:nix-community/lanzaboote"; # Secureboot Configuration + lanzaboote.url = "github:nix-community/lanzaboote"; lanzaboote.inputs.nixpkgs.follows = "nixpkgs"; - nur.url = "github:nix-community/NUR"; # Nix User Repository - sops-nix.url = "github:Mic92/sops-nix"; # Encrypted secrets in Nix configuration files + nur.url = "github:nix-community/NUR"; + sops-nix.url = "github:Mic92/sops-nix"; + doom-emacs.url = "github:nix-community/nix-doom-emacs"; }; outputs = { - self, nixpkgs, home-manager, lanzaboote, nur, sops-nix, ... + self, nixpkgs, home-manager, lanzaboote, nur, sops-nix, doom-emacs, ... }@inputs: let inherit (self) outputs; diff --git a/home-manager/common/software/cli/doom-emacs.nix b/home-manager/common/software/cli/doom-emacs.nix new file mode 100644 index 00000000..c0cbf3e8 --- /dev/null +++ b/home-manager/common/software/cli/doom-emacs.nix @@ -0,0 +1,6 @@ +{ ... }: { + programs.doom-emacs = { + enable = true; + doomPrivateDir = ./doom.d; + }; +}; \ No newline at end of file diff --git a/lib/default.nix b/lib/default.nix index feaac2ed..88922627 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,19 +1,18 @@ { inputs, outputs, stateVersion, hmStateVersion, ... }: { + # Helper function for generating home-manager configs mkHome = { hostname, username, desktop ? null, platform ? "x86_64-linux" }: inputs.home-manager.lib.homeManagerConfiguration { pkgs = inputs.nixpkgs.legacyPackages.${platform}; - # pkgs = inputs.nixpkgs.${platform}; - extraSpecialArgs = { - inherit inputs outputs desktop hostname platform username hmStateVersion; - }; - modules = [ ../home-manager ]; + extraSpecialArgs = { inherit inputs outputs desktop hostname platform username hmStateVersion; }; + modules = [ + ../home-manager + inputs.doom-emacs.hmModule + ]; }; # Helper function for generating host configs mkHost = { hostname, username, desktop ? null, installer ? null, gpu ? null }: inputs.nixpkgs.lib.nixosSystem { - specialArgs = { - inherit inputs outputs desktop hostname username stateVersion gpu; - }; + specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu; }; modules = [ ../nixos inputs.sops-nix.nixosModules.sops # Handle secrets @@ -29,4 +28,4 @@ "aarch64-darwin" "x86_64-darwin" ]; -} +} \ No newline at end of file