...
 
Commits (8)
......@@ -5,7 +5,19 @@
createHome = true;
description = "Naoki OKAMURA";
group = "users";
extraGroups = [ "wheel" "audio" "video" "render" "disk" "input" "storage" "docker" "vboxusers" "rslsync" ];
extraGroups = [
# basic
"wheel" "docker"
# gui
"audio" "video" "render" "disk" "input" "storage"
# software
"rslsync"
# vm
"kvm" "libvirtd"
];
home = "/home/nyarla";
isNormalUser = true;
shell = pkgs.zsh;
......
{ config, pkgs, ... }:
{
programs.zsh.enable = true;
programs.zsh.syntaxHighlighting.enable = true;
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
enableCompletion = true;
};
security.sudo.enable = true;
environment.systemPackages = with pkgs; [
# shell
zsh nix-zsh-completions zsh-completions wcwidth-cjk tmux tmux-up
zsh fzy
wcwidth-cjk
tmux tmux-up
# utilities
file gnused gawk gnumake fzy vimHugeX keychain editorconfig-core-c
patchelf
# files
file gnused gawk
gnumake patchelf
zip unzip bzip2 gzip p7zip gnutar lzma unrar xar cpio dmg2img pbzx
platinum-searcher
restic
whipper
# archiver
unzip zip bzip2 gzip p7zip gnutar lzma
# vcs
git
mercurial
bazaar
subversion
cvs
# VCS
git mercurial bazaar subversion cvs
# remote shell
keychain
mosh
# script
python3 perl
# network
curl wget
bind
# editor
vimHugeX
editorconfig-core-c
# system
lsof
# file-systems
ntfs3g
hfsprogs
exfat exfat-utils
# hardware
gptfdisk
pciutils usbutils
];
services.dbus.packages = with pkgs; [
whipper
];
}
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# web browser
firefox-bin
feedreader
# terminal
mlterm
# email
thunderbird-bin
# networks
firefox-bin thunderbird-bin
slack
uget
feedreader
# credentials
keepassxc
keepassxc # TODO: change to pass?
veracrypt
# ebooks
calibre
# music
spotify
deadbeef
spotify
# chat
slack
# graphics
gimp-with-plugins inkscape
# downloader
uget
# office
peek
# windows app
wineUnstable
# X.org
xclip
xdg_utils
];
services.dbus.packages = with pkgs; [
firefox-bin feedreader thunderbird-bin keepassxc spotify slack uget
firefox-bin thunderbird-bin
slack
uget
feedreader
keepassxc
veracrypt
calibre
deadbeef
spotify
gimp-with-plugins inkscape
peek
wineUnstable
xclip
];
}
{ pkgs, ... }:
{
environment.systemPackages = (with pkgs; [
# toolchain
protobuf hugo awscli
environment.systemPackages = with pkgs; [
# websites
hugo sassc
# language
go goimports dep
nodejs yarn sassc
# cloud
awscli google-cloud-sdk
# api
protobuf
# languages
stdenv.cc
go goimports dep
nodejs yarn
elmPackages.elm-format
perl perlPackages.Appcpanminus
# container
linuxkit moby docker_compose google-cloud-sdk
]);
linuxkit moby docker_compose docker
];
virtualisation.docker = {
enable = true;
storageDriver = "overlay2";
......
......@@ -2,8 +2,14 @@
{
fonts = {
fonts = with pkgs; [
# basical fonts
noto-fonts noto-fonts-jp noto-fonts-extra noto-fonts-emoji
myrica myrica-patched genjyuu-gothic
# monospace
myrica myrica-patched
# documenation
genjyuu-gothic
];
fontconfig = {
......
......@@ -15,30 +15,38 @@ in {
wayland = false;
};
desktopManager.xterm.enable = false;
desktopManager.gnome3 = {
enable = true;
extraGSettingsOverridePackages = [
config.i18n.inputMethod.package
] ++ (with pkgs; [
gnome3.dconf-editor feedreader
]);
desktopManager = {
xterm.enable = false;
sessionPath = [
config.i18n.inputMethod.package
] ++ (with pkgs; [
gnome3.dconf-editor
gnome3.dconf
gnome3.glib.dev
dbus-glib
]);
gnome3 = {
enable = true;
extraGSettingsOverridePackages = (with pkgs; [
feedreader
peek
gnome3.dconf-editor # FIXME: really needed?
]) ++ [ config.i18n.inputMethod.package ];
sessionPath = (with pkgs; [
gnome3.dconf-editor # FIXME: really needed?
gnome3.dconf
gnome3.glib.dev
dbus-glib
]);
};
};
};
environment.gnome3.excludePackages = with pkgs.gnome3; [
accerciser epiphany evolution
gnome-terminal gnome-weather gnome-todo gnome-maps
gnome-calendar gnome-clocks gnome-contacts gnome-music
accerciser
evolution
gnome-terminal
gnome-weather
gnome-todo
gnome-maps
gnome-calendar
gnome-clocks
gnome-contacts
gnome-music
];
environment.systemPackages = with themes; [
......
......@@ -4,8 +4,6 @@
fonts.fontconfig.dpi = 192;
environment.variables = {
#GDK_SCALE = "2";
#GDK_DPI_SCALE = "0.5";
QT_AUTO_SCREEN_SCALE_FACTOR = "0";
QT_SCREEN_SCALE_FACTORS = "1.5";
QT_SCALE_FACTOR = "1";
......
{ config, pkgs, ... }:
{
services.xserver.displayManager.sessionCommands = ''
${pkgs.gnome3.dconf.lib}/libexec/dconf-service &
${config.i18n.inputMethod.package}/bin/ibus-daemon -drx --config=${config.i18n.inputMethod.package}/libexec/ibus-dconf
'';
i18n.inputMethod = {
enabled = "ibus";
ibus.engines = with pkgs; [ ibus-skk ];
};
i18n.inputMethod.enabled = "ibus";
i18n.inputMethod.ibus.engines = with pkgs; [ ibus-skk ];
services.dbus.packages = [ config.i18n.inputMethod.package ];
services.dbus.packages = [
config.i18n.inputMethod.package
];
environment.systemPackages = with pkgs; [
skk-dicts skktools
];
services.xserver.displayManager.sessionCommands = ''
${pkgs.gnome3.dconf.lib}/libexec/dconf-service &
${config.i18n.inputMethod.package}/bin/ibus-daemon -drx --config=${config.i18n.inputMethod.package}/libexec/ibus-dconf
'';
}
......@@ -14,13 +14,17 @@
];
security.pam.loginLimits = [
{ domain = "@audio"; item = "memlock"; type = "-"; value = "unlimited"; }
{ domain = "@audio"; item = "rtprio"; type = "-"; value = "99"; }
{ domain = "@audio"; item = "nofile"; type = "soft"; value = "99999"; }
{ domain = "@audio"; item = "nofile"; type = "hard"; value = "99999"; }
{ domain = "@audio"; item = "memlock"; type = "-"; value = "unlimited"; }
{ domain = "@audio"; item = "rtprio"; type = "-"; value = "99"; }
{ domain = "@audio"; item = "nofile"; type = "soft"; value = "99999"; }
{ domain = "@audio"; item = "nofile"; type = "hard"; value = "99999"; }
];
environment.systemPackages = with pkgs; [
qjackctl jack2
];
services.dbus.packages = with pkgs; [
qjackctl jack2
];
}
......@@ -4,28 +4,45 @@
virtmanager remmina spice-gtk looking-glass-client
];
services.dbus.packages = with pkgs; [
virtmanager remmina spice-gtk looking-glass-client
];
boot.kernelModules = [
"kvm" "kvm_intel" "vfio-iommu-type1" "vfio-mdev"
"kvm" "kvm_intel" "kvmgt" # FIXME: support AMD processors
"vfio-iommu-type1" "vfio-mdev"
];
boot.kernelParams = [
"kvm.ignore_msrs=1" "intel_iommu=on" "i915.enable_gvt=1" "vfio-iommu-type1.allow_unsafe_interrupts=1"
"kvm.ignore_msrs=1"
"vfio-iommu-type1.allow_unsafe_interrupts=1"
# TODO:support AMD processors
"drm.debug=0"
"kvm_intel.nested=1"
"kvm_intel.emulate_invalid_guest_state=0"
"intel_iommu=on"
];
services.udev.extraRules = ''
SUBSYSTEM=="vfio", OWNER="root", GROUP="kvm"
'';
virtualisation.kvmgt.enable = true;
virtualisation.kvmgt.vgpus = {
"i915-GVTg_V5_4" = {
uuid = "a297db4a-f4c2-11e6-90f6-d3b88d6c9525";
virtualisation.kvmgt = {
enable = true;
vgpus = {
"i915-GVTg_V5_4" = {
uuid = "a297db4a-f4c2-11e6-90f6-d3b88d6c9525";
};
};
};
virtualisation.libvirtd.enable = true;
virtualisation.libvirtd.qemuRunAsRoot = true;
virtualisation.libvirtd.qemuPackage = pkgs.qemu_kvm;
virtualisation.libvirtd.qemuVerbatimConfig = ''
virtualisation.libvirtd = {
enable = true;
qemuRunAsRoot = true;
qemuPackage = pkgs.qemu_kvm;
qemuVerbatimConfig = ''
user = "nyarla"
group = "kvm"
dynamic_ownership = 1
......@@ -43,9 +60,9 @@
"/dev/rtc",
"/dev/hpet",
"/dev/vfio/vfio",
"/dev/vfio/17",
"/dev/dri/card0",
"/dev/dri/renderD128"
]
'';
'';
};
}
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# player
deadbeef
# CD ripper
whipper
] ++ [
# ebook management
calibre
] ++ [
# edit multimedia files
gimp-with-plugins inkscape
] ++ [
wine
];
services.dbus.packages = with pkgs; [
deadbeef whipper calibre
];
}
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# terminal emualtor
mlterm
# Xorg utilities
xclip xdg_utils
# disk utilites
gptfdisk veracrypt restic ntfs3g exfat exfat-utils
# device toolchains
pciutils usbutils
];
}
......@@ -35,8 +35,8 @@
networking.hostId = "71ca914d";
networking.hostName = "NyXPS15";
networking.firewall = {
allowedTCPPorts = [ ];
allowedUDPPorts = [ ];
allowedTCPPorts = [ 19000 ];
allowedUDPPorts = [ 19000 ];
};
# Firewall
......
#!/usr/bin/env bash
set -e -u -o pipefail
has() {
type $1 2>&1 >/dev/null
}
link() {
local from=$1 dest=$2
test -d "$(dirname "$dest")" || mkdir -p "$(dirname "$dest")"
test -e $dest || ln -s $from $dest
}
fetch() {
local url=$1 dest=$2
test -d "$(dirname "$dest")" || mkdir -p "$(dirname "$dest")"
test -e $dest || curl -o $dest -L $url
}
clone() {
local repo=$1 dest=$2
test -d "$(dirname "$dest")" || mkdir -p "$(dirname "$dest")"
test -e $dest || git clone $repo $dest
}
# tap
( brew tap | grep caskroom/cask ) || brew tap caskroom/cask
( brew tap | grep caskroom/versions ) || brew tap caskroom/versions
( brew tap | grep waltarix/customs ) || brew tap waltarix/customs
# pkgs
test -e /usr/local/bin/zsh || brew install zsh zsh-completions zsh-syntax-highlighting
test -e /usr/local/bin/tmux || brew install waltarix/customs/tmux
test -e /usr/local/bin/wcwidth-cjk || brew install waltarix/customs/wcwidth-cjk
test -e /usr/local/bin/gsed || brew install gnu-sed
test -e /usr/local/bin/gawk || brew install gawk
test -e /usr/local/bin/gmake || brew install make
test -e /usr/local/bin/keychain || brew install keychain
test -e /usr/local/bin/fzy || brew install fzy
test -e /usr/local/bin/restic || brew install restic
test -e /usr/local/bin/git || brew install git
test -e /usr/local/bin/hg || brew install mercurial
test -e /usr/local/bin/bzr || brew install bazaar
test -e /usr/local/bin/svn || brew install subversion
test -e /usr/local/bin/editorconfig || brew install editorconfig
test -e /usr/local/bin/go || brew install go
test -e /usr/local/bin/sassc || brew install sassc
test -e /usr/local/bin/node || brew install nodejs
test -e /usr/local/bin/yarn || brew install yarn
java -version || brew cask install java
test -e /usr/local/bin/scala || brew install scala
test -e /usr/local/bin/ocaml || brew install ocaml
test -e /usr/local/bin/opam || brew install opam
test -e /usr/local/bin/nim || brew install nim
test -e /usr/local/bin/syncthing || brew install syncthing syncthing-inotify
test -e /Applications/Firefox.app || brew cask install firefox
test -e /Applications/Dropbox.app || brew cask install dropbox
test -e /Applications/KeePassXC.app || brew cask install keepassxc
test -e /Applications/MacVim.app || brew cask install macvim
test -e /Applications/"IntelliJ IDEA CE".app || brew cask install intellij-idea-ce
# dotfiles
clone https://github.com/nyarla/nixos-configurations $HOME/local/dotfiles
cd $HOME/local/dotfiles/dotfiles/nyarla
# git
link `pwd`/git/gitconfig $HOME/.gitconfig
link `pwd`/git/gitignore $HOME/.gitignore
# Vim
link `pwd`/vim/init.vim $HOME/.vimrc
link `pwd`/vim/init.gvim $HOME/.gvimrc
link `pwd`/vim/init $HOME/.vim/userautoload/init
link `pwd`/vim/plugins $HOME/.vim/userautoload/plugins
test -d $HOME/.vim.d || (mkdir -p $HOME/.vim.d/swap; mkdir -p $HOME/.vim.d/backup )
fetch https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim $HOME/.vim/autoload/plug.vim
fetch https://raw.githubusercontent.com/hukl/Smyck-Color-Scheme/master/smyck.vim $HOME/.vim/colors/smyck.vim
# zsh
link `pwd`/zsh/init.zsh $HOME/.zshrc
fetch https://raw.githubusercontent.com/miekg/lean/master/prompt_lean_setup $HOME/.zfunctions/prompt_lean_setup
clone https://github.com/b4b4r07/enhancd $HOME/.enhancd
clone https://github.com/riywo/anyenv $HOME/.anyenv
# tmux
link `pwd`/tmux/tmux.conf $HOME/.tmux.conf
#!/usr/bin/env bash
# Functions
# =========
has() {
type "${1:-}" 2>&1 >/dev/null
}
pkg() {
pacman -S "${1:-}"
}
# Packages
# ========
has gcc || pkg msys2-devel
has make || pkg make
has git || pkg git
has curl || pkg curl
# Dotfiles
# ========
if test ! -d $HOME/local/dotfiles ; then
test -d $HOME/local || mkdir -p $HOME/local
git clone https://github.com/nyarla/nixos-configurations.git $HOME/local/dotfiles
fi
DOTFILES=$HOME/local/dotfiles/dotfiles/nyarla
# git
ln -sf $DOTFILES/git/gitconfig $HOME/.gitconfig
ln -sf $DOTFILES/git/gitignore $HOME/.gitignore
# vim
ln -sf $DOTFILES/vim/init.vim $HOME/.vimrc
ln -sf $DOTFILES/vim/init.gvim $HOME/.gvimrc
test -d $HOME/.vim/autoload || mkdir -p $HOME/.vim/autoload/
test -d $HOME/.vim/colors || mkdir -p $HOME/.vim/colors/
test -d $HOME/.vim/userautoload || mkdir -p $HOME/.vim/userautoload/
test -d $HOME/.vim.d/swap || mkdir -p $HOME/.vim.d/swap
test -d $HOME/.vim.d/backup || mkdir -p $HOME/.vim.d/backup
ln -sf $DOTFILES/vim/init $HOME/.vim/userautoload/init
ln -sf $DOTFILES/vim/plugins $HOME/.vim/userautoload/plugins
curl -L https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -o $HOME/.vim/autoload/plug.vim
curl -L https://raw.githubusercontent.com/hukl/Smyck-Color-Scheme/master/smyck.vim -o $HOME/.vim/colors/smyck.vim
# zsh
ln -sf $DOTFILES/zsh/bootstrap.zsh $HOME/.zshrc
test -d $HOME/.anyenv || git clone https://github.com/riywo/anyenv $HOME/.anyenv
# tmux
ln -sf $DOTFILES/tmux/tmux.conf $HOME/.tmux.conf
#!/usr/bin/env bash
# Functions
# =========
has() {
type "${1:-}" 2>&1 >/dev/null
}
# Toolchains
# ==========
if has npm ; then
test -d $HOME/.config/npm || mkdir -p $HOME/.config/npm
npm config set prefix $HOME/.config/npm
npm install -g \
bash-language-server \
dockerfile-language-server-nodejs \
purescript-language-server \
typescript-language-server \
vscode-css-languageserver-bin \
vscode-json-languageserver
fi
# Dotfiles
# ========
DOTFILES=/etc/nixos/dotfiles/nyarla
# git
ln -sf $DOTFILES/git/gitconfig $HOME/.gitconfig
ln -sf $DOTFILES/git/gitignore $HOME/.gitignore
# vim
if has go ; then
go get -u github.com/vim-volt/volt
cd $GOPATH/src/github.com/vim-volt/volt
make
mkdir -p $GOPATH/bin
cp bin/volt $GOPATH/bin/volt
fi
if has volt ; then
ln -sf $DOTFILES/volt $HOME/.config/vim-volt
volt get -u -l
volt build
fi
# zsh
ln -sf $DOTFILES/zsh/zshrc.zsh $HOME/.zshrc
# mlterm
test -d $HOME/.mlterm || mkdir -p $HOME/.mlterm
ln -sf $DOTFILES/mlterm/main $HOME/.mlterm/main
ln -sf $DOTFILES/mlterm/aafont $HOME/.mlterm/aafont
ln -sf $DOTFILES/mlterm/color $HOME/.mlterm/color
ln -sf $DOTFILES/mlterm/key $HOME/.mlterm/key
#!/usr/bin/env bash
has() {
type $1 2>&1 >/dev/null
}
pkg() {
local name=$1
sudo pacman -S $name
}
link() {
local from=$1 dest=$2
test -d "$(dirname "$dest")" || mkdir -p "$(dirname "$dest")"
test -e $dest || ln -s $from $dest
}
fetch() {
local url=$1 dest=$2
test -d "$(dirname "$dest")" || mkdir -p "$(dirname "$dest")"
test -e $dest || curl -o $dest -L $url
}
clone() {
local repo=$1 dest=$2
test -d "$(dirname "$dest")" || mkdir -p "$(dirname "$dest")"
test -e $dest || git clone $repo $dest
}
# pkgs
has git || pkg git
has zsh || pkg zsh
has fzy || pkg fzy
# dotfiles
clone https://github.com/nyarla/nixos-configurations $HOME/local/dotfiles
cd $HOME/local/dotfiles/dotfiles/nyarla
# git
link `pwd`/git/gitconfig $HOME/.gitconfig
link `pwd`/git/gitignore $HOME/.gitignore
# Vim
link `pwd`/vim/init.vim $HOME/.vimrc
link `pwd`/vim/init.gvim $HOME/.gvimrc
link `pwd`/vim/init $HOME/.vim/userautoload/init
link `pwd`/vim/plugins $HOME/.vim/userautoload/plugins
test -d $HOME/.vim.d || (mkdir -p $HOME/.vim.d/swap; mkdir -p $HOME/.vim.d/backup )
fetch https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim $HOME/.vim/autoload/plug.vim
fetch https://raw.githubusercontent.com/hukl/Smyck-Color-Scheme/master/smyck.vim $HOME/.vim/colors/smyck.vim
# ZSH
link `pwd`/zsh/init.zsh $HOME/.zshrc
fetch https://raw.githubusercontent.com/miekg/lean/master/prompt_lean_setup $HOME/.zfunctions/prompt_lean_setup
clone https://github.com/b4b4r07/enhancd $HOME/.enhancd
clone https://github.com/riywo/anyenv $HOME/.anyenv
# tmux
link `pwd`/tmux/tmux.conf $HOME/.tmux.conf
#!/usr/bin/env bash
set -e -u -o pipefail
cd $HOME
# Functions
# =========
has() {
type "${1:-}" 2>&1 >/dev/null
}
# WSL Host
# ========
sudo sed -i.bak -e "s%http://[^ ]\+%http://ftp.jaist.ac.jp/pub/Linux/ubuntu/%g" /etc/apt/sources.list
sudo apt update
sudo apt upgrade -y
sudo apt install -y mlterm mlterm-im-fcitx fcitx fcitx-skk skkdic-cdb skkdic-extra skktools language-pack-ja dbus-x11
sudo update-locale LANG=ja_JP.UTF-8
if ! test -e $HOME/.nix-profile ; then
test -d /etc/nix || sudo mkdir -p /etc/nix
echo "use-sqlite-wal = false" | sudo tee /etc/nix/nix.conf
echo "sandbox = false" | sudo tee -a /etc/nix/nix.conf
has nix-env || curl https://nixos.org/nix/install | sh
fi
if ! test -e /etc/nixpkgs ; then
sudo mkdir -p /etc/nixpkgs
sudo chown nyarla:users /etc/nixpkgs
cd /etc/nixpkgs
git init
git remote add upstream https://github.com/NixOS/nixpkgs.git
git pull upstream master
cd $HOME
fi
if ! test -e /usr/share/fonts/nix-fonts ; then
ln -sf ~/.nix-profile/share/fonts /usr/share/fonts/nix-fonts
fi
cat <<... | sudo tee /etc/wsl.conf
[automount]
enabled = true
root = /
mountFsTab = true
options = "metadata,umask=22,fmask=11"
[network]
generateHosts = true
generateResolveConf = true
[interop]
enabled = true
appendWindowsPath = false
...
# Toolchains
# ==========
if has npm ; then
test -d $HOME/.config/npm || mkdir -p $HOME/.config/npm
npm config set prefix $HOME/.config/npm
npm install -g \
bash-language-server \
dockerfile-language-server-nodejs \
purescript-language-server \
typescript-language-server \
vscode-css-languageserver-bin \
vscode-json-languageserver \
js-beautify \
typescript-formatter \
fixjson
fi
if ! test -e $HOME/.cargo/env ; then
curl https://sh.rustup.rs -sSf | sh
fi
# Dotfiles
# ========
DOTFILES=$HOME/local/dotfiles/dotfiles/nyarla
# git
ln -sf $DOTFILES/git/gitconfig $HOME/.gitconfig
ln -sf $DOTFILES/git/gitignore $HOME/.gitignore
# vim
ln -sf $DOTFILES/vim/init.vim $HOME/.vimrc
ln -sf $DOTFILES/vim/init.gvim $HOME/.gvimrc
test -d $HOME/.config/nvim/autoload || mkdir -p $HOME/.config/nvim/autoload/
test -d $HOME/.config/nvim/colors || mkdir -p $HOME/.config/nvim/colors/
test -d $HOME/.nvim.d/swap || mkdir -p $HOME/.vim.d/swap
test -d $HOME/.vim.d/backup || mkdir -p $HOME/.vim.d/backup
ln -sf $DOTFILES/vim/init.vim $HOME/.config/nvim/init.vim
curl -L https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -o $HOME/.config/nvim/autoload/plug.vim
curl -L https://raw.githubusercontent.com/hukl/Smyck-Color-Scheme/master/smyck.vim -o $HOME/.config/nvim/colors/smyck.vim
# zsh
ln -sf $DOTFILES/zsh/bootstrap.zsh $HOME/.zshrc
# mlterm
test -d $HOME/.mlterm || mkdir -p $HOME/.mlterm
ln -sf $DOTFILES/mlterm/main $HOME/.mlterm/main
ln -sf $DOTFILES/mlterm/aafont $HOME/.mlterm/aafont
ln -sf $DOTFILES/mlterm/color $HOME/.mlterm/color
ln -sf $DOTFILES/mlterm/key $HOME/.mlterm/key
......@@ -20,7 +20,7 @@
{
"type": "git",
"path": "github.com/MaxMEllon/vim-jsx-pretty",
"version": "007b85e1d51f4dbbba2c15ca4a34b5ff7a8db9ef"
"version": "77c206386cca01f45365010d44c441d845d63a99"
},
{
"type": "git",
......@@ -40,7 +40,7 @@
{
"type": "git",
"path": "github.com/derekwyatt/vim-scala",
"version": "971ac9ab3fe945105ef88587cfe5273fa2c8e988"
"version": "bbdfea4b98fdb8866a8a6060ec1294643cfeb413"
},
{
"type": "git",
......@@ -60,7 +60,7 @@
{
"type": "git",
"path": "github.com/fatih/vim-go",
"version": "255f903c14350fb5d615b316661bac93db1544ce"
"version": "b6a0bde7d4c64a063ea1b6365e3dd24e2d4f4df1"
},
{
"type": "git",
......@@ -75,7 +75,7 @@
{
"type": "git",
"path": "github.com/itchyny/lightline.vim",
"version": "3b7c7b83d2ef5f559158c84c5afb0f51656ccade"
"version": "80c242c3c5394fd5143b5d7e2741989ba04ae46a"
},
{
"type": "git",
......@@ -95,12 +95,12 @@
{
"type": "git",
"path": "github.com/leafgarland/typescript-vim",
"version": "7704fac2c765aaf975ad4034933bf63113dd4a64"
"version": "5a319ea5504e18215d155576c78d1b7fb8e22c8f"
},
{
"type": "git",
"path": "github.com/neoclide/coc.nvim",
"version": "0b97d1b56aa60983c891ae9104d110d6a1b791fa"
"version": "83248daa2b8a5ab5969b02bde2890e80d125ad65"
},
{
"type": "git",
......@@ -155,12 +155,12 @@
{
"type": "git",
"path": "github.com/ryanoasis/vim-devicons",
"version": "cdc08fd72ffa2e4754c1ceefccd485f07a735177"
"version": "793fda61101f02fed05d30d606671f9b933452fb"
},
{
"type": "git",
"path": "github.com/scrooloose/nerdtree",
"version": "28eb47e2678cf629d92b4f1f00dd56cba22fc4ae"
"version": "33fe2fdf16a95c12e8284364c780ed405dbaad17"
},
{
"type": "git",
......
#!/usr/bin/env zsh
# NixOS and nixpkgs
# -----------------
if type nixos-rebuild 2>&1 >/dev/null ; then
if test -e /etc/nixpkgs ; then
alias nixos-apply="sudo nixos-rebuild -I nixpkgs=/etc/nixpkgs switch"
alias nixos-upgrade="sudo nixos-rebuild -I nixpkgs=/etc/nixpkgs boot"
else
alias nixos-apply="sudo nixos-rebuild switch"
alias nixos-upgrade="sudo nixos-rebuild boot"
fi
fi
if type nix-env 2>&1 >/dev/null ; then
if test -e /etc/nixpkgs ; then
alias nix-build="nix-build -I nixpkgs=/etc/nixpkgs"
alias nix-env="nix-env -I nixpkgs=/etc/nixpkgs"
alias nix-shell="nix-shell -I nixpkgs=/etc/nixpkgs"
alias nix-search="nix search -I nixpkgs=/etc/nixpkgs"
else
alias nix-search="nix search"
fi
fi
function nix-clean() {
nix-store --gc
if test -e /etc/nixos ; then
sudo nix-store --gc
fi
if test -e /etc/nixos ; then
sudo nix-collect-garbage -d
sudo /run/current-system/bin/switch-to-configuration boot
fi
}
# Aliases
# -------
case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
linux | *_nt-* )
alias ls="ls --color -F"
;;
darwin)
alias ls="ls -GF"
;;
esac
if type fzy 2>&1 >/dev/null; then
function fzy-history() {
BUFFER="$(fc -l -n 1 | sort | uniq | fzy --query "${LBUFFER}")"
CURSOR=$#BUFFER
zle -R -c
}
zle -N fzy-history
bindkey '^R' fzy-history
fi
#!/usr/bin/env bash
# Prepare Auto-onstall
# --------------------
if test -d /etc/nixos ; then
export DOTFILES=/etc/nixos/dotfiles/nyarla
fi
if test -z "${DOTFILES:-}" ; then
export DOTFILES="$HOME"/local/dotfiles/dotfiles/nyarla
fi
if ! test -d $DOTFILES/../../.git ; then
cd $DOTFILES/../../
git init
git remote add origin git@gitlab.com:nyarla/nixos-configurations.git
git pull origin master
fi
# NPM (Node.js)
# -------------
if type npm 2>&1 >/dev/null ; then
test -d "$HOME"/.config/npm || mkdir -p "$HOME"/.config/npm
if test "$(npm config get prefix)" != "${HOME}/.config/npm" ; then
npm config set prefix "${HOME}/.config/npm"
fi
test -x $HOME/.config/npm/bin/bash-language-server || npm install -g bash-language-server
test -x $HOME/.config/npm/bin/docker-langserver || npm install -g dockerfile-language-server-nodejs
test -x $HOME/.config/npm/bin/typescript-language-server || npm install -g typescript-language-server
test -x $HOME/.config/npm/bin/vscode-css-languageserver || npm install -g vscocde-css-languageserver-bin
test -x $HOME/.config/npm/bin/vscode-json-languageserver || npm install -g vscode-json-languageserver
fi
# Git
# ---
test -e $HOME/.gitconfig || ln -s $DOTFILES/git/gitconfig $HOME/.gitconfig
test -e $HOME/.gitignore || ln -s $DOTFILES/git/gitignore $HOME/.gitignore
# TMUX
# ----
test -e $HOME/.tmux.conf || ln -s $DOTFILES/tmux/tmux.conf $HOME/.tmux.conf
# Vim
# ---
if ! test -d "$HOME"/.vim.d ; then
mkdir -p "$HOME"/.vim.d/{backup,swap}
fi
test -e $HOME/.config/vim-volt || ln -sf $DOTFILES/volt $HOME/.config/vim-volt
### FIXME: auto install for vim plugins
# MLTerm
# ------
test -d $HOME/.mlterm || mkdir -p $HOME/.mlterm
test -e $HOME/.mlterm/color || ln -s $DOTFILES/mlterm/color $HOME/.mlterm/color
test -e $HOME/.mlterm/key || ln -s $DOTFILES/mlterm/key $HOME/.mlterm/key
case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
darwin)
test -e $HOME/.mlterm/main || ln -s $DOTFILES/mlterm/main.macOS $HOME/.mlterm/main
test -e $HOME/.mlterm/aafont || ln -s $DOTFILES/mlterm/aafont.macOS $HOME/.mlterm/aafont
;;
*)
test -e $HOME/.mlterm/main || ln -s $DOTFILES/mlterm/main $HOME/.mlterm/main
test -e $HOME/.mlterm/aafont || ln -s $DOTFILES/mlterm/aafont $HOME/.mlterm/aafont
;;
esac
# Post Auto-install
# -----------------
unset DOTFILES
#!/usr/bin/env zsh
# Golang
# ------
export GOPATH="$HOME"/dev
if ! test -d "$GOPATH"/bin ; then
mkdir -p "$GOPATH"/bin
fi
export PATH="$GOPATH"/bin:$PATH
# NPM (Node.js)
# -------------
if ! test -d "$HOME"/.config/npm/bin ; then
mkdir -p "$HOME"/.config/npm/bin
fi
export PATH="$HOME"/.config/npm/bin:$PATH
# Rust
# ----
if test -e "$HOME"/.cargo/env ; then
source "$HOME"/.cargo/env
fi
# Perl
# ----
#if test -d "$HOME"/.config/perl5 ; then
# eval "$(perl -I "$HOME"/.config/perl5/lib/perl5 -Mlocal::lib="$HOME"/.config/perl5)"
# export PATH="$HOME"/.config/perl5/bin:$PATH
#fi
# Keychain
# --------
if type keychain 2>&1 >/dev/null && test -d "$HOME"/.ssh/id_ed25519 ; then
keychain --nogui --quiet $HOME/.ssh/id_ed25519
source "$HOME"/.keychain/$(hostname)-sh
fi
# Vim8 with Volt
# --------------
if type volt 2>&1 >/dev/null ; then
export VOLTPATH=$HOME/.config/vim-volt
fi
# Anyenv
# ------
if test -e $HOME/.anyenv/bin ; then
export PATH="$HOME"/.anyenv/bin:$PATH
eval "$(anyenv init -)"
fi
# Machine-local scripts
# ---------------------
if ! test -d "$HOME"/local/bin ; then
mkdir -p "$HOME"/local/bin
fi
export PATH="$HOME"/local/bin:$PATH
# Cleanup
# -------
path=(${^path}(N-/^W))
#!/usr/bin/env bash
# bootstrap zsh environment
# =========================
CWD=$(pwd)
! test -d /etc/nixos || export ROOTDIR=/etc/nixos
! test -z "${DOTFILES:-}" || export ROOTDIR="$HOME"/local/dotfiles
export DOTFILES="$ROOTDIR"/dotfiles/nyarla
if ! test -d "$ROOTDIR"/.git ; then
cd $ROOTDIR
git init
git remote add origin https://gitlab.com/nyarla/nixos-configurations.git
git pull origin master
cd $CWD
fi
cd "$HOME"
test -e "$HOME"/.zshrc || ln -sf "$DOTFILES"/zsh/zshrc.zsh "$HOME"/.zshrc
test -e "$HOME"/.zshenv || ln -sf "$DOTFILES"/zsh/zshenv.zsh "$HOME"/.zshenv
test -e "$HOME"/.zprofile || ln -sf "$DOTFILES"/zsh/zprofile.zsh "$HOME"/.zprofile
cd $CWD
unset CWD
unset ROOTDIR
unset DOTFILES
exec $SHELL -l
#!/usr/bin/env zsh
# ZSH Options
# -----------
setopt autocd
setopt auto_pushd
setopt pushd_ignore_dups
setopt pushd_to_home
setopt hist_ignore_dups
setopt hist_ignore_all_dups
setopt hist_ignore_space
setopt hist_reduce_blanks
setopt hist_find_no_dups
setopt share_history
export HISTFILE=$HOME/.zsh_history
export HISTSIZE=1024
export SAVEHIST=1024
#!/usr/bin/env zsh
# Kernel
# ------
case "$(uname -r | tr '[:upper:]' '[:lower:]')" in
*-microsoft )
unsetopt BG_NICE
umask 022
;;
esac
# Platform
# --------
case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
*_nt-* )
alias exit="sh -c \"cmd /C 'taskkill /F /T /PID $(cat /proc/$$/winpid)'\""
trap 'sh -c "cmd /C \"taskkill /F /T /PID $(cat /proc/$$/winpid)\""' 1 2 3 15
;;
esac
#!/usr/bin/env zsh
# zprofile (for login)
# ====================
CWD="$(pwd)"
function has() {
type ${1:-} 2>&1 >/dev/null
}
# wcwidth-cjk (for cjk)
# --------------------
if has wcwidth-cjk && has wcwidth; then
if test "$(wcwidth '○' | cut -d' ' -f1)" = "1" ; then
exec wcwidth-cjk $SHELL --login
fi
fi
# keychain (for ssh and mosh)
# ---------------------------
if has keychain ; then
keychain --nogui --quiet "$HOME"/.ssh/id_ed25519
source "$HOME"/.keychain/$(hostname)-sh
fi
# auto install (dotfiles)
# -----------------------
! test -d /etc/nixos || export DOTFILES=/etc/nixos/dotfiles/nyarla
! test -z "${DOTFILES:-}" || export DOTFILES="$HOME"/local/dotfiles/dotfiles/nyarla
if ! test -d $DOTFILES/../../.git ; then
cd $DOTFILES/../../.git
git init
git remote add origin git@gitlab.com:nyarla/nixos-configurations.git
git pull origin master
fi
if has npm; then
if ! test -d "$HOME"/.config/npm ; then
mkdir -p "$HOME"/.config/npm
npm config set prefix "$HOME"/.config/npm
npm install -g \
bash-language-server \
dockerfile-language-server \
typescript-language-server \
vscode-css-languageserver \
vscode-json-languageserver \
;
fi
fi
test -e "$HOME"/.gitignore || ln -sf "$DOTFILES"/git/gitignore "$HOME"/.gitignore
test -e "$HOME"/.gitconfig || ln -sd "$DOTFILES"/git/gitconfig "$HOME"/.gitconfig
test -e "$HOME"/.tmux.conf || ln -sf "$DOTFILES"/ "$HOME"/.tmux.conf
test -d "$HOME"/.vim.d || mkdir -p "$HOME"/.vim.d/{backup,swap}
test -e "$HOME"/.config/vim-volt || ln -sf "$DOTFILES"/volt "$HOME"/.config/vim-volt
# TODO: auto install vim plugins by vim-volt
test -d "$HOME"/.mlterm || mkdir -p "$HOME"/.mlterm
test -e "$HOME"/.mlterm/color || ln -sf "$DOTFILES"/mlterm/color "$HOME"/.mlterm/color
test -e "$HOME"/.mlterm/key || ln -sf "$DOTFILES"/mlterm/key "$HOME"/.mlterm/key
case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
darwin)
test -e "$HOME"/.mlterm/main || ln -sf "$DOTFILES"/mlterm/main.macOS "$HOME"/.mlterm/main
test -e "$HOME"/.mlterm/aafont || ln -sf "$DOTFILES"/mlterm/aafont.macOS "$HOME"/.mlterm/aafont
;;
*)
test -e "$HOME"/.mlterm/main || ln -sf "$DOTFILES"/mlterm/main "$HOME"/.mlterm/main
test -e "$HOME"/.mlterm/aafont || ln -sf "$DOTFILES"/mlterm/aafont "$HOME"/.mlterm/aafont
;;
esac
# auto install (zsh plugins)
# --------------------------
test -d "$HOME"/.config/zsh || mkdir -p "$HOME"/.config/zsh
cd "$HOME"/.config/zsh
test -d enhancd || git clone https://github.com/b4b4r07/enhancd
test -d pure || git clone https://github.com/sindresorhus/pure
test -d "$HOME"/local/zfunctions || mkdir -p "$HOME"/local/zfunctions
test -e "$HOME"/local/zfunctions/async || ln -sf "$HOME"/.config/zsh/pure/async.zsh "$HOME"/local/zfunctions/async
test -e "$HOME"/local/zfunctions/prompt_pure_setup || ln -sf "$HOME"/.config/zsh/pure/pure.zsh "$HOME"/local/zfunctions/prompt_pure_setup
cd $CWD
unset CWD
unset DOTFILES
unset -f has
#!/usr/bin/env zsh
# zshenv (for login, interactive or shell script)
# ===========================================
# Go
# --
export GOPATH="$HOME"/dev
! test -d "$GOPATH"/bin || export PATH="$GOPATH"/bin:$PATH
# Node.js (npm)
# -------------
! test -d "$HOME"/.config/npm/bin || export PATH="$HOME"/.config/npm/bin:$PATH
# Rust (cargo)
# ------------
! test -d "$HOME"/.cargo/env || source "$HOME"/.cargo/env
# Volt (vim plugin manager)
# -------------------------
! test -e"$HOME"/.config/vim-volt || export VOLTPATH="$HOME"/.config/vim-volt
# Scripts (on local machine)
# --------------------------
! test -d "$HOME"/local/bin || export PATH="$HOME"/local/bin:$PATH
# cleanup (PATH)
# --------------
path=(${^path}(N-/^W))
#!/usr/bin/env zsh
# Preload
# -------
if type wcwidth-cjk 2>&1 >/dev/null ; then
case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
linux)
if ! [[ "${LD_PRELOAD:-}" =~ .*wcwidth-cjk.* ]]; then
exec wcwidth-cjk $SHELL
fi
;;
darwin)
if ! [[ "${DYLD_INSERT_LIBRARIES:-}" =~ .*wcwidth-cjk.* ]]; then
exec wcwidth-cjk $SHELL
fi
;;
esac
fi
function has() {
type ${1:-} 2>&1 >/dev/null
}
# ZPlug
# -----
export ZPLUG_HOME="$HOME"/.config/zplug
if ! test -d $ZPLUG_HOME ; then
test -d "$HOME"/.config || mkdir -p "$HOME"/.config
git clone https://github.com/zplug/zplug $ZPLUG_HOME
fi
# zshrc (for login or interactive)
# ================================
# zsh options
# -----------
setopt autocd
setopt auto_pushd
setopt pushd_ignore_dups
setopt pushd_to_home
if test -e $ZPLUG_HOME/init.zsh ; then
source $ZPLUG_HOME/init.zsh
setopt hist_ignore_dups
setopt hist_ignore_all_dups
setopt hist_reduce_blanks
setopt hist_find_no_dups
setopt share_history
zplug "b4b4r07/enhancd", use:"init.sh"
test "${HISTFILE:-}" != "" || export HISTFILE="$HOME"/.zsh_history
test "${HISTSIZE:-}" != "" || export HISTSIZE=1024
test "${SAVEHIST:-}" != "" || export SAVEHIST=1024
zplug "mafredri/zsh-async"
zplug "sindresorhus/pure"
# nix and nixos
# -------------
if test -e /etc/nixos ; then
export DOTFILES=/etc/nixos/dotfiles/nyarla
if has nix-env ; then
if test -d /etc/nixpkgs ; then
alias nix-build="nix-build -I nixpkgs=/etc/nixpkgs"
alias nix-env="nix-env -I nixpkgs=/etc/nixpkgs"
alias nix-shell="nix-shell -I nixpkgs=/etc/nixpkgs"
alias nix-search="nix search -I nixpkgs=/etc/nixpkgs"
if has nixos-rebuild ; then
alias nixos-apply="sudo nixos-rebuild -I nixpkgs=/etc/nixpkgs switch"
alias nixos-upgrade="sudo nixos-rebuild -I nixpkgs=/etc/nixpkgs boot"
fi
else
export DOTFILES=$HOME/local/dotfiles/dotfiles/nyarla
zplug "zsh-users/zsh-syntax-highlighting", defer:2
zplug "zsh-users/zsh-completions", defer:2
fi
alias nix-search"nix search"
zplug "$DOTFILES"/zsh, from:"local", use:"*.plugin.zsh"
if has nixos-rebuild ; then
alias nixos-apply="sudo nixos-rebuild switch"
alias nixos-upgrade="sudo nixos-rebuild boot"
fi
fi
if ! zplug check ; then
zplug install
if has nixos-rebuild ; then
function nix-clean() {
nix-store --gc
sudo nix-store --gc
sudo nix-collect-garbage -d
sudo /run/current-system/bin/switch-to-configuration boot
}
else
alias nix-clean="nix-store --gc"
fi
zplug load
function nix-prepare() {
cd "$HOME"/local/files \
&& find . -type f '*.*' | xargs -I{} nix-prefetch-url "file://$HOME/local/files/{}"
}
fi
# command-specific
# ----------------
if has fzy ; then
function fzy-history() {
BUFFER="$(fc -l -n 1 | sort | uniq | fzy --query "${LBUFFER}")"
CURSOR=$#BUFFER
zle -R -c
}
zle -N fzy-history
bindkey '^R' fzy-history
fi
# os-specific
# -----------
case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
linux)
alias ls="ls --color -F"
;;
darwin)
alias ls="ls -GF"
;;
*_nt-*)
alias ls="ls -GF"
# workaround for WSL1
# unsetopt BG_NICE
# umask 022
# alias exit="sh -c \"cmd /C 'taskkill /F /T /PID $(cat /proc/$$/winpid)'\""
# trap 'sh -c "cmd /C \"taskkill /F /T /PID $(cat /proc/$$/winpid)\""' 1 2 3 15
;;
esac
# init (zsh plugins)
# ------------------
! test -e "$HOME"/.config/zsh/enhancd/init.sh || source "$HOME"/.config/zsh/enhancd/init.sh
if test -e "$HOME"/local/zfunctions ; then
fpath=("$HOME"/local/zfunctions $fpath)
autoload -U promptinit; promptinit
prompt pure
fi
# finalize
# --------
if ! test -z "${__INIT_CWD:-}" ; then
cd $__INIT_CWD
unset __INIT_CWD
fi
unset -f has
......@@ -7,6 +7,7 @@ in {
myrica-patched = require ./pkgs/myrica-patched/default.nix { };
newaita-icons = require ./pkgs/newaita-icons/default.nix { };
noto-fonts-jp = require ./pkgs/noto-fonts-jp/default.nix { };
pbzx = require ./pkgs/pbzx/default.nix { };
plastik-theme = require ./pkgs/plastik-theme/default.nix { };
switchboard-plug-locale = require ./pkgs/switchboard-plug-locale/default.nix { };
tmux-up = require ./pkgs/tmux-up/default.nix { };
......
{ stdenv, fetchurl, pkgconfig, lzma, xar }:
stdenv.mkDerivation rec {
name = "pbzx";
version = "v1.0.2";
src = fetchurl {
url = "https://github.com/NiklasRosenstein/pbzx/archive/v1.0.2.tar.gz";
sha256 = "147xnhi0x488cjhryi641kyxpiplhk4m5fmz3d771bkhvkwkrnrk";
};
buildInputs = [
lzma xar pkgconfig
];
buildPhase = ''
${stdenv.cc}/bin/gcc -o pbzx pbzx.c $(pkg-config liblzma --cflags --libs) -lxar
'';
installPhase = ''
mkdir -p $out/bin
cp pbzx $out/bin/pbzx
'';
}
......@@ -7,7 +7,7 @@ LABEL com.kalaclista.appname="VMware Workstaiton Player" \
RUN apt-get update \
&& apt-get install -y \
build-essential \
build-essential git python python3 \
ca-certificates \
openssl curl bash sed \
xserver-xorg libxi6 libxinerama1 libxcursor1 fontconfig libasound2 \
......
......@@ -9,6 +9,8 @@ docker run -it --init --name="vmware-postbuild" \
\
$USER:vmware -c "\
bash /tmp/vmware.bundle --console --required --eulas-agreed \
&& git clone --depth 1 https://github.com/DrDonk/unlocker \
&& cd unlocker && bash lnx-install.sh \
&& sed -i 's/if \"\$BINDIR\"\/vmware-modconfig --appname=.*/if true ||/' /usr/bin/vmplayer \
"
......
......@@ -2,38 +2,28 @@
{
imports = [
# Hardware and Host
../config/per-host/NyXPS15.nix
../config/per-hardware/XPS-9560-JP.nix
../config/per-host/NyXPS15.nix
# Location
../config/per-location/jp.nix
# Account
../config/per-account/nyarla.nix
# Console
../config/per-bundle/console.nix
../config/per-bundle/development.nix
# Desktop
../config/per-bundle/gnome3-xorg.nix
../config/per-bundle/fonts.nix
../config/per-bundle/hidpi.nix
../config/per-bundle/ibus.nix
../config/per-bundle/toolchains.nix
# Desktop Environment
../config/per-bundle/gnome3.nix
# Desktop Applications
../config/per-bundle/browsers.nix
../config/per-bundle/multimedia.nix
../config/per-bundle/office.nix
# Virtualization and emulators
# ../config/per-bundle/vbox.nix
../overlays/experimental/vmware-host.nix
../config/per-bundle/desktop.nix
# Optional
# Extra
../config/per-bundle/jackaudio.nix
../config/per-bundle/kvm.nix
];
}