35 lines
1.0 KiB
Nix
35 lines
1.0 KiB
Nix
|
{
|
||
|
description = "Matabas — databas för mat";
|
||
|
|
||
|
inputs = {
|
||
|
nixpkgs.url = "github:NixOs/nixpkgs/nixos-23.05";
|
||
|
flake-utils.url = "github:numtide/flake-utils";
|
||
|
};
|
||
|
|
||
|
outputs = { self, flake-utils, nixpkgs }:
|
||
|
flake-utils.lib.eachDefaultSystem (system:
|
||
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||
|
in rec {
|
||
|
packages = rec {
|
||
|
hello = pkgs.hello;
|
||
|
default = hello;
|
||
|
};
|
||
|
devShells.default = pkgs.mkShell {
|
||
|
packages = [ packages.default ];
|
||
|
};
|
||
|
}
|
||
|
) // {
|
||
|
nixosConfigurations.matabas-container =
|
||
|
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||
|
in nixpkgs.lib.nixosSystem {
|
||
|
system = "x86_64-linux";
|
||
|
modules = [({ pkgs, ... }: {
|
||
|
boot.isContainer = true;
|
||
|
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
||
|
system.stateVersion = "23.05";
|
||
|
environment.systemPackages = [ self.packages.x86_64-linux.default ];
|
||
|
})];
|
||
|
};
|
||
|
};
|
||
|
}
|