mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 04:08:12 +09:00
init files
This commit is contained in:
+11
@@ -14,3 +14,14 @@
|
||||
|
||||
!/flake.nix
|
||||
!/flake.lock
|
||||
|
||||
!/shells/
|
||||
!/flake/
|
||||
!/overlays/
|
||||
|
||||
!/modules/applications/
|
||||
!/modules/hardwares/
|
||||
!/modules/profiles/
|
||||
!/modules/services/
|
||||
!/modules/systems/
|
||||
!/modules/users/
|
||||
|
||||
Generated
+1468
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,112 @@
|
||||
{
|
||||
description = "moons NixOS configurations";
|
||||
|
||||
inputs = {
|
||||
# NixOS
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-26.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Hardware / Platform
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
nixos-wsl.url = "github:nix-community/NixOS-WSL";
|
||||
|
||||
# Desktop
|
||||
niri-flake.url = "github:sodiboo/niri-flake";
|
||||
|
||||
stylix = {
|
||||
url = "github:nix-community/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Terminal
|
||||
ghostty = {
|
||||
url = "github:moons-14/ghostty";
|
||||
};
|
||||
|
||||
# Shell / Launcher
|
||||
vicinae.url = "github:vicinaehq/vicinae";
|
||||
|
||||
vicinae-extensions = {
|
||||
url = "github:vicinaehq/extensions";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
noctalia = {
|
||||
url = "github:noctalia-dev/noctalia";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Editor
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim/nixos-26.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Secrets management
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Disk management
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Boot
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Flake framework
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
# Code formatting and git hooks
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
git-hooks-nix.url = "github:cachix/git-hooks.nix";
|
||||
|
||||
# Dev services
|
||||
services-flake.url = "github:juspay/services-flake";
|
||||
|
||||
# LLM agents
|
||||
llm-agents = {
|
||||
url = "github:numtide/llm-agents.nix";
|
||||
};
|
||||
|
||||
codex-desktop-linux = {
|
||||
url = "github:ilysenko/codex-desktop-linux";
|
||||
};
|
||||
|
||||
# Index / Search
|
||||
nix-index-database = {
|
||||
url = "github:nix-community/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Systems
|
||||
systems.url = "github:nix-systems/default-linux";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
flake-parts,
|
||||
systems,
|
||||
...
|
||||
}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = import systems;
|
||||
|
||||
imports = [
|
||||
./overlays
|
||||
./shells
|
||||
./flake
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./formatter.nix
|
||||
./git-hooks.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{ system, ... }:
|
||||
let
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
|
||||
programs = {
|
||||
nixfmt.enable = true;
|
||||
deadnix.enable = true;
|
||||
statix.enable = true;
|
||||
|
||||
shfmt.enable = true;
|
||||
shellcheck.enable = true;
|
||||
|
||||
prettier = {
|
||||
enable = true;
|
||||
package = unstable.prettier;
|
||||
};
|
||||
yamlfmt.enable = true;
|
||||
taplo.enable = true;
|
||||
oxfmt.enable = true;
|
||||
};
|
||||
|
||||
settings = {
|
||||
excludes = [
|
||||
".git/**"
|
||||
"*.lock"
|
||||
".direnv/**"
|
||||
"*.age"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.git-hooks-nix.flakeModule
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
pre-commit.settings = {
|
||||
hooks = {
|
||||
treefmt = {
|
||||
enable = true;
|
||||
|
||||
package = config.treefmt.build.wrapper;
|
||||
};
|
||||
|
||||
gitleaks = {
|
||||
enable = true;
|
||||
name = "gitleaks";
|
||||
description = "Detect hardcoded secrets";
|
||||
|
||||
entry = "${pkgs.gitleaks}/bin/gitleaks dir --no-banner --redact --verbose .";
|
||||
|
||||
pass_filenames = false;
|
||||
|
||||
stages = [
|
||||
"pre-commit"
|
||||
"pre-push"
|
||||
];
|
||||
};
|
||||
|
||||
deadnix.enable = true;
|
||||
statix.enable = true;
|
||||
shellcheck.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
flake.overlays.default = _final: prev: {
|
||||
llm-agents = inputs.llm-agents.packages.${prev.stdenv.hostPlatform.system};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
_: {
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
devShells.android = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
android-tools # adb, fastboot
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
alias adb-shutter-off='adb shell settings put system csc_pref_camera_forced_shuttersound_key 0'
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./dotnix.nix
|
||||
./android.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
_: {
|
||||
perSystem =
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
devShells.dotnix = pkgs.mkShell {
|
||||
packages = [
|
||||
config.treefmt.build.wrapper
|
||||
|
||||
pkgs.git
|
||||
pkgs.gitleaks
|
||||
pkgs.pre-commit
|
||||
|
||||
# sops-nix / age
|
||||
pkgs.sops
|
||||
pkgs.age
|
||||
pkgs.ssh-to-age
|
||||
|
||||
# YubiKey for sops editing
|
||||
pkgs.age-plugin-yubikey
|
||||
pkgs.yubikey-manager
|
||||
pkgs.pcsc-tools
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
${config.pre-commit.settings.shellHook}
|
||||
|
||||
export SOPS_AGE_KEY_FILE="$HOME/.config/sops/age/yubikey-identity.txt"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user