feat: format via 'ls **/*.nix | each { |it| nixfmt $it.name }'

This commit is contained in:
Ryan Yin
2025-07-30 12:17:24 +08:00
parent d10b30b06b
commit 13bb77108c
219 changed files with 2103 additions and 1728 deletions

View File

@@ -1,3 +1,4 @@
{mylib, ...}: {
{ mylib, ... }:
{
imports = mylib.scanPaths ./.;
}

View File

@@ -3,16 +3,18 @@
config,
lib,
...
}: let
}:
let
cfg = config.modules.desktop;
in {
in
{
options.modules.desktop = {
fonts.enable = lib.mkEnableOption "Rich Fonts - Add NerdFonts Icons, emojis & CJK Fonts";
};
config.fonts.packages = with pkgs;
lib.mkIf cfg.fonts.enable
[
config.fonts.packages =
with pkgs;
lib.mkIf cfg.fonts.enable [
# icon fonts
material-design-icons
font-awesome

View File

@@ -3,7 +3,8 @@
config,
myvars,
...
}: {
}:
{
# auto upgrade nix to the unstable version
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/tools/package-management/nix/default.nix#L284
# nix.package = pkgs.nixVersions.latest;
@@ -13,12 +14,15 @@
nix.settings = {
# enable flakes globally
experimental-features = ["nix-command" "flakes"];
experimental-features = [
"nix-command"
"flakes"
];
# given the users in this list the right to specify additional substituters via:
# 1. `nixConfig.substituers` in `flake.nix`
# 2. command line args `--options substituers http://xxx`
trusted-users = [myvars.username];
trusted-users = [ myvars.username ];
# substituers that will be considered before the official ones(https://cache.nixos.org)
substituters = [

View File

@@ -1,7 +1,7 @@
{nuenv, ...} @ args: {
nixpkgs.overlays =
[
nuenv.overlays.default
]
++ (import ../../overlays args);
{ nuenv, ... }@args:
{
nixpkgs.overlays = [
nuenv.overlays.default
]
++ (import ../../overlays args);
}

View File

@@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
# for security reasons, do not load neovim's user config
# since EDITOR may be used to edit some critical files
environment.variables.EDITOR = "nvim --clean";

View File

@@ -1,4 +1,5 @@
{myvars, ...}: {
{ myvars, ... }:
{
programs.ssh = myvars.networking.ssh;
users.users.${myvars.username} = {