mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-22 16:58:31 +02:00
feat: simplify flake.nix
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ ... }: {
|
||||
{...}: {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{ ... }:
|
||||
{
|
||||
# a cat(1) clone with syntax highlighting and Git integration.
|
||||
{...}: {
|
||||
# a cat(1) clone with syntax highlighting and Git integration.
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
@@ -12,6 +11,4 @@
|
||||
Catppuccin-mocha = builtins.readFile ./Catppuccin-mocha.tmTheme;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
neofetch
|
||||
nnn # terminal file manager
|
||||
@@ -20,12 +18,12 @@
|
||||
# networking tools
|
||||
mtr # A network diagnostic tool
|
||||
iperf3
|
||||
dnsutils # `dig` + `nslookup`
|
||||
dnsutils # `dig` + `nslookup`
|
||||
ldns # replacement of `dig`, it provide the command `drill`
|
||||
aria2 # A lightweight multi-protocol & multi-source command-line download utility
|
||||
socat # replacement of openbsd-netcat
|
||||
nmap # A utility for network discovery and security auditing
|
||||
ipcalc # it is a calculator for the IPv4/v6 addresses
|
||||
ipcalc # it is a calculator for the IPv4/v6 addresses
|
||||
|
||||
# misc
|
||||
cowsay
|
||||
@@ -40,7 +38,7 @@
|
||||
gnupg
|
||||
|
||||
# nix related
|
||||
#
|
||||
#
|
||||
# it provides the command `nom` works just like `nix
|
||||
# with more details log output
|
||||
nix-output-monitor
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
imports = [
|
||||
./bat
|
||||
./nushell
|
||||
@@ -11,5 +10,4 @@
|
||||
./git.nix
|
||||
./starship.nix
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# `programs.git` will generate the config file: ~/.config/git/config
|
||||
# to make git use this config file, `~/.gitconfig` should not exist!
|
||||
#
|
||||
# https://git-scm.com/docs/git-config#Documentation/git-config.txt---global
|
||||
home.activation.removeExistingGitconfig = lib.hm.dag.entryBefore [ "checkLinkTargets" ] ''
|
||||
home.activation.removeExistingGitconfig = lib.hm.dag.entryBefore ["checkLinkTargets"] ''
|
||||
rm -f ~/.gitconfig
|
||||
'';
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{ ... }: {
|
||||
{...}: {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
configFile.source = ./config.nu;
|
||||
|
||||
# home-manager will merge the cotent in `environmentVariables` with the `envFile.source`
|
||||
# but basically, I set all environment variables via the shell-independent way, so I don't need to use those two options
|
||||
#
|
||||
#
|
||||
# envFile.source = ./env.nu;
|
||||
# environmentVariables = { FOO="bar"; };
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ ... }: {
|
||||
{...}: {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
{pkgs, ...}: let
|
||||
buildTmuxPlugin = pkgs.tmuxPlugins.mkTmuxPlugin;
|
||||
in
|
||||
{
|
||||
in {
|
||||
draculaTheme = buildTmuxPlugin {
|
||||
pluginName = "dracula";
|
||||
version = "v2.2.0";
|
||||
src = builtins.fetchTarball {
|
||||
name = "dracula-tmux-v2.2.0";
|
||||
url = "https://github.com/dracula/tmux/archive/refs/tags/v2.2.0.tar.gz";
|
||||
name = "dracula-tmux-v2.2.0";
|
||||
url = "https://github.com/dracula/tmux/archive/refs/tags/v2.2.0.tar.gz";
|
||||
sha256 = "sha256:0v2k994yy4xx2iw8qxg7qphw46gq2qmg496i3a3h9b6jgwxqm7zn";
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
plugins = pkgs.tmuxPlugins // pkgs.callPackage ./custom-plugins.nix {};
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
plugins = pkgs.tmuxPlugins // pkgs.callPackage ./custom-plugins.nix {};
|
||||
in {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shell = "${pkgs.nushell}/bin/nu";
|
||||
|
||||
# Resize the window to the size of the smallest session for which it is the current window.
|
||||
#
|
||||
#
|
||||
aggressiveResize = true;
|
||||
|
||||
# https://github.com/tmux-plugins/tmux-sensible
|
||||
# tmux-sensible overwrites default tmux shortcuts, makes them more sane.
|
||||
sensibleOnTop = true;
|
||||
|
||||
|
||||
# extraConfig = builtins.readFile ./tmux.conf;
|
||||
# keyMode = "vi"; # default is emacs
|
||||
|
||||
|
||||
baseIndex = 1; # start index from 1
|
||||
escapeTime = 0; # do not wait for escape key
|
||||
terminal = "xterm-256color";
|
||||
@@ -31,8 +32,8 @@ in
|
||||
plugin = continuum;
|
||||
extraConfig = ''
|
||||
set -g @continuum-save-interval '15'
|
||||
|
||||
# Option to display current status of tmux continuum in tmux status line.
|
||||
|
||||
# Option to display current status of tmux continuum in tmux status line.
|
||||
set -g status-right 'Continuum status: #{continuum_status}'
|
||||
'';
|
||||
}
|
||||
@@ -41,7 +42,7 @@ in
|
||||
# Manually persists tmux environment across system restarts.
|
||||
# prefix + Ctrl-s - save
|
||||
# prefix + Ctrl-r - restore
|
||||
#
|
||||
#
|
||||
plugin = resurrect;
|
||||
# Restore Neovim sessions
|
||||
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
{...}: {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user