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