-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
37 lines (32 loc) · 1.18 KB
/
flake.nix
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
{
description = "A simple NixOS flake";
inputs = {
# NixOS official package source, here using the nixos-23.11 branch
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
};
# The `self` parameter is special, it refers to
# the attribute set returned by the `outputs` function itself.
outputs = { self, nixpkgs, ... }@inputs: {
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
# The host with the hostname `my-nixos` will use this configuration
nixosConfigurations.c-nixos = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
./configuration.nix
];
};
nixosModules.default = import ./modules/default.nix;
overlays.default = import ./overlay.nix;
packages.x86_64-linux.default =
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
install-script = pkgs.writeShellScriptBin "install.sh" (builtins.readFile ./install.sh);
in
pkgs.symlinkJoin {
name = "install.sh";
paths = [ install-script pkgs.nixos-rebuild ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = "wrapProgram $out/bin/install.sh --prefix PATH : $out/bin";
};
};
}