dotfiles/flake.nix

67 lines
1.7 KiB
Nix
Raw Normal View History

2023-04-25 19:21:03 +00:00
{
description = "Your new nix config";
outputs = {
self,
nixpkgs,
...
}: let
2023-04-25 19:21:03 +00:00
forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
"x86_64-linux"
#"i686-linux"
#"aarch64-darwin"
#"x86_64-darwin"
2023-04-25 19:21:03 +00:00
];
in {
# Entrypoint for NixOS configurations
nixosConfigurations = import ./hosts {inherit self;};
# devshells that are provided by this flake
# adding more packages to buildInputs makes them available
# while inside the devshell - enetered via `nix develop`
2023-04-25 19:21:03 +00:00
devShells = forAllSystems (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
buildInputs = with pkgs; [
alejandra # opionated Nix formatter
# example of bootstrapping self-contained shell
# applications for your flake
# this adds an `update` command to your shell
# which'll update all inputs and commit
(writeShellApplication {
name = "update";
text = ''
nix flake update && git commit flake.lock -m "flake: bump inputs"
'';
})
];
};
}
2023-04-25 19:21:03 +00:00
);
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
};
2023-04-25 20:10:57 +00:00
inputs = {
# Nixpkgs (unstable)
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2023-04-25 19:21:03 +00:00
# Home manager
home-manager.url = "github:nix-community/home-manager/";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2023-04-25 19:21:03 +00:00
# nixos-hardware
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
2024-05-29 13:39:33 +00:00
hyprland.url = "github:hyprwm/Hyprland?submodules=1";
2024-05-29 13:39:33 +00:00
nvf = {
url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs";
2023-04-25 19:21:03 +00:00
};
};
}