formatting :3
This commit is contained in:
parent
21f83eb26d
commit
e3d2db48bb
1 changed files with 21 additions and 50 deletions
71
flake.nix
71
flake.nix
|
@ -10,40 +10,21 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
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;
|
||||||
allowLocalDeployment = true;
|
allowLocalDeployment = true;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit lib;
|
inherit lib;
|
||||||
|
@ -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 =
|
|
||||||
{
|
{
|
||||||
meta = {
|
default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ nix colmena git pkgs.home-manager ]; };
|
||||||
description = "All my NixoS machines";
|
});
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
nixpkgs = import nixpkgs {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
overlays = [ ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
bengal = mkHost { hostname = "bengal"; };
|
colmena = {
|
||||||
|
meta = {
|
||||||
maine-coon = mkHost { hostname = "maine-coon"; };
|
description = "All my NixoS machines";
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
nixpkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bengal = mkHost { hostname = "bengal"; };
|
||||||
|
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 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue