Switched to using flake-utils
This reducies the number of things that I will need at sometime in the theortical future, by doing more work now.
This commit is contained in:
parent
f3dc384e73
commit
2c64ba8530
53
flake.lock
53
flake.lock
|
@ -1,5 +1,35 @@
|
|||
{
|
||||
"nodes": {
|
||||
"emacs-overlay": {
|
||||
"locked": {
|
||||
"lastModified": 1639416884,
|
||||
"narHash": "sha256-ucI8w/JcQQzEbppfPBK7HPfsy3HRi5hy2FoksuvkPCc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "9516033899da467b8fcee6536a61ea66ebd0c4fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1629481132,
|
||||
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "997f7efcb746a9c140ce1f13c72263189225f482",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -69,10 +99,31 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"emacs-overlay": "emacs-overlay",
|
||||
"home-manager": "home-manager",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nur": "nur"
|
||||
"nur": "nur",
|
||||
"utils": "utils"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1632420560,
|
||||
"narHash": "sha256-8Tsa4Hp/CHCA6J8/E7EODhp75z5N1NBhFiOb3lBv/tI=",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "flake-utils-plus",
|
||||
"rev": "4b1bcafcfcd78bd36ceabfe3872822ba5c7fcbe8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"ref": "v1.3.0",
|
||||
"repo": "flake-utils-plus",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
40
flake.nix
40
flake.nix
|
@ -3,6 +3,7 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
utils.url = "github:gytis-ivaskevicius/flake-utils-plus/v1.3.0";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
|
@ -18,22 +19,33 @@
|
|||
url = "github:NixOS/nixos-hardware/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
emacs-overlay = {
|
||||
url = "github:nix-community/emacs-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
# All outputs for the system (configs)
|
||||
outputs = { home-manager, nixpkgs, nur, nixos-hardware, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = { allowUnfree = true; };
|
||||
outputs = inputs@{ self, utils, nixpkgs, nixos-hardware, nur, home-manager
|
||||
, emacs-overlay, ... }:
|
||||
utils.lib.mkFlake {
|
||||
hosts = {
|
||||
nil.modules = [
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
||||
./hosts/nil.nix
|
||||
];
|
||||
};
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
# Config is based on hostname
|
||||
nil = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
|
||||
# Shared logic below.
|
||||
inherit self inputs;
|
||||
supportedSystems = [ "x86_64-linux" ];
|
||||
channels.nixpkgs = {
|
||||
input = nixpkgs;
|
||||
overlaysBuilder = channels: [ ];
|
||||
};
|
||||
channelsConfig = { allowUnfree = true; };
|
||||
sharedOverlays = [ nur.overlay emacs-overlay.overlay ];
|
||||
hostDefaults = {
|
||||
modules = [
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
||||
./hosts/nil.nix
|
||||
|
@ -45,8 +57,8 @@
|
|||
}
|
||||
{ nixpkgs.overlays = [ nur.overlay ]; }
|
||||
];
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Reference in New Issue
Block a user