blob: 5e79ce243385f29e4025fbf50e4a3926003a2a6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
{
description = "Your new nix config";
outputs = {
self,
nixpkgs,
...
}: let
forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
"x86_64-linux"
#"i686-linux"
#"aarch64-darwin"
#"x86_64-darwin"
];
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`
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"
'';
})
];
};
}
);
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
};
inputs = {
# Nixpkgs (unstable)
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Home manager
home-manager.url = "github:nix-community/home-manager/";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# nixos-hardware
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
hyprland.url = "github:hyprwm/Hyprland?submodules=1";
nvf = {
url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
|