puter/flake.nix

74 lines
1.8 KiB
Nix
Raw Normal View History

2024-02-04 20:51:11 +00:00
{
description = "My NixOS configuration";
inputs = {
2024-03-08 21:46:46 +00:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
2024-12-19 17:30:18 +00:00
devenv-root = {
url = "file+file:///dev/null";
flake = false;
};
devenv.url = "github:cachix/devenv";
2025-03-23 21:48:46 +00:00
hardware.url = "github:NixOS/nixos-hardware";
agenix.url = "github:ryantm/agenix";
2025-01-18 21:32:36 +00:00
phps.url = "github:fossar/nix-phps";
2025-03-01 21:21:00 +00:00
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.2";
flatpak.url = "github:gmodena/nix-flatpak?ref=latest";
2025-03-09 15:37:21 +00:00
nixpkgs.follows = "nixos-cosmic/nixpkgs";
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
2025-03-23 21:48:46 +00:00
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-02-04 20:51:11 +00:00
};
2024-03-08 21:46:46 +00:00
outputs = {
2024-12-01 16:52:52 +00:00
self,
2024-03-08 21:46:46 +00:00
nixpkgs,
flake-parts,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
2024-12-01 16:43:53 +00:00
imports = [
2024-12-19 17:30:18 +00:00
inputs.devenv.flakeModule
2024-12-01 16:43:53 +00:00
];
2024-03-08 21:46:46 +00:00
systems = ["x86_64-linux" "aarch64-linux"];
2024-12-01 16:52:52 +00:00
flake = {
2024-12-01 03:05:16 +00:00
lib = nixpkgs.lib.extend (import ./lib.nix);
2024-12-14 07:42:24 +00:00
nixosConfigurations = self.lib.genNixosConfigurations {inherit inputs;};
2024-02-04 20:51:11 +00:00
};
2024-03-08 21:46:46 +00:00
perSystem = {
pkgs,
2024-12-01 16:43:53 +00:00
inputs',
2025-03-23 21:48:46 +00:00
lib,
2024-03-08 21:46:46 +00:00
...
}: {
2024-12-19 17:30:18 +00:00
devenv.shells.default = {
devenv.root = let
devenvRootFileContent = builtins.readFile inputs.devenv-root.outPath;
in
2025-03-23 21:48:46 +00:00
lib.mkIf (devenvRootFileContent != "") devenvRootFileContent;
2024-02-04 20:51:11 +00:00
2024-12-19 17:30:18 +00:00
name = "puter";
2024-12-01 16:43:53 +00:00
2024-12-19 17:30:18 +00:00
imports = [
./devenv.nix
2024-12-01 16:43:53 +00:00
];
packages = [
inputs'.agenix.packages.agenix
];
};
2024-04-21 17:55:29 +00:00
2025-03-23 21:48:46 +00:00
packages = lib.packagesFromDirectoryRecursive {
2025-03-09 15:37:21 +00:00
inherit (pkgs) callPackage;
directory = ./packages;
};
2024-02-04 20:51:11 +00:00
};
2024-03-08 21:46:46 +00:00
};
2024-02-04 20:51:11 +00:00
}