refactor: clean up flake

main
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,46 +13,48 @@
user = "mandlm"; user = "mandlm";
in in
{ {
nixosConfigurations.nixos-vm = nixpkgs.lib.nixosSystem { nixosConfigurations = {
system = "x86_64-linux"; nixos-vm = nixpkgs.lib.nixosSystem {
specialArgs = inputs; system = "x86_64-linux";
modules = [ specialArgs = inputs;
./configuration.nix modules = [
./users.nix ./configuration.nix
./machines/nixos-vm/configuration.nix ./users.nix
./machines/nixos-vm/hardware-configuration.nix ./machines/nixos-vm/configuration.nix
./machines/nixos-vm/hardware-configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
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 ];
}; };
} }
]; ];
}; };
nixosConfigurations.apache = nixpkgs.lib.nixosSystem { apache = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = inputs; specialArgs = inputs;
modules = [ modules = [
./configuration.nix ./configuration.nix
./users.nix ./users.nix
./machines/apache/configuration.nix ./machines/apache/configuration.nix
./machines/apache/hardware-configuration.nix ./machines/apache/hardware-configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
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; };
home-manager.users.${user} = { home-manager.users.${user} = {
imports = [ ./home-${user}.nix ]; imports = [ ./home-${user}.nix ];
}; };
} }
]; ];
};
}; };
}; };
} }