Don't manage Doom config with Nix

inky
Elnu 1 year ago
parent 838fb30d39
commit e8323e1fdc

@ -1,4 +1,4 @@
{ pkgs, lib, fetchFromGitHub, ... }: { pkgs, lib, config, configDir, fetchFromGitHub, ... }:
{ {
programs.emacs.enable = true; programs.emacs.enable = true;
@ -7,12 +7,10 @@
if [ ! -d .emacs.d ]; then if [ ! -d .emacs.d ]; then
git clone --depth 1 https://github.com/doomemacs/doomemacs .emacs.d git clone --depth 1 https://github.com/doomemacs/doomemacs .emacs.d
fi fi
mkdir -p .doom.d
ln -sf ${config.home.homeDirectory}/${configDir}/emacs/.doom.d/* .doom.d
''; '';
home.file = { home.file = {
".doom.d" = {
source = ./.doom.d;
recursive = true;
};
".emacs.d/everforest".source = pkgs.fetchFromGitHub { ".emacs.d/everforest".source = pkgs.fetchFromGitHub {
owner = "Theory-of-Everything"; owner = "Theory-of-Everything";
repo = "everforest-emacs"; repo = "everforest-emacs";

@ -12,10 +12,11 @@
outputs = inputs@{ self, nixpkgs, home-manager }: outputs = inputs@{ self, nixpkgs, home-manager }:
let let
user = "elnu"; user = "elnu";
configDir = "nix-config";
in { in {
nixosConfigurations = import ./hosts { nixosConfigurations = import ./hosts {
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
inherit inputs nixpkgs home-manager user; inherit inputs nixpkgs home-manager user configDir;
}; };
}; };
} }

@ -1,4 +1,4 @@
{ lib, inputs, nixpkgs, home-manager, user, ... }: { lib, inputs, nixpkgs, home-manager, user, configDir, ... }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
@ -10,6 +10,7 @@ let
hmImports = [ hmImports = [
(import ./home.nix) (import ./home.nix)
]; ];
hmArgs = { inherit user configDir; };
in in
{ {
desktop = lib.nixosSystem { desktop = lib.nixosSystem {
@ -26,7 +27,7 @@ in
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager {
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { inherit user; }; extraSpecialArgs = hmArgs;
users.${user} = { users.${user} = {
imports = hmImports ++ [ imports = hmImports ++ [
(import ./desktop/home.nix) (import ./desktop/home.nix)
@ -55,7 +56,7 @@ in
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager {
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { inherit user; }; extraSpecialArgs = hmArgs;
users.${user} = { users.${user} = {
imports = hmImports ++ [ imports = hmImports ++ [
(import ./thinkpads/home.nix) (import ./thinkpads/home.nix)
@ -80,7 +81,7 @@ in
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager {
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { inherit user; }; extraSpecialArgs = hmArgs;
users.${user} = { users.${user} = {
imports = hmImports ++ [ imports = hmImports ++ [
(import ./thinkpads/home.nix) (import ./thinkpads/home.nix)

Loading…
Cancel
Save