formatting :3

This commit is contained in:
CherryKitten 2024-03-24 19:02:30 +01:00
parent 21f83eb26d
commit e3d2db48bb
Signed by: sammy
GPG key ID: 98D8F75FB0658276

View file

@ -10,34 +10,15 @@
}; };
outputs = outputs =
inputs @ { self inputs @ { self, nixpkgs, nixpkgs-unstable, home-manager, ... }:
, nixpkgs
, nixpkgs-unstable
, home-manager
, ...
}:
let let
inherit (self) outputs; inherit (self) outputs;
systems = [ systems = [ "aarch64-linux" "i686-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
"aarch64-linux"
"i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
forEachSystem = f: lib.genAttrs systems (system: f); forEachSystem = f: lib.genAttrs systems (system: f);
forAllSystems = lib.genAttrs systems; forAllSystems = lib.genAttrs systems;
lib = nixpkgs.lib // home-manager.lib; lib = nixpkgs.lib // home-manager.lib;
mkHost = mkHost = { hostname, user ? "sammy", }: {
{ hostname imports = [ ./hosts/${hostname}/configuration.nix ./modules/nixos/common.nix (import "${home-manager}/nixos") ];
, user ? "sammy"
,
}: {
imports = [
./hosts/${hostname}/configuration.nix
./modules/nixos/common.nix
(import "${home-manager}/nixos")
];
deployment = { deployment = {
targetUser = user; targetUser = user;
@ -51,34 +32,25 @@
devShells = forAllSystems (system: devShells = forAllSystems (system:
let pkgs = import nixpkgs { system = system; }; in let pkgs = import nixpkgs { system = system; }; in
{ default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ nix colmena git pkgs.home-manager ]; }; });
colmena =
{ {
default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ nix colmena git pkgs.home-manager ]; };
});
colmena = {
meta = { meta = {
description = "All my NixoS machines"; description = "All my NixoS machines";
specialArgs = { inherit inputs outputs; }; specialArgs = { inherit inputs outputs; };
nixpkgs = import nixpkgs { nixpkgs = import nixpkgs { system = "x86_64-linux"; };
system = "x86_64-linux";
overlays = [ ];
};
}; };
bengal = mkHost { hostname = "bengal"; }; bengal = mkHost { hostname = "bengal"; };
maine-coon = mkHost { hostname = "maine-coon"; }; maine-coon = mkHost { hostname = "maine-coon"; };
}; };
nixosConfigurations.test = nixpkgs.lib.nixosSystem { nixosConfigurations.test = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { specialArgs = { inherit inputs outputs; };
flake = self; modules = [ ./modules ./hosts/test-vm/configuration.nix (import "${home-manager}/nixos") ];
};
modules = [
./modules
./hosts/test-vm/configuration.nix
(import "${home-manager}/nixos")
];
}; };
homeConfigurations.sammy = homeConfigurations.sammy =
@ -89,6 +61,5 @@
inherit pkgs; inherit pkgs;
modules = [ ./modules/users/sammy.nix ]; modules = [ ./modules/users/sammy.nix ];
}; };
}; };
} }