mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 09:18:35 +02:00
feat: format via 'ls **/*.nix | each { |it| nixfmt $it.name }'
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
{mylib, ...}: {
|
||||
{ mylib, ... }:
|
||||
{
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{nuenv, ...} @ args: {
|
||||
nixpkgs.overlays =
|
||||
[
|
||||
nuenv.overlays.default
|
||||
]
|
||||
++ (import ../../overlays args);
|
||||
{ nuenv, ... }@args:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
nuenv.overlays.default
|
||||
]
|
||||
++ (import ../../overlays args);
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{myvars, ...}: {
|
||||
{ myvars, ... }:
|
||||
{
|
||||
programs.ssh = myvars.networking.ssh;
|
||||
|
||||
users.users.${myvars.username} = {
|
||||
|
||||
Reference in New Issue
Block a user