refactoring: Use flake-inputs instead of awkwardly passing through
This commit is contained in:
parent
b7feffc52f
commit
bb397841ee
3 changed files with 22 additions and 31 deletions
27
flake.nix
27
flake.nix
|
@ -24,8 +24,8 @@
|
|||
sops-nix,
|
||||
nvfetcher,
|
||||
deploy-rs,
|
||||
tlaternet-webserver,
|
||||
}: let
|
||||
...
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
in {
|
||||
##################
|
||||
|
@ -33,9 +33,14 @@
|
|||
##################
|
||||
nixosConfigurations = {
|
||||
# The actual system definition
|
||||
tlaternet = self.lib.makeNixosSystem {
|
||||
tlaternet = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
extraModules = [(import ./configuration/hardware-specific/linode)];
|
||||
specialArgs.flake-inputs = inputs;
|
||||
|
||||
modules = [
|
||||
./configuration
|
||||
./configuration/hardware-specific/linode
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -63,19 +68,21 @@
|
|||
####################
|
||||
# Helper functions #
|
||||
####################
|
||||
lib = import ./lib {
|
||||
inherit nixpkgs sops-nix tlaternet-webserver;
|
||||
lib = nixpkgs.lib;
|
||||
};
|
||||
lib = import ./lib {inherit (nixpkgs) lib;};
|
||||
|
||||
###################
|
||||
# Utility scripts #
|
||||
###################
|
||||
packages.${system} = let
|
||||
inherit (nixpkgs.legacyPackages.${system}) writeShellScript;
|
||||
vm = self.lib.makeNixosSystem {
|
||||
vm = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
extraModules = [(import ./configuration/hardware-specific/vm.nix)];
|
||||
specialArgs.flake-inputs = inputs;
|
||||
|
||||
modules = [
|
||||
./configuration
|
||||
./configuration/hardware-specific/vm.nix
|
||||
];
|
||||
};
|
||||
in {
|
||||
default = vm.config.system.build.vm;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue