...
 
Commits (12)
......@@ -13,7 +13,7 @@
"audio" "video" "render" "disk" "input" "storage" "lightdm"
# vm
# "kvm" "libvirtd"
"kvm" "libvirtd"
];
home = "/home/nyarla";
isNormalUser = true;
......
{ config, pkgs, ... }:
let
softwares = {
desktop = (with pkgs.mate; [
caja caja-extensions caja-dropbox
engrampa eom atril pluma
mate-calc mate-polkit
]) ++ (with pkgs.gnome3; [
gucharmap zenity gsound
dconf dconf-editor gvfs
gnome-font-viewer
])++ (with pkgs; [
polybarFull dunst rofi
bspwm sxhkd
]);
utility = (with pkgs; [
pavucontrol networkmanagerapplet
lxappearance-gtk3 arandr
light hsetroot wmctrl xdotool graphicsmagick xtitle
glib-networking udisks2 glib
]) ++ (with pkgs.xorg; [
xsetroot xwininfo xdpyinfo xrdb
]);
system = (with pkgs; [
qt5.full gnome3.adwaita-icon-theme gtk-engine-murrine
gnome3.gnome-themes-extra
]);
themes = {
gtk = pkgs.plastik-theme;
icon = pkgs.newaita-icons;
cursor = pkgs.capitaine-cursors;
};
};
packages = (with softwares; desktop ++ utility ++ system ++ (with themes; [ gtk icon cursor ])) ++ [ config.i18n.inputMethod.package ];
addToXDGDirs = p: ''
if test -d "${p}/share"; then
case "''${XDG_DATA_DIRS}" in
*:${p}/share:*) ;;
*) export XDG_DATA_DIRS=''${XDG_DATA_DIRS}:${p}/share
esac
fi
if test -d "${p}/lib/girepository-1.0"; then
case "''${GI_TYPELIB_PATH}" in
*:${p}/lib/girepository-1.0:*) ;;
*) export GI_TYPELIB_PATH=''${GI_TYPELIB_PATH}:${p}/lib ;;
esac
case "''${LD_LIBRARY_PATH}" in
*:${p}/lib:*) ;;
*) export LD_LIBRARY_PATH=''${LD_LIBRARY_PATH}:${p}/lib ;;
esac
fi
if test -d "${p}/lib/gio" ; then
case "''${GIO_EXTRA_MODULES}" in
*:${p}/lib/gio/modules:*) ;;
*) export GIO_EXTRA_MODULES=''${GIO_EXTRA_MODULES}:${p}/lib/gio/modules ;;
esac
fi
'';
nixos-gsettings-overrides = pkgs.runCommand "nixos-gsettings-overrides" {}
''
mkdir -p $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
cp -rf ${pkgs.gnome3.gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas*/glib-2.0/schemas/*.xml \
$out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
${pkgs.stdenv.lib.concatMapStrings (p: ''
if test -d ${p}/share/gsettings-schemas; then
cp -rf ${p}/share/gsettings-schemas/*/glib-2.0/schemas/* \
$out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
fi
'') (config.environment.systemPackages ++ packages)}
${pkgs.glib.dev}/bin/glib-compile-schemas $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
'';
in {
systemd.packages = with pkgs; [
dunst
];
programs.fuse.userAllowOther = true;
programs.dconf.enable = true;
programs.qt5ct.enable = true;
users.groups.storage = {};
security.polkit = {
enable = true;
extraConfig = ''
polkit.addRule(function(action, subject) {
if ( action.id === "org.freedesktop.udisks2.encrypted-unlock-system" && subject.isInGroup("storage") ) {
return polkit.Result.YES;
}
if ( (action.id === "org.freedesktop.udisks2.filesystem-mount-system"
|| action.id === "org.freedesktop.udisks2.filesystem-mount") && subject.isInGroup("storage") ) {
return polkit.Result.YES;
}
});
'';
};
services.accounts-daemon.enable = true;
services.gnome3.gnome-keyring.enable = true;
services.gnome3.gnome-settings-daemon.enable = true;
services.gvfs.enable = true;
services.system-config-printer.enable = true;
services.upower.enable = config.powerManagement.enable;
networking.networkmanager = {
enable = true;
};
services.dbus = {
socketActivated = true;
packages = packages;
};
services.compton = {
enable = true;
backend = "glx";
shadow = true;
shadowOffsets = [ (-15) (-15) ];
shadowOpacity = "0.2";
shadowExclude = [
"class_g = 'Firefox' && argb"
];
fade = true;
fadeDelta = 10;
fadeSteps = [ "0.25" "0.25" ];
vSync = true;
settings = {
"shadow-radius" = 15;
};
};
environment.pathsToLink = [ "/share" ];
environment.systemPackages = packages;
environment.variables = { GTK_CSD = "0"; };
nixpkgs.config.pulseaudio = true;
services.xserver = {
enable = true;
autorun = true;
updateDbusEnvironment = true;
libinput.enable = true;
displayManager = {
job.environment.LANG = "ja_JP.UTF-8";
lightdm = {
enable = true;
greeters = {
mini = {
enable = true;
user = "nyarla";
extraConfig = ''
[greeter]
show-password-label = true
show-input-cursor = true
password-label-text = login:
[greeter-hotkeys]
mod-key = control
shutdown-key = s
suspend-key = p
hibernate-key = h
restart-key = r
[greeter-theme]
font = "Sans"
font-size = 1em
text-color = "#F9F9F9"
error-color = "#FF0000"
background-image = ""
background-color = "#333333"
window-color = "#333333"
border-color = "#00CCFF"
border-width = 1px
layout-space = 30
password-color = "#FFFFFF"
password-background-color = "#333333"
'';
};
};
};
};
desktopManager = {
default = "bspwm";
session = pkgs.stdenv.lib.singleton {
name = "bspwm";
start = ''
export GTK_DATA_PREFIX=${config.system.path}
export NIX_GSETTINGS_OVERRIDES_DIR=${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
export CAJA_EXTENSION_DIRS=$CAJA_EXTENSION_DIRS''${CAJA_EXTENSION_DIRS:+:}${config.system.path}/lib/caja/extensions-2.0/
${pkgs.stdenv.lib.concatMapStrings (p: ''
${addToXDGDirs p}
'') config.environment.systemPackages}
export XCURSOR_THEME=capitaine-cursors-white
export XCURSOR_SIZE=48
${pkgs.xorg.xrdb}/bin/xrdb -merge /etc/nixos/dotfiles/nyarla/xorg/Xresources
${pkgs.xorg.xsetroot}/bin/xsetroot -cursor_name left_ptr
export SXHKD_SHELL=${pkgs.zsh}/bin/zsh
${pkgs.sxhkd}/bin/sxhkd -c /etc/nixos/dotfiles/nyarla/sxhkd/sxhkdrc &
${pkgs.bspwm}/bin/bspwm -c /etc/nixos/dotfiles/nyarla/bspwm/bspwmrc &
waitPID=$!
'';
};
};
};
}
......@@ -48,6 +48,7 @@
ntfs3g
hfsprogs
exfat exfat-utils
gocryptfs dropbox
# hardware
gptfdisk
......
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
forked-daapd
];
}
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# terminal
let
applications = with pkgs; [
mlterm
# networks
firefox
epiphany
electron_3
chromium
uget
tdesktop
vlc
# credentials
keepassxc # TODO: change to pass?
veracrypt
# ebooks
calibre
# music
deadbeef
# graphics
gimp inkscape fontforge-gtk
# office
peek
spice-up
# windows app
wineUnstable winetricks
# X.org
xclip
xdg_utils
libnotify
];
services.dbus.packages = with pkgs; [
mlterm
firefox
epiphany
electron_3
uget
foliate
vlc
keepassxc
veracrypt
calibre
deadbeef
spotify
gimp inkscape fontforge-gtk
peek spice-up
wineUnstable winetricks
xclip
xdg_utils
libnotify
xclip xdg_utils libnotify
];
in {
environment.systemPackages = applications;
services.dbus.packages = applications;
}
......@@ -5,7 +5,7 @@
hugo sassc goaccess
# cloud
awscli aws-sam-cli google-cloud-sdk
awscli google-cloud-sdk
# api
protobuf
......
......@@ -6,7 +6,7 @@
noto-fonts noto-fonts-jp noto-fonts-extra noto-fonts-emoji
# monospace
myrica myrica-patched
myrica nerdfonts-symbols
# documenation
genjyuu-gothic
......@@ -19,7 +19,7 @@
defaultFonts = {
sansSerif = [ "Noto Sans JP" "Noto Color Emoji" ];
serif = [ "Noto Serif JP" "Noto Color Emoji" ];
monospace = [ "Myrica M Patched" "Noto Sans Mono CJK JP" "Noto Color Emoji" ];
monospace = [ "Myrica M" "Symbols Nerd Fonts" "Noto Color Emoji" ];
};
};
};
......
......@@ -11,13 +11,9 @@
skk-dicts skktools
];
services.xserver.displayManager.sessionCommands = ''
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
${pkgs.gnome3.dconf.lib}/libexec/dconf-service &
${config.i18n.inputMethod.package}/bin/ibus-daemon -drx --config=${config.i18n.inputMethod.package}/libexec/ibus-dconf
'';
environment.variables = {
"GTK_IM_MODULE" = "ibus";
"QT_IM_MODULE" = "ibus";
"XMODIFIERS" = "@im=ibus";
};
}
{ config, pkgs, ... }:
let
apps = (with pkgs.mate; [
caja caja-extensions engrampa eom atril
caja caja-extensions caja-dropbox engrampa eom atril
mate-calc pluma mate-polkit
]) ++ (with pkgs.gnome3; [
gucharmap zenity gsound
dconf gvfs
dconf-editor gnome-font-viewer
]) ++ (with pkgs; [
polybar dunst lxtask
pavucontrol connman-gtk blueman
polybarFull dunst lxtask stalonetray
pavucontrol blueman
lxappearance-gtk3 obconf arandr
light hsetroot xorg.xsetroot xorg.xwininfo xorg.xdpyinfo
wmctrl xdotool graphicsmagick
openbox glib-networking udisks2
]) ++ [ config.i18n.inputMethod.package ];
openbox glib-networking udisks2 glib
networkmanagerapplet
]) ++ [ config.i18n.inputMethod.package ];
themes = {
gtk = pkgs.plastik-theme;
icon = pkgs.newaita-icons;
......@@ -70,9 +70,6 @@ in {
lightdm = {
enable = true;
extraConfig = ''
user-authority-in-system-dir = true
'';
greeters = {
mini = {
enable = true;
......@@ -117,10 +114,7 @@ in {
bsSupport = true;
start = ''
export GTK_DATA_PREFIX=${config.system.path}
export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
export NIX_GSETTINGS_OVERRIDES_DIR=${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
export CAJA_EXTENSION_DIRS=$CAJA_EXTENSION_DIRS''${CAJA_EXTENSION_DIRS:+:}${config.system.path}/lib/caja/extensions-2.0/
${pkgs.stdenv.lib.concatMapStrings (p: ''
......@@ -130,7 +124,18 @@ in {
export XCURSOR_THEME=capitaine-cursors-white
export XCURSOR_SIZE=48
${pkgs.xorg.xsetroot}/bin/xsetroot -cursor_name left_ptr -solid "#363636"
${pkgs.hsetroot}/bin/hsetroot -solid "#363636"
if test -e /dev/sda1 ; then
${pkgs.glib}/bin/gio mount -d /dev/sda1
${pkgs.gocryptfs}/bin/gocryptfs -config /run/media/nyarla/LINUX/Vault/gocryptfs.conf \
-allow_other \
-passfile /etc/gocryptfs/password \
/run/media/nyarla/LINUX/Dropbox/Encrypted \
/run/media/nyarla/LINUX/Decrypted
${pkgs.dropbox}/bin/dropbox &
fi
exec ${pkgs.openbox}/bin/openbox-session
'';
......@@ -146,22 +151,19 @@ in {
gucharmap zenity gsound
dconf gvfs dconf-editor gnome-font-viewer
]) ++ (with pkgs; [
polybar dunst lxtask
pavucontrol connman-gtk blueman openvpn
polybarFull dunst lxtask stalonetray
pavucontrol blueman openvpn
lxappearance-gtk3 obconf arandr
networkmanagerapplet
]) ++ [
config.i18n.inputMethod.package
];
systemd.packages = with pkgs; [ blueman ];
networking.connman = {
enable = true;
enableVPN = true;
networkInterfaceBlacklist = [
"virbr" "docker"
];
};
networking.networkmanager.enable = true;
programs.fuse.userAllowOther = true;
programs.dconf.enable = true;
security.polkit = {
......@@ -185,7 +187,6 @@ in {
services.gnome3 = {
gnome-keyring.enable = true;
gnome-settings-daemon.enable = true;
gnome-settings-daemon.package = pkgs.mate.mate-settings-daemon;
};
services.gvfs.enable = true;
services.system-config-printer.enable = true;
......@@ -202,6 +203,7 @@ in {
shadowOpacity = "0.2";
shadowExclude = [
"class_g = 'Firefox' && argb"
"class_g = 'Polybar'"
];
fade = true;
......@@ -210,16 +212,7 @@ in {
settings = {
"shadow-radius" = 15;
"no-dock-shadow" = true;
"no-dnd-shadow" = true;
"unredir-if-possible" = false;
"paint-on-overlay" = true;
"glx-no-stencil" = true;
"glx-no-rebind-pixmap" = true;
"vsync" = "true";
};
};
......@@ -227,8 +220,13 @@ in {
environment.systemPackages = (with themes; [
gtk icon cursor
]) ++ apps ++ (with pkgs; [
qt5.qtbase gnome3.adwaita-icon-theme
qt5.full gnome3.adwaita-icon-theme gtk-engine-murrine
gnome3.gnome-themes-extra
]);
nixpkgs.config.pulseaudio = true;
environment.variables = {
"GTK_CSD" = "0";
};
}
{ pkgs, ... }:
{ config, pkgs, ... }:
{
# Boot
# ====
......@@ -26,7 +26,7 @@
boot.kernelModules = [
"tcp_bbr"
];
# initrd
boot.initrd.luks.devices = [
{ name = "container";
......@@ -43,6 +43,7 @@
"snd_hda_intel.power_save=0"
"snd_hda_intel.power_save_controller=0"
"usb_storage.quirks=152d:0578:u"
# "video=HDMI-A-1:d"
];
boot.blacklistedKernelModules = [
......@@ -88,15 +89,12 @@
enable = true;
driSupport = true;
s3tcSupport = true;
extraPackages = [ pkgs.libGL_driver config.boot.kernelPackages.nvidia_x11.out ];
};
# Xorg
services.xserver.useGlamor = true;
services.xserver.videoDrivers = [ "i915" ];
services.xserver.deviceSection = ''
Option "SwapbuffersWait" "true"
Option "TearFree" "true"
'';
# webcam
# services.uvcvideo.dynctrl = {
......
......@@ -34,20 +34,13 @@
# -------
networking.hostId = "71ca914d";
networking.hostName = "NyXPS15";
networking.wireless = {
enable = true;
networks = {
dummary = {};
};
};
# Firewall
# --------
networking.firewall = {
enable = true;
allowedTCPPorts = [ 445 139 19000 58080 ];
allowedUDPPorts = [ 137 138 5353 19000 ];
allowedTCPPorts = [ 53 19000 58080 17500 ];
allowedUDPPorts = [ 53 5353 19000 17500 ];
};
# Auto Discovery
......@@ -95,67 +88,63 @@
# file sharing
# ------------
services.samba = {
enable = true;
package = pkgs.samba4;
securityType = "user";
extraConfig = ''
interfaces = 192.168.122.0/24 localhost
workgroup = WORKGROUP
server string = NyXPS15
netbios name = NYXPS15
hosts deny = 0.0.0.0/0
hosts allow = 192.168.122. localhost
guest account = nobody
map to guest = bad user
'';
shares = {
data = {
"path" = "/data";
"browsable" = "Yes";
"read only" = "No";
"create mask" = "0600";
"directory mask" = "0700";
"force user" = "nyarla";
"force group" = "users";
"acl allow execute always" = "Yes";
};
};
};
# ssh
# ---
programs.ssh.startAgent = true;
# services.samba = {
# enable = true;
# package = pkgs.samba4;
# securityType = "user";
# extraConfig = ''
# interfaces = 192.168.122.0/24 localhost
# workgroup = WORKGROUP
# server string = NyXPS15
# netbios name = NYXPS15
# hosts deny = 0.0.0.0/0
# hosts allow = 192.168.122. localhost
# guest account = nobody
# map to guest = bad user
# '';
# shares = {
# data = {
# "path" = "/data";
# "browsable" = "Yes";
# "read only" = "No";
# "create mask" = "0600";
# "directory mask" = "0700";
# "force user" = "nyarla";
# "force group" = "users";
# "acl allow execute always" = "Yes";
# };
# };
# };
# backup via restic
# -----------------
systemd.services.restic = {
enable = true;
description = "Automatic backup service via restic";
unitConfig = {
"RefuseManualStart" = "no";
"RefuseManualStop" = "yes";
};
serviceConfig = {
"Type" = "oneshot";
"ExecStart" = "${pkgs.zsh}/bin/zsh /etc/nixos/scripts/backup";
"User" = "nyarla";
"Group" = "users";
};
path = with pkgs; [
rsync restic zsh coreutils
];
};
systemd.timers.restic = {
enable = true;
description = "Automatic backup timer via restic";
wantedBy = [ "timer.target" "network.target" "mult-user.target" ];
timerConfig = {
"OnCalendar" = "*-*-* 01:00:00";
"Persistent" = "true";
};
};
# systemd.services.restic = {
# enable = true;
# description = "Automatic backup service via restic";
# unitConfig = {
# "RefuseManualStart" = "no";
# "RefuseManualStop" = "yes";
# };
# serviceConfig = {
# "Type" = "oneshot";
# "ExecStart" = "${pkgs.zsh}/bin/zsh /etc/nixos/scripts/backup";
# "User" = "nyarla";
# "Group" = "users";
# };
# path = with pkgs; [
# rsync restic zsh coreutils
# ];
# };
# systemd.timers.restic = {
# enable = true;
# description = "Automatic backup timer via restic";
# wantedBy = [ "timer.target" "network.target" "mult-user.target" ];
# timerConfig = {
# "OnCalendar" = "*-*-* 01:00:00";
# "Persistent" = "true";
# };
# };
# Resilio Sync
# ------------
......
#!/bin/sh
#!/usr/bin/env sh
# Global Settings
# ===============
# BSPWM Configuration
# ===================
# border colors
# -------------
bspc config normal_border_color '#5D5D5D'
bspc config active_border_color '#9CD9F0'
bspc config focused_border_color '#CDEE69'
bspc config presel_feedback_color '#FFE377'
bspc config normal_border_color '#F9F9F9'
bspc config active_border_color '#CCFF00'
bspc config focused_border_color '#00CCFF'
bspc config presel_feedback_color '#FFCC33'
# windows
# -------
bspc config top_padding 32
bspc config top_padding 48
bspc config left_padding 0
bspc config bottom_padding 0
bspc config right_padding 0
bspc config window_gap 12
bspc config border_width 6
bspc config window_gap 48
bspc config border_width 3
# workspace
# ---------
bspc monitor -d 1 2 3 4 5 6 7 8 9
# behavior
# --------
bspc config click_to_focus button1
bspc config pointer_modifier mod1
bspc config focus_follows_pointer true
bspc config external_rules_command /etc/nixos/dotfiles/nyarla/bspwm/rules
# Auto Start
# ==========
# Desktop Configuration
# =====================
# Wallpaper
# ---------
hsetroot -full /etc/nixos/dotfiles/nyarla/xorg/wallpaper.jpg
# Polybar
# -------
/etc/nixos/dotfiles/nyarla/polybar/launch.sh &
# Startup Configuartion
# =====================
# Dropbox
# -------
if ! pgrep dropbox && test -e /dev/sda1 ; then
gio mount -d "$(readlink -e /dev/disk/by-uuid/813eda2b-63cb-4cbe-8dd4-5f02c090273b)"
gocryptfs -config /run/media/nyarla/LINUX/Vault/gocryptfs.conf \
-allow_other \
-passfile /etc/gocryptfs/password \
/run/media/nyarla/LINUX/Dropbox/Encrypted \
/run/media/nyarla/LINUX/Decrypted
dropbox &
fi
# Network Manager
# ---------------
nm-applet &
# Input Method
# ------------
"$(nix-store -r $(nix-store -qd $(which dconf)) | grep -vP "\-\w+$")"/libexec/dconf-service &
P="$(nix-store -r $(nix-store -qd $(which ibus-setup)))"
$P/bin/ibus-daemon -drx --config=$P/libexec/ibus-dconf
unset P
......@@ -51,18 +51,18 @@ close_all = ctrl+shift+space
history = ctrl+grave
context = ctrl+shift+period
[urgency_low]
background = "#F8F8F8"
background = "#F9F9F9"
foreground = "#000000"
frame_color = "#B0B0B0"
frame_color = "#CCCCCC"
timeout = 10
[urgency_normal]
background = "#FFE377"
background = "#FFCC33"
foreground = "#000000"
frame_color = "#D0B03C"
frame_color = "#CC9900"
timeout = 10
[urgency_critical]
background = "#E09690"
background = "#FF0000"
foreground = "#000000"
frame_color = "#C75646"
frame_color = "#CC0000"
timeout = 0
# vim: ft=cfg
black=#242424
red=#c75646
green=#8eb33b
yellow=#d0b03c
blue=#72b3cc
magenta=#c8a0d1
cyan=#218693
white=#b0b0b0
hl_black=#5d5d5d
hl_red=#e09690
hl_green=#cdee69
hl_yellow=#ffe377
hl_blue=#9cd9f0
hl_magenta=#fbb1f9
hl_cyan=#77dfd8
hl_white=#f7f7f7
black=#000000
red=#CC0000
green=#99CC00
yellow=#CC9900
blue=#0099CC
magenta=#CC00CC
cyan=#009999
white=#CCCCCC
hl_black=#666666
hl_red=#FF6633
hl_green=#CCFF00
hl_yellow=#FFCC33
hl_blue=#00CCFF
hl_magenta=#FF00FF
hl_cyan=#00CCCC
hl_white=#F9F9F9
......@@ -19,10 +19,10 @@ box_drawing_font = decsp
scrollbar_mode = false
fg_color = hl_white
bg_color = #242424
bg_color = #191919
vt_color_mode = true
cursor_bg_color = hl_black
cursor_fg_color = hl_white
cursor_bg_color = hl_green
cursor_fg_color = hl_black
line_space = 6
......
......@@ -11,3 +11,5 @@ ibus-daemon -drx --config=$(readlink /run/current-system/sw/bin/ibus-daemon | se
# Information Bar
# ---------------
/etc/nixos/dotfiles/nyarla/polybar/launch.sh &
nm-applet &
......@@ -29,7 +29,7 @@
<item label="Scrapbox">
<action name="Execute">
<command>epiphany "https://scrapbox.io/nyarla"</command>
<command>epiphany --application-mode --profile="/home/nyarla/.local/share/epiphany-scrapbox.io-88829e3feb6c6bf956faa126c15b232beec93619" https://scrapbox.io/nyarla/</command>
</action>
</item>
......@@ -83,13 +83,17 @@
<command>~/local/wine/mp3tag/bin/wine 'C:\Program Files\Mp3tag\Mp3tag.exe'</command>
</action>
</item>
</memu>
<menu id="apps-vm" label="VM">
<item label="VMware Workstation Player">
<item label="Virt Manager">
<action name="Execute">
<command>virt-manager</command>
</action>
</item>
<item label="Windows 10 Pro">
<action name="Execute">
<command>/etc/nixos/packages/dockerapp/vmware-workstation-player/run</command>
<command>env GDK_SCALE=1 GDK_DPI_SCALE=1 virt-manager -c qemu:///system --show-domain-console Win10Pro</command>
</action>
</item>
</menu>
......@@ -246,11 +250,11 @@
<separator />
<menu id="apps-browsers"/>
<menu id="apps-multimedia"/>
<menu id="apps-vm"/>
<separator />
<menu id="apps-office"/>
<menu id="system-utilities"/>
<separater />
<menu id="apps-vm"/>
<separator />
<menu id="system-actions"/>
</menu>
</openbox_menu>
......@@ -220,27 +220,27 @@
</keybind>
<keybind key="W-l">
<action name="Execute">
<command>dm-tool switch-to-greeter</command>
<command>xset dpms force off</command>
</action>
</keybind>
<keybind key="W-Left">
<action name="Execute">
<command>wmctrl -r :ACTIVE: -e 0,1920,48,1920,2064</command>
<command>wmctrl -r :ACTIVE: -e 0,0,48,1920,2064</command>
</action>
</keybind>
<keybind key="W-Right">
<action name="Execute">
<command>wmctrl -r :ACTIVE: -e 0,3840,48,1920,2064</command>
<command>wmctrl -r :ACTIVE: -e 0,1920,48,1920,2064</command>
</action>
</keybind>
<keybind key="W-Up">
<action name="Execute">
<command>wmctrl -r :ACTIVE: -e 0,1920,48,3840,2064</command>
<command>wmctrl -r :ACTIVE: -e 0,0,48,3840,2064</command>
</action>
</keybind>
<keybind key="W-Down">
<action name="Execute">
<command>wmctrl -r :ACTIVE: -e 0,2880,540,1920,1080</command>
<command>wmctrl -r :ACTIVE: -e 0,940,540,1920,1080</command>
</action>
</keybind>
</keyboard>
......
# vim: ft=conf
[colors]
gray-brightest = #FFFFFF
gray-brighter = #F9F9F9
gray-bright = #CCCCCC
gray-dark = #666666
gray-darker = #333333
gray-darkest = #000000
red-bright = #FF0000
red-dark = #CC0000
orange-bright = #FF6633
orange-dark = #CC6600
yellow-bright = #FFCC33
yellow-dark = #CC9900
lime-bright = #CCFF00
lime-dark = #99CC00
green-bright = #00CC00
green-dark = #009900
mint-bright = #00CC99
mint-dark = #009966
cyan-bright = #00CCCC
cyan-adark = #009999
sky-bright = #00CCFF
sky-dark = #0099CC
blue-bright = #0000FF
blue-dark = #0000CC
purple-bright = #9900CC
purple-dark = #660099
magenta-bright = #CC00CC
magenta-dark = #990099
wine-bright = #CC3366
wine-dark = #990033
[bar/main]
monitor = eDP-1
# monitor = rdp0
......@@ -8,30 +53,68 @@ height = 48
font-0 = "Monospace:size=24;3"
background = #242424
foreground = #F8F8F8
background = #81191919
foreground = #F0F9F9
border-size = 0
module-margin-left = 1
modules-left = menu
modules-center = window
modules-right = cpu memory volume network date time account machine battery
modules-left = userhost title
modules-center = bspwm
modules-right = datetime cpu memory volume network battery spacer
tray-detached = true
tray-position = right
tray-maxsize = 32
tray-scale = 1.0
line-size = 3
line-color = ${colors.gray-brighter}
[module/spacer]
type = custom/text
content = " "
[module/bspwm]
type = internal/bspwm
enable-click = true
enable-scroll = true
label-focused = "%icon% %name% "
label-focused-underline = ${colors.lime-bright}
label-occupied = "%icon% %name% "
label-occupied-underline = ${colors.sky-bright}
label-uegent = "%icon% %name% "
label-urgent-background = ${colors.red-bright}
label-urgent-foreground = ${colors.gray-brightest}
label-empty = "%icon% %name% "
label-empty-foreground = ${colors.gray-bright}
[module/title]
type = internal/xwindow
format = <label>
label = %{F#CCFF00}%{F-} %{B}%title%%{B-}
label-maxlen = 64
[module/volume]
type = internal/alsa
type = internal/pulseaudio
sink = alsa_output.pci-0000_00_1f.3.analog-stereo
interval = 2
use-ui-max = false
interval = 1
format-volume = %{A3:pavucontrol &:}<ramp-volume><label-volume>%{A}
format-muted = %{A3:pavucontrol &:}<label-muted>---%{A}
format-volume = %{A2:polybar-pulseaudio-volume.sh 2 &:}%{A3:pavucontrol &:}<ramp-volume><label-volume>%{A}%{A}
format-mute = %{A2:polybar-pulseaudio-volume.sh 2 &:}%{A3:pavucontrol &:}<label-mute>%{A}{A}
label-volume = %percentage:1%%
label-muted = %{F#C8A0D1}%{F-}
label-volume = %percentage%%
label-muted = %{F#FF6633}%{F-}---
ramp-volume-0 = %{F#9CD9F0}%{F-}
ramp-volume-1 = %{F#FFE377}%{F-}
ramp-volume-2 = %{F#E09690}%{F-}
ramp-volume-0 = %{F#00CCFF}%{F-}
ramp-volume-1 = %{F#CCFF00}%{F-}
ramp-volume-2 = %{F#FFCC33}%{F-}
[module/battery]
type = internal/battery
......@@ -40,55 +123,40 @@ adapter = AC
time-format = %H:%M
format-charging = "<ramp-capacity> "
format-discharging = "<ramp-capacity> "
format-full = "<ramp-capacity> "
format-charging = "%{F#FFCC00}%{F-}%percentage%% <ramp-capacity>"
format-discharging = "%{F#CCCCCD}%{F-}%percentage% <ramp-capacity>"
format-full = "%{F#CCFF00}%{F-}100% <ramp-capacity>"
ramp-capacity-0 = %{F#C75646}%{F-}
ramp-capacity-1 = %{F#E09690}%{F-}
ramp-capacity-2 = %{F#FFE377}%{F-}
ramp-capacity-3 = %{F#8EB33B}%{F-}
ramp-capacity-4 = %{F#CDEE69}%{F-}
ramp-capacity-0 = %{F#FF0000}%{F-}
ramp-capacity-1 = %{F#FF6633}%{F-}
ramp-capacity-2 = %{F#FFCC33}%{F-}
ramp-capacity-3 = %{F#CCFF00}%{F-}
ramp-capacity-4 = %{F#CCFF00}%{F-}
[module/network]
type = internal/network
interface = wlp2s0
format-connected = %{A1:connman-gtk &:}%{F#9CD9F0}%{F-}<label-connected>%{A}
format-disconnetted = %{A1:connman-gtk &:}%{F#5D5D5D}%{F-}<label-disconnected>%{A}
format-connected = %{F#9CD9F0}%{F-}<label-connected>
format-disconnetted = %{F#5D5D5D}%{F-}<label-disconnected>
label-connected = %essid%
label-disconnected = none
[module/date]
type = internal/date
interval = 1.0
date = %Y-%m-%d (%a)
format = %{F#FFE377}%{F-}<label>
label = %date%
[module/time]
[module/datetime]
type = internal/date
interval = 1.0
time = %H:%M:%S
date = %Y-%m-%d
time = %H:%M:%S (%a)
format = %{F#00CCCC}%{F-}<label>
label = %{A1:polybar-datetime-clipboard.sh &:}%date%T%time%%{A}
format = %{F#77DFD8}%{F-}<label>
label = %time%
[module/account]
[module/userhost]
type = custom/script
exec = whoami
exec = "sh -c 'echo $(id -un)@$(hostname)'"
tail = false
format = %{F#9CD9F0}%{F-}<label>
[module/machine]
type = custom/script
exec = hostname
tail = false
format = %{F#CDEE69}%{F-}<label>
format = "%{F#00CCFF} %{F-} <label>"
[module/cpu]
type = internal/cpu
......@@ -108,14 +176,3 @@ type = internal/memory
format = %{F#5D5D5D}%{F-}<label>
label = %gb_used:0:4%GB
[module/window]
type = internal/xwindow
format = %{A1:sleep 0.2; xdotool key --clearmodifiers F12 &:}<label>%{A}
label = %{F#CDEE69}%{F-} %title%
label-maxlen = 64
label-empty = Nothing
label-empty-foreground = #B0B0B0
[module/menu]
type = custom/text
content = %{A1:sleep 0.2; xdotool key --clearmodifiers F11 &:}%{F#9CD9F0}%{F-} Applications%{A}
......@@ -3,4 +3,9 @@
pkill polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
case "${PATH}" in
*:/etc/nixos/scripts:*) ;;
*) export PATH=/etc/nixos/scripts:$PATH
esac
polybar -c /etc/nixos/dotfiles/nyarla/polybar/config main &
[Desktop Entry]
Name=Edit the.kalaclista.com
Exec=/etc/nixos/scripts/protocol-kalaclista-website.pl %u
Icon=text-markdown
Type=Application
Terminal=false
MimeType=x-scheme-handler/kalaclista;
# Applications
# ============
super + a ; b
firefox
super + a ; c
mlterm
caja
super + a ; d
deadbeef
super + a ; f
nautilus
super + a ; g
chromium
super + a ; p
keepassxc
super + a ; l
dm-tool lock
super + a ; q
bspc quit
super + a ; r
sh /etc/nixos/dotfiles/nyarla/bspwm/bspwmrc && pkill -SIGUSR1 sxhkd
sh /etc/nixos/dotfiles/nyarla/bspwm/bspwmrc && pkill -SIGUSR1 sxhkd
super + a ; t
mlterm
super + a ; x
bspc node focused -c
......@@ -25,10 +29,11 @@ super + a ; x
super + a ; X
bspc node focused -k
# Desktops
# ========
super + w ; {1,2,3,4,5,6,7,8,9}
super + a ; {1,2,3,4,5,6,7,8,9}
bspc desktop -f {1,2,3,4,5,6,7,8,9}
# Windows
......@@ -66,18 +71,20 @@ super + {Left,Right}
# Multimedia Keys
# ===============
XF86AudioRaiseVolume
pactl set-sink-mute 1 false ; pactl set-sink-volume 1 +1%
# XF86AudioRaiseVolume
# pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +1%
XF86AudioLowerVolume
pactl set-sink-mute 1 false ; pactl set-sink-volume 1 -1%
# XF86AudioLowerVolume
# pactl set-sink-mute 0 false ; pactl set-sink-volume 0 -1%
XF86AudioMute
pactl set-sink-mute 1 toggle
# XF86AudioMute
# pactl set-sink-mute 0 toggle
XF86MonBrightnessDown
light -U 10%
# XF86MonBrightnessDown
# light -U 10%
XF86MonBrightnessUp
light -A 10%
# XF86MonBrightnessUp
# light -A 10%
XF86Search
sh -c /etc/nixos/scripts/bemenu-application-launch.sh
Xcursor*theme: /run/current-system/sw/share/icons/capitaine-cursors-white
Xcursor*size: 48
......@@ -4,9 +4,12 @@ in {
deezer = require ./pkgs/deezer/default.nix { };
deno-land = require ./pkgs/deno-land/default.nix { };
elementary-tweaks = require ./pkgs/elementary-tweaks/default.nix { };
foliate = require ./pkgs/foliate/default.nix { };
fontmerger = require ./pkgs/font-merger/default.nix { };
forked-daapd = require ./pkgs/forked-daapd/default.nix { };
genjyuu-gothic = require ./pkgs/genjyuu-gothic/default.nix { };
myrica-patched = require ./pkgs/myrica-patched/default.nix { };
nerdfonts-symbols = require ./pkgs/nerdfonts-symbols/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 { };
......
{ stdenv, fetchurl, patchelf, gzip }:
stdenv.mkDerivation rec {
name = "deno-${version}";
version = "v0.13.0";
version = "v0.23.0";
src = fetchurl {
url = "https://github.com/denoland/deno/releases/download/${version}/deno_linux_x64.gz";
sha256 = "1pyh1ycvk6wj61ch06263sfa262lsg1n7fq5x0cfqag51rnfkcdl";
sha256 = "14mk9k29mhfv6yszb2k01nnp4rai1phvsrs6sxr71y7vd8rz9j4n";
};
propargatedBuildInputs = [ patchelf gzip ];
......
{ stdenv, fetchurl, ninja, meson, gettext, webkitgtk, gnome3, wrapGAppsHook }:
stdenv.mkDerivation rec {
name = "foliate";
version = "1.5.3";
src = fetchurl {
url = "https://github.com/johnfactotum/foliate/archive/${version}.tar.gz";
sha256 = "1mz27qj9zwkn978yd4sdswha4laq5gf9s6cs5xrkqfj9242mrx4m";
};
buildInputs = [
gettext webkitgtk gnome3.gjs
];
nativeBuildInputs = [
ninja meson wrapGAppsHook
];
}
{ stdenv, fetchurl
, avahi, sqlite, ffmpeg, minixml, protobufc, json_c, zlib, libgcrypt, libgpgerror, libuv
, libconfuse, libevent, libunistring, libplist, libantlr3c, libsodium, libwebsockets
, openssl, alsaLib, curl, libpulseaudio
, gperf, antlr3_5, pkgconfig
}:
stdenv.mkDerivation rec {
name = "forked-daapd";
version = "26.5";
src = fetchurl {
url = "https://github.com/ejurgensen/forked-daapd/releases/download/${version}/forked-daapd-${version}.tar.xz";
sha256 = "0g4j0mm5qaij36rd75x90l3dh8rvghr6b2m02dj41zvqq30ya4kd";
};
buildInputs = [
avahi sqlite ffmpeg minixml protobufc json_c zlib libgcrypt libgpgerror libuv
libconfuse libevent libunistring libplist libantlr3c libsodium libwebsockets
openssl alsaLib curl libpulseaudio
];
nativeBuildInputs = [
gperf antlr3_5 pkgconfig
];
}
......@@ -4,8 +4,8 @@ stdenv.mkDerivation rec{
name = "nerdfont-symbols-${version}";
src = fetchurl {
name = "nerdfont-symbols.ttf";
url = "https://github.com/ryanoasis/nerd-fonts/raw/master/src/glyphs/Symbols-1000-em%20Nerd%20Font%20Complete.ttf";
sha256 = "1xamn2migcy0vdsvm9ypf7vl2rzkq0z8cz70a7z9dpx4mdffi2kx";
url = "https://github.com/ryanoasis/nerd-fonts/raw/master/src/glyphs/Symbols-2048-em%20Nerd%20Font%20Complete.ttf";
sha256 = "078ynwfl92p8pq1n3ic07248whdjm30gcvkq3sy9gas1vlpyg6an";
};
unpackPhase = ''
......
......@@ -5,8 +5,8 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "cbrnix";
repo = "Newaita";
rev = "d73e6fd99a7c96817f09b821d251a37aa8ab90e0";
sha256 = "0rhxb7kvvv0qq91ikb2mrj23kfmkl3vknxsaqvbmn9qz7744qjjb";
rev = "5561b6d18625fd405bff0daaef069fb4d99f0bd3";
sha256 = "1llzmgm428vxp5ipzxyxzamm7yfqhxyc9iv52lrrc09vx1bds6ck";
};
installPhase = ''
......
......@@ -2,52 +2,22 @@
let
message = ''
Please download from:
- https://www.opendesktop.org/co/1528244815
- https://www.gnome-look.org/s/Gnome/p/1239261/
'';
gtk = requireFile {
name = "Plastik_Master.tar.xz";
sha256 = "1gix9jnpf1wysppa2jifdlbb26g88f4krwd3il2mad3j2w59ff7n";
inherit message;
};
gnome-shell-white = requireFile {
name = "Plastik-20180913144229.tar.xz";
sha256 = "0xy2pivhzg15qx5k4lrmww5024qd3ir97j9fx5avaks13dw6zy1x";
inherit message;
};
gnome-shell-griss = requireFile {
name = "Plastik-Griss-20180727042955.tar.xz";
sha256 = "1mjn1wyvngqcmcgbqjan4c364x836w521awp30k3kg5103chyi5p";
inherit message;
};
gnome-shell-dark = requireFile {
name = "PlastikDark-Shell.tar.xz";
sha256 = "0apha3vh144nd21r86xn60sy2dnpcq0vq46y3lg0v50rlbdgic0b";
themes = requireFile {
name = "plastik-themes.tar.xz";
sha256 = "09awnz1gx64caqwwklw0l5hihkcnkhsy77q4ly4r0jy2g989m86r";
inherit message;
};
in stdenv.mkDerivation rec {
name = "plastik-theme-${version}";
version = "git";
srcs = [ gtk gnome-shell-white gnome-shell-griss gnome-shell-dark ];
unpackPhase = ''
${stdenv.lib.concatMapStrings (x: ''
tar -xf ${x}
'') srcs}
'';
name = "plastik-themes-${version}";
version = "2019-09-03";
src = themes;
installPhase = ''
mkdir -p $out/share/themes
mv Plastik/gnome-shell Plastik/Plastik/
mv PlastikDark-Shell/gnome-shell Plastik/Plastik-Dark/
mv Plastik-Griss/gnome-shell Plastik/Plastik-Griss/
mv Plastik/* $out/share/themes/
cp -R * $out/share/themes
'';
}
......@@ -11,7 +11,7 @@ cp /var/run/lightdm/$USER/xauthority /tmp/.Xauthority
state=$HOME/local/docker/vmware
docker run --rm -t --init --privileged --net host \
docker run --rm -t --init --privileged --net host --shm-size 2g \
--mount type=bind,src=/etc/group,dst=/etc/group,readonly \
--mount type=bind,src=/etc/shells,dst=/etc/shells,readonly \
--mount type=bind,src=/etc/passwd,dst=/etc/passwd,readonly \
......@@ -55,5 +55,5 @@ docker run --rm -t --init --privileged --net host
&& (/usr/bin/vmware-networks --start &) \
&& sudo -u $(id -un) -g $(id -gn) ibus-daemon -dx \
&& (test -d /app/.config/dconf || sudo -u $(id -un) -g $(id -gn) dbus-launch ibus-setup) \
&& sudo -u $(id -un) -g $(id -gn) dbus-launch env GDK_SCALE=2 GDK_DPI_SCALE=0.5 vmplayer
&& sudo -u $(id -un) -g $(id -gn) dbus-launch vmplayer
"
......@@ -16,8 +16,7 @@
../config/per-bundle/development.nix
# Desktop
#../config/per-bundle/gnome3-xorg.nix
../config/per-bundle/openbox-xorg.nix
../config/per-bundle/bspwm-xorg.nix
../config/per-bundle/fonts.nix
../config/per-bundle/hidpi.nix
../config/per-bundle/ibus.nix
......@@ -26,7 +25,6 @@
# Extra
../config/per-bundle/daapd.nix
../config/per-bundle/jackaudio.nix
../overlays/experimental/vmware-host.nix
#../config/per-bundle/kvm.nix
../config/per-bundle/kvm.nix
];
}
#!/usr/bin/env sh
date +%Y-%m-%dT%H:%M:%S | clipboard set -
notify-send -i calendar -u low Datetime "Copied datetime to clipboard"
#!/usr/bin/env zsh
function main() {
local IDX=${1:-1}
local VOL="$(pactl list sinks | grep Volume | grep -v Base | sed -n ${IDX}p | sed -e 's/.\+\([0-9]\{2\}%\).\+/\1/' )"
notify-send -i audio-subwoofer -u low Volume $VOL
}
main "${@}"
#!/usr/bin/env perl
use strict;
use warnings;
our $basedir = $ENV{'HOME'} . '/local/dev/src/github.com/nyarla/the.kalaclista.com-v2';
sub convert {
my $url = shift;
my ( $website, $path ) = ( $url =~ m{kalaclista:([^/]+?)/([^.]+).md} );
return "src/${website}/content/${path}.md";
}
sub main {
my $path = convert(shift);
system(qq[ echo "${path}" >${basedir}/.edit ]);
my $out = '';
if ( ! -e $path ) {
if ( $path =~ m{^src/notes/content/([^\.]+)\.md$} ) {
my $page = $1;
my $date = `date +%Y-%m-%dT%H:%M:%S`;
chomp($date);
$out .= <<"__EOF__";
---
type: notes
title: "${page}"
slug: '${page}'
date: '${date}+09:00'
ads: true
fixme: false
---
__EOF__
} else {
system qq{ mkdir -p \$(dirname '${basedir}/${path}') };
my ( $website, $year, $month, $day, $hour, $minute, $second ) = ( $path =~ m{^src/([^/]+)/content/(\d{4})/(\d{2})/(\d{2})/(\d{2})(\d{2})(\d{2})\.md$} );
$out .= <<"__EOF__";
---
type: ${website}
title: ""
date: '${year}-${month}-${day}T${hour}:${minute}:${second}+09:00'
slug: '${hour}${minute}${second}'
__EOF__
if ( $website eq 'posts' ) {
$out .= <<'__EOF__';
tags:
-
__EOF__
}
$out .= <<'__EOF__';
ads: true
fixme: false
---
__EOF__
}
open(my $fh, '>', "${basedir}/${path}");
print $fh $out;
close($fh);
}
my $code = system(qw(tmux list-sessions));
if ( $code != 0 ) {
system qq[mlterm -e zsh -c 'cd ${basedir} && tmux-up'];
} else {
system qq[tmux new-window -c ${basedir} vim -c NERDTree ${path} ];
}
}
main(@ARGV);