feat: initial commit; NixOS Era
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
.env.nix
|
||||||
|
hardware-configuration.nix
|
||||||
126
README.md
Normal file
126
README.md
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
# BluePlum's dotfiles
|
||||||
|
|
||||||
|
Sup. This repository is representative of my personal configuration files
|
||||||
|
(available [here at https://github.com/antonw51/dotfiles](https://github.com/antonw51/dotfiles)).
|
||||||
|
|
||||||
|
Feel free to look at, pick and choose, fork, or do whatever you want with
|
||||||
|
these. That's kind of the point.
|
||||||
|
|
||||||
|
See what I consider my dotfiles to be at [the Preferences section](#Preferences)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### NixOS
|
||||||
|
|
||||||
|
This entire repository is representative of a `/etc/nixos` directory for use
|
||||||
|
with NixOS. Installing these dotfiles is hence easiest on NixOS.
|
||||||
|
|
||||||
|
To do so, you'll need `git`, your favorite editor and the root priviliges for
|
||||||
|
your system. (For a bare NixOS system `nix-shell` suffices:)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ nix-shell -p git
|
||||||
|
```
|
||||||
|
|
||||||
|
Clone this repository into a folder that's ideally owned by your user account
|
||||||
|
rather than root (or just use `sudo` for the following steps). Then copy its
|
||||||
|
contents into the `/etc/nixos` directory.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Remove existing configuration
|
||||||
|
$ [ -f /etc/nixos/configuration.nix ]
|
||||||
|
&& sudo rm /etc/nixos/configuration.nix
|
||||||
|
|
||||||
|
$ git clone https://github.com/antonw51/dotfiles ~/dotfiles
|
||||||
|
$ sudo cp -r ~/dotfiles/* /etc/nixos
|
||||||
|
```
|
||||||
|
|
||||||
|
You will also need to make a `.env.nix` file for device specific configuration.
|
||||||
|
`nixos-rebuild build` will tell you which keys need to be filled out, but the
|
||||||
|
current minimal config looks like (`/etc/nixos/.env.nix`):
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
hostname = "pinklilac"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!INFO]
|
||||||
|
>
|
||||||
|
> This `.env.nix` file configures some keys shared across the configuration.
|
||||||
|
> Namely this `hostname` property which declares `system.networking.hostname`
|
||||||
|
> _and_ adds a nix file at `/etc/nixos/{hostname}.nix` (where `{hostname}` is
|
||||||
|
> your hostname) to `configuration.nix` module `imports`.
|
||||||
|
>
|
||||||
|
> With this you can configure per-device specifics, such as displays, or
|
||||||
|
> additional configuration. See `blueplum.nix` for an example.
|
||||||
|
|
||||||
|
Thereafter you can run `sudo nixos-rebuild boot` to build the configuration and
|
||||||
|
`reboot` to apply it appropriately.
|
||||||
|
|
||||||
|
If you forked or own the repository and want to cleanly keep the git repository
|
||||||
|
seperated from write-protected `/etc/` files to commit to the repository, you
|
||||||
|
can move the `git` file and `.git` directories contents to another more
|
||||||
|
permanent directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# In this example, the persistent directory will be ~/dev/nixos
|
||||||
|
|
||||||
|
$ mkdir -p ~/dev/nixos
|
||||||
|
$ mv -r ~/dotfiles/.git/* ~/dev/nixos
|
||||||
|
$ mv ~/dotfiles/git ~/dev/nixos && chmod +x ~/dev/nixos/git
|
||||||
|
|
||||||
|
# Optionally remove the originally cloned directory:
|
||||||
|
$ rm -r ~/dotfiles # git metadata is preserved.
|
||||||
|
```
|
||||||
|
|
||||||
|
Then use the `git` executable (with `fish`) in the new directory to interact with the repository held in `/etc/nixos`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ cd ~/dev/nixos
|
||||||
|
$ ./git add .
|
||||||
|
$ ./git commit
|
||||||
|
$ ./git push
|
||||||
|
# ...
|
||||||
|
```
|
||||||
|
|
||||||
|
### Other
|
||||||
|
|
||||||
|
NixOS allows for reproducible and easily configurable configuration files both
|
||||||
|
system- and user-wide. It makes the installation process a lot easier.
|
||||||
|
|
||||||
|
Without NixOS to manage your system, you'll have to configure and "generate"
|
||||||
|
configs yourself. For most things, `git`, `i3`, and packages alike this
|
||||||
|
consists of essentially translating the contents of files such as `home.nix` or
|
||||||
|
`home/i3.nix` into equivilant configuration.
|
||||||
|
|
||||||
|
However, program configurations within the `pkgs` directory don't have this
|
||||||
|
constraint, as they're defined as traditional configs and then simply copied.
|
||||||
|
These you can copy or symlink to quickly set up the appropriate software. (For
|
||||||
|
instance, to set up Fish, you can link `pkgs/fish` to your local
|
||||||
|
`$__fish_config_dir`.)
|
||||||
|
|
||||||
|
If you choose this approach, set up symlinks, and want to commit/contribute to
|
||||||
|
the git repository contained within the dotfiles, you may do so within the
|
||||||
|
cloned repository; no need to move anything or use any special git scripts.
|
||||||
|
|
||||||
|
## Preferences
|
||||||
|
|
||||||
|
While I don't _necessarily_ follow any specific ideologies when
|
||||||
|
making/modifying my dotfiles, I do typically:
|
||||||
|
|
||||||
|
- Try and keep things to essentials (not minimalistic, but nothing overkill)
|
||||||
|
- Personally familiar (keyboard shortcuts might not be to your liking)
|
||||||
|
- With _some_ expansion in mind (`.env.nix` for example)
|
||||||
|
- Somewhat consistent (The IBM Carbon colors are currently a personal favorite
|
||||||
|
of mine)
|
||||||
|
- Formatted and linted consistently (Lua, Nix, and Fish files are all
|
||||||
|
formatted, and I try to keep them up to high, consistent standard)
|
||||||
|
- Ephermeral (I won't live forever, duh, and this ain't a group project)
|
||||||
|
- Somewhat informational? (You're reading this `README`, afterall)
|
||||||
|
- Redacted (You won't find sensitive things here, perhaps outside of my name,
|
||||||
|
which is rather obvious already)
|
||||||
|
- Fine-tuned (Irks, even minor I do my best to iron out while trying to keep
|
||||||
|
away from hacky patches)
|
||||||
42
blueplum.nix
Normal file
42
blueplum.nix
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib ? pkgs.lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
concat = strings: lib.concatStringsSep " " strings;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
|
||||||
|
open = true;
|
||||||
|
|
||||||
|
nvidiaSettings = true;
|
||||||
|
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.displayManager.setupCommands = concat [
|
||||||
|
"${lib.getExe pkgs.xorg.xrandr}"
|
||||||
|
concat
|
||||||
|
[
|
||||||
|
"--output DP-0"
|
||||||
|
"--mode 1920x1080"
|
||||||
|
"--pos 0x0"
|
||||||
|
"--rate 144"
|
||||||
|
"--primary"
|
||||||
|
]
|
||||||
|
concat
|
||||||
|
[
|
||||||
|
"--output HDMI-0"
|
||||||
|
"--mode 1920x1080"
|
||||||
|
"--pos 1920x0"
|
||||||
|
"--rate 144"
|
||||||
|
]
|
||||||
|
];
|
||||||
|
}
|
||||||
227
configuration.nix
Normal file
227
configuration.nix
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
stateVersion = "25.05";
|
||||||
|
env = import ./.env.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
(import (./. + "/${env.hostname}.nix"))
|
||||||
|
(
|
||||||
|
let
|
||||||
|
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-${stateVersion}.tar.gz";
|
||||||
|
in
|
||||||
|
import "${home-manager}/nixos"
|
||||||
|
)
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(import "${fetchTarball "https://github.com/nix-community/fenix/archive/main.tar.gz"}/overlay.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
chromium
|
||||||
|
|
||||||
|
libsecret
|
||||||
|
gnome-keyring
|
||||||
|
adwaita-icon-theme
|
||||||
|
gtk3
|
||||||
|
|
||||||
|
vim
|
||||||
|
git
|
||||||
|
xh
|
||||||
|
jq
|
||||||
|
|
||||||
|
(fenix.complete.withComponents [
|
||||||
|
"rustc"
|
||||||
|
"cargo"
|
||||||
|
"clippy"
|
||||||
|
"rust-src"
|
||||||
|
"rustfmt"
|
||||||
|
"rust-analyzer"
|
||||||
|
])
|
||||||
|
nodejs-slim_latest
|
||||||
|
pnpm
|
||||||
|
nixd
|
||||||
|
nixfmt-rfc-style
|
||||||
|
clang
|
||||||
|
llvmPackages.bintools
|
||||||
|
stylua
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
noto-fonts-emoji
|
||||||
|
jetbrains-mono
|
||||||
|
nerd-fonts.symbols-only
|
||||||
|
inter
|
||||||
|
times-newer-roman
|
||||||
|
(import ./pkgs/monaco-font/default.nix { inherit pkgs; })
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts.fontconfig = {
|
||||||
|
enable = true;
|
||||||
|
defaultFonts = {
|
||||||
|
monospace = [
|
||||||
|
"JetBrains Mono"
|
||||||
|
"Symbols Nerd Font"
|
||||||
|
"Liberation Mono"
|
||||||
|
"Monaco"
|
||||||
|
];
|
||||||
|
sansSerif = [
|
||||||
|
"Inter"
|
||||||
|
"Noto Sans"
|
||||||
|
];
|
||||||
|
serif = [ "Times Newer Roman" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
windowManager.i3 = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
rofi
|
||||||
|
i3status
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
displayManager.startx.enable = true;
|
||||||
|
tty = 7;
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
options = "caps:super";
|
||||||
|
};
|
||||||
|
|
||||||
|
excludePackages = with pkgs; [ xterm ];
|
||||||
|
};
|
||||||
|
greetd = {
|
||||||
|
enable = true;
|
||||||
|
vt = config.services.xserver.tty;
|
||||||
|
restart = false;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command = lib.concatStringsSep " " [
|
||||||
|
"${lib.getExe pkgs.greetd.tuigreet}"
|
||||||
|
"--remember"
|
||||||
|
"--asterisks"
|
||||||
|
"--time"
|
||||||
|
];
|
||||||
|
user = "greeter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.chromium = import ./home/chromium.nix;
|
||||||
|
|
||||||
|
programs.fish.enable = true;
|
||||||
|
programs.bash.interactiveShellInit = ''
|
||||||
|
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] then
|
||||||
|
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||||
|
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.anton = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "anton";
|
||||||
|
shell = pkgs.bash;
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.users.anton = import ./home.nix;
|
||||||
|
|
||||||
|
# programs.home-manager.enable = true;
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme = "gnome";
|
||||||
|
style = "adwaita-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
Experimental = true;
|
||||||
|
FastConnectable = true;
|
||||||
|
};
|
||||||
|
Policy.AutoEnable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
configurationLimit = 10;
|
||||||
|
};
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
boot.kernelParams = [ "console=tty1" ];
|
||||||
|
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
networking.hostName = env.hostname;
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Stockholm";
|
||||||
|
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "sv_SE.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "sv_SE.UTF-8";
|
||||||
|
LC_MEASUREMENT = "sv_SE.UTF-8";
|
||||||
|
LC_MONETARY = "sv_SE.UTF-8";
|
||||||
|
LC_NAME = "sv_SE.UTF-8";
|
||||||
|
LC_NUMERIC = "sv_SE.UTF-8";
|
||||||
|
LC_PAPER = "sv_SE.UTF-8";
|
||||||
|
LC_TELEPHONE = "sv_SE.UTF-8";
|
||||||
|
LC_TIME = "sv_SE.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.settings.extra-experimental-features = [ "nix-command" ];
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = stateVersion; # Did you read the comment?
|
||||||
|
}
|
||||||
5
git
Executable file
5
git
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env fish
|
||||||
|
git \
|
||||||
|
--git-dir=(status dirname) \
|
||||||
|
--work-tree=/etc/nixos \
|
||||||
|
$argv
|
||||||
131
home.nix
Normal file
131
home.nix
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib ? pkgs.lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
neovim = pkgs.callPackage ./pkgs/neovim/default.nix { };
|
||||||
|
fish = pkgs.callPackage ./pkgs/fish/default.nix { };
|
||||||
|
|
||||||
|
env = import ./.env.nix;
|
||||||
|
|
||||||
|
home = /home/anton;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.username = lib.mkDefault "anton";
|
||||||
|
home.homeDirectory = lib.mkDefault home;
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
element-desktop
|
||||||
|
spotify
|
||||||
|
kitty
|
||||||
|
vesktop
|
||||||
|
flameshot
|
||||||
|
krita
|
||||||
|
davinci-resolve
|
||||||
|
|
||||||
|
btop
|
||||||
|
neovim
|
||||||
|
xclip
|
||||||
|
tree
|
||||||
|
xh
|
||||||
|
babelfish
|
||||||
|
hyperfine
|
||||||
|
|
||||||
|
# required by spotify
|
||||||
|
ffmpeg_4
|
||||||
|
];
|
||||||
|
|
||||||
|
home.pointerCursor = {
|
||||||
|
gtk.enable = true;
|
||||||
|
x11.enable = true;
|
||||||
|
name = "Posy_Cursor_Black";
|
||||||
|
size = 32;
|
||||||
|
package = pkgs.posy-cursors;
|
||||||
|
};
|
||||||
|
|
||||||
|
xsession = {
|
||||||
|
enable = true;
|
||||||
|
windowManager.i3 = import ./home/i3.nix { inherit pkgs; };
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.btop.enable = true;
|
||||||
|
programs.fastfetch.enable = true;
|
||||||
|
|
||||||
|
programs.kitty = import ./home/kitty.nix { inherit pkgs; };
|
||||||
|
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
shellInit = ''
|
||||||
|
set fish_function_path $fish_function_path ${fish}/functions
|
||||||
|
'';
|
||||||
|
interactiveShellInit = ''
|
||||||
|
source ${fish}/config.fish
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Fix Fish command not found issues
|
||||||
|
programs.command-not-found.enable = false;
|
||||||
|
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
extraConfig = ''
|
||||||
|
set runtimepath+=${neovim}
|
||||||
|
source ${neovim}/init.lua
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.rofi = {
|
||||||
|
enable = true;
|
||||||
|
theme = "gruvbox-dark-soft";
|
||||||
|
font = "Monaco 12";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
userName = "Anton";
|
||||||
|
userEmail = "aligator.h0spital.e@gmail.com";
|
||||||
|
|
||||||
|
signing =
|
||||||
|
if (env.git or { }) ? signingKey then
|
||||||
|
{
|
||||||
|
key = env.git.signingKey;
|
||||||
|
signByDefault = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ signByDefault = false; };
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
|
||||||
|
"url \"https://github.com/\"".insteadOf = "gh:";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSshSupport = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
|
||||||
|
pinentry.package = pkgs.pinentry-curses;
|
||||||
|
};
|
||||||
|
|
||||||
|
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "Adwaita-dark";
|
||||||
|
package = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
NIXPKGS_ALLOW_UNFREE = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.stateVersion = (pkgs.callPackage <nixos-config> { }).system.stateVersion;
|
||||||
|
}
|
||||||
41
home/chromium.nix
Normal file
41
home/chromium.nix
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
defaultSearchProviderEnabled = true;
|
||||||
|
defaultSearchProviderSuggestURL = "https://duckduckgo.com/?q={searchTerms}&type=list";
|
||||||
|
defaultSearchProviderSearchURL = "https://duckduckgo.com/?q={searchTerms}";
|
||||||
|
|
||||||
|
extraOpts =
|
||||||
|
let
|
||||||
|
languagetool = "oldceeleldhonbafppcapldpdifcinji";
|
||||||
|
shortkeys = "logpjaacgmcbpdkdchjiaagddngobkck";
|
||||||
|
darkreader = "eimadpbcbfnmbkopoojfekhnkhdbieeh";
|
||||||
|
ublock = "ddkjiahejlhfcafbddmgiahcphecmpfh";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
extensions = {
|
||||||
|
install.initiallist = [
|
||||||
|
languagetool
|
||||||
|
shortkeys
|
||||||
|
darkreader
|
||||||
|
ublock
|
||||||
|
];
|
||||||
|
commands."linux:Alt+Left" = {
|
||||||
|
command_name = "04-prevtab";
|
||||||
|
extension = shortkeys;
|
||||||
|
global = false;
|
||||||
|
};
|
||||||
|
commands."linux:Alt+Right" = {
|
||||||
|
command_name = "03-nexttab";
|
||||||
|
extension = shortkeys;
|
||||||
|
global = false;
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
message_center.disabled_extension_ids = [ shortkeys ];
|
||||||
|
profile.content_settings.permission_actions = {
|
||||||
|
mic_stream = [ { action = 2; } ];
|
||||||
|
notifications = [ { action = 2; } ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
100
home/i3.nix
Normal file
100
home/i3.nix
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib ? pkgs.lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
mod = "Mod4";
|
||||||
|
|
||||||
|
wallpaper = pkgs.callPackage ../pkgs/wallpaper/default.nix { };
|
||||||
|
|
||||||
|
env = import /etc/nixos/.env.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
modifier = mod;
|
||||||
|
|
||||||
|
fonts = {
|
||||||
|
names = [ "Monaco" ];
|
||||||
|
size = 8.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
keybindings = lib.mkOptionDefault {
|
||||||
|
"${mod}+q" = "kill";
|
||||||
|
"${mod}+n" = "exec \"${
|
||||||
|
lib.concatStringsSep " " [
|
||||||
|
"${lib.getExe pkgs.rofi}"
|
||||||
|
"-show combi"
|
||||||
|
"-modes combi"
|
||||||
|
"-combi-modes drun,run"
|
||||||
|
"-combi-display-format {text}"
|
||||||
|
]
|
||||||
|
}\"";
|
||||||
|
"${mod}+Return" = "exec ${lib.getExe pkgs.kitty}";
|
||||||
|
|
||||||
|
"${mod}+Left" = "focus left";
|
||||||
|
"${mod}+Right" = "focus right";
|
||||||
|
"${mod}+Up" = "focus up";
|
||||||
|
"${mod}+Down" = "focus down";
|
||||||
|
|
||||||
|
"${mod}+Shift+Left" = "move left";
|
||||||
|
"${mod}+Shift+Right" = "move right";
|
||||||
|
"${mod}+Shift+Up" = "move up";
|
||||||
|
"${mod}+Shift+Down" = "move down";
|
||||||
|
|
||||||
|
"${mod}+Ctrl+Left" = "move workspace to output left";
|
||||||
|
"${mod}+Ctrl+Right" = "move workspace to output right";
|
||||||
|
|
||||||
|
"Print" = "exec ${lib.getExe pkgs.flameshot} gui";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig =
|
||||||
|
let
|
||||||
|
background = lib.concatStringsSep " " [
|
||||||
|
"exec --no-startup-id"
|
||||||
|
"${lib.concatStringsSep " " [
|
||||||
|
"${lib.getExe pkgs.xwinwrap}"
|
||||||
|
"-g 3820x1080"
|
||||||
|
"-s"
|
||||||
|
"-b"
|
||||||
|
"-ni"
|
||||||
|
"-sp"
|
||||||
|
"-ov"
|
||||||
|
"-nf"
|
||||||
|
]}"
|
||||||
|
"--"
|
||||||
|
"${lib.concatStringsSep " " [
|
||||||
|
"${lib.getExe pkgs.mpv}"
|
||||||
|
"${wallpaper}/wallpaper.mov"
|
||||||
|
"-wid WID"
|
||||||
|
"--loop"
|
||||||
|
"--no-audio"
|
||||||
|
"--no-osc"
|
||||||
|
"--no-input-default-bindings"
|
||||||
|
"--no-input-cursor"
|
||||||
|
"--gpu-api=vulkan"
|
||||||
|
"--vo=gpu-next"
|
||||||
|
"--framedrop=vo"
|
||||||
|
"--profile=low-latency"
|
||||||
|
"--hwdec=auto"
|
||||||
|
]}"
|
||||||
|
];
|
||||||
|
displays =
|
||||||
|
if (env ? displays) then
|
||||||
|
lib.concatStringsSep "\n" [
|
||||||
|
"workspace 1 output ${env.displays.primary}"
|
||||||
|
(if (env.displays ? secondary) then "workspace 2 output ${env.displays.secondary}" else "")
|
||||||
|
"exec i3-msg focus output ${env.displays.primary}"
|
||||||
|
]
|
||||||
|
else
|
||||||
|
"";
|
||||||
|
in
|
||||||
|
lib.concatStringsSep "\n" [
|
||||||
|
background
|
||||||
|
displays
|
||||||
|
];
|
||||||
|
}
|
||||||
49
home/kitty.nix
Normal file
49
home/kitty.nix
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
font = {
|
||||||
|
package = pkgs.jetbrains-mono;
|
||||||
|
name = "JetBrains Mono";
|
||||||
|
size = 13;
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
foreground #f2f4f8
|
||||||
|
background #161616
|
||||||
|
selection_foreground #f2f4f8
|
||||||
|
selection_background #2a2a2a
|
||||||
|
|
||||||
|
cursor #f2f4f8
|
||||||
|
cursor_text_color #161616
|
||||||
|
|
||||||
|
url_color #25be6a
|
||||||
|
|
||||||
|
active_border_color #78a9ff
|
||||||
|
inactive_border_color #535353
|
||||||
|
bell_border_color #3ddbd9
|
||||||
|
|
||||||
|
active_tab_foreground #0c0c0c
|
||||||
|
active_tab_background #78a9ff
|
||||||
|
inactive_tab_foreground #6e6f70
|
||||||
|
inactive_tab_background #2a2a2a
|
||||||
|
|
||||||
|
color0 #282828
|
||||||
|
color8 #484848
|
||||||
|
color1 #ee5396
|
||||||
|
color9 #f16da6
|
||||||
|
color2 #25be6a
|
||||||
|
color10 #46c880
|
||||||
|
color3 #ebcb8b
|
||||||
|
color11 #f0d399
|
||||||
|
color4 #78a9ff
|
||||||
|
color12 #8cb6ff
|
||||||
|
color5 #be95ff
|
||||||
|
color13 #c8a5ff
|
||||||
|
color6 #33b1ff
|
||||||
|
color14 #52bdff
|
||||||
|
color7 #dfdfe0
|
||||||
|
color15 #e4e4e5
|
||||||
|
color16 #3ddbd9
|
||||||
|
color17 #ff7eb6
|
||||||
|
'';
|
||||||
|
}
|
||||||
6
home/neovim.nix
Normal file
6
home/neovim.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
}
|
||||||
316
home/vesktop.nix
Normal file
316
home/vesktop.nix
Normal file
@@ -0,0 +1,316 @@
|
|||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
discordBranch = "stable";
|
||||||
|
tray = true;
|
||||||
|
minimizeToTray = false;
|
||||||
|
enableMenu = true;
|
||||||
|
hardwareAcceleration = true;
|
||||||
|
arRPC = true;
|
||||||
|
|
||||||
|
enableSplashScreen = false;
|
||||||
|
splashTheming = false;
|
||||||
|
};
|
||||||
|
vencord.settings = {
|
||||||
|
autoUpdate = true;
|
||||||
|
autoUpdateNotification = false;
|
||||||
|
notifyAboutUpdates = false;
|
||||||
|
useQuickCss = true;
|
||||||
|
disableMinSize = true;
|
||||||
|
plugins = {
|
||||||
|
CommandsAPI.enabled = true;
|
||||||
|
DynamicImageModalAPI.enabled = true;
|
||||||
|
MemberListDecoratorsAPI.enabled = true;
|
||||||
|
MessageAccessoriesAPI.enabled = true;
|
||||||
|
MessageDecorationsAPI.enabled = true;
|
||||||
|
MessageEventsAPI.enabled = true;
|
||||||
|
MessageUpdaterAPI.enabled = true;
|
||||||
|
ServerListAPI.enabled = true;
|
||||||
|
UserSettingsAPI.enabled = true;
|
||||||
|
AlwaysExpandRoles.enabled = true;
|
||||||
|
AlwaysTrust.enabled = true;
|
||||||
|
AnonymiseFileNames.enabled = true;
|
||||||
|
BetterGifPicker.enabled = true;
|
||||||
|
BetterSettings = {
|
||||||
|
enabled = true;
|
||||||
|
disableFade = true;
|
||||||
|
organizeMenu = true;
|
||||||
|
eagerLoad = true;
|
||||||
|
};
|
||||||
|
BetterUploadButton.enabled = true;
|
||||||
|
BiggerStreamPreview.enabled = true;
|
||||||
|
BlurNSFW.enabled = true;
|
||||||
|
CallTimer.enabled = true;
|
||||||
|
ConsoleJanitor = {
|
||||||
|
enabled = true;
|
||||||
|
disableLoggers = false;
|
||||||
|
disableSpotifyLogger = true;
|
||||||
|
whitelistedLoggers = "GatewaySocket; Routing/Utils";
|
||||||
|
allowLevel = {
|
||||||
|
error = true;
|
||||||
|
warn = false;
|
||||||
|
trace = false;
|
||||||
|
log = false;
|
||||||
|
info = false;
|
||||||
|
debug = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
CopyEmojiMarkdown.enabled = true;
|
||||||
|
CrashHandler.enabled = true;
|
||||||
|
CtrlEnterSend = {
|
||||||
|
enabled = false;
|
||||||
|
submitRule = "ctrl+enter";
|
||||||
|
sendMessageInTheMiddleOfACodeBlock = true;
|
||||||
|
};
|
||||||
|
CustomIdle = {
|
||||||
|
enabled = true;
|
||||||
|
idleTimeout = 10;
|
||||||
|
remainInIdle = true;
|
||||||
|
};
|
||||||
|
DisableCallIdle.enabled = true;
|
||||||
|
ExpressionCloner.enabled = true;
|
||||||
|
F8Break.enabled = true;
|
||||||
|
FakeNitro = {
|
||||||
|
enabled = true;
|
||||||
|
enableEmojiBypass = true;
|
||||||
|
emojiSize = 48;
|
||||||
|
transformEmojis = true;
|
||||||
|
enableStickerBypass = true;
|
||||||
|
stickerSize = 160;
|
||||||
|
transformStickers = true;
|
||||||
|
transformCompoundSentence = false;
|
||||||
|
enableStreamQualityBypass = true;
|
||||||
|
useHyperLinks = true;
|
||||||
|
hyperLinkText = "{{NAME}}";
|
||||||
|
disableEmbedPermissionCheck = false;
|
||||||
|
};
|
||||||
|
FakeProfileThemes = {
|
||||||
|
enabled = true;
|
||||||
|
nitroFirst = true;
|
||||||
|
};
|
||||||
|
FavoriteEmojiFirst.enabled = true;
|
||||||
|
FixCodeblockGap.enabled = true;
|
||||||
|
FixImagesQuality.enabled = true;
|
||||||
|
FixSpotifyEmbeds = {
|
||||||
|
enabled = true;
|
||||||
|
volume = 10;
|
||||||
|
};
|
||||||
|
FixYoutubeEmbeds.enabled = true;
|
||||||
|
ForceOwnerCrown.enabled = true;
|
||||||
|
FriendsSince.enabled = true;
|
||||||
|
FullSearchContext.enabled = true;
|
||||||
|
FullUserInChatbox.enabled = true;
|
||||||
|
GameActivityToggle.enabled = true;
|
||||||
|
IgnoreActivities = {
|
||||||
|
enabled = false;
|
||||||
|
listMode = 0;
|
||||||
|
idsList = "";
|
||||||
|
ignorePlaying = false;
|
||||||
|
ignoreStreaming = false;
|
||||||
|
ignoreListening = false;
|
||||||
|
ignoreWatching = false;
|
||||||
|
ignoreCompeting = false;
|
||||||
|
};
|
||||||
|
ImageFilename.enabled = true;
|
||||||
|
IrcColors = {
|
||||||
|
enabled = true;
|
||||||
|
lightness = 70;
|
||||||
|
memberListColors = true;
|
||||||
|
applyColorOnlyToUsersWithoutColor = false;
|
||||||
|
applyColorOnlyInDms = false;
|
||||||
|
};
|
||||||
|
LoadingQuotes = {
|
||||||
|
enabled = true;
|
||||||
|
replaceEvents = true;
|
||||||
|
enablePluginPresetQuotes = true;
|
||||||
|
enableDiscordPresetQuotes = true;
|
||||||
|
additionalQuotes = "";
|
||||||
|
additionalQuotesDelimiter = "|";
|
||||||
|
};
|
||||||
|
MemberCount.enabled = true;
|
||||||
|
MessageClickActions.enabled = true;
|
||||||
|
MessageLatency = {
|
||||||
|
enabled = true;
|
||||||
|
latency = 1;
|
||||||
|
detectDiscordKotlin = true;
|
||||||
|
showMillis = false;
|
||||||
|
ignoreSelf = false;
|
||||||
|
};
|
||||||
|
MessageLogger = {
|
||||||
|
enabled = true;
|
||||||
|
deleteStyle = "text";
|
||||||
|
logDeletes = true;
|
||||||
|
collapseDeleted = false;
|
||||||
|
logEdits = true;
|
||||||
|
inlineEdits = true;
|
||||||
|
ignoreBots = false;
|
||||||
|
ignoreSelf = false;
|
||||||
|
ignoreUsers = "";
|
||||||
|
ignoreChannels = "";
|
||||||
|
ignoreGuilds = "";
|
||||||
|
};
|
||||||
|
NewGuildSettings = {
|
||||||
|
enabled = true;
|
||||||
|
guild = true;
|
||||||
|
messages = 1;
|
||||||
|
everyone = true;
|
||||||
|
role = true;
|
||||||
|
highlights = true;
|
||||||
|
events = true;
|
||||||
|
showAllChannels = true;
|
||||||
|
};
|
||||||
|
NoDevtoolsWarning.enabled = true;
|
||||||
|
NoF1.enabled = true;
|
||||||
|
NoMosaic = {
|
||||||
|
enabled = false;
|
||||||
|
inlineVideo = true;
|
||||||
|
};
|
||||||
|
NoServerEmojis.enabled = true;
|
||||||
|
NormalizeMessageLinks.enabled = true;
|
||||||
|
NotificationVolume = {
|
||||||
|
enabled = false;
|
||||||
|
notificationVolume = 100;
|
||||||
|
};
|
||||||
|
OnePingPerDM.enabled = true;
|
||||||
|
PauseInvitesForever.enabled = true;
|
||||||
|
PermissionFreeWill = {
|
||||||
|
enabled = false;
|
||||||
|
lockout = true;
|
||||||
|
onboarding = true;
|
||||||
|
};
|
||||||
|
PermissionsViewer.enabled = true;
|
||||||
|
PinDMs = {
|
||||||
|
enabled = false;
|
||||||
|
pinOrder = 0;
|
||||||
|
canCollapseDmSection = false;
|
||||||
|
};
|
||||||
|
PlatformIndicators.enabled = true;
|
||||||
|
PreviewMessage.enabled = true;
|
||||||
|
QuickReply.enabled = true;
|
||||||
|
ReactErrorDecoder.enabled = true;
|
||||||
|
RelationshipNotifier.enabled = true;
|
||||||
|
ReplaceGoogleSearch = {
|
||||||
|
enabled = false;
|
||||||
|
replacementEngine = "off";
|
||||||
|
};
|
||||||
|
ReplyTimestamp.enabled = true;
|
||||||
|
RevealAllSpoilers.enabled = true;
|
||||||
|
RoleColorEverywhere.enabled = true;
|
||||||
|
SecretRingToneEnabler = {
|
||||||
|
enabled = false;
|
||||||
|
onlySnow = false;
|
||||||
|
};
|
||||||
|
Summaries = {
|
||||||
|
enabled = true;
|
||||||
|
summaryExpiryThresholdDays = 3;
|
||||||
|
};
|
||||||
|
SendTimestamps = {
|
||||||
|
enabled = true;
|
||||||
|
replaceMessageContents = true;
|
||||||
|
};
|
||||||
|
ServerInfo.enabled = true;
|
||||||
|
ServerListIndicators.enabled = true;
|
||||||
|
ShikiCodeblocks = {
|
||||||
|
enabled = true;
|
||||||
|
theme = "https://raw.githubusercontent.com/shikijs/textmate-grammars-themes/2d87559c7601a928b9f7e0f0dda243d2fb6d4499/packages/tm-themes/themes/dark-plus.json";
|
||||||
|
tryHljs = "SECONDARY";
|
||||||
|
useDevIcon = "GREYSCALE";
|
||||||
|
bgOpacity = 100;
|
||||||
|
};
|
||||||
|
ShowHiddenChannels.enabled = true;
|
||||||
|
ShowHiddenThings = {
|
||||||
|
enabled = true;
|
||||||
|
showTimeouts = true;
|
||||||
|
showInvitesPaused = true;
|
||||||
|
showModView = true;
|
||||||
|
};
|
||||||
|
ShowMeYourName = {
|
||||||
|
enabled = true;
|
||||||
|
mode = "nick-user";
|
||||||
|
friendNicknames = "dms";
|
||||||
|
displayNames = false;
|
||||||
|
inReplies = false;
|
||||||
|
};
|
||||||
|
SilentMessageToggle.enabled = true;
|
||||||
|
SilentTyping.enabled = true;
|
||||||
|
SpotifyControls.enabled = true;
|
||||||
|
SpotifyCrack.enabled = true;
|
||||||
|
SpotifyShareCommands.enabled = true;
|
||||||
|
SuperReactionTweaks = {
|
||||||
|
enabled = true;
|
||||||
|
superReactByDefault = false;
|
||||||
|
unlimitedSuperReactionPlaying = false;
|
||||||
|
superReactionPlayingLimit = 0;
|
||||||
|
};
|
||||||
|
TextReplace = {
|
||||||
|
enabled = false;
|
||||||
|
stringRules = [
|
||||||
|
{
|
||||||
|
find = "";
|
||||||
|
replace = "";
|
||||||
|
onlyIfIncludes = "";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
regexRules = [
|
||||||
|
{
|
||||||
|
find = "";
|
||||||
|
replace = "";
|
||||||
|
onlyIfIncludes = "";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
TypingIndicator.enabled = true;
|
||||||
|
TypingTweaks = {
|
||||||
|
enabled = true;
|
||||||
|
showAvatars = true;
|
||||||
|
showRoleColors = true;
|
||||||
|
alternativeFormatting = true;
|
||||||
|
};
|
||||||
|
UserMessagesPronouns = {
|
||||||
|
enabled = true;
|
||||||
|
pronounsFormat = "LOWERCASE";
|
||||||
|
showSelf = true;
|
||||||
|
};
|
||||||
|
UserVoiceShow.enabled = true;
|
||||||
|
ValidReply.enabled = true;
|
||||||
|
ValidUser.enabled = true;
|
||||||
|
VoiceChatDoubleClick.enabled = true;
|
||||||
|
VcNarrator = {
|
||||||
|
enabled = false;
|
||||||
|
voice = "us-mbrola-1 espeak-ng-mbrola";
|
||||||
|
volume = 1;
|
||||||
|
rate = 1;
|
||||||
|
sayOwnName = false;
|
||||||
|
latinOnly = false;
|
||||||
|
joinMessage = "{{USER}} joined";
|
||||||
|
leaveMessage = "{{USER}} left";
|
||||||
|
moveMessage = "{{USER}} moved to {{CHANNEL}}";
|
||||||
|
muteMessage = "{{USER}} muted";
|
||||||
|
unmuteMessage = "{{USER}} unmuted";
|
||||||
|
deafenMessage = "{{USER}} deafened";
|
||||||
|
undeafenMessage = "{{USER}} undeafened";
|
||||||
|
};
|
||||||
|
ViewRaw.enabled = true;
|
||||||
|
VoiceMessages.enabled = true;
|
||||||
|
VolumeBooster = {
|
||||||
|
enabled = true;
|
||||||
|
multiplier = 3;
|
||||||
|
};
|
||||||
|
WebKeybinds.enabled = true;
|
||||||
|
WebScreenShareFixes.enabled = true;
|
||||||
|
WhoReacted.enabled = true;
|
||||||
|
BadgeAPI.enabled = true;
|
||||||
|
NoTrack = {
|
||||||
|
enabled = true;
|
||||||
|
disableAnalytics = true;
|
||||||
|
};
|
||||||
|
Settings = {
|
||||||
|
enabled = true;
|
||||||
|
settingsLocation = "aboveNitro";
|
||||||
|
};
|
||||||
|
DisableDeepLinks.enabled = true;
|
||||||
|
SupportHelper.enabled = true;
|
||||||
|
WebContextMenus.enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
15
pkgs/fish/config.fish
Normal file
15
pkgs/fish/config.fish
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
set fish_greeting '( .-.)'
|
||||||
|
|
||||||
|
fish_vi_key_bindings
|
||||||
|
|
||||||
|
alias cls='clear; and echo $fish_greeting';
|
||||||
|
alias ...='cd ../..';
|
||||||
|
|
||||||
|
set -l directory (status dirname)
|
||||||
|
|
||||||
|
[ -f "$directory/prompt.fish" ]; and source "$directory/prompt.fish"
|
||||||
|
[ -f "$directory/alias.fish" ]; and source "$directory/alias.fish"
|
||||||
|
|
||||||
|
if not set -qx SSH_AUTH_SOCK
|
||||||
|
set -x SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket)
|
||||||
|
end
|
||||||
23
pkgs/fish/default.nix
Normal file
23
pkgs/fish/default.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
pkgs ? import <nixpkgs> { },
|
||||||
|
lib ? pkgs.lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
pkgs.stdenv.mkDerivation rec {
|
||||||
|
pname = "fish-config";
|
||||||
|
version = "1.0";
|
||||||
|
|
||||||
|
src = builtins.path {
|
||||||
|
path = ./.;
|
||||||
|
name = pname;
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -r ${src}/* $out/
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
dontBuild = true;
|
||||||
|
}
|
||||||
26
pkgs/fish/functions/clip.fish
Normal file
26
pkgs/fish/functions/clip.fish
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
function clip
|
||||||
|
if not command -q xclip
|
||||||
|
echoerr "clip: 'xclip' is not available on this system"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if not tty -s
|
||||||
|
set -l stdin
|
||||||
|
read stdin -z
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -ql stdin
|
||||||
|
echo "$stdin" | xclip -selection clipboard
|
||||||
|
echo "copied into clipboard (stdin)"
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if [ -n "$(string trim -- $argv)" ]
|
||||||
|
echo "$argv" | xclip -selection clipboard
|
||||||
|
echo "copied into clipboard"
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
xclip -selection clipboard -o
|
||||||
|
end
|
||||||
|
|
||||||
3
pkgs/fish/functions/echoerr.fish
Normal file
3
pkgs/fish/functions/echoerr.fish
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function echoerr
|
||||||
|
echo $argv >&2
|
||||||
|
end
|
||||||
45
pkgs/fish/functions/nix-shell.fish
Normal file
45
pkgs/fish/functions/nix-shell.fish
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
function nix-shell
|
||||||
|
set -l _argv (string split ' ' -- $argv);
|
||||||
|
|
||||||
|
if contains -- '-q' $_argv; or contains -- '--query' $_argv
|
||||||
|
for pkg in (string split ' ' -- $FISH_NIX_PACKAGES)
|
||||||
|
echo $pkg
|
||||||
|
end
|
||||||
|
return 0;
|
||||||
|
end
|
||||||
|
|
||||||
|
function package_flag -a arg
|
||||||
|
contains -- '-p' $arg
|
||||||
|
or contains -- '--packages' $arg
|
||||||
|
end
|
||||||
|
|
||||||
|
if not command -q nix-shell; or not package_flag $argv
|
||||||
|
command nix-shell --run fish $argv;
|
||||||
|
return $status;
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l packages
|
||||||
|
set -l reading_packages 0
|
||||||
|
for arg in $_argv
|
||||||
|
if [ $reading_packages -ne 0 ]
|
||||||
|
if string match -r '^-'
|
||||||
|
set reading_packages 0
|
||||||
|
else
|
||||||
|
not contains -- $arg (string split ' ' -- $FISH_NIX_PACKAGES);
|
||||||
|
and set packages $packages $arg
|
||||||
|
end
|
||||||
|
else
|
||||||
|
package_flag $arg; and set reading_packages 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l prev_packages $FISH_NIX_PACKAGES;
|
||||||
|
set -x FISH_NIX_PACKAGES $prev_packages $packages;
|
||||||
|
|
||||||
|
command nix-shell --run fish $argv;
|
||||||
|
set -l nix_status $status;
|
||||||
|
|
||||||
|
set -x FISH_NIX_PACKAGES $prev_packages;
|
||||||
|
|
||||||
|
return $nix_status
|
||||||
|
end
|
||||||
12
pkgs/fish/functions/nix-shell.fish.bckup
Normal file
12
pkgs/fish/functions/nix-shell.fish.bckup
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
function nix-shell
|
||||||
|
if not command -q nix-shell
|
||||||
|
command nix-shell;
|
||||||
|
return $status;
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l _argv $argv
|
||||||
|
argparse -i 'p/packages=' -- $argv
|
||||||
|
or command nix-shell -- $_argv
|
||||||
|
|
||||||
|
set -x FISH_NIX_PACKAGES
|
||||||
|
end
|
||||||
18
pkgs/fish/functions/round.fish
Normal file
18
pkgs/fish/functions/round.fish
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
function round
|
||||||
|
argparse -n 'round' -i 'p/precision=!_validate_int' -- $argv
|
||||||
|
or return 1;
|
||||||
|
|
||||||
|
set -l value (string trim -- $argv)
|
||||||
|
if [ -z $value ]
|
||||||
|
echoerr 'round: no input'
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l precision 1
|
||||||
|
if set -q _flag_precision
|
||||||
|
set precision (math "10 ^ $_flag_precision")
|
||||||
|
end
|
||||||
|
|
||||||
|
set value (math "$value * $precision")
|
||||||
|
echo (math "round($value) / $precision")
|
||||||
|
end
|
||||||
76
pkgs/fish/prompt.fish
Normal file
76
pkgs/fish/prompt.fish
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
function fish_mode_prompt; end
|
||||||
|
|
||||||
|
function fish_prompt
|
||||||
|
set -l command_status $status;
|
||||||
|
|
||||||
|
set -l duration '';
|
||||||
|
begin
|
||||||
|
[ $CMD_DURATION -gt 700 ]; and set -l seconds \
|
||||||
|
"$(round -p 2 (math $CMD_DURATION / 1000 % 60))s";
|
||||||
|
[ $CMD_DURATION -gt 60000 ]; and set -l minutes \
|
||||||
|
"$(round (math $CMD_DURATION / 60000))m";
|
||||||
|
|
||||||
|
[ $CMD_DURATION -gt 700 ]; and set duration (string join '' -- \
|
||||||
|
(set_color normal) \
|
||||||
|
'took ' \
|
||||||
|
(set_color yellow) \
|
||||||
|
(string join ' ' -- $minutes $seconds) \
|
||||||
|
);
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l mode
|
||||||
|
begin
|
||||||
|
function color_and_wrap -a color char
|
||||||
|
string join '' -- (set_color --bold $color) "[$char]"
|
||||||
|
functions -e color_and_wrap
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l indicator \
|
||||||
|
(switch $fish_bind_mode
|
||||||
|
case default; color_and_wrap red 'N'
|
||||||
|
case insert; color_and_wrap cyan 'I'
|
||||||
|
case replace_one; color_and_wrap green 'R'
|
||||||
|
case visual; color_and_wrap brmagenta 'V'
|
||||||
|
case '*'; color_and_wrap red '?'
|
||||||
|
end)
|
||||||
|
set mode (string join '' -- $indicator (set_color normal) ' ')
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l nix_shell
|
||||||
|
begin
|
||||||
|
set -l packages (string split ' ' -- $FISH_NIX_PACKAGES)
|
||||||
|
|
||||||
|
if [ -n "$IN_NIX_SHELL" ]
|
||||||
|
set nix_shell "$(set_color brblue) "
|
||||||
|
|
||||||
|
set -ql packages[1]; and set nix_shell "$nix_shell($packages[1]";
|
||||||
|
set -ql packages[2]; and set nix_shell "$nix_shell, $packages[2]";
|
||||||
|
set -ql packages[3]; and not set -ql packages[4]; and set nix_shell "$nix_shell, $packages[3]";
|
||||||
|
|
||||||
|
set -ql packages[4]; and set nix_shell "$nix_shell, +$(math (count $packages) - 2) more"
|
||||||
|
|
||||||
|
set -ql packages[1]; set nix_shell "$nix_shell) "
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l cursor_color (set_color green)
|
||||||
|
[ $command_status -ne 0 ]; and set -l cursor_color (set_color red)
|
||||||
|
|
||||||
|
set -l pwd (string join '' -- \
|
||||||
|
$cursor_color \
|
||||||
|
(prompt_pwd -D 2 -d 1) \
|
||||||
|
(set_color normal) \
|
||||||
|
);
|
||||||
|
|
||||||
|
[ (fish_vcs_prompt) ]; and set -l git (string join '' -- \
|
||||||
|
(set_color yellow) \
|
||||||
|
' ' \
|
||||||
|
(string sub -s 3 -e -1 -- (fish_vcs_prompt)) \
|
||||||
|
' ' \
|
||||||
|
);
|
||||||
|
|
||||||
|
[ $command_status -ne 0 ]; and set -l last_status "[$command_status]";
|
||||||
|
|
||||||
|
[ -n $duration ]; and echo $duration
|
||||||
|
string join '' -- $mode $nix_shell $pwd $git $cursor_color $last_status '|> '
|
||||||
|
end
|
||||||
29
pkgs/monaco-font/default.nix
Normal file
29
pkgs/monaco-font/default.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
pkgs ? import <nixpkgs> { system = builtins.currentSystem; },
|
||||||
|
lib ? pkgs.lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
pkgs.stdenv.mkDerivation rec {
|
||||||
|
pname = "monaco-font";
|
||||||
|
version = "1.0";
|
||||||
|
|
||||||
|
src = builtins.fetchurl {
|
||||||
|
url = "https://github.com/taodongl/monaco.ttf/raw/refs/heads/master/monaco.ttf";
|
||||||
|
sha256 = "sha256:09chm7js9qk80q47d1ybp5imhl0bwjp0kcwfk4i8hcsjbf0cwrvw";
|
||||||
|
};
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share/fonts/truetype
|
||||||
|
cp $src $out/share/fonts/truetype/monaco.ttf
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
desscription = "Monaco font";
|
||||||
|
homepage = "https://github.com/taodongl/monaco.ttf";
|
||||||
|
licensse = licenses.free;
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
||||||
1
pkgs/monaco-font/result
Symbolic link
1
pkgs/monaco-font/result
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/nix/store/kp450zrxxva5fv7wwpnz841vgxan6c49-nixos-system-blueplum-25.05.811874.daf6dc47aa4b
|
||||||
1
pkgs/neovim/after/ftplugin/fish.lua
Normal file
1
pkgs/neovim/after/ftplugin/fish.lua
Normal file
@@ -0,0 +1 @@
|
|||||||
|
vim.lsp.enable('fish_ls')
|
||||||
2
pkgs/neovim/after/ftplugin/markdown.lua
Normal file
2
pkgs/neovim/after/ftplugin/markdown.lua
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
vim.wo.wrap = false
|
||||||
|
vim.opt.expandtab = true
|
||||||
23
pkgs/neovim/default.nix
Normal file
23
pkgs/neovim/default.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
pkg ? import <nixpkg>,
|
||||||
|
lib ? pkg.lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
pkg.stdenv.mkDerivation rec {
|
||||||
|
pname = "neovim-config";
|
||||||
|
version = "1.0";
|
||||||
|
|
||||||
|
src = builtins.path {
|
||||||
|
path = ./.;
|
||||||
|
name = "neovim-config";
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -r ${src}/* $out/
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
dontBuild = true;
|
||||||
|
}
|
||||||
14
pkgs/neovim/init.lua
Normal file
14
pkgs/neovim/init.lua
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
local lazy = require('BluePlum.lazy').bootstrap()
|
||||||
|
|
||||||
|
require('BluePlum')
|
||||||
|
|
||||||
|
if lazy then
|
||||||
|
lazy.setup({
|
||||||
|
spec = {
|
||||||
|
{ import = 'plugins' },
|
||||||
|
},
|
||||||
|
checker = { enabled = false },
|
||||||
|
change_detection = { notify = false },
|
||||||
|
performance = { rtp = { reset = false } }
|
||||||
|
})
|
||||||
|
end
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user