fmt: reformat
All checks were successful
gitea-deepak/nixconf/pipeline/head This commit looks good
Test templates, puts into cache / nix (nix-runner) (push) Successful in 6m33s

This commit is contained in:
Deepak Mallubhotla 2025-03-24 04:12:00 -05:00
parent 9dbe1605e0
commit a057d9bcc7
Signed by: deepak
GPG Key ID: 47831B15427F5A55
13 changed files with 368 additions and 344 deletions

View File

@ -1 +0,0 @@
indentation = "Tabs"

View File

@ -54,7 +54,8 @@
}; };
}; };
outputs = { outputs =
{
self, self,
systems, systems,
nixpkgs, nixpkgs,
@ -62,7 +63,8 @@
spaceport-nvim, spaceport-nvim,
nomodoro, nomodoro,
... ...
} @ inputs: let }@inputs:
let
customPackageOverlay = customPackageOverlay =
(import ./overlays/default.nix { (import ./overlays/default.nix {
inherit cmp-vimtex; inherit cmp-vimtex;
@ -70,14 +72,14 @@
inherit inputs; inherit inputs;
inherit nomodoro; inherit nomodoro;
parrot-nvim = inputs.parrot-nvim; parrot-nvim = inputs.parrot-nvim;
}) }).overlay;
.overlay;
# Small tool to iterate over each systems # Small tool to iterate over each systems
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
# Eval the treefmt modules from ./treefmt.nix # Eval the treefmt modules from ./treefmt.nix
treefmtEval = eachSystem (pkgs: inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix); treefmtEval = eachSystem (pkgs: inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
in { in
{
nixosConfigurations = ( nixosConfigurations = (
import ./hosts/hosts.nix { import ./hosts/hosts.nix {
inherit inputs; inherit inputs;
@ -98,6 +100,8 @@
kubectl kubectl
jq jq
stern stern
nixfmt-rfc-style
alejandra
]; ];
}; };
}); });

View File

@ -1,4 +1,7 @@
{pkgs ? import <nixpkgs> {}}: let {
pkgs ? import <nixpkgs> { },
}:
let
custom-fonts = pkgs.stdenvNoCC.mkDerivation { custom-fonts = pkgs.stdenvNoCC.mkDerivation {
pname = "input"; pname = "input";
version = "1.0.2"; version = "1.0.2";
@ -16,6 +19,7 @@
description = "Input DJR font"; description = "Input DJR font";
}; };
}; };
in { in
{
inherit custom-fonts; inherit custom-fonts;
} }

View File

@ -4,11 +4,12 @@
specialArgs, specialArgs,
lib, lib,
... ...
}: let }:
let
pkgs-unstable = specialArgs.nixpkgs-unstable; pkgs-unstable = specialArgs.nixpkgs-unstable;
in in
# default_python = pkgs-unstable.python313; # default_python = pkgs-unstable.python313;
{ {
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.packages = home.packages =
[ [
@ -68,9 +69,11 @@ in
"$HOME/.local/bin" "$HOME/.local/bin"
]; ];
home.sessionVariables = let home.sessionVariables =
let
win_home_dir = specialArgs.win_home_dir or "/mnt/c/Users/Deepak"; win_home_dir = specialArgs.win_home_dir or "/mnt/c/Users/Deepak";
in { in
{
# Namespace our own nixconf variables with DPK # Namespace our own nixconf variables with DPK
# Set a common directory for Windows for WSL installs # Set a common directory for Windows for WSL installs
@ -110,7 +113,7 @@ in
}; };
includes = [ includes = [
# this allows us to have a local gitconfig maybe? # this allows us to have a local gitconfig maybe?
{path = "~/.gitconfig.local";} { path = "~/.gitconfig.local"; }
]; ];
}; };
@ -182,7 +185,7 @@ in
# syntax highlighting # syntax highlighting
vim-just vim-just
]; ];
extraConfig = import ./neovim/init-vim.nix {inherit config;}; extraConfig = import ./neovim/init-vim.nix { inherit config; };
}; };
programs.thefuck.enable = true; programs.thefuck.enable = true;
@ -264,8 +267,8 @@ in
anthropic_api_key = { anthropic_api_key = {
path = "${config.sops.defaultSymlinkPath}/anthropic_api_key"; path = "${config.sops.defaultSymlinkPath}/anthropic_api_key";
}; };
hello = {}; hello = { };
newkey = {}; newkey = { };
}; };
}; };
} }

View File

@ -1,4 +1,5 @@
{config}: '' { config }:
''
inoremap jj <Esc> inoremap jj <Esc>
inoremap kk <Esc> inoremap kk <Esc>

View File

@ -6,9 +6,11 @@
modulesPath, modulesPath,
hostname, hostname,
... ...
}: let }:
custom-fonts = import ../fonts {inherit pkgs;}; let
in { custom-fonts = import ../fonts { inherit pkgs; };
in
{
imports = [ imports = [
"${modulesPath}/profiles/minimal.nix" "${modulesPath}/profiles/minimal.nix"
]; ];
@ -38,8 +40,8 @@ in {
''; '';
nix.settings = { nix.settings = {
trusted-substituters = ["http://attic.baklava"]; trusted-substituters = [ "http://attic.baklava" ];
trusted-public-keys = ["systems:tvbHIThn7MAwvgMSiYR3ULVlL6cBrA40afqGuextnNQ="]; trusted-public-keys = [ "systems:tvbHIThn7MAwvgMSiYR3ULVlL6cBrA40afqGuextnNQ=" ];
}; };
nixpkgs.overlays = [ nixpkgs.overlays = [

View File

@ -1,18 +1,21 @@
{ {
inputs, inputs,
customPackageOverlay, customPackageOverlay,
# ... # ...
}: let }:
let
linuxSystem = "x86_64-linux"; linuxSystem = "x86_64-linux";
lib = inputs.nixpkgs.lib; lib = inputs.nixpkgs.lib;
nixpkgs-unstable = import inputs.nixpkgs { nixpkgs-unstable = import inputs.nixpkgs {
system = linuxSystem; system = linuxSystem;
config.allowUnfreePredicate = pkg: config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [ builtins.elem (lib.getName pkg) [
"claude-code" "claude-code"
]; ];
}; };
in { in
{
"maxos" = inputs.nixpkgs-24-11.lib.nixosSystem { "maxos" = inputs.nixpkgs-24-11.lib.nixosSystem {
system = linuxSystem; system = linuxSystem;
specialArgs = { specialArgs = {
@ -33,7 +36,7 @@ in {
}; };
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.users.deepak = { home-manager.users.deepak = {
imports = [../home/deepak/home.nix]; imports = [ ../home/deepak/home.nix ];
}; };
home-manager.sharedModules = [ home-manager.sharedModules = [
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
@ -95,7 +98,7 @@ in {
}; };
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.users.deepak = { home-manager.users.deepak = {
imports = [../home/deepak/home.nix]; imports = [ ../home/deepak/home.nix ];
}; };
home-manager.sharedModules = [ home-manager.sharedModules = [
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops

View File

@ -5,9 +5,11 @@
pkgs, pkgs,
customPackageOverlay, customPackageOverlay,
... ...
}: let }:
custom-fonts = import ../../fonts {inherit pkgs;}; let
in { custom-fonts = import ../../fonts { inherit pkgs; };
in
{
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -150,7 +152,7 @@ in {
# Open ports in the firewall. # Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];
networking.firewall.allowedUDPPorts = [62532]; networking.firewall.allowedUDPPorts = [ 62532 ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
# networking.firewall.enable = false; # networking.firewall.enable = false;

View File

@ -6,7 +6,8 @@
lib, lib,
modulesPath, modulesPath,
... ...
}: { }:
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
@ -18,19 +19,20 @@
"usbhid" "usbhid"
"sd_mod" "sd_mod"
]; ];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ boot.kernelModules = [
"kvm-intel" "kvm-intel"
"wl" "wl"
]; ];
boot.extraModulePackages = [config.boot.kernelPackages.broadcom_sta]; boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/6d9433c6-2dab-4936-a924-d0a205381189"; device = "/dev/disk/by-uuid/6d9433c6-2dab-4936-a924-d0a205381189";
fsType = "ext4"; 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" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/67E3-17ED"; device = "/dev/disk/by-uuid/67E3-17ED";
@ -38,7 +40,7 @@
}; };
swapDevices = [ swapDevices = [
{device = "/dev/disk/by-uuid/1e0f60e9-cf43-451d-8466-81887f27c7cf";} { device = "/dev/disk/by-uuid/1e0f60e9-cf43-451d-8466-81887f27c7cf"; }
]; ];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";

View File

@ -3,9 +3,11 @@
customPackageOverlay, customPackageOverlay,
modulesPath, modulesPath,
... ...
}: let }:
custom-fonts = import ../../fonts {inherit pkgs;}; let
in { custom-fonts = import ../../fonts { inherit pkgs; };
in
{
imports = [ imports = [
"${modulesPath}/profiles/minimal.nix" "${modulesPath}/profiles/minimal.nix"
]; ];

View File

@ -3,9 +3,11 @@
customPackageOverlay, customPackageOverlay,
modulesPath, modulesPath,
... ...
}: let }:
custom-fonts = import ../../fonts {inherit pkgs;}; let
in { custom-fonts = import ../../fonts { inherit pkgs; };
in
{
imports = [ imports = [
"${modulesPath}/profiles/minimal.nix" "${modulesPath}/profiles/minimal.nix"
]; ];

View File

@ -4,8 +4,11 @@
nomodoro, nomodoro,
parrot-nvim, parrot-nvim,
inputs, inputs,
}: let }:
pluginoverlay = _final: prev: let let
pluginoverlay =
_final: prev:
let
cmpVimtexPlugin = prev.vimUtils.buildVimPlugin { cmpVimtexPlugin = prev.vimUtils.buildVimPlugin {
src = cmp-vimtex; src = cmp-vimtex;
name = "cmp-vimtex"; name = "cmp-vimtex";
@ -33,7 +36,8 @@
name = "zsh-completions"; name = "zsh-completions";
src = inputs.zsh-completions; src = inputs.zsh-completions;
}; };
in { in
{
customVimPlugins = { customVimPlugins = {
cmp-vimtex = cmpVimtexPlugin; cmp-vimtex = cmpVimtexPlugin;
spaceport-nvim = spaceportNvimPlugin; spaceport-nvim = spaceportNvimPlugin;
@ -46,7 +50,8 @@
zsh-completions = zshCompletionPlugin; zsh-completions = zshCompletionPlugin;
}; };
}; };
in { in
{
overlay = inputs.nixpkgs.lib.composeManyExtensions [ overlay = inputs.nixpkgs.lib.composeManyExtensions [
pluginoverlay pluginoverlay
inputs.claude-mcp-bundle.overlays.default inputs.claude-mcp-bundle.overlays.default

View File

@ -1,5 +1,6 @@
# treefmt.nix # treefmt.nix
{...}: { { ... }:
{
projectRootFile = "treefmt.nix"; projectRootFile = "treefmt.nix";
settings.global.excludes = [ settings.global.excludes = [
"*.toml" "*.toml"
@ -14,23 +15,17 @@
programs.mdsh.enable = true; programs.mdsh.enable = true;
# programs.nixfmt.enable = true; programs.nixfmt.enable = true;
# settings.formatter.nixfmt.indent = " ";
programs.alejandra.enable = true;
settings.formatter.alejandra.indentation = "Tabs";
programs.shellcheck.enable = true; programs.shellcheck.enable = true;
programs.shfmt.enable = true; programs.shfmt.enable = true;
settings.formatter.shfmt.indent = "\t"; settings.formatter.shfmt.indent_size = 0;
programs.yamlfmt.enable = true; 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.just.enable = true;
programs.stylua.enable = true; # Already configured for tabs in stylua.toml programs.stylua.enable = true;
# Formatter specific settings
} }