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