refactor: clean up flake

This commit is contained in:
mandlm 2022-06-26 15:03:45 +02:00
parent 9c1e1a5243
commit 44aea5c83f
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
2 changed files with 40 additions and 56 deletions

View File

@ -37,27 +37,10 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1655983783,
"narHash": "sha256-0h1FzkYWei24IdKNpCX93onkF/FMiXQG8SdEbTc0r8A=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6141b8932a5cf376fe18fcd368cecd9ad946cb68",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs"
"nixpkgs-unstable": "nixpkgs-unstable"
} }
} }
}, },

View File

@ -1,7 +1,6 @@
{ {
inputs = { inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-22.05; nixpkgs.url = github:NixOS/nixpkgs/nixos-22.05;
nixpkgs-unstable.url = github:NixOS/nixpkgs/nixos-unstable;
home-manager = { home-manager = {
url = github:nix-community/home-manager/release-22.05; url = github:nix-community/home-manager/release-22.05;
@ -14,7 +13,8 @@
user = "mandlm"; user = "mandlm";
in in
{ {
nixosConfigurations.nixos-vm = nixpkgs.lib.nixosSystem { nixosConfigurations = {
nixos-vm = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = inputs; specialArgs = inputs;
modules = [ modules = [
@ -27,7 +27,7 @@
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user; }; home-manager.extraSpecialArgs = { inherit user nixpkgs; };
home-manager.users.${user} = { home-manager.users.${user} = {
imports = [ ./home-${user}.nix ]; imports = [ ./home-${user}.nix ];
}; };
@ -35,7 +35,7 @@
]; ];
}; };
nixosConfigurations.apache = nixpkgs.lib.nixosSystem { apache = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = inputs; specialArgs = inputs;
modules = [ modules = [
@ -56,4 +56,5 @@
]; ];
}; };
}; };
};
} }