Restructure to use flakes
This commit is contained in:
46
flake.nix
Normal file
46
flake.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
inputs = {
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixpkgs = {
|
||||
url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
};
|
||||
};
|
||||
outputs = inputs: {
|
||||
nixosConfigurations = {
|
||||
w1n5t0n = import ./machines/w1n5t0n.nix inputs;
|
||||
};
|
||||
homeConfigurations = {
|
||||
me = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
system = "x86_64-linux";
|
||||
username = "me";
|
||||
homeDirectory = "/home/me";
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
system = "x86_64-linux";
|
||||
hostname = "w1n5t0n";
|
||||
};
|
||||
configuration.imports = [ ./users/me.nix ];
|
||||
};
|
||||
};
|
||||
}
|
||||
//
|
||||
inputs.flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
in
|
||||
{
|
||||
devShell = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
inputs.home-manager.defaultPackage.${system};
|
||||
];
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user