about summary refs log tree commit diff stats
path: root/flake.nix
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-02-20 10:52:59 +0100
committerene <ene@sils.li>2023-02-20 10:52:59 +0100
commit810e9528f35d8418b4480632a2d73668f292e306 (patch)
tree710c7c0acb706d57f6f0d75770189255798b247b /flake.nix
parentFix(bootstrap): Record the dependencies (diff)
downloadnixos-config-810e9528f35d8418b4480632a2d73668f292e306.tar.gz
nixos-config-810e9528f35d8418b4480632a2d73668f292e306.zip
Fix(flake): Rebase to a good base
Diffstat (limited to '')
-rw-r--r--flake.nix104
1 files changed, 99 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix
index 4509c80b..dfb356d7 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,14 +2,108 @@
 {
   description = "Nixos system config";
 
-  inputs = import ./flake/inputs;
+  inputs = {
+    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+    home-manager = {
+      url = "github:nix-community/home-manager/master";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+
+    agenix = {
+      url = "github:ryantm/agenix";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+    impermanence = {
+      url = "github:nix-community/impermanence";
+    };
+
+    neovim_config = {
+      url = "git+https://codeberg.org/ene/neovim-config.git";
+      flake = false;
+    };
+
+    strip_js_comments = {
+      url = "git+https://codeberg.org/ene/strip_js_comments.git";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+    shell-library = {
+      url = "git+https://git.sils.li/ene/lib-sh.git";
+      flake = false;
+    };
+    user_js = {
+      url = "github:arkenfox/user.js";
+      flake = false;
+    };
+    snap-sync = {
+      url = "github:qubidt/snap-sync";
+      flake = false;
+    };
+  };
 
-  outputs = {self, ...} @ inputs: let
-    pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
+  outputs = {
+    self,
+    nixpkgs,
+    home-manager,
+    neovim_config,
+    strip_js_comments,
+    user_js,
+    impermanence,
+    agenix,
+    snap-sync,
+    shell-library,
+    ...
+  } @ inputs: let
+    # pkgs = nixpkgs.legacyPackages.x86_64-linux;
+    sysLib = import ./lib {inherit pkgs shell-library;};
     system = "x86_64-linux";
+    pkgs = import inputs.nixpkgs {
+      inherit system;
+      config = {
+        allowUnfreePredicate = pkg:
+          builtins.elem (inputs.nixpkgs.lib.getName pkg) [
+            "steam"
+            "steam-original"
+          ];
+      };
+    };
   in {
-    nixosConfigurations =
-      import ./outputs/nixosConfigurations {inherit inputs system;};
+    nixosConfigurations.tiamat = nixpkgs.lib.nixosSystem {
+      inherit system;
+      specialArgs =
+        pkgs.lib.recursiveUpdate inputs
+        sysLib;
+      modules = [
+        ./hosts/tiamat/configuration.nix
+        agenix.nixosModules.default
+
+        home-manager.nixosModules.home-manager
+        {
+          home-manager = {
+            useGlobalPkgs = true;
+            useUserPackages = true;
+            users.soispha = import ./home-manager;
+            extraSpecialArgs = {
+              inherit
+                pkgs
+                sysLib
+                strip_js_comments
+                user_js
+                system
+                neovim_config
+                impermanence
+                snap-sync
+                ;
+            };
+          };
+        }
+      ];
+    };
+
+    nixosConfigurations.mammun = self.outputs.nixosConfigurations.tiamat;
+    nixosConfigurations.spawn = nixpkgs.lib.nixosSystem {
+      specialArgs = inputs;
+      modules = [./hosts/spawn/configuration.nix];
+    };
 
     packages."${system}" = {
       install = import ./bootstrap/install {