dotfiles/flake.nix

117 lines
3.3 KiB
Nix
Raw Normal View History

2024-01-05 18:42:21 +01:00
{
2024-01-06 18:40:20 +01:00
description = "Geoffrey Frogeye's base configurations";
2024-01-05 18:42:21 +01:00
inputs = {
2024-01-06 18:40:20 +01:00
nixpkgs.url = "nixpkgs/nixos-23.11";
# OS
disko = {
url = "disko";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "nixos-hardware";
2024-01-16 22:39:29 +01:00
# NOD
nix-on-droid = {
2024-01-16 23:27:15 +01:00
url = "github:nix-community/nix-on-droid/release-23.05"; # No 23.11 :(
2024-01-16 22:39:29 +01:00
inputs.nixpkgs.follows = "nixpkgs";
2024-01-16 23:27:15 +01:00
inputs.home-manager.follows = "home-manager";
2024-01-16 22:39:29 +01:00
};
2024-01-06 18:40:20 +01:00
# HM
home-manager = {
url = "home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim/c96d7b46d05a78e695ed1c725d1596b65509b4f9";
# 24.05 Anything after this commit works
inputs.nixpkgs.follows = "nixpkgs";
};
nixgl = {
url = "github:guibou/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
2024-01-05 18:42:21 +01:00
};
2024-01-16 22:39:29 +01:00
outputs = { self, nixpkgs, disko, nixos-hardware, nix-on-droid, home-manager, stylix, nixvim, nixgl, nur, ... }:
2024-01-06 18:40:20 +01:00
let
nixpkgsConfig = {
overlays = [
nixgl.overlay
];
config.allowUnfree = true;
};
2024-01-06 18:40:20 +01:00
lib = {
2024-01-16 22:39:29 +01:00
nixosSystem = { system, modules ? [ ] }: nixpkgs.lib.nixosSystem {
2024-01-06 18:40:20 +01:00
inherit system;
modules = modules ++ [
self.nixosModules.dotfiles
{
nixpkgs = nixpkgsConfig;
2024-01-06 18:40:20 +01:00
home-manager.sharedModules = [ self.homeManagerModules.dotfiles ];
}
];
};
2024-01-16 22:39:29 +01:00
nixOnDroidConfiguration = { modules ? [ ] }: nix-on-droid.lib.nixOnDroidConfiguration {
pkgs = import nixpkgs (nixpkgsConfig // {
system = "aarch64-linux"; # nod doesn't support anything else
});
2024-01-16 22:39:29 +01:00
modules = modules ++ [
self.nixOnDroidModules.dotfiles
{
home-manager.sharedModules = [ self.homeManagerModules.dotfiles ];
}
];
};
homeManagerConfiguration = { system, modules ? [ ] }: home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs (nixpkgsConfig // {
2024-01-06 18:40:20 +01:00
inherit system;
});
2024-01-06 18:40:20 +01:00
modules = modules ++ [ self.homeManagerModules.dotfiles ];
};
};
in
{
lib = lib;
nixosModules.dotfiles = {
imports = [
./os
disko.nixosModules.disko
home-manager.nixosModules.home-manager
];
};
2024-01-16 22:39:29 +01:00
nixOnDroidModules.dotfiles = {
imports = [
./nod
# home-manager is included
2024-01-16 22:39:29 +01:00
];
};
2024-01-06 18:40:20 +01:00
homeManagerModules.dotfiles = {
imports = [
./hm
stylix.homeManagerModules.stylix
nixvim.homeManagerModules.nixvim
nur.hmModules.nur
2024-01-06 18:40:20 +01:00
];
};
nixosConfigurations.curacao = lib.nixosSystem {
system = "x86_64-linux";
modules = [
./curacao/os.nix
nixos-hardware.nixosModules.dell-g3-3779
];
};
nixosConfigurations.pindakaas = lib.nixosSystem {
system = "aarch64-linux";
modules = [
./pindakaas/os.nix
nixos-hardware.nixosModules.pine64-pinebook-pro
];
};
2024-01-16 22:39:29 +01:00
nixOnDroidConfigurations.sprinkles = lib.nixOnDroidConfiguration { };
2024-01-05 18:42:21 +01:00
};
}