🔧 clean up flake.nix
This commit is contained in:
parent
d4218579ce
commit
e8d4263e65
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
result
|
result
|
||||||
|
.direnv
|
16
flake.lock
generated
16
flake.lock
generated
@ -1,5 +1,20 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1653893745,
|
||||||
|
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -38,6 +53,7 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
|
62
flake.nix
62
flake.nix
@ -3,49 +3,29 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager }: {
|
outputs = { self, nixpkgs, home-manager, flake-utils, ... }:
|
||||||
homeConfigurations = {
|
flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]
|
||||||
aarch64-darwin = home-manager.lib.homeManagerConfiguration {
|
(system:
|
||||||
system = "aarch64-darwin";
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
homeDirectory = "/Users/walkah";
|
in
|
||||||
username = "walkah";
|
{
|
||||||
stateVersion = "21.03";
|
homeConfigurations = {
|
||||||
configuration = { config, pkgs, ... }: {
|
walkah = home-manager.lib.homeManagerConfiguration {
|
||||||
imports = [
|
system = system;
|
||||||
./home.nix
|
homeDirectory = if pkgs.stdenv.isDarwin then "/Users/walkah" else "/home/walkah";
|
||||||
];
|
username = "walkah";
|
||||||
};
|
stateVersion = "21.03";
|
||||||
};
|
configuration = { config, pkgs, ... }: {
|
||||||
x86_64-darwin = home-manager.lib.homeManagerConfiguration {
|
imports = [ ./home.nix ];
|
||||||
system = "x86_64-darwin";
|
};
|
||||||
homeDirectory = "/Users/walkah";
|
};
|
||||||
username = "walkah";
|
};
|
||||||
stateVersion = "21.03";
|
packages.default =
|
||||||
configuration = { config, pkgs, ... }: {
|
self.homeConfigurations.${system}.walkah.activationPackage;
|
||||||
imports = [
|
});
|
||||||
./home.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
x86_64-linux = home-manager.lib.homeManagerConfiguration {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
homeDirectory = "/home/walkah";
|
|
||||||
username = "walkah";
|
|
||||||
stateVersion = "21.03";
|
|
||||||
configuration = { config, pkgs, ... }: {
|
|
||||||
imports = [
|
|
||||||
./home.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
defaultPackage.aarch64-darwin = self.homeConfigurations.aarch64-darwin.activationPackage;
|
|
||||||
defaultPackage.x86_64-darwin = self.homeConfigurations.x86_64-darwin.activationPackage;
|
|
||||||
defaultPackage.x86_64-linux = self.homeConfigurations.x86_64-linux.activationPackage;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user