nix/flake.nix
2022-02-03 06:46:44 -05:00

110 lines
3.7 KiB
Nix

{
description = "A highly structured configuration database.";
nixConfig.extra-experimental-features = "nix-command flakes";
nixConfig.extra-substituters = "https://nrdxp.cachix.org https://nix-community.cachix.org";
nixConfig.extra-trusted-public-keys = "nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
inputs = {
nixos.url = "github:nixos/nixpkgs/release-21.11";
latest.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
alejandra.url = "github:kamadorueda/alejandra";
alejandra.inputs.nixpkgs.follows = "nixpkgs";
emacs.url = "github:nix-community/emacs-overlay";
emacs.inputs.nixpkgs.follows = "nixpkgs";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
flake-utils.inputs.nixpkgs.follows = "nixpkgs";
home.url = "github:nix-community/home-manager";
home.inputs.nixpkgs.follows = "nixpkgs";
naersk.url = "github:nmattia/naersk";
naersk.inputs.nixpkgs.follows = "nixpkgs";
neovim.url = "github:nix-community/neovim-nightly-overlay";
neovim.inputs.nixpkgs.follows = "nixpkgs";
# nur.url = "github:nix-community/NUR";
# nur.inputs.nixpkgs.follows = "nixpkgs";
# poetry2nix.url = "github:nix-community/poetry2nix";
# poetry2nix.inputs.nixpkgs.follows = "nixpkgs";
statix.url = "github:nerdypepper/statix";
statix.inputs.nixpkgs.follows = "nixpkgs";
# vim-plugins.url = "github:m15a/nixpkgs-vim-extra-plugins";
# vim-plugins.inputs.nixpkgs.follows = "nixpkgs";
wayland.url = "github:nix-community/nixpkgs-wayland";
wayland.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
inputs @
{ self
, nixos
, latest
, nixpkgs
, nixos-hardware
, agenix
, alejandra
, emacs
, fenix
, flake-utils
, home
, neovim
# , nur
# , poetry2nix
, statix
# , vim-plugins
, wayland
, ...
}:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
# system = "x86_64-linux";
config.allowUnfree = true;
overlays = [
agenix.overlay
emacs.overlay
fenix.overlay
neovim.overlay
# (import inputs.nur)
# (import inputs.vim-plugins)
];
};
in
{
nixosConfigurations = {
zaphod = nixpkgs.lib.nixosSystem
{
inherit system;
# system = "x86_64-linux";
specialArgs = { inherit inputs pkgs; };
modules = (
[
./hosts/zaphod.nix
./modules/hm-system-defaults.nix
./modules/nix-path.nix
home.nixosModules.home-manager
agenix.nixosModules.age
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mrhedgehog = import ./home/mrhedgehog.nix {
inherit self pkgs inputs;
};
}
]
);
};
};
homeConfigurations = {
mrhedgehog = inputs.home.lib.homeManagerConfiguration {
# inherit system;
# system = "x86_64-linux";
homeDirectory = "/home/mrhedgehog";
username = "mrhedgehog";
configuration.imports = [ ./home/mrhedgehog.nix { inherit pkgs; } ];
};
};
};
}