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
cd ~/nix-config
nix-shell
# for nixos:
sudo nixos-rebuild switch --flake .
# for home-manager
home-manager switch --flake .#lu@HOSTNAME
nh os switch
```
Feel free to brutalize as much of this config as you want for your own purposes.

View file

@ -27,7 +27,7 @@
} @ inputs:
let
inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib;
lib = nixpkgs.lib;
systems = [
"x86_64-linux"
"aarch64-darwin"
@ -53,6 +53,11 @@
specialArgs = { inherit inputs outputs; };
modules = [
./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; };
modules = [
./nixos/yukari/configuration.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
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = { inherit inputs outputs; };
home-manager.users.lu = import ./home/yukari.nix;
}
];
};
};

View file

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