From d00ef791399d8316a8414fe4d0a29d42baef7b1f Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Sun, 21 Feb 2021 19:38:12 -0500 Subject: Update flake --- flake.lock | 21 +++++++++++++++++++-- flake.nix | 14 +++++++++++--- machines/firelink.nix | 2 +- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 96d8c8e..7d0dd74 100644 --- a/flake.lock +++ b/flake.lock @@ -21,6 +21,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1613453906, + "narHash": "sha256-w6oeQ3OTCKxRAG9KtjK+ErxpvUhNr48binO99JVQP9Q=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "115770eed0c0fa50c1277cd0f7fe0f15501dbc43", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1613772719, @@ -37,7 +53,7 @@ "type": "github" } }, - "nixpkgs_unstable": { + "nixpkgs-unstable": { "locked": { "lastModified": 1613761605, "narHash": "sha256-lUF6UPR96ZzQC0faNXBHLoLhNAdxZqYqDwz0PaIZ/7Y=", @@ -56,8 +72,9 @@ "root": { "inputs": { "nix": "nix", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", - "nixpkgs_unstable": "nixpkgs_unstable" + "nixpkgs-unstable": "nixpkgs-unstable" } } }, diff --git a/flake.nix b/flake.nix index 371a36d..ed11cda 100644 --- a/flake.nix +++ b/flake.nix @@ -1,13 +1,14 @@ { inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.09"; - inputs.nixpkgs_unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs.nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs.nixos-hardware.url = github:NixOS/nixos-hardware/master; # TODO: Remove nix overlay when pull request is resolved: # https://github.com/NixOS/nix/pull/4566 inputs.nix.url = "github:orbekk/nix/master"; inputs.nix.inputs.nixpkgs.follows = "nixpkgs"; - outputs = { self, nixpkgs, nixpkgs_unstable, nix }: + outputs = { self, nixpkgs, nixpkgs-unstable, nix, nixos-hardware }: { nixosConfigurations = let mkConfig = { hostName @@ -19,6 +20,7 @@ modules = [ module + nixpkgs.nixosModules.notDetected ({config, pkgs, ...}: { # Let 'nixos-version --json' know about the Git revision # of this flake. @@ -27,7 +29,13 @@ nixpkgs.overlays = [ # Add unstable packages. - (final: prev: { unstable = nixpkgs_unstable.legacyPackages."x86_64-linux"; }) + (final: prev: { + my-extras = { + inherit nixpkgs; + inherit nixpkgs-unstable; + inherit nixos-hardware; + }; + }) # For git+file support with bare repo. nix.overlay (final: prev: { nixFlakes = final.nix; }) diff --git a/machines/firelink.nix b/machines/firelink.nix index 9b17ce2..013bf92 100644 --- a/machines/firelink.nix +++ b/machines/firelink.nix @@ -6,7 +6,7 @@ let src = /home/orbekk/projects/source/.; }); my-linuxPackages = - let linuxPkgs = super.unstable.linuxPackages_latest; + let linuxPkgs = super.my-extras.nixpkgs-unstable.legacyPackages.${pkgs.system}.linuxPackages_latest; in linuxPkgs.extend (self: super: { # xpadneo = super.xpadneo.overrideAttrs (o: rec { # version = "master"; -- cgit v1.2.3