From c256a2aa8a73368ed95db4d5da5e873f4bd8a354 Mon Sep 17 00:00:00 2001 From: Andreas Date: Mon, 23 Sep 2024 10:11:44 +0000 Subject: [PATCH] configuration.nix now has access to inputs from flaek --- configuration.nix | 2 +- flake.nix | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/configuration.nix b/configuration.nix index 2acac1f..1de7e10 100644 --- a/configuration.nix +++ b/configuration.nix @@ -5,7 +5,7 @@ # NixOS-WSL specific options are documented on the NixOS-WSL repository: # https://github.com/nix-community/NixOS-WSL -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs, ... }: { imports = [ diff --git a/flake.nix b/flake.nix index 4e5ebc9..236c0c3 100644 --- a/flake.nix +++ b/flake.nix @@ -5,32 +5,26 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; }; - outputs = { self, nixpkgs, nixos-wsl, nix, ...}: - #outputs = { self, nixpkgs, nixos-wsl, nix, ...}@inputs: - #let - #system = if builtins ? currentSystem - # then builtins.currentSystem - # #then "x86_64-linux" - # else "x86_64-linux"; - #in + outputs = { self, nixpkgs, nixos-wsl, nix, ...}@inputs: + let + system = if builtins ? currentSystem + then builtins.currentSystem + else "x86_64-linux"; + in { nixosConfigurations = { nixos = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + inherit system; modules = [ nixos-wsl.nixosModules.default ./configuration.nix { - #inherit system; - #system = "x86_64-linux"; system.stateVersion = "24.05"; wsl.enable = true; nix.settings.experimental-features = ["nix-command" "flakes" ]; - #modules = [ ./configuration.nix ]; - #specialArgs = { inherit inputs; }; } ]; - #specialArgs = { inherit inputs; }; + specialArgs = { inherit inputs; }; }; }; };