Caesium refactors flake

This commit is contained in:
Matthew Bessette
2026-07-27 23:52:28 -04:00
parent cadf6dd263
commit ace6b0932f
6 changed files with 244 additions and 261 deletions
+21
View File
@@ -0,0 +1,21 @@
# 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
# ];
# };
+17 -39
View File
@@ -7,12 +7,25 @@
home.packages = with pkgs; [];
programs.home-manager.enable = true;
# Enable direnv for automatic environment switching
programs.direnv = {
enable = true;
nix-direnv.enable = true; # Better Nix flakes integration with caching
home.packages = with pkgs; [
claude-desktop
firefox
wowup-cf
faugus-launcher
ghostty
];
services.flatpak = {
packages = [
com.spotify.Client
com.discordapp.Discord
];
overrides = [];
};
# Managed VS Code Extensions (The "Clean" Way)
programs.vscode = {
enable = true;
@@ -21,18 +34,6 @@
userSettings = builtins.fromJSON (builtins.readFile ./config.vscode.settings.json);
extensions = with inputs.nix-vscode-extensions.extensions.${pkgs.system}.vscode-marketplace; [
bbenoist.nix
eamodio.gitlens
github.copilot-chat
graphql.vscode-graphql-syntax
hashicorp.terraform
mechatroner.rainbow-csv
mermaidchart.vscode-mermaid-chart
redhat.vscode-xml
vscode-icons-team.vscode-icons
typescriptteam.native-preview
mkhl.direnv
oxc.oxc-vscode
biomejs.biome
];
};
};
@@ -43,40 +44,19 @@
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh.enable = true;
oh-my-zsh.theme = "robbyrussell";
oh-my-zsh.plugins = [
"git"
"npm"
];
initContent = ''
export SSH_AUTH_SOCK=~/.1password/agent.sock
# Auto-allow direnv for directories with flake.nix
auto_allow_direnv() {
if [[ -f flake.nix ]] && [[ ! -f .envrc ]]; then
echo "use flake" > .envrc
direnv allow
elif [[ -f flake.nix ]] && [[ -f .envrc ]]; then
direnv allow
fi
}
# Run auto-allow when changing directories
chpwd_functions+=(auto_allow_direnv)
'';
shellAliases = {
ll = "ls -l";
update = "sudo nixos-rebuild switch --flake ~/nixos#caesium";
dev = "nix develop -c $SHELL";
nixos = "code ~/nixos";
};
};
home.sessionVariables = {
# Points to the Homebrew location mentioned in your caveat
NPM_CONFIG_PREFIX = "/mnt/Projects/.npm-global/.npm-global";
};
@@ -92,8 +72,6 @@
# ~/.config (dotfiles)
xdg.enable = true;
xdg.configFile."biome.json".source = ./config.biome.json;
xdg.configFile."oxlintrc.json".source = ./config.oxlintrc.json;
xdg.configFile."ssh.conf".source = ./config.ssh.conf;
programs.ssh = {
+3 -24
View File
@@ -141,6 +141,7 @@
# --- PROGRAMS ---
programs.zsh.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
@@ -159,38 +160,16 @@
polkitPolicyOwners = [ "mbessette" ];
};
# Biome config
environment.etc."biome.json".source = ./config.biome.json;
# environment.etc."oxlintrc.json".source = ./config.oxlintrc.json;
# environment.etc."ssh_config".source = ./config.ssh.conf;
environment.systemPackages = with pkgs; [
ethtool
vim
git
wget
curl
firefox
discord
wowup-cf
spotify
faugus-launcher
signal-desktop
## Emulators
xenia-canary
mupen64plus
python3
nodejs_26
];
services.flatpak.packages = [
# "io.github.Faugus.faugus-launcher"
];
services.flatpak.overrides = {
# "io.github.Faugus.faugus-launcher".Context.filesystems = [
# "/mtn/bottles"
# ];
};
programs.appimage = {
enable = true;
binfmt = true;
Generated
+84 -122
View File
@@ -21,27 +21,6 @@
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1784500460,
"narHash": "sha256-UvORnAxTRHax7RG74W8Z2t4GvIkX6AjJ5kk0QlwZomo=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "57a3171f94705599a2499248ca5758d5eb47c0e0",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@@ -59,22 +38,6 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
@@ -120,15 +83,37 @@
]
},
"locked": {
"lastModified": 1784546264,
"narHash": "sha256-jxVr5EHMYAOkFvS2k0abIvt6NqyshyWmiHHzV17sT2g=",
"lastModified": 1785119570,
"narHash": "sha256-Rgs2xKnGLFWQscxUaXX07oyZeuMDOHEbqDOsgliLFGM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e3dea8e4792b09a6c0eb5836b0284ad05b1acba0",
"rev": "d4fd24667c8cbef124bb70a20380cab75ec8474d",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-26.05",
"repo": "home-manager",
"type": "github"
}
},
"home-manager-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgsUnstable"
]
},
"locked": {
"lastModified": 1785168662,
"narHash": "sha256-kGJTc0oEUQuEwV66lSlMxYtOEtpk9N/HS43k+rFAvs8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "cbb77679b3d992c8b62f884cd3a84af534a28621",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
@@ -138,7 +123,9 @@
"cl-nix-lite": "cl-nix-lite",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_3",
"nixpkgs": [
"nixpkgsUnstable"
],
"systems": "systems_2",
"treefmt-nix": "treefmt-nix_2"
},
@@ -156,18 +143,39 @@
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgsUnstable"
]
},
"locked": {
"lastModified": 1784500460,
"narHash": "sha256-UvORnAxTRHax7RG74W8Z2t4GvIkX6AjJ5kk0QlwZomo=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "57a3171f94705599a2499248ca5758d5eb47c0e0",
"type": "github"
},
"original": {
"owner": "nix-darwin",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1767983141,
"narHash": "sha256-7ZCulYUD9RmJIDULTRkGLSW1faMpDlPKcbWJLYHoXcs=",
"lastModified": 1783368811,
"narHash": "sha256-0H8jDwR4Kegb3heaTrH1ftbgKfZVDT8JE+46uXxDy/Q=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "440818969ac2cbd77bfe025e884d0aa528991374",
"rev": "20d42f0ee98c9fe9f85e8d1de474f1409ed10d05",
"type": "github"
},
"original": {
"owner": "gmodena",
"ref": "latest",
"ref": "main",
"repo": "nix-flatpak",
"type": "github"
}
@@ -175,7 +183,7 @@
"nix-vscode-extensions": {
"inputs": {
"nixpkgs": [
"nixpkgs"
"nixpkgsUnstable"
]
},
"locked": {
@@ -194,7 +202,9 @@
},
"nixos-hardware": {
"inputs": {
"nixpkgs": "nixpkgs_5"
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1784310968,
@@ -211,26 +221,6 @@
"type": "github"
}
},
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1784058842,
"narHash": "sha256-3u3tvbCIAid3Mv7RrJx13jusIEQC/HeKYhO/SUSxR3A=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "24c8dc8e0f2170e1a377be24dfadc7d9d21dc1ad",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "main",
"repo": "NixOS-WSL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1779796641,
@@ -278,6 +268,22 @@
"type": "github"
}
},
"nixpkgsUnstable": {
"locked": {
"lastModified": 1785090369,
"narHash": "sha256-m0pDuRJG7EDo9ri+4Ksu83VsI+PlxNC9lNBfydejce4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "624af665418d3c65d544145b4d34ad696439570e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1761236834,
@@ -295,22 +301,6 @@
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1782999065,
"narHash": "sha256-5Dgj5+pIQYZKrXUGaLCk7CKfN3MmpwIhO94++WVxvng=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "80d591ed473cfc46329932c2aadac9b435342c7c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1770107345,
"narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=",
@@ -326,62 +316,34 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_4": {
"locked": {
"lastModified": 1767892417,
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1783776592,
"narHash": "sha256-UgCQzxeWI75XM8G+hPrPh+MKzEPjG3SpAj7dtqSbksA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e7a3ca8092b61ff85b6a45bf863ea2b2d6a661b3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1784497964,
"narHash": "sha256-vlHUuqAcbcH2RKmHbPiuQzbv1pnzzavXnI62RD0bqCU=",
"lastModified": 1785104993,
"narHash": "sha256-eKbrvPoAOFutbYMdbB3r5EQVmFxKv24iKqHPPUXA0gM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "241313f4e8e508cb9b13278c2b0fa25b9ca27163",
"rev": "8623c4c20aa4ca2f5fb81510d2944066c3fb0d96",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"home-manager-darwin": "home-manager-darwin",
"mac-app-util": "mac-app-util",
"nix-darwin": "nix-darwin",
"nix-flatpak": "nix-flatpak",
"nix-vscode-extensions": "nix-vscode-extensions",
"nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_7",
"nixpkgs-nodejs": "nixpkgs-nodejs"
"nixpkgs": "nixpkgs_4",
"nixpkgs-nodejs": "nixpkgs-nodejs",
"nixpkgsUnstable": "nixpkgsUnstable"
}
},
"systems": {
@@ -434,7 +396,7 @@
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1780220602,
+116 -76
View File
@@ -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
];
};
};
+3
View File
@@ -0,0 +1,3 @@
{
home.backupFileExtension = "before-nix";
}