1
0
Fork 0
nix-system-configurations/flake.nix
2025-08-12 19:26:34 -05:00

163 lines
4.7 KiB
Nix

# SPDX-FileCopyrightText: 2025 Ethan Reece <contact@ethanreece.com>
#
# SPDX-License-Identifier: MIT
{
description = "Home Manager configuration";
inputs = {
flake-lib = {
url = "git+https://git.sudoer777.dev/me/nix-flake-base.git?ref=main";
flake = true;
inputs = {
devshell.follows = "devshell";
flake-parts.follows = "flake-parts";
git-hooks-nix.follows = "git-hooks-nix";
lix-module.follows = "lix-module";
nixgl.follows = "nixgl";
nixpkgs.follows = "nixpkgs";
treefmt-nix.follows = "treefmt-nix";
};
};
catppuccin.url = "github:catppuccin/nix";
devshell.url = "github:numtide/devshell";
disko = {
url = "github:nix-community/disko/latest";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
git-hooks-nix.url = "github:cachix/git-hooks.nix";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence.url = "github:nix-community/impermanence";
# TODO: https://git.lix.systems/lix-project/lix/issues/943
lix = {
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
flake = false;
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
inputs.lix.follows = "lix";
};
nix-darwin = {
url = "github:nix-darwin/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
nixgl = {
url = "github:nix-community/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nur.url = "github:nix-community/NUR";
pwndbg.url = "github:pwndbg/pwndbg";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } (
{ withSystem, ... }:
{
systems = [
"aarch64-linux"
"aarch64-darwin"
"x86_64-linux"
];
imports = [
inputs.flake-lib.flakeModule
./options
./sops
./home-manager/flake-module.nix
./nix-darwin/flake-module.nix
./nixos/flake-module.nix
];
targets = {
asahi = {
enable = true;
system = "aarch64-linux";
};
raspi = {
enable = true;
system = "aarch64-linux";
};
macos = {
enable = true;
system = "aarch64-darwin";
};
};
perSystem =
{ pkgs, system, ... }:
{
editors.helix.enable = true;
languages = {
en-us = {
enable = true;
dictionary = [
"ASLR"
"Boycat"
"Guix"
"iterm"
"Jujutsu"
"LanguageTool"
"LLMs"
"LTeX"
"MatthewCroughan"
"MWMBL"
"Nix"
"Reece"
"TrackMeNot"
"UTD"
];
excludes = [
".sops.yaml"
"sops/*"
];
vale."{**/*.md,**/*.txt}".packages = {
RedHat.enable = true;
proselint.enable = true;
write-good.enable = true;
alex.enable = true;
};
};
markdown.enable = true;
nix.enable = true;
plain-text.enable = true;
toml.enable = true;
yaml.enable = true;
};
# pre-commit.settings.excludes = [
# ".sops.yaml"
# "sops"
# ];
# treefmt.settings.global.excludes = [
# ".sops.yaml"
# "sops/*"
# ];
devshells.default = {
packages = [ pkgs.forgejo-cli ];
devshell = {
motd = ''
{202} Nix System Configurations{reset}
$(type -p menu &>/dev/null && menu)
'';
name = "System Configurations";
};
};
};
}
);
}