2022-11-20 16:23:58 +01:00
|
|
|
{
|
|
|
|
description = "reo101's NixOS, nix-on-droid and nix-on-darwin configs";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
# Nixpkgs
|
|
|
|
nixpkgs = {
|
|
|
|
# url = "github:nixos/nixpkgs/nixos-22.05";
|
|
|
|
url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Nix on Droid
|
|
|
|
nix-on-droid = {
|
|
|
|
# url = "github:t184256/nix-on-droid/release-22.05";
|
|
|
|
url = "github:t184256/nix-on-droid/master";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
|
|
|
};
|
|
|
|
|
2022-11-22 22:36:10 +01:00
|
|
|
# Nix Darwin
|
|
|
|
nix-darwin = {
|
|
|
|
url = "github:lnl7/nix-darwin/master";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2022-11-20 16:23:58 +01:00
|
|
|
# Home Manager
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/release-22.05";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
# hardware = {
|
|
|
|
# url = "github:nixos/nixos-hardware";
|
|
|
|
# };
|
|
|
|
|
|
|
|
# nix-colors = {
|
|
|
|
# url = "github:misterio77/nix-colors";
|
|
|
|
# };
|
|
|
|
|
|
|
|
neovim-nightly-overlay = {
|
|
|
|
url = "github:nix-community/neovim-nightly-overlay";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
zig-overlay = {
|
|
|
|
url = "github:mitchellh/zig-overlay";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-11-21 14:36:23 +01:00
|
|
|
|
|
|
|
zls-overlay = {
|
|
|
|
url = "github:zigtools/zls";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-11-20 16:23:58 +01:00
|
|
|
};
|
|
|
|
|
2022-11-25 13:53:13 +01:00
|
|
|
outputs =
|
|
|
|
{ self
|
|
|
|
, nixpkgs
|
|
|
|
, nix-on-droid
|
|
|
|
, nix-darwin
|
|
|
|
, home-manager
|
|
|
|
# , hardware
|
|
|
|
# , nix-colors
|
|
|
|
, neovim-nightly-overlay
|
|
|
|
, zig-overlay
|
|
|
|
, zls-overlay
|
|
|
|
, ...
|
|
|
|
} @ inputs:
|
2022-11-20 16:23:58 +01:00
|
|
|
let
|
2022-11-21 08:52:42 +01:00
|
|
|
inherit (self) outputs;
|
2022-11-21 08:53:32 +01:00
|
|
|
forAllSystems = nixpkgs.lib.genAttrs [
|
|
|
|
"aarch64-linux"
|
|
|
|
"i686-linux"
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-darwin"
|
|
|
|
"x86_64-darwin"
|
|
|
|
];
|
2022-11-20 16:23:58 +01:00
|
|
|
in
|
|
|
|
rec {
|
2022-11-21 08:53:32 +01:00
|
|
|
packages = forAllSystems (system:
|
|
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in import ./pkgs { inherit pkgs; }
|
|
|
|
);
|
2022-11-20 16:23:58 +01:00
|
|
|
|
2022-11-21 08:53:32 +01:00
|
|
|
devShells = forAllSystems (system:
|
|
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in import ./shell.nix { inherit pkgs; }
|
|
|
|
);
|
2022-11-20 16:23:58 +01:00
|
|
|
|
|
|
|
overlays = import ./overlays;
|
|
|
|
nixosModules = import ./modules/nixos;
|
|
|
|
nixOnDroidModules = import ./modules/nix-on-droid;
|
|
|
|
nixDarwinModules = import ./modules/nix-darwin;
|
|
|
|
homeManagerModules = import ./modules/home-manager;
|
|
|
|
|
|
|
|
nixosConfigurations = {
|
|
|
|
# arthur = nixpkgs.lib.nixosSystem {
|
|
|
|
# specialArgs = { inherit inputs outputs; };
|
|
|
|
# modules = [
|
|
|
|
# ./nixos/arthur/configuration.nix
|
|
|
|
# ];
|
|
|
|
# };
|
|
|
|
};
|
|
|
|
|
|
|
|
nixOnDroidConfigurations =
|
|
|
|
let mkHost = system: hostname: nix-on-droid.lib.nixOnDroidConfiguration {
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
|
|
|
|
overlays = [
|
|
|
|
nix-on-droid.overlays.default
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
modules = [
|
|
|
|
./nix-on-droid/${hostname}/configuration.nix
|
|
|
|
{ nix.registry.nixpkgs.flake = nixpkgs; }
|
|
|
|
] ++ (builtins.attrValues nixOnDroidModules);
|
|
|
|
|
|
|
|
extraSpecialArgs = {
|
2022-11-21 08:52:42 +01:00
|
|
|
inherit inputs outputs;
|
2022-11-20 16:23:58 +01:00
|
|
|
# rootPath = ./.;
|
|
|
|
};
|
|
|
|
|
|
|
|
home-manager-path = home-manager.outPath;
|
|
|
|
};
|
2022-11-25 13:53:13 +01:00
|
|
|
in
|
|
|
|
rec {
|
|
|
|
cheetah = mkHost "aarch64-linux" "cheetah";
|
2022-11-20 16:23:58 +01:00
|
|
|
|
2022-11-25 13:53:13 +01:00
|
|
|
default = cheetah;
|
|
|
|
};
|
2022-11-20 16:23:58 +01:00
|
|
|
|
2022-11-22 22:36:10 +01:00
|
|
|
darwinConfigurations =
|
2022-11-25 13:51:29 +01:00
|
|
|
let mkHost = system: hostname: users: nix-darwin.lib.darwinSystem {
|
2022-11-22 22:36:10 +01:00
|
|
|
inherit system;
|
|
|
|
modules = [
|
|
|
|
./nix-darwin/${hostname}/configuration.nix
|
2022-11-25 13:51:29 +01:00
|
|
|
home-manager.darwinModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = false;
|
|
|
|
useUserPackages = true;
|
|
|
|
users = nixpkgs.lib.attrsets.genAttrs
|
|
|
|
users
|
|
|
|
(user: import ./nix-darwin/${hostname}/home/${user}.nix);
|
|
|
|
|
|
|
|
extraSpecialArgs = { inherit inputs; };
|
|
|
|
};
|
|
|
|
}
|
2022-11-22 22:36:10 +01:00
|
|
|
] ++ (builtins.attrValues nixDarwinModules);
|
2022-11-24 01:14:51 +01:00
|
|
|
inputs = { inherit inputs outputs nix-darwin nixpkgs; };
|
2022-11-22 22:36:10 +01:00
|
|
|
};
|
2022-11-25 13:51:29 +01:00
|
|
|
in
|
|
|
|
rec {
|
|
|
|
apavel-a01 = mkHost "x86_64-darwin" "apavel-a01" [ "apavel" ];
|
|
|
|
};
|
2022-11-22 22:36:10 +01:00
|
|
|
|
2022-11-20 16:23:58 +01:00
|
|
|
homeConfigurations = {
|
|
|
|
# "nix-on-droid@cheetah" = home-manager.lib.homeManagerConfiguration {
|
|
|
|
# pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
|
|
# extraSpecialArgs = { inherit inputs outputs; };
|
|
|
|
# modules = [
|
|
|
|
# ./home-manager/home.nix
|
|
|
|
# ];
|
|
|
|
# };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|