treewide: reformat

This commit is contained in:
Nikodem Rabuliński 2025-02-04 10:57:35 +01:00
parent bfddcef2fd
commit b54497c7ea
5 changed files with 57 additions and 37 deletions

View file

@ -6,13 +6,15 @@
Collection of my personal Nix configurations and opinionated NixOS, nix-darwin, home-manager, and flake-parts modules. Collection of my personal Nix configurations and opinionated NixOS, nix-darwin, home-manager, and flake-parts modules.
> [!CAUTION] > [!CAUTION]
> I tried to make the modules in this repository useful to others without having to modify them, > I tried to make the modules in this repository useful to others without having
> meaning I tried to have many configuration options, have them be disabled by default, etc. > to modify them, meaning I tried to have many configuration options, have them
> That is no more and although I still encourage people to use my config for learning and inspiration, > be disabled by default, etc. That is no more and although I still encourage
> the modules will now assume they're running in my infrastructure and I'll only add > people to use my config for learning and inspiration, the modules will now
> configuration and/or enabling options when it makes sense to me, personally. > assume they're running in my infrastructure and I'll only add configuration
> and/or enabling options when it makes sense to me, personally.
## Project structure ## Project structure
- hosts - per-machine configurations - hosts - per-machine configurations
- kazuki - my linux arm server - kazuki - my linux arm server
- legion - my linux x86 server - legion - my linux x86 server
@ -26,28 +28,36 @@ Collection of my personal Nix configurations and opinionated NixOS, nix-darwin,
- flake - flake-parts modules - flake - flake-parts modules
- services - configs for services I self-host - services - configs for services I self-host
- secrets - agenix secrets - secrets - agenix secrets
- wrappers - nix packages wrapped with my configs (see: [wrapper-manager](https://github.com/viperML/wrapper-manager)) - wrappers - nix packages wrapped with my configs (see:
[wrapper-manager](https://github.com/viperML/wrapper-manager))
- assets - miscellaneous values reused throughout my config - assets - miscellaneous values reused throughout my config
- effects.nix - hercules-ci configuration - effects.nix - hercules-ci configuration
## Code guidelines ## Code guidelines
Not set rules but general guidelines for myself to hopefully keep this config clean, maintainable, and reusable. Not set rules but general guidelines for myself to hopefully keep this config
clean, maintainable, and reusable.
- only importing downwards. this means no `imports = [ ../../foo/bar/some-module.nix ];` - only importing downwards. this means no
- ideally only one level of imports. `imports = [ ../../foo/bar/some-module.nix ];`
this means i'll try to only do `imports = [ ./foo ];` or `imports = [ ./bar.nix ]` but not `imports = [ ./x/y/z.nix ];` - ideally only one level of imports. this means i'll try to only do
- the file should be roughly in order of most interesting to least interesting options. `imports = [ ./foo ];` or `imports = [ ./bar.nix ]` but not
`imports = [ ./x/y/z.nix ];`
- the file should be roughly in order of most interesting to least interesting
options.
- `imports` should be the first attribute (except for `_file`) - `imports` should be the first attribute (except for `_file`)
- there should be no implicit state anywhere in the config. - there should be no implicit state anywhere in the config. (sounds obvious but
(sounds obvious but this is already broken with legion and the zfs pool but i'll let that one slide) this is already broken with legion and the zfs pool but i'll let that one
to achieve this i still need to create a proper live iso with my config and my bootstrapping ssh key slide) to achieve this i still need to create a proper live iso with my config
and my bootstrapping ssh key
## TODOs ## TODOs
Sorted rougly by priority Sorted rougly by priority
- bring back ci (sorta done) - bring back ci (sorta done)
- hercules-ci effects for deploying machines on update (if configuration is valid) - hercules-ci effects for deploying machines on update (if configuration is
valid)
- fix disko - fix disko
- make the configuration truly declarative (to a reasonable degree) - make the configuration truly declarative (to a reasonable degree)
- themeing solution - themeing solution

View file

@ -55,6 +55,18 @@
programs.nixfmt.enable = true; programs.nixfmt.enable = true;
programs.statix.enable = true; programs.statix.enable = true;
programs.fish_indent.enable = true; programs.fish_indent.enable = true;
programs.deno.enable = true;
programs.stylua.enable = true;
programs.shfmt.enable = true;
settings.global.excludes = [
# agenix
"*.age"
# racket
"*.rkt"
"**/rashrc"
];
settings.on-unmatched = "fatal";
}; };
}; };
}; };

View file

@ -1,8 +1,8 @@
builds: builds:
include: include:
- 'devShells.*.*' - "devShells.*.*"
- 'packages.*.*' - "packages.*.*"
- 'formatter.*' - "formatter.*"
- 'nixosConfigurations.*' - "nixosConfigurations.*"
- 'darwinConfigurations.*' - "darwinConfigurations.*"
- 'homeConfigurations.*' - "homeConfigurations.*"

View file

@ -5,10 +5,8 @@
}: }:
{ {
config, config,
configurationName,
lib, lib,
pkgs, pkgs,
inputs,
inputs', inputs',
username, username,
... ...

View file

@ -1,22 +1,22 @@
local wezterm = require 'wezterm' local wezterm = require("wezterm")
local cfg = { local cfg = {
color_scheme = 'Default Dark (base16)', color_scheme = "Default Dark (base16)",
enable_tab_bar = false, enable_tab_bar = false,
font = wezterm.font('IosevkaTerm Nerd Font'), font = wezterm.font("IosevkaTerm Nerd Font"),
window_decorations = 'TITLE | RESIZE', window_decorations = "TITLE | RESIZE",
font_size = 10.5, font_size = 10.5,
native_macos_fullscreen_mode = true, native_macos_fullscreen_mode = true,
hide_mouse_cursor_when_typing = false, hide_mouse_cursor_when_typing = false,
keys = { keys = {
{ key = "Enter", mods = "CTRL", action = wezterm.action { SendString = "\x1b[13;5u" } }, { key = "Enter", mods = "CTRL", action = wezterm.action({ SendString = "\x1b[13;5u" }) },
{ key = "Enter", mods = "SHIFT", action = wezterm.action { SendString = "\x1b[13;2u" } }, { key = "Enter", mods = "SHIFT", action = wezterm.action({ SendString = "\x1b[13;2u" }) },
}, },
} }
if string.find(wezterm.target_triple, "darwin") then if string.find(wezterm.target_triple, "darwin") then
cfg.font_size = 14.0 cfg.font_size = 14.0
cfg.window_decorations = 'RESIZE' cfg.window_decorations = "RESIZE"
end end
return cfg return cfg