70 lines
2.1 KiB
Text
70 lines
2.1 KiB
Text
{
|
|
description = "Configuration for NixOS";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
# flake-parts.url = "github:hercules-ci/flake-parts";
|
|
};
|
|
# https://nix.dev/tutorials/nix-language.html#named-attribute-set-argument
|
|
outputs = inputs@{self, nixpkgs, nixos-hardware, home-manager, sops-nix, ...}:
|
|
let
|
|
lib = import ./lib { inherit (nixpkgs) lib; };
|
|
in
|
|
{
|
|
# NOTE: Run `nix flake show` to see what this flake has to offer.
|
|
# TODO: Enable automated formatting with numtide/treefmt-nix
|
|
# `nixos-rebuild switch --flake .#<hostname>`
|
|
nixosConfigurations = {
|
|
neon = nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit inputs; };
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./hosts/neon
|
|
];
|
|
};
|
|
#lithium = nixpkgs.lib.nixosSystem {
|
|
#specialArgs = { inherit inputs; };
|
|
#system = "x86_64-linux";
|
|
#modules = [
|
|
#./hosts/lithium
|
|
#];
|
|
#};
|
|
lithium = lib.mkSystem {
|
|
users = [
|
|
{ name = "jml"; }
|
|
];
|
|
};
|
|
};
|
|
homeConfigurations = {
|
|
"jml" = home-manager.lib.homeManagerConfiguration {
|
|
modules = [
|
|
./users/jml/home.nix
|
|
];
|
|
};
|
|
};
|
|
# TODO: Implement a dev shell for working on this repository.
|
|
# Personally I'm using hx, nil, and git-agecrypt
|
|
# The only thing totally necessary which isn't captured by the flake inputs
|
|
# is git-agecrypt so that should be included here or somehow in the flake.
|
|
devShells.x86_64-linux.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
nixpkgs-fmt
|
|
sops
|
|
age
|
|
git-agecrypt
|
|
];
|
|
shellHook = ''
|
|
echo "ready to rock"
|
|
'';
|
|
};
|
|
# `nix run .#name` and `nix build .#name`
|
|
# packages = {};
|
|
# `home-manager switch`
|
|
# homeConfigurations = {};
|
|
};
|
|
}
|