From c6e26d9a5a3087da76432862aba5f21fc7ffe54f Mon Sep 17 00:00:00 2001 From: Alex Stan <90788596+Ultra980@users.noreply.github.com> Date: Sat, 25 Mar 2023 11:49:15 +0200 Subject: [PATCH] move nix-software-center into the flake.nix Signed-off-by: Alex Stan --- flake.lock | 53 ++++++++++++++++++++++++++++++++++++++- flake.nix | 8 ++++-- ultrapc/configuration.nix | 15 +++++------ 3 files changed, 66 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index 8917045..3a41bca 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,41 @@ { "nodes": { + "nix-software-center": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + }, + "locked": { + "lastModified": 1678759647, + "narHash": "sha256-F1WIPB+8u1QIv1FKDlfCxf4trktwnvtywFHdRuQXgZs=", + "owner": "vlinkz", + "repo": "nix-software-center", + "rev": "0ba4ad447567626e66a5729d64e0e5eb751d40c0", + "type": "github" + }, + "original": { + "owner": "vlinkz", + "repo": "nix-software-center", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1676721149, + "narHash": "sha256-mN2EpTGxxVNnFZLoLWRwh6f7UWhXy4qE+wO2CZyrXps=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5f4e07deb7c44f27d498f8df9c5f34750acf52d2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1679616449, "narHash": "sha256-E6Fvb13mDFa1ZY4lDbTpKbjvUOA4gbh23GWRf3ZzOOw=", @@ -18,7 +53,23 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "nix-software-center": "nix-software-center", + "nixpkgs": "nixpkgs_2" + } + }, + "utils": { + "locked": { + "lastModified": 1676283394, + "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index f9b26ec..8c092a6 100644 --- a/flake.nix +++ b/flake.nix @@ -1,11 +1,15 @@ { description = "My NixOS system configuration"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nix-software-center.url = "github:vlinkz/nix-software-center"; + }; - outputs = { self, nixpkgs }: { + outputs = { self, nixpkgs, ... }@inputs: { nixosConfigurations.ultrapc = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + specialArgs = { inherit inputs; }; modules = [ ./ultrapc/configuration.nix ]; diff --git a/ultrapc/configuration.nix b/ultrapc/configuration.nix index 8239d46..d83a092 100644 --- a/ultrapc/configuration.nix +++ b/ultrapc/configuration.nix @@ -2,14 +2,15 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, inputs, ... }: let - nix-software-center = import (pkgs.fetchFromGitHub { - owner = "vlinkz"; - repo = "nix-software-center"; - rev = "0.1.1"; - sha256 = "0frigabszyfkphfbsniaa1d546zm8a2gx0cqvk2fr2qfa71kd41n"; - }) {}; + # nix-software-center = import (pkgs.fetchFromGitHub { + # owner = "vlinkz"; + # repo = "nix-software-center"; + # rev = "0.1.1"; + # sha256 = "0frigabszyfkphfbsniaa1d546zm8a2gx0cqvk2fr2qfa71kd41n"; + # }) {}; + nix-software-center = inputs.nix-software-center.packages.${pkgs.system}.nix-software-center; in { imports =