summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2022-12-20 22:29:55 +0100
committerQuentin Aristote <quentin@aristote.fr>2022-12-20 22:29:55 +0100
commit95644485ac1402a8dc84c520a3ded7b29720f950 (patch)
treec124a795dba03106cadff1645c532f6251898f86 /flake.nix
parent51df83cffaa45130f94bf5ab78b6b14fbb37ec4d (diff)
parent9bde3c4624eb916bafcf9a18792edb42e3a25a17 (diff)
Merge branch 'master' into searx-engine-alternativeto
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..ac3ee30
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,41 @@
+{
+ inputs = {
+ personal-webpage = {
+ url = "github:qaristote/webpage";
+ inputs = {
+ nixpkgs.follows = "/nixpkgs";
+ flake-utils.follows = "/flake-utils";
+ };
+ };
+ };
+
+ outputs = { self, nixpkgs, personal-webpage, flake-utils, ... }@attrs:
+ flake-utils.lib.eachDefaultSystem (system: {
+ overlays.default = final: prev: {
+ personal = import ./pkgs { pkgs = final; } // {
+ webpage = personal-webpage.defaultPackage."${system}";
+ };
+ };
+ }) // {
+ nixosModules.default = import ./modules;
+ nixosConfigurations = let
+ system = "x86_64-linux";
+ specialArgs = attrs;
+ commonModules = [
+ self.nixosModules.default
+ ({ ... }: {
+ nixpkgs.overlays = [ self.overlays."${system}".default ];
+ })
+ ];
+ in {
+ hermes = nixpkgs.lib.nixosSystem {
+ inherit system specialArgs;
+ modules = commonModules ++ [ ./config ./hardware-configuration.nix ];
+ };
+ hermes-test = nixpkgs.lib.nixosSystem {
+ inherit system specialArgs;
+ modules = commonModules ++ [ ./tests/configuration.nix ];
+ };
+ };
+ };
+}