Rename custom aerospace module from services.aerospace to roles.aerospace to avoid conflicting with nix-darwin's built-in aerospace service support. Move claude-code package override to flake-level overlay to ensure the GCS-distributed version is used instead of the npm registry version in unstable. This is necessary for corporate environments where npm registry access may be blocked.
226 lines
7.2 KiB
Nix
226 lines
7.2 KiB
Nix
{
|
|
description = "A very basic flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
|
|
|
|
nix-darwin = {
|
|
url = "github:nix-darwin/nix-darwin/nix-darwin-25.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-25.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
home-manager-unstable = {
|
|
url = "github:nix-community/home-manager/master";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
|
|
plasma-manager = {
|
|
url = "github:nix-community/plasma-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.home-manager.follows = "home-manager";
|
|
};
|
|
|
|
plasma-manager-unstable = {
|
|
url = "github:nix-community/plasma-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
inputs.home-manager.follows = "home-manager-unstable";
|
|
};
|
|
|
|
google-cookie-retrieval = {
|
|
url = "git+https://git.johnogle.info/johno/google-cookie-retrieval.git";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
jovian = {
|
|
url = "github:Jovian-Experiments/Jovian-NixOS";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-wsl, ... } @ inputs: let
|
|
nixosModules = [
|
|
./roles
|
|
] ++ [
|
|
./roles/jovian-compat.nix
|
|
inputs.home-manager.nixosModules.home-manager
|
|
{
|
|
nixpkgs.overlays = [
|
|
(final: prev: {
|
|
unstable = import nixpkgs-unstable {
|
|
system = prev.system;
|
|
config.allowUnfree = true;
|
|
};
|
|
custom = prev.callPackage ./packages {};
|
|
# Compatibility: bitwarden renamed to bitwarden-desktop in unstable
|
|
bitwarden-desktop = prev.bitwarden-desktop or prev.bitwarden;
|
|
})
|
|
];
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.sharedModules = [
|
|
inputs.plasma-manager.homeModules.plasma-manager
|
|
];
|
|
home-manager.extraSpecialArgs = {
|
|
globalInputs = inputs;
|
|
};
|
|
}
|
|
];
|
|
# Modules for unstable-based systems (like nix-deck)
|
|
nixosModulesUnstable = [
|
|
./roles
|
|
] ++ [
|
|
inputs.home-manager-unstable.nixosModules.home-manager
|
|
inputs.jovian.nixosModules.jovian
|
|
{
|
|
nixpkgs.overlays = [
|
|
(final: prev: {
|
|
unstable = import nixpkgs-unstable {
|
|
system = prev.system;
|
|
config.allowUnfree = true;
|
|
};
|
|
custom = prev.callPackage ./packages {};
|
|
# Compatibility: bitwarden renamed to bitwarden-desktop in unstable
|
|
bitwarden-desktop = prev.bitwarden-desktop or prev.bitwarden;
|
|
})
|
|
];
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.sharedModules = [
|
|
inputs.plasma-manager-unstable.homeModules.plasma-manager
|
|
];
|
|
home-manager.extraSpecialArgs = {
|
|
globalInputs = inputs;
|
|
};
|
|
}
|
|
];
|
|
darwinModules = [
|
|
./roles/darwin.nix
|
|
] ++ [
|
|
inputs.home-manager.darwinModules.home-manager
|
|
{
|
|
nixpkgs.overlays = [
|
|
(final: prev: {
|
|
unstable = import nixpkgs-unstable {
|
|
system = prev.system;
|
|
config.allowUnfree = true;
|
|
overlays = [
|
|
# Override claude-code in unstable to use our custom GCS-based build
|
|
# (needed for corporate networks that block npm registry)
|
|
(ufinal: uprev: {
|
|
claude-code = prev.custom.claude-code or (prev.callPackage ./packages {}).claude-code;
|
|
})
|
|
];
|
|
};
|
|
custom = prev.callPackage ./packages {};
|
|
# Compatibility: bitwarden renamed to bitwarden-desktop in unstable
|
|
bitwarden-desktop = prev.bitwarden-desktop or prev.bitwarden;
|
|
})
|
|
];
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.extraSpecialArgs = {
|
|
globalInputs = inputs;
|
|
};
|
|
}
|
|
];
|
|
|
|
in {
|
|
nixosConfigurations.nix-book = nixpkgs.lib.nixosSystem rec {
|
|
system = "x86_64-linux";
|
|
modules = nixosModules ++ [
|
|
./machines/nix-book/configuration.nix
|
|
{
|
|
home-manager.users.johno = {
|
|
imports = [ ./home/home-laptop-compact.nix ];
|
|
# Machine-specific overrides
|
|
home.roles.i3_sway.extraSwayConfig = {
|
|
output.eDP-1.scale = "1.75";
|
|
};
|
|
};
|
|
home-manager.extraSpecialArgs = { inherit system; };
|
|
}
|
|
];
|
|
};
|
|
|
|
nixosConfigurations.boxy = nixpkgs.lib.nixosSystem rec {
|
|
system = "x86_64-linux";
|
|
modules = nixosModules ++ [
|
|
./machines/boxy/configuration.nix
|
|
inputs.home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.users.johno = import ./home/home-media-center.nix;
|
|
home-manager.extraSpecialArgs = { inherit system; };
|
|
}
|
|
];
|
|
};
|
|
|
|
nixosConfigurations.wixos = nixpkgs.lib.nixosSystem rec {
|
|
system = "x86_64-linux";
|
|
modules = nixosModules ++ [
|
|
nixos-wsl.nixosModules.default
|
|
./machines/wixos/configuration.nix
|
|
inputs.home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.users.johno = import ./home/home-desktop.nix;
|
|
home-manager.extraSpecialArgs = { inherit system; };
|
|
}
|
|
];
|
|
};
|
|
|
|
nixosConfigurations.zix790prors = nixpkgs.lib.nixosSystem rec {
|
|
system = "x86_64-linux";
|
|
modules = nixosModules ++ [
|
|
./machines/zix790prors/configuration.nix
|
|
inputs.home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.users.johno = import ./home/home-desktop.nix;
|
|
home-manager.extraSpecialArgs = { inherit system; };
|
|
}
|
|
];
|
|
};
|
|
|
|
# Live USB ISO configuration
|
|
nixosConfigurations.live-usb = nixpkgs.lib.nixosSystem rec {
|
|
system = "x86_64-linux";
|
|
modules = nixosModules ++ [
|
|
./machines/live-usb/configuration.nix
|
|
{
|
|
home-manager.users.nixos = import ./home/home-live-usb.nix;
|
|
home-manager.extraSpecialArgs = { inherit system; };
|
|
}
|
|
];
|
|
};
|
|
|
|
# Steam Deck configuration (using unstable for better Jovian compatibility)
|
|
nixosConfigurations.nix-deck = nixpkgs-unstable.lib.nixosSystem rec {
|
|
system = "x86_64-linux";
|
|
modules = nixosModulesUnstable ++ [
|
|
./machines/nix-deck/configuration.nix
|
|
{
|
|
home-manager.users.johno = import ./home/home-desktop.nix;
|
|
home-manager.extraSpecialArgs = { inherit system; };
|
|
}
|
|
];
|
|
};
|
|
|
|
# Darwin/macOS configurations
|
|
darwinConfigurations."blkfv4yf49kt7" = inputs.nix-darwin.lib.darwinSystem rec {
|
|
system = "aarch64-darwin";
|
|
modules = darwinModules ++ [
|
|
./machines/johno-macbookpro/configuration.nix
|
|
{
|
|
home-manager.users.johno = import ./home/home-darwin-work.nix;
|
|
home-manager.extraSpecialArgs = { inherit system; };
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|