mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-10 14:42:40 +02:00
feat: format via 'ls **/*.nix | each { |it| nixfmt $it.name }'
This commit is contained in:
+14
-13
@@ -53,12 +53,12 @@ let
|
||||
# HTTPS_PROXY = "http://127.0.0.1:7890";
|
||||
};
|
||||
|
||||
homebrew_env_script =
|
||||
lib.attrsets.foldlAttrs
|
||||
(acc: name: value: acc + "\nexport ${name}=${value}")
|
||||
""
|
||||
(homebrew_mirror_env // local_proxy_env);
|
||||
in {
|
||||
homebrew_env_script = lib.attrsets.foldlAttrs (
|
||||
acc: name: value:
|
||||
acc + "\nexport ${name}=${value}"
|
||||
) "" (homebrew_mirror_env // local_proxy_env);
|
||||
in
|
||||
{
|
||||
# Install packages from nix's official package repository.
|
||||
#
|
||||
# The packages installed here are available to all users, and are reproducible across machines, and are rollbackable.
|
||||
@@ -75,13 +75,14 @@ in {
|
||||
# darwin only apps
|
||||
utm # virtual machine
|
||||
];
|
||||
environment.variables =
|
||||
{
|
||||
# Fix https://github.com/LnL7/nix-darwin/wiki/Terminfo-issues
|
||||
TERMINFO_DIRS = map (path: path + "/share/terminfo") config.environment.profiles ++ ["/usr/share/terminfo"];
|
||||
}
|
||||
# Set variables for you to manually install homebrew packages.
|
||||
// homebrew_mirror_env;
|
||||
environment.variables = {
|
||||
# Fix https://github.com/LnL7/nix-darwin/wiki/Terminfo-issues
|
||||
TERMINFO_DIRS = map (path: path + "/share/terminfo") config.environment.profiles ++ [
|
||||
"/usr/share/terminfo"
|
||||
];
|
||||
}
|
||||
# Set variables for you to manually install homebrew packages.
|
||||
// homebrew_mirror_env;
|
||||
|
||||
# Set environment variables for nix-darwin before run `brew bundle`.
|
||||
system.activationScripts.homebrew.text = lib.mkBefore ''
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{lib, ...}:
|
||||
{ lib, ... }:
|
||||
# ===================================================================
|
||||
# Remove packages that are not well supported for the Darwin platform
|
||||
# ===================================================================
|
||||
@@ -19,15 +19,16 @@ let
|
||||
"ncdu"
|
||||
"racket-minimal"
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(_: super: let
|
||||
removeUnwantedPackages = pname:
|
||||
lib.warn "the ${pname} has been removed on the darwin platform"
|
||||
super.emptyDirectory;
|
||||
in
|
||||
lib.genAttrs
|
||||
brokenPackages
|
||||
removeUnwantedPackages)
|
||||
(
|
||||
_: super:
|
||||
let
|
||||
removeUnwantedPackages =
|
||||
pname: lib.warn "the ${pname} has been removed on the darwin platform" super.emptyDirectory;
|
||||
in
|
||||
lib.genAttrs brokenPackages removeUnwantedPackages
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{mylib, ...}: {
|
||||
imports =
|
||||
(mylib.scanPaths ./.)
|
||||
++ [
|
||||
../base
|
||||
];
|
||||
{ mylib, ... }:
|
||||
{
|
||||
imports = (mylib.scanPaths ./.) ++ [
|
||||
../base
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{config, ...}: {
|
||||
{ config, ... }:
|
||||
{
|
||||
###################################################################################
|
||||
#
|
||||
# Core configuration for nix-darwin
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
config,
|
||||
myvars,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
homeDir = config.users.users."${myvars.username}".home;
|
||||
in {
|
||||
in
|
||||
{
|
||||
# https://github.com/LnL7/nix-darwin/blob/master/modules/programs/gnupg.nix
|
||||
# try `pkill gpg-agent` if you have issues(such as `no pinentry`)
|
||||
programs.gnupg.agent = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{myvars, ...}: {
|
||||
{ myvars, ... }:
|
||||
{
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users."${myvars.username}" = {
|
||||
home = "/Users/${myvars.username}";
|
||||
|
||||
Reference in New Issue
Block a user