link home-manager as a nixos module

This commit is contained in:
insects 2024-08-21 15:03:47 +02:00
parent 2eb8f36610
commit 477bce6897
3 changed files with 13 additions and 23 deletions

View file

@ -9,10 +9,7 @@ If you're me, and the machine you're installing on has a configuration, it's as
git clone forgejo@cirno.with.al:shadows_withal/nix-config.git ~/nix-config git clone forgejo@cirno.with.al:shadows_withal/nix-config.git ~/nix-config
cd ~/nix-config cd ~/nix-config
nix-shell nix-shell
# for nixos: nh os switch
sudo nixos-rebuild switch --flake .
# for home-manager
home-manager switch --flake .#lu@HOSTNAME
``` ```
Feel free to brutalize as much of this config as you want for your own purposes. Feel free to brutalize as much of this config as you want for your own purposes.

View file

@ -27,7 +27,7 @@
} @ inputs: } @ inputs:
let let
inherit (self) outputs; inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib; lib = nixpkgs.lib;
systems = [ systems = [
"x86_64-linux" "x86_64-linux"
"aarch64-darwin" "aarch64-darwin"
@ -53,6 +53,11 @@
specialArgs = { inherit inputs outputs; }; specialArgs = { inherit inputs outputs; };
modules = [ modules = [
./nixos/enoko/configuration.nix ./nixos/enoko/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = { inherit inputs outputs; };
home-manager.users.lu = import ./home/enoko.nix;
}
]; ];
}; };
@ -60,24 +65,11 @@
specialArgs = { inherit inputs outputs; }; specialArgs = { inherit inputs outputs; };
modules = [ modules = [
./nixos/yukari/configuration.nix ./nixos/yukari/configuration.nix
]; home-manager.nixosModules.home-manager
}; {
}; home-manager.extraSpecialArgs = { inherit inputs outputs; };
home-manager.users.lu = import ./home/yukari.nix;
homeConfigurations = { }
"lu@yukari" = lib.homeManagerConfiguration {
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
./home/yukari.nix
];
};
"lu@enoko" = lib.homeManagerConfiguration {
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
./home/enoko.nix
]; ];
}; };
}; };

View file

@ -14,6 +14,7 @@
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
home-manager home-manager
git git
nh
]; ];
}; };
} }