279 lines
7.0 KiB
Nix
279 lines
7.0 KiB
Nix
{
|
|
description = "Michael Thomas's NixOS configuration";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-24.05";
|
|
unstable.url = "nixpkgs/nixos-unstable";
|
|
nur.url = "github:nix-community/NUR";
|
|
|
|
home-manager = {
|
|
url = "github:rycee/home-manager/release-24.05";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
darwin = {
|
|
url = "github:lnl7/nix-darwin/master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
utils.url = "github:numtide/flake-utils";
|
|
nixvim = {
|
|
# url = "github:nix-community/nixvim/nixos-24.05";
|
|
url = "github:nix-community/nixvim";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
|
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
|
ironbar = {
|
|
url = "github:JakeStanger/ironbar";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
agenix = {
|
|
url = "github:ryantm/agenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nixos-wsl = {
|
|
url = "github:nix-community/NixOS-WSL";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
vscode-server = {
|
|
url = "github:nix-community/nixos-vscode-server";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
unstable,
|
|
nur,
|
|
agenix,
|
|
utils,
|
|
rust-overlay,
|
|
nix-vscode-extensions,
|
|
nixos-wsl,
|
|
vscode-server,
|
|
darwin,
|
|
home-manager,
|
|
...
|
|
} @ inputs: let
|
|
forAllSystems = nixpkgs.lib.genAttrs utils.lib.defaultSystems;
|
|
|
|
defaultModules = [
|
|
self.overlaysModule
|
|
home-manager.nixosModules.home-manager
|
|
./modules
|
|
];
|
|
|
|
baseHomeModule = {
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.extraSpecialArgs = {inherit inputs;};
|
|
};
|
|
in {
|
|
# Your custom packages
|
|
# Accessible through 'nix build', 'nix shell', etc
|
|
packages = forAllSystems (system:
|
|
import ./pkgs {
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
inherit inputs;
|
|
});
|
|
|
|
overlays = import ./overlays {inherit inputs;};
|
|
|
|
overlaysModule = {
|
|
nixpkgs.overlays = builtins.attrValues self.overlays;
|
|
};
|
|
|
|
nixosConfigurations = let
|
|
fullNixOSModules =
|
|
defaultModules
|
|
++ [
|
|
baseHomeModule
|
|
{
|
|
home-manager.users.michael = import ./user/environments/nixos/home.nix;
|
|
}
|
|
];
|
|
in {
|
|
kitchen = nixpkgs.lib.nixosSystem {
|
|
system = utils.lib.system.x86_64-linux;
|
|
modules =
|
|
fullNixOSModules
|
|
++ [
|
|
./modules/common.nix
|
|
./modules/containers.nix
|
|
|
|
./machines/kitchen/configuration.nix
|
|
];
|
|
specialArgs = {inherit inputs;};
|
|
};
|
|
|
|
thinkcentre = nixpkgs.lib.nixosSystem {
|
|
system = utils.lib.system.x86_64-linux;
|
|
modules =
|
|
fullNixOSModules
|
|
++ [
|
|
./modules/common.nix
|
|
./modules/hyprland.nix
|
|
./modules/containers.nix
|
|
|
|
./machines/thinkcentre/configuration.nix
|
|
agenix.nixosModules.default
|
|
{
|
|
environment.systemPackages = [
|
|
agenix.packages.x86_64-linux.default
|
|
];
|
|
}
|
|
];
|
|
specialArgs = {inherit inputs;};
|
|
};
|
|
|
|
terra = nixpkgs.lib.nixosSystem {
|
|
system = utils.lib.system.x86_64-linux;
|
|
modules =
|
|
fullNixOSModules
|
|
++ [
|
|
./modules/common.nix
|
|
./modules/hyprland.nix
|
|
./modules/containers.nix
|
|
./modules/applications/steam
|
|
|
|
./machines/terra/configuration.nix
|
|
agenix.nixosModules.default
|
|
{
|
|
environment.systemPackages = [
|
|
agenix.packages.x86_64-linux.default
|
|
];
|
|
}
|
|
];
|
|
specialArgs = {inherit inputs;};
|
|
};
|
|
|
|
oracle = nixpkgs.lib.nixosSystem {
|
|
system = utils.lib.system.x86_64-linux;
|
|
modules =
|
|
defaultModules
|
|
++ [
|
|
./modules/nix.nix
|
|
baseHomeModule
|
|
{
|
|
home-manager.users.michael = import ./user/environments/nixos-server/home.nix;
|
|
}
|
|
agenix.nixosModules.default
|
|
{
|
|
environment.systemPackages = [
|
|
agenix.packages.x86_64-linux.default
|
|
];
|
|
}
|
|
|
|
./machines/oracle/configuration.nix
|
|
];
|
|
specialArgs = {inherit inputs;};
|
|
};
|
|
|
|
# WSL environment
|
|
work = inputs.nixpkgs.lib.nixosSystem {
|
|
system = utils.lib.system.x86_64-linux;
|
|
modules =
|
|
defaultModules
|
|
++ [
|
|
vscode-server.nixosModules.default
|
|
./modules/containers.nix
|
|
./modules/nix.nix
|
|
|
|
./machines/work/configuration.nix
|
|
];
|
|
specialArgs = {inherit inputs;};
|
|
};
|
|
};
|
|
|
|
darwinConfigurations = {
|
|
mac = darwin.lib.darwinSystem {
|
|
system = "aarch64-darwin";
|
|
specialArgs = {inherit inputs;};
|
|
modules = [
|
|
self.overlaysModule
|
|
home-manager.darwinModules.home-manager
|
|
baseHomeModule
|
|
{
|
|
home-manager.users.michael = import ./user/environments/mac/home.nix;
|
|
}
|
|
|
|
./modules/yabai.nix
|
|
./machines/mac/configuration.nix
|
|
];
|
|
};
|
|
};
|
|
|
|
homeConfigurations = {
|
|
nixos = inputs.home-manager.lib.homeManagerConfiguration {
|
|
system = "x86_64-linux";
|
|
homeDirectory = "/home/michael";
|
|
username = "michael";
|
|
stateVersion = "21.05";
|
|
configuration = {
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
programs.home-manager.enable = true;
|
|
|
|
imports = [
|
|
./user/environments/nixos/home.nix
|
|
];
|
|
};
|
|
};
|
|
|
|
wsl = inputs.home-manager.lib.homeManagerConfiguration {
|
|
system = "x86_64-linux";
|
|
homeDirectory = "/home/michael";
|
|
username = "michael";
|
|
stateVersion = "21.05";
|
|
configuration = {
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
programs.home-manager.enable = true;
|
|
|
|
imports = [
|
|
./user/environments/wsl/home.nix
|
|
];
|
|
};
|
|
};
|
|
|
|
mac = inputs.home-manager.lib.homeManagerConfiguration {
|
|
system = "aarch64-darwin";
|
|
homeDirectory = "/Users/michael";
|
|
username = "michael";
|
|
stateVersion = "22.05";
|
|
configuration = {
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
programs.home-manager.enable = true;
|
|
|
|
imports = [
|
|
./user/environments/mac/home.nix
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
# // utils.lib.eachSystem [ "aarch64-linux" "x86_64-darwin" "x86_64-linux" ] (system: {
|
|
# nixpkgs = import nixpkgs {
|
|
# inherit system;
|
|
# overlays = [
|
|
# self.overlays.default
|
|
# ];
|
|
# config.allowUnfree = true;
|
|
# };
|
|
# });
|
|
}
|