This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/flake.nix
James Patrick d7e2c0a924 Switching from hardcoded username.
Will this ever change? No like likely, but I do think that this is the
correct way to do this.
2022-08-14 19:35:15 -04:00

70 lines
1.7 KiB
Nix

{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus/v1.3.1";
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";
};
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{ self
, emacs-overlay
, home-manager
, nixos-hardware
, nixpkgs
, nur
, utils
, ...
}:
let
inherit (utils.lib) mkFlake;
inherit (self.lib.my) mapModules mapModulesRec';
in
mkFlake {
lib = nixpkgs.lib.extend (self: super: {
my = import ./lib {
inherit inputs;
pkgs = nixpkgs;
lib = self;
};
});
inherit self inputs;
supportedSystems = [ "x86_64-linux" ];
hosts = {
nil.modules = [ ./hosts/nil ];
};
channels.nixpkgs = {
input = nixpkgs;
overlaysBuilder = channels: [ ];
};
channelsConfig = { allowUnfree = true; };
sharedOverlays = [ nur.overlay (import ./pkgs) emacs-overlay.overlay ];
hostDefaults = {
specialArgs = {
inherit home-manager nixos-hardware;
user = { name = "james"; description = "James Patrick"; };
};
modules = mapModulesRec' ./modules import;
system = "x86_64-linux";
};
};
}