Commit e8c4882d authored by Naoki OKAMURA's avatar Naoki OKAMURA

improved: use unpatched Myrica M with NERDFonts symbols

parent 57795994
{ 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=$!
'';
};
};
};
}
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
forked-daapd
];
}
......@@ -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";
};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment