2021-11-28 01:10:36 +00:00
|
|
|
{
|
|
|
|
description = "NixOS configuration";
|
|
|
|
|
|
|
|
inputs = {
|
2022-07-10 04:35:11 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2022-02-08 01:24:05 +00:00
|
|
|
utils.url = "github:gytis-ivaskevicius/flake-utils-plus/v1.3.1";
|
2021-11-28 01:10:36 +00:00
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
nur = {
|
|
|
|
url = "github:nix-community/NUR";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
nixos-hardware = {
|
|
|
|
url = "github:NixOS/nixos-hardware/master";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-12-14 03:28:47 +00:00
|
|
|
|
|
|
|
emacs-overlay = {
|
|
|
|
url = "github:nix-community/emacs-overlay";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-11-28 01:10:36 +00:00
|
|
|
};
|
|
|
|
|
2021-12-14 03:28:47 +00:00
|
|
|
outputs = inputs@{ self, utils, nixpkgs, nixos-hardware, nur, home-manager
|
|
|
|
, emacs-overlay, ... }:
|
2022-08-12 03:55:18 +00:00
|
|
|
let
|
|
|
|
inherit (utils.lib) mkFlake;
|
|
|
|
inherit (self.lib.my) mapModules mapModulesRec';
|
2022-08-09 02:28:48 +00:00
|
|
|
in mkFlake {
|
2022-08-12 03:55:18 +00:00
|
|
|
lib = nixpkgs.lib.extend (self: super: {
|
|
|
|
my = import ./lib {
|
|
|
|
inherit inputs;
|
|
|
|
pkgs = nixpkgs;
|
|
|
|
lib = self;
|
|
|
|
};
|
|
|
|
});
|
2022-08-09 02:28:48 +00:00
|
|
|
|
|
|
|
inherit self inputs;
|
|
|
|
supportedSystems = [ "x86_64-linux" ];
|
2021-12-14 03:28:47 +00:00
|
|
|
hosts = {
|
|
|
|
nil.modules = [
|
2022-08-06 21:52:19 +00:00
|
|
|
nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen2
|
2022-08-13 03:33:38 +00:00
|
|
|
./hosts/nil
|
2021-12-14 03:28:47 +00:00
|
|
|
];
|
2021-11-28 01:10:36 +00:00
|
|
|
};
|
|
|
|
|
2021-12-14 03:28:47 +00:00
|
|
|
channels.nixpkgs = {
|
|
|
|
input = nixpkgs;
|
|
|
|
overlaysBuilder = channels: [ ];
|
2021-11-28 01:10:36 +00:00
|
|
|
};
|
2021-12-14 03:28:47 +00:00
|
|
|
channelsConfig = { allowUnfree = true; };
|
2022-08-06 21:52:19 +00:00
|
|
|
|
2021-12-14 03:28:47 +00:00
|
|
|
sharedOverlays = [ nur.overlay emacs-overlay.overlay ];
|
|
|
|
hostDefaults = {
|
2022-08-12 03:55:18 +00:00
|
|
|
modules = mapModulesRec' ./modules import ++ [
|
2021-12-14 03:28:47 +00:00
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.james = import ./home.nix;
|
|
|
|
}
|
2022-03-27 02:01:24 +00:00
|
|
|
{ nixpkgs.overlays = [ nur.overlay (import ./pkgs) ]; }
|
2021-12-14 03:28:47 +00:00
|
|
|
];
|
|
|
|
system = "x86_64-linux";
|
|
|
|
};
|
2021-11-28 01:10:36 +00:00
|
|
|
};
|
|
|
|
}
|