fmt: alejandra
This commit is contained in:
parent
ae454228f6
commit
9dbe1605e0
1
alejandra.toml
Normal file
1
alejandra.toml
Normal file
@ -0,0 +1 @@
|
||||
indentation = "Tabs"
|
24
flake.nix
24
flake.nix
@ -1,5 +1,4 @@
|
||||
{
|
||||
|
||||
description = "Configuration v1";
|
||||
|
||||
inputs = {
|
||||
@ -53,11 +52,9 @@
|
||||
url = "git+ssh://git@gitea.deepak.science:2222/deepak/claude_mcp_bundle.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
outputs = {
|
||||
self,
|
||||
systems,
|
||||
nixpkgs,
|
||||
@ -65,8 +62,7 @@
|
||||
spaceport-nvim,
|
||||
nomodoro,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
} @ inputs: let
|
||||
customPackageOverlay =
|
||||
(import ./overlays/default.nix {
|
||||
inherit cmp-vimtex;
|
||||
@ -74,14 +70,14 @@
|
||||
inherit inputs;
|
||||
inherit nomodoro;
|
||||
parrot-nvim = inputs.parrot-nvim;
|
||||
}).overlay;
|
||||
})
|
||||
.overlay;
|
||||
# Small tool to iterate over each systems
|
||||
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
|
||||
|
||||
# Eval the treefmt modules from ./treefmt.nix
|
||||
treefmtEval = eachSystem (pkgs: inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
|
||||
in
|
||||
{
|
||||
in {
|
||||
nixosConfigurations = (
|
||||
import ./hosts/hosts.nix {
|
||||
inherit inputs;
|
||||
@ -95,5 +91,15 @@
|
||||
formatting = treefmtEval.${pkgs.system}.config.build.check self;
|
||||
});
|
||||
|
||||
devShells = eachSystem (pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
kubernetes-helm
|
||||
kubectl
|
||||
jq
|
||||
stern
|
||||
];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -1,8 +1,4 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
}:
|
||||
|
||||
let
|
||||
{pkgs ? import <nixpkgs> {}}: let
|
||||
custom-fonts = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "input";
|
||||
version = "1.0.2";
|
||||
@ -20,7 +16,6 @@ let
|
||||
description = "Input DJR font";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
inherit custom-fonts;
|
||||
}
|
||||
|
@ -4,13 +4,11 @@
|
||||
specialArgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
pkgs-unstable = specialArgs.nixpkgs-unstable;
|
||||
in
|
||||
# default_python = pkgs-unstable.python313;
|
||||
{
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
home.packages =
|
||||
[
|
||||
@ -51,7 +49,6 @@ in
|
||||
pkgs.custom-servers.arxiv-mcp-server
|
||||
pkgs.custom-servers.basic-memory-server
|
||||
pkgs.custom-servers.mcp-text-editor
|
||||
|
||||
]
|
||||
++ pkgs.lib.optionals specialArgs.withGUI [
|
||||
pkgs.discord
|
||||
@ -71,11 +68,9 @@ in
|
||||
"$HOME/.local/bin"
|
||||
];
|
||||
|
||||
home.sessionVariables =
|
||||
let
|
||||
home.sessionVariables = let
|
||||
win_home_dir = specialArgs.win_home_dir or "/mnt/c/Users/Deepak";
|
||||
in
|
||||
{
|
||||
in {
|
||||
# Namespace our own nixconf variables with DPK
|
||||
|
||||
# Set a common directory for Windows for WSL installs
|
||||
@ -273,5 +268,4 @@ in
|
||||
newkey = {};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ config }:
|
||||
''
|
||||
{config}: ''
|
||||
inoremap jj <Esc>
|
||||
inoremap kk <Esc>
|
||||
|
||||
|
@ -6,15 +6,11 @@
|
||||
modulesPath,
|
||||
hostname,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
}: let
|
||||
custom-fonts = import ../fonts {inherit pkgs;};
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [
|
||||
"${modulesPath}/profiles/minimal.nix"
|
||||
|
||||
];
|
||||
|
||||
wsl = {
|
||||
@ -31,7 +27,6 @@ in
|
||||
# nativeSystemd = true;
|
||||
|
||||
wslConf.interop.appendWindowsPath = false;
|
||||
|
||||
};
|
||||
|
||||
networking.hostName = hostname; # Define your hostname.
|
||||
@ -116,5 +111,4 @@ in
|
||||
source = "${pkgs.rootlesskit}/bin/rootlesskit";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -2,20 +2,17 @@
|
||||
inputs,
|
||||
customPackageOverlay,
|
||||
# ...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
linuxSystem = "x86_64-linux";
|
||||
lib = inputs.nixpkgs.lib;
|
||||
nixpkgs-unstable = import inputs.nixpkgs {
|
||||
system = linuxSystem;
|
||||
config.allowUnfreePredicate =
|
||||
pkg:
|
||||
config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"claude-code"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
"maxos" = inputs.nixpkgs-24-11.lib.nixosSystem {
|
||||
system = linuxSystem;
|
||||
specialArgs = {
|
||||
@ -72,7 +69,6 @@ in
|
||||
home-manager.sharedModules = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
inputs.NixOS-WSL-2411.nixosModules.wsl
|
||||
|
@ -1,13 +1,13 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ pkgs, customPackageOverlay, ... }:
|
||||
|
||||
let
|
||||
custom-fonts = import ../../fonts { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
customPackageOverlay,
|
||||
...
|
||||
}: let
|
||||
custom-fonts = import ../../fonts {inherit pkgs;};
|
||||
in {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
@ -161,5 +161,4 @@ in
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "20.09"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
@ -6,9 +6,7 @@
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
@ -32,8 +30,7 @@
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."nixosroot".device =
|
||||
"/dev/disk/by-uuid/3b0d4c02-d9e5-44ab-8461-30797547ed70";
|
||||
boot.initrd.luks.devices."nixosroot".device = "/dev/disk/by-uuid/3b0d4c02-d9e5-44ab-8461-30797547ed70";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/67E3-17ED";
|
||||
|
@ -3,15 +3,11 @@
|
||||
customPackageOverlay,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
}: let
|
||||
custom-fonts = import ../../fonts {inherit pkgs;};
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [
|
||||
"${modulesPath}/profiles/minimal.nix"
|
||||
|
||||
];
|
||||
|
||||
wsl = {
|
||||
@ -28,7 +24,6 @@ in
|
||||
nativeSystemd = true;
|
||||
|
||||
wslConf.interop.appendWindowsPath = false;
|
||||
|
||||
};
|
||||
|
||||
networking.hostName = "nixosEggYoke"; # Define your hostname.
|
||||
@ -90,5 +85,4 @@ in
|
||||
|
||||
# Optional (default: 41641):
|
||||
services.tailscale.port = 62532;
|
||||
|
||||
}
|
||||
|
@ -3,15 +3,11 @@
|
||||
customPackageOverlay,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
}: let
|
||||
custom-fonts = import ../../fonts {inherit pkgs;};
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [
|
||||
"${modulesPath}/profiles/minimal.nix"
|
||||
|
||||
];
|
||||
|
||||
wsl = {
|
||||
@ -28,7 +24,6 @@ in
|
||||
nativeSystemd = true;
|
||||
|
||||
wslConf.interop.appendWindowsPath = false;
|
||||
|
||||
};
|
||||
|
||||
networking.hostName = "nixosWSL"; # Define your hostname.
|
||||
@ -90,5 +85,4 @@ in
|
||||
|
||||
# Optional (default: 41641):
|
||||
services.tailscale.port = 62532;
|
||||
|
||||
}
|
||||
|
@ -4,11 +4,8 @@
|
||||
nomodoro,
|
||||
parrot-nvim,
|
||||
inputs,
|
||||
}:
|
||||
let
|
||||
pluginoverlay =
|
||||
_final: prev:
|
||||
let
|
||||
}: let
|
||||
pluginoverlay = _final: prev: let
|
||||
cmpVimtexPlugin = prev.vimUtils.buildVimPlugin {
|
||||
src = cmp-vimtex;
|
||||
name = "cmp-vimtex";
|
||||
@ -36,8 +33,7 @@ let
|
||||
name = "zsh-completions";
|
||||
src = inputs.zsh-completions;
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
customVimPlugins = {
|
||||
cmp-vimtex = cmpVimtexPlugin;
|
||||
spaceport-nvim = spaceportNvimPlugin;
|
||||
@ -49,10 +45,8 @@ let
|
||||
customZshPlugins = {
|
||||
zsh-completions = zshCompletionPlugin;
|
||||
};
|
||||
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
overlay = inputs.nixpkgs.lib.composeManyExtensions [
|
||||
pluginoverlay
|
||||
inputs.claude-mcp-bundle.overlays.default
|
||||
|
34
treefmt.nix
34
treefmt.nix
@ -1,20 +1,36 @@
|
||||
# treefmt.nix
|
||||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
projectRootFile = "treefmt.nix";
|
||||
settings.global.excludes = [
|
||||
"*.toml"
|
||||
"*.ttf"
|
||||
"*.txt"
|
||||
"*.otf"
|
||||
"Jenkinsfile"
|
||||
"fonts/out/*"
|
||||
];
|
||||
|
||||
programs.deadnix.enable = true;
|
||||
programs.mdsh.enable = true;
|
||||
programs.nixfmt.enable = true;
|
||||
programs.shellcheck.enable = true;
|
||||
programs.shfmt.enable = true;
|
||||
programs.yamlfmt.enable = true;
|
||||
programs.just.enable = true;
|
||||
|
||||
programs.stylua.enable = true;
|
||||
programs.mdsh.enable = true;
|
||||
|
||||
# programs.nixfmt.enable = true;
|
||||
# settings.formatter.nixfmt.indent = " ";
|
||||
programs.alejandra.enable = true;
|
||||
settings.formatter.alejandra.indentation = "Tabs";
|
||||
|
||||
programs.shellcheck.enable = true;
|
||||
|
||||
programs.shfmt.enable = true;
|
||||
settings.formatter.shfmt.indent = "\t";
|
||||
|
||||
programs.yamlfmt.enable = true;
|
||||
settings.formatter.yamlfmt.indent = 1; # yamlfmt uses number of tab characters for indent
|
||||
settings.formatter.yamlfmt.use_tabs = true;
|
||||
|
||||
programs.just.enable = true; # just format uses tabs by default if first line has tabs
|
||||
|
||||
programs.stylua.enable = true; # Already configured for tabs in stylua.toml
|
||||
|
||||
# Formatter specific settings
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user