From a2cbf737e78051c2cb10eeaf4a5dccc19d6348ba Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Sat, 7 Oct 2023 01:33:26 +0200 Subject: first working --- flake.nix | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index d80f804..e0c3a5d 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,10 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; sops-nix.url = "github:Mic92/sops-nix"; - home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = inputs@{ @@ -15,25 +18,22 @@ ... }: let system = "x86_64-linux"; - overlay = nixpkgs.lib.composeManyExtensions [ - (import ./overlays/vimPlugins.nix {inherit pkgs;}) - (import ./overlays/suckless.nix {inherit pkgs;}) - ]; - pkgs = import nixpkgs { - overlays = [ - overlay - ]; - inherit system; - }; + pkgs = import nixpkgs {inherit system;}; lib = (nixpkgs.lib.extend (_: _: home-manager.lib)).extend (import ./lib); in with lib; { inherit lib; nixosConfigurations.lemptop = nixpkgs.lib.nixosSystem { - inherit system; + inherit lib system; + specialArgs = {inherit inputs;}; modules = [ - ./nixos/configuration.nix - ./nixos/lemptop.nix + ({config, ... }: { + nixpkgs.overlays = with lib; [(composeManyExtensions [ + (import ./overlays/vimPlugins.nix {inherit pkgs;}) + (import ./overlays/suckless.nix {inherit pkgs; home = config.users.users.mike.home;}) + ])]; + }) + ./machines/lemptop.nix ] ++ (attrValues (attrsets.mergeAttrsList [ (modulesIn ./profiles/core) @@ -45,15 +45,15 @@ templates = { default = { path = ./templates/flake; - description = "Flake with python and go stuff"; + description = "Python and go stuff"; }; ansible = { path = ./templates/ansible; - description = "Flake with ansible and shellhook to login to awx"; + description = "Ansible and shellhook to login to awx"; }; go = { path = ./templates/go; - description = "Flake with go, gotools, and gofumpt"; + description = "Go, gotools, and gofumpt"; }; }; }; -- cgit v1.2.3