refactor: clean up flake

This commit is contained in:
Michael Mandl 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"
}
},
"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": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
"nixpkgs": "nixpkgs"
}
}
},

View file

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