feat: nix fmt

This commit is contained in:
Ryan Yin
2023-12-18 00:36:59 +08:00
parent a04a058077
commit b2f75a37dc
50 changed files with 293 additions and 269 deletions
+10 -7
View File
@@ -1,8 +1,6 @@
{
pkgs,
...
}: {
home.packages = with pkgs; [
{pkgs, ...}: {
home.packages = with pkgs;
[
# general tools
pulumi
pulumictl
@@ -17,9 +15,14 @@
# aliyun
aliyun-cli
] ++ (if pkgs.stdenv.isLinux then [
]
++ (
if pkgs.stdenv.isLinux
then [
# cloud tools that nix do not have cache for.
terraform
terraformer # generate terraform configs from existing cloud resources
] else []);
]
else []
);
}
+3 -3
View File
@@ -12,10 +12,10 @@
programs = {
k9s = {
enable = true;
skin =
let
skin = let
skin_file = "${cattppuccin-k9s}/dist/mocha.yml"; # theme - cattppuccin mocha
skin_attr = builtins.fromJSON (builtins.readFile
skin_attr = builtins.fromJSON (
builtins.readFile
# replace 'base: &base "#1e1e2e"' with 'base: &base "default"'
# to make fg/bg color transparent. "default" means transparent in k9s skin.
(pkgs.runCommandNoCC "get-skin-json" {} ''
+9 -3
View File
@@ -14,7 +14,8 @@
#
#############################################################
home.packages = with pkgs; [
home.packages = with pkgs;
[
(python3.withPackages (
ps:
with ps; [
@@ -53,7 +54,10 @@
bfg-repo-cleaner # remove large files from git history
k6 # load testing tool
protobuf # protocol buffer compiler
] ++ (if pkgs.stdenv.isLinux then [
]
++ (
if pkgs.stdenv.isLinux
then [
# Automatically trims your branches whose tracking remote refs are merged or gone
# It's really useful when you work on a project for a long time.
git-trim
@@ -66,7 +70,9 @@
mitmproxy # http/https proxy tool
insomnia # REST client
wireshark # network analyzer
] else []);
]
else []
);
programs = {
direnv = {
+4 -2
View File
@@ -1,6 +1,8 @@
{ pkgs, catppuccin-helix, ... }:
{
pkgs,
catppuccin-helix,
...
}: {
# https://github.com/catppuccin/helix
xdg.configFile."helix/themes".source = "${catppuccin-helix}/themes/default";
+5 -1
View File
@@ -1,4 +1,8 @@
{pkgs, catppuccin-alacritty, ...}:
{
pkgs,
catppuccin-alacritty,
...
}:
###########################################################
#
# Alacritty Configuration
+1 -2
View File
@@ -25,8 +25,7 @@
if pkgs.stdenv.isDarwin
then "14.0"
else "13.0";
in
''
in ''
-- Pull in the wezterm API
local wezterm = require 'wezterm'
+1 -3
View File
@@ -1,6 +1,4 @@
{ catppuccin-btop, ... }:
{
{catppuccin-btop, ...}: {
# https://github.com/catppuccin/btop/blob/main/themes/catppuccin_mocha.theme
home.file.".config/btop/themes".source = "${catppuccin-btop}/themes";
-1
View File
@@ -19,7 +19,6 @@
nmap # A utility for network discovery and security auditing
ipcalc # it is a calculator for the IPv4/v6 addresses
# Text Processing
# Docs: https://github.com/learnbyexample/Command-line-text-processing
gnugrep # GNU grep, provides `grep`/`egrep`/`fgrep`
-1
View File
@@ -2,7 +2,6 @@
config,
lib,
pkgs,
userfullname,
useremail,
...
+4 -2
View File
@@ -6,7 +6,8 @@
enableZshIntegration = true;
enableNushellIntegration = true;
settings = {
settings =
{
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
@@ -22,6 +23,7 @@
};
palette = "catppuccin_mocha";
} // builtins.fromTOML (builtins.readFile "${catppuccin-starship}/palettes/mocha.toml");
}
// builtins.fromTOML (builtins.readFile "${catppuccin-starship}/palettes/mocha.toml");
};
}
+5 -1
View File
@@ -1,4 +1,8 @@
{config, nushell-scripts, ...}: let
{
config,
nushell-scripts,
...
}: let
d = config.xdg.dataHome;
c = config.xdg.configHome;
cache = config.xdg.cacheHome;
+5 -1
View File
@@ -1,4 +1,8 @@
{ pkgs, lib, ... }: {
{
pkgs,
lib,
...
}: {
# Adjust the color temperature(& brightness) of your screen according to
# your surroundings. This may help your eyes hurt less if you are
# working in front of the screen at night.
+4 -2
View File
@@ -24,9 +24,11 @@
];
# https://github.com/catppuccin/cava
home.file.".config/cava/config".text = ''
home.file.".config/cava/config".text =
''
# custom cava config
'' + builtins.readFile "${catppuccin-cava}/mocha.cava";
''
+ builtins.readFile "${catppuccin-cava}/mocha.cava";
programs = {
mpv = {
+1 -3
View File
@@ -1,6 +1,4 @@
{ wallpapers, ... }:
{
{wallpapers, ...}: {
# https://github.com/ryan4yin/wallpapers
home.file.".config/wallpapers".source = wallpapers;
home.file.".local/bin/wallpaper_random" = {
+1 -2
View File
@@ -62,8 +62,7 @@
"image/webp" = ["imv.desktop"];
};
associations.removed =
{
associations.removed = {
# ......
};
};
+4 -3
View File
@@ -1,6 +1,8 @@
{ pkgs, anyrun, ... }:
{
pkgs,
anyrun,
...
}: {
imports = [
anyrun.homeManagerModules.default
];
@@ -83,5 +85,4 @@
}
'';
};
}
-1
View File
@@ -43,5 +43,4 @@
"GBM_BACKEND" = "nvidia-drm";
"__GLX_VENDOR_LIBRARY_NAME" = "nvidia";
};
}
-1
View File
@@ -1,7 +1,6 @@
{
config,
pkgs,
username,
...
}: {
@@ -18,7 +18,6 @@
boot.loader.efi.efiSysMountPoint = "/boot";
boot.loader.systemd-boot.enable = true;
# boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
@@ -41,7 +40,6 @@
"cifs" # mount windows share
];
boot.initrd = {
# unlocked luks devices via a keyfile or prompt a passphrase.
luks.devices."crypted-nixos" = {
-1
View File
@@ -24,7 +24,6 @@
#
# See also https://grahamc.com/blog/erase-your-darlings/
# NOTE: impermanence only mounts the directory/file list below to /persistent
# If the directory/file already exists in the root filesystem, you should
# move those files/directories to /persistent first!
+12 -3
View File
@@ -10,7 +10,11 @@
}: let
username = specialArgs.username;
in
{ name, nodes, ... }: {
{
name,
nodes,
...
}: {
deployment = {
targetHost = name; # hostName or IP address
targetUser = targetUser;
@@ -25,7 +29,10 @@ in
nix.registry.nixpkgs.flake = nixpkgs;
nix.channel.enable = false; # disable nix-channel, we use flakes instead.
}
] ++ (if (home-module != null) then [
]
++ (
if (home-module != null)
then [
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
@@ -34,5 +41,7 @@ in
home-manager.extraSpecialArgs = specialArgs;
home-manager.users."${username}" = home-module;
}
] else []);
]
else []
);
}
+5 -1
View File
@@ -1,4 +1,8 @@
{pkgs, config, ...}: {
{
pkgs,
config,
...
}: {
##########################################################################
#
# Install all apps and packages here.
+1 -2
View File
@@ -1,5 +1,4 @@
{ username, ... }:
{
{username, ...}: {
####################################################################
#
# NixOS's Configuration for Remote Building / Distributed Building
+1 -3
View File
@@ -1,6 +1,4 @@
{ username, ... }:
{
{username, ...}: {
# Don't allow mutation of users outside the config.
users.mutableUsers = false;
-1
View File
@@ -1,5 +1,4 @@
{pkgs, ...}: {
# =========================================================================
# Base NixOS Configuration
# =========================================================================
+4 -2
View File
@@ -5,8 +5,10 @@ builtins.map
(builtins.filter # find all overlay files in the current directory
(f:
f != "default.nix" # ignore default.nix
(
f:
f
!= "default.nix" # ignore default.nix
&& f != "README.md" # ignore README.md
)
(builtins.attrNames (builtins.readDir ./.)))
-1
View File
@@ -3,7 +3,6 @@
pkgs,
agenix,
mysecrets,
username,
...
}: {
-1
View File
@@ -3,7 +3,6 @@
pkgs,
agenix,
mysecrets,
username,
...
}: {