summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--flake.nix81
1 files changed, 45 insertions, 36 deletions
diff --git a/flake.nix b/flake.nix
index c1538c4..292e2a0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -14,7 +14,8 @@
};
outputs =
- { self, nixpkgs, unstable, home-manager, nur, impermanence, hm-isolation, ... }: let
+ { self, nixpkgs, unstable, home-manager, nur, impermanence, hm-isolation, ... }:
+ let
system = "x86_64-linux";
pkgs = pkgsNoLocal.extend self.overlays.default;
@@ -31,7 +32,9 @@
inherit (util pkgs.lib) importAll;
local = import ./pkgs;
- in with pkgs.lib; {
+ in
+ with pkgs.lib; {
+ formatter.${system} = pkgs.nixpkgs-fmt;
packages.${system} = local pkgs pkgsNoLocal;
overlays.default = final: prev: {
@@ -39,45 +42,51 @@
unstable = (importPkgs unstable).extend self.overlays.default;
};
- nixosConfigurations = let
- hostConfig = host: (makeOverridable nixpkgs.lib.nixosSystem) {
- inherit pkgs system;
+ nixosConfigurations =
+ let
+ hostConfig = host: (makeOverridable nixpkgs.lib.nixosSystem) {
+ inherit pkgs system;
- modules = [
- ./sys
- host
- nixpkgs.nixosModules.notDetected
- impermanence.nixosModule
- ];
- };
- in mapAttrs (_: hostConfig) (importAll { root = ./sys/platform; });
+ modules = [
+ ./sys
+ host
+ nixpkgs.nixosModules.notDetected
+ impermanence.nixosModule
+ ];
+ };
+ in
+ mapAttrs (_: hostConfig) (importAll { root = ./sys/platform; });
- homeConfigurations = let
- registry = { ... }: {
- config.nix.registry = {
- "nixpkgs".flake = nixpkgs;
- "unstable".flake = unstable;
- "nur".flake = nur;
+ homeConfigurations =
+ let
+ registry = { ... }: {
+ config.nix.registry = {
+ "nixpkgs".flake = nixpkgs;
+ "unstable".flake = unstable;
+ "nur".flake = nur;
+ };
};
- };
- home = platform: home-manager.lib.homeManagerConfiguration {
- inherit pkgs;
+ home = platform: home-manager.lib.homeManagerConfiguration {
+ inherit pkgs;
- modules = [
- ./home
- platform
- registry
- hm-isolation.homeManagerModule
- ];
- };
+ modules = [
+ ./home
+ platform
+ registry
+ hm-isolation.homeManagerModule
+ ];
+ };
- platformHome = name: platform: let
- value = home platform;
- in {
- inherit value;
- name = "${value.config.home.username}@${name}";
- };
- in mapAttrs' platformHome (importAll { root = ./home/platform; });
+ platformHome = name: platform:
+ let
+ value = home platform;
+ in
+ {
+ inherit value;
+ name = "${value.config.home.username}@${name}";
+ };
+ in
+ mapAttrs' platformHome (importAll { root = ./home/platform; });
};
}