Caesium refactors flake
This commit is contained in:
@@ -2,123 +2,163 @@
|
||||
description = "A very basic flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
|
||||
mac-app-util.url = "github:hraban/mac-app-util";
|
||||
|
||||
darwin.url = "github:lnl7/nix-darwin/master";
|
||||
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||
nixpkgsUnstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
nixos-hardware = {
|
||||
url = "github:NixOS/nixos-hardware/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
url = "github:nix-community/home-manager/release-26.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager-darwin = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||
};
|
||||
|
||||
mac-app-util = {
|
||||
url = "github:hraban/mac-app-util";
|
||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||
};
|
||||
|
||||
nix-darwin = {
|
||||
url = "github:nix-darwin/nix-darwin/master";
|
||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||
};
|
||||
|
||||
nix-vscode-extensions = {
|
||||
url = "github:nix-community/nix-vscode-extensions";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||
};
|
||||
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
||||
nix-flatpak = {
|
||||
url = "github:gmodena/nix-flatpak/main";
|
||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||
};
|
||||
|
||||
# Pinned nixpkgs for a specific nodejs_22 + yarn version required by cleo-app
|
||||
nixpkgs-nodejs.url = "github:NixOS/nixpkgs/21808d22b1cda1898b71cf1a1beb524a97add2c4";
|
||||
};
|
||||
|
||||
outputs = { self, darwin, nixpkgs, nixos-hardware, nixos-wsl, home-manager, mac-app-util, nix-flatpak, ... }@inputs:
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgsUnstable,
|
||||
nixos-hardware,
|
||||
home-manager,
|
||||
home-manager-darwin,
|
||||
nix-darwin,
|
||||
mac-app-util,
|
||||
nix-flatpak,
|
||||
nixpkgs-nodejs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
linuxSystem = "x86_64-linux";
|
||||
darwinSystem = "aarch64-darwin";
|
||||
pkgs = import nixpkgs {
|
||||
system = linuxSystem;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
mkOverlays = sys: [
|
||||
(final: prev: {
|
||||
unstable = import nixpkgsUnstable {
|
||||
system = sys;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
pinnedNode = import inputs.nixpkgs-nodejs {
|
||||
system = sys;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
in {
|
||||
# Framework - argon
|
||||
nixosConfigurations.argon = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { system = linuxSystem; inherit inputs; };
|
||||
|
||||
modules = [
|
||||
nixos-hardware.nixosModules.framework-12th-gen-intel
|
||||
./_hosts/argon/configuration.nix
|
||||
./nixos-modules
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations.bromine = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { system = linuxSystem; inherit inputs; };
|
||||
|
||||
modules = [
|
||||
nixos-hardware.nixosModules.framework-11th-gen-intel
|
||||
./_hosts/bromine/configuration.nix
|
||||
./nixos-modules
|
||||
];
|
||||
};
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# NixOS Configuration (Linux)
|
||||
# -------------------------------------------------------------
|
||||
nixosConfigurations.caesium = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { system = linuxSystem; inherit inputs; };
|
||||
|
||||
modules = [
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
./caesium.nixos.nix
|
||||
{
|
||||
nixpkgs.overlays = mkOverlays linuxSystem;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
# The Home Manager NixOS module
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
home-manager.users."mbessette" = import ./caesium.home.nix;
|
||||
home-manager.backupFileExtension = "before-nix";
|
||||
}
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
./caesium.nixos.nix
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations.caesium-wsl = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { system = linuxSystem; inherit inputs; };
|
||||
|
||||
modules = [
|
||||
nixos-wsl.nixosModules.default
|
||||
./_hosts/caesium-wsl/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
darwinConfigurations.cleo-darwin = darwin.lib.darwinSystem {
|
||||
# -------------------------------------------------------------
|
||||
# nix-darwin Configuration (macOS)
|
||||
# -------------------------------------------------------------
|
||||
darwinConfigurations.cleo-darwin = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = { system = darwinSystem; inherit inputs; };
|
||||
system = darwinSystem;
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = mkOverlays darwinSystem;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
./cleo.darwin.nix
|
||||
mac-app-util.darwinModules.default
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
home-manager.users."matthew.bessette" = import ./cleo.home.nix;
|
||||
home-manager.backupFileExtension = ".before-nix";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
darwinConfigurations.hydrogen = darwin.lib.darwinSystem {
|
||||
darwinConfigurations.hydrogen = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = { system = darwinSystem; inherit inputs; };
|
||||
system = darwinSystem;
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = mkOverlays darwinSystem;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
./hydrogen.darwin.nix
|
||||
mac-app-util.darwinModules.default
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
home-manager.users."mbessette" = import ./hydrogen.home.nix;
|
||||
home-manager.backupFileExtension = ".before-nix";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# Homemanager configuration
|
||||
# -------------------------------------------------------------
|
||||
homeConfigurations."mbessette@caesium" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = linuxSystem;
|
||||
config.allowUnfree = true;
|
||||
overlays = mkOverlays linuxSystem;
|
||||
};
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home.shared.nix
|
||||
./caesium.home.nix
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations."mbessette@hydrogen" = home-manager-darwin.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgsUnstable {
|
||||
system = darwinSystem;
|
||||
config.allowUnfree = true;
|
||||
overlays = mkOverlays darwinSystem;
|
||||
};
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home.shared.nix
|
||||
./hydrogen.home.nix
|
||||
mac-app-util.homeManagerModules.default
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations."matthew.bessette@cleo-darwin" = home-manager-darwin.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgsUnstable {
|
||||
system = darwinSystem;
|
||||
config.allowUnfree = true;
|
||||
overlays = mkOverlays darwinSystem;
|
||||
};
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home.shared.nix
|
||||
./cleo.home.nix
|
||||
mac-app-util.homeManagerModules.default
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user