feat: add comments, format all nix files

This commit is contained in:
Ryan Yin
2023-06-13 01:05:13 +08:00
parent 86114a4db1
commit dc0fc97cb9
47 changed files with 438 additions and 420 deletions

View File

@@ -7,4 +7,4 @@
xdg.configFile."alacritty/alacritty.yml".source = ./alacritty.yml;
xdg.configFile."alacritty/theme_github_dark.yml".source = ./theme_github_dark.yml;
}
}

View File

@@ -1,11 +1,11 @@
{config, pkgs, nil, ...}:
{ config, pkgs, nil, ... }:
{
home.packages = with pkgs; [
nil.packages."${pkgs.system}".default # nix language server
nil.packages."${pkgs.system}".default # nix language server
# GUI IDE
insomnia # REST client
insomnia # REST client
# need to run `conda-install` before using it
# need to run `conda-shell` before using command `conda`
@@ -33,4 +33,4 @@
programs.gh = {
enable = true;
};
}
}

View File

@@ -1,10 +1,11 @@
{config, ...}:
{ config, ... }:
let
d = config.xdg.dataHome;
c = config.xdg.configHome;
cache = config.xdg.cacheHome;
in rec {
in
rec {
# add environment variables
systemd.user.sessionVariables = {
# clean up ~
@@ -29,4 +30,4 @@ in rec {
};
home.sessionVariables = systemd.user.sessionVariables;
}
}

View File

@@ -1,6 +1,5 @@
{
pkgs,
...
{ pkgs
, ...
}: {
programs.ssh = {
enable = true;
@@ -36,4 +35,4 @@
# check imported keys by `ssh-add -l`
# TODO `ssh-add` can only add keys temporary, use gnome-keyring to unlock all keys after login.
};
}
}

View File

@@ -1,31 +1,31 @@
{pkgs, config, ...}:
{ pkgs, config, ... }:
{
# Linux Only Packages, not available on Darwin
home.packages = with pkgs; [
btop # replacement of htop/nmon
btop # replacement of htop/nmon
htop
iotop
nmon
## networking tools
wireguard-tools # manage wireguard vpn manually, via wg-quick
wireguard-tools # manage wireguard vpn manually, via wg-quick
iftop
# misc
libnotify
# system call monitoring
strace # system call monitoring
ltrace # library call monitoring
lsof # list open files
strace # system call monitoring
ltrace # library call monitoring
lsof # list open files
# system tools
ethtool
sysstat
lm_sensors # for `sensors` command
cifs-utils # for mounting windows shares
lm_sensors # for `sensors` command
cifs-utils # for mounting windows shares
];
# auto mount usb drives

View File

@@ -2,10 +2,10 @@
# It's a bunch of specifications from freedesktop.org intended to standardize desktops and
# other GUI applications on various systems (primarily Unix-like) to be interoperable:
# https://www.freedesktop.org/wiki/Specifications/
{config, pkgs, ...}:
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
xdg-utils # provides cli tools such as `xdg-mime` `xdg-open`
xdg-utils # provides cli tools such as `xdg-mime` `xdg-open`
xdg-user-dirs
];
@@ -22,13 +22,13 @@
# ls /etc/profiles/per-user/ryan/share/applications/
mimeApps = {
enable = true;
defaultApplications =
defaultApplications =
let
browser = ["firefox.desktop"];
browser = [ "firefox.desktop" ];
in
{
"application/json" = browser;
"application/pdf" = browser; # TODO: pdf viewer
"application/pdf" = browser; # TODO: pdf viewer
"text/html" = browser;
"text/xml" = browser;
@@ -48,18 +48,18 @@
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/unknown" = browser;
"x-scheme-handler/discord" = ["discord.desktop"];
"x-scheme-handler/tg" = ["telegramdesktop.desktop"];
"audio/*" = ["mpv.desktop"];
"video/*" = ["mpv.dekstop"];
"image/*" = ["imv.desktop"];
"x-scheme-handler/discord" = [ "discord.desktop" ];
"x-scheme-handler/tg" = [ "telegramdesktop.desktop" ];
"audio/*" = [ "mpv.desktop" ];
"video/*" = [ "mpv.dekstop" ];
"image/*" = [ "imv.desktop" ];
};
associations.removed =
let
browser = ["google-chrome.desktop"];
browser = [ "google-chrome.desktop" ];
in
{
"text/html" = browser;