Use home-manager as module
This commit is contained in:
49
flake.nix
49
flake.nix
@ -3,42 +3,25 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-22.11";
|
||||
home-manager.url = "github:nix-community/home-manager/release-22.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-22.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }: {
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
outputs = inputs@{ nixpkgs, home-manager, ... }: {
|
||||
nixosConfigurations = {
|
||||
atlas = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
homeManagerConfigurations = {
|
||||
jordan = home-manager.lib.homeManagerConfiguration {
|
||||
inherit system pkgs;
|
||||
username = "jordan";
|
||||
homeDirectory = "/home/jordan";
|
||||
configuration = {
|
||||
imports = ]
|
||||
./users/jordan/home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
atlas = lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
modules = [
|
||||
./system/configuration.nix
|
||||
];
|
||||
};
|
||||
modules = [
|
||||
./system/configuration.nix
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.jordan = import ./users/jordan/home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user