From fd0bbb296165113305f12e45295502d4d37cdb58 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Sun, 6 Feb 2022 00:19:29 +0000 Subject: [PATCH] Use custom nix package --- flake.lock | 67 ++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 2 ++ modules/common.nix | 10 ++++++- systems.nix | 4 +-- 4 files changed, 80 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 3e5aedb..e9a08e1 100644 --- a/flake.lock +++ b/flake.lock @@ -93,6 +93,72 @@ "type": "github" } }, + "lowdown-src": { + "flake": false, + "locked": { + "lastModified": 1633514407, + "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", + "type": "github" + }, + "original": { + "owner": "kristapsdz", + "repo": "lowdown", + "type": "github" + } + }, + "nix": { + "inputs": { + "lowdown-src": "lowdown-src", + "nixpkgs": "nixpkgs", + "nixpkgs-regression": "nixpkgs-regression" + }, + "locked": { + "lastModified": 1643066034, + "narHash": "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg=", + "owner": "NixOS", + "repo": "nix", + "rev": "a1cd7e58606a41fcf62bf8637804cf8306f17f62", + "type": "github" + }, + "original": { + "id": "nix", + "ref": "latest-release", + "type": "indirect" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1632864508, + "narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "82891b5e2c2359d7e58d08849e4c89511ab94234", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-21.05-small", + "type": "indirect" + } + }, + "nixpkgs-regression": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "indirect" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1643788601, @@ -129,6 +195,7 @@ "deploy-rs": "deploy-rs", "flake-utils": "flake-utils", "home-manager": "home-manager", + "nix": "nix", "nixpkgs-stable": "nixpkgs-stable", "nixpkgs-unstable": "nixpkgs-unstable" } diff --git a/flake.nix b/flake.nix index 720a7fd..6e6b75b 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,7 @@ # For extra-stable systems nixpkgs-stable.url = "nixpkgs/nixos-21.11"; + nix.url = "nix/latest-release"; agenix.url = "github:ryantm/agenix"; agenix.inputs.nixpkgs.follows = "nixpkgs-unstable"; deploy-rs.url = "github:serokell/deploy-rs"; @@ -25,6 +26,7 @@ nixpkgs-unstable, nixpkgs-stable, + nix, agenix, deploy-rs, diff --git a/modules/common.nix b/modules/common.nix index bce5242..08b6de7 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, inputs, config, options, ... }: +{ lib, pkgs, inputs, system, config, options, ... }: let inherit (lib) mkIf mkDefault mkAliasDefinitions; inherit (lib.my) mkOpt; @@ -34,6 +34,14 @@ }; }; + nix = { + package = inputs.nix.defaultPackage.${system}; + extraOptions = + '' + experimental-features = nix-command flakes ca-derivations + ''; + }; + environment.systemPackages = with pkgs; [ vim iperf3 diff --git a/systems.nix b/systems.nix index 8799d20..320df48 100644 --- a/systems.nix +++ b/systems.nix @@ -12,8 +12,8 @@ lib = pkgsFlakes.${nixpkgs}.lib; in lib.nixosSystem { inherit lib system; - specialArgs = { inherit inputs; myModules = modules; }; - modules = attrValues modules ++ [ { networking.hostName = mkDefault name; } config ]; + specialArgs = { inherit inputs system; }; + modules = attrValues modules ++ [ { networking.hostName = mkDefault name; } config ]; }; in mapAttrs mkSystem { colony = {