summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2026-11-29 17:24:18 +0100
committerquentin@aristote.fr <quentin@aristote.fr>2026-11-29 17:42:35 +0100
commitce831333a24011d0692f6871047fe74eab9fab8c (patch)
tree9bb971e2afe0a4b22c73274e8b8e8d05d014401d /flake.nix
downloadhermaphroditos-ce831333a24011d0692f6871047fe74eab9fab8c.tar.gz
hermaphroditos-ce831333a24011d0692f6871047fe74eab9fab8c.tar.bz2
hermaphroditos-ce831333a24011d0692f6871047fe74eab9fab8c.tar.xz
initial commit
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..ca34236
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,55 @@
+{
+ inputs = {
+ personal-webpage = {
+ url = "git+https://git.aristote.fr/about-me/webpage";
+ inputs.nixpkgs.follows = "/nixpkgs";
+ };
+ my-nixpkgs.url = "git+https://git.aristote.fr/nix/my-nixpkgs";
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
+ };
+
+ outputs =
+ {
+ nixpkgs,
+ my-nixpkgs,
+ nixos-hardware,
+ personal-webpage,
+ ...
+ }:
+ {
+ nixosConfigurations =
+ let
+ system = "x86_64-linux";
+ commonModules = [
+ my-nixpkgs.nixosModules.personal
+ (
+ { ... }:
+ {
+ nixpkgs.overlays = [
+ (self: _: {
+ personal = { inherit (personal-webpage.packages."${self.stdenv.hostPlatform.system}") webpage; };
+ })
+ # TODO the order shouldn't matter, yet this overlay doesn't work
+ # if it comes first
+ my-nixpkgs.overlays.personal
+ ];
+ }
+ )
+ ];
+ in
+ {
+ hermaphroditos = nixpkgs.lib.nixosSystem {
+ inherit system;
+ specialArgs = { inherit nixos-hardware; };
+ modules = commonModules ++ [
+ ./config
+ ./config/hardware
+ ];
+ };
+ hermaphroditos-test = nixpkgs.lib.nixosSystem {
+ inherit system;
+ modules = commonModules ++ [ ./tests/configuration.nix ];
+ };
+ };
+ };
+}