Reorganize configuration.

This commit is contained in:
Gabriel Ebner 2020-07-14 16:47:09 +02:00
parent 8f5ce8e2e8
commit 890c4bf464
11 changed files with 128 additions and 218 deletions

@ -3,8 +3,8 @@
{
imports =
[
# ./common.nix
./common-headless.nix ./sway.nix
./common-headless.nix
./sway.nix
./large-sw.nix
./uefi.nix
./fstrim.nix
@ -39,11 +39,6 @@
environment.systemPackages = with pkgs; [
beets
mediainfo
flac
clementine
uvccapture
piper
];

89
common-gui.nix Normal file

@ -0,0 +1,89 @@
{ config, pkgs, ... }:
{
imports = [
./pulseaudio.nix
];
i18n.inputMethod = {
enabled = "fcitx";
fcitx.engines = with pkgs.fcitx-engines; [ mozc anthy table-other m17n ];
};
fonts = {
enableDefaultFonts = false;
fonts = with pkgs; [
xorg.fontbhlucidatypewriter100dpi
xorg.fontbhlucidatypewriter75dpi
dejavu_fonts
freefont_ttf
gyre-fonts # TrueType substitutes for standard PostScript fonts
liberation_ttf
xorg.fontbh100dpi
xorg.fontmiscmisc
xorg.fontcursormisc
# unifont
wqy_microhei
inconsolata
dejavu_fonts
ipafont
ipaexfont
ubuntu_font_family
source-code-pro
fira fira-mono fira-code
noto-fonts-emoji
noto-fonts-cjk
cantarell_fonts # from gnome3 module
];
};
# prevent satanic torture
programs.qt5ct.enable = true;
hardware.uinput.enable = true;
users.extraUsers.gebner.extraGroups = [ "input" "tty" "audio" "video" "uinput" ];
services.dbus.packages = with pkgs; [ gnome3.gcr ];
services.udev.packages = [ pkgs.gnome3.gnome-settings-daemon ];
# copied from gnome3 module
security.polkit.enable = true;
services.udisks2.enable = true;
services.accounts-daemon.enable = true;
services.geoclue2.enable = true;
services.gnome3.at-spi2-core.enable = true;
services.gnome3.gnome-keyring.enable = true;
services.gvfs.enable = true;
programs.seahorse.enable = true;
services.gnome3.sushi.enable = true;
services.gnome3.gnome-settings-daemon.enable = true;
services.telepathy.enable = true;
networking.networkmanager.enable = true;
services.upower.enable = config.powerManagement.enable;
programs.dconf.enable = true;
services.flatpak.enable = true;
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
# Needed for themes and backgrounds
environment.pathsToLink = [ "/share" ];
environment.variables.GIO_EXTRA_MODULES = with pkgs.gnome3; [
"${pkgs.lib.getLib dconf}/lib/gio/modules"
"${glib_networking.out}/lib/gio/modules"
"${gvfs}/lib/gio/modules" ];
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
};
services.blueman.enable = true;
programs.gnupg = {
agent.enable = true;
agent.pinentryFlavor = "gnome3";
};
}

@ -38,7 +38,6 @@
browsing = true;
drivers = [ pkgs.hplip ];
};
# services.colord.enable = true;
boot.kernel.sysctl = {
"kernel.perf_event_paranoid" = "0";
@ -80,8 +79,6 @@
password = if config.virtualisation != null then "" else null;
};
# services.nscd.enable = false;
system.fsPackages = with pkgs; [
ntfs3g
exfat

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
{
imports =
[
./common-headless.nix
./i3.nix
];
}

@ -3,7 +3,8 @@
{
imports =
[
./common.nix
./common-headless.nix
./i3.nix
./large-sw.nix
./uefi.nix
./fstrim.nix

@ -4,7 +4,8 @@ let mpdStreamingPort = 8080; in
{
imports =
[
./common.nix
./common-headless.nix
./i3.nix
./uefi.nix
./fstrim.nix
];
@ -78,6 +79,4 @@ let mpdStreamingPort = 8080; in
};
};
services.blueman.enable = true;
}

96
i3.nix

@ -1,12 +1,9 @@
{ config, pkgs, ... }:
{
# programs.ibus.enable = true;
# programs.ibus.plugins = [ pkgs.ibus-anthy pkgs.mozc ];
i18n.inputMethod = {
enabled = "fcitx";
fcitx.engines = with pkgs.fcitx-engines; [ mozc anthy table-other m17n ];
};
imports = [
./common-gui.nix
];
environment.systemPackages = with pkgs; with gnome3; [
i3
@ -38,38 +35,6 @@
hicolor_icon_theme
];
fonts = {
enableDefaultFonts = false;
fonts = with pkgs; [
xorg.fontbhlucidatypewriter100dpi
xorg.fontbhlucidatypewriter75dpi
dejavu_fonts
freefont_ttf
gyre-fonts # TrueType substitutes for standard PostScript fonts
liberation_ttf
xorg.fontbh100dpi
xorg.fontmiscmisc
xorg.fontcursormisc
# unifont
wqy_microhei
inconsolata
dejavu_fonts
ipafont
ipaexfont
ubuntu_font_family
source-code-pro
fira fira-mono fira-code
noto-fonts-emoji
noto-fonts-cjk
cantarell_fonts # from gnome3 module
];
};
# prevent satanic torture
programs.qt5ct.enable = true;
services.xserver = {
enable = true;
@ -110,59 +75,6 @@
xkbOptions = "caps:ctrl_modifier";
};
services.dbus.packages = with pkgs; [ dunst gnome3.gcr ];
services.udev.packages = [ pkgs.gnome3.gnome_settings_daemon ];
# copied from gnome3 module
security.polkit.enable = true;
services.udisks2.enable = true;
services.accounts-daemon.enable = true;
services.geoclue2.enable = true;
services.gnome3.at-spi2-core.enable = true;
services.gnome3.gnome-keyring.enable = true;
services.gvfs.enable = true;
programs.seahorse.enable = true;
services.gnome3.sushi.enable = true;
services.telepathy.enable = true;
networking.networkmanager.enable = true;
services.upower.enable = config.powerManagement.enable;
programs.dconf.enable = true;
services.flatpak.enable = true;
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
# Needed for themes and backgrounds
environment.pathsToLink = [ "/share" ];
environment.variables.GIO_EXTRA_MODULES = with pkgs.gnome3; [
"${pkgs.lib.getLib dconf}/lib/gio/modules"
"${glib_networking.out}/lib/gio/modules"
"${gvfs}/lib/gio/modules" ];
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
};
services.blueman.enable = true;
hardware.pulseaudio = {
enable = true;
zeroconf.discovery.enable = true;
daemon.config = {
flat-volumes = "no";
avoid-resampling = "yes";
resample-method = "speex-float-10";
default-sample-format = "s32le";
default-sample-rate = "96000";
};
package = pkgs.pulseaudioFull;
extraModules = [ pkgs.pulseaudio-modules-bt ];
};
programs.gnupg = {
agent.enable = true;
agent.pinentryFlavor = "gnome3";
};
services.dbus.packages = with pkgs; [ dunst ];
}

@ -34,6 +34,10 @@
meshlab
audacious
flac
clementine
uvccapture
yarn

@ -3,7 +3,8 @@
{
imports =
[
./common.nix
./common-headless.nix
./i3.nix
./large-sw.nix
./uefi.nix
./fstrim.nix
@ -60,8 +61,6 @@
unison
];
services.blueman.enable = true;
virtualisation.docker = {
enable = true;
storageDriver = "overlay2";

19
pulseaudio.nix Normal file

@ -0,0 +1,19 @@
{ config, pkgs, ... }:
{
hardware.pulseaudio = {
enable = true;
zeroconf.discovery.enable = true;
daemon.config = {
flat-volumes = "no";
avoid-resampling = "yes";
resample-method = "speex-float-10";
default-sample-format = "s32le";
default-sample-rate = "96000";
};
package = pkgs.pulseaudioFull;
extraModules = [ pkgs.pulseaudio-modules-bt ];
};
}

103
sway.nix

@ -1,12 +1,9 @@
{ config, pkgs, ... }:
{
# programs.ibus.enable = true;
# programs.ibus.plugins = [ pkgs.ibus-anthy pkgs.mozc ];
i18n.inputMethod = {
enabled = "fcitx";
fcitx.engines = with pkgs.fcitx-engines; [ mozc anthy table-other m17n ];
};
imports = [
./common-gui.nix
];
environment.systemPackages = with pkgs; with gnome3; [
i3status
@ -47,38 +44,6 @@
firefox = firefox-wayland;
};
fonts = {
enableDefaultFonts = false;
fonts = with pkgs; [
xorg.fontbhlucidatypewriter100dpi
xorg.fontbhlucidatypewriter75dpi
dejavu_fonts
freefont_ttf
gyre-fonts # TrueType substitutes for standard PostScript fonts
liberation_ttf
xorg.fontbh100dpi
xorg.fontmiscmisc
xorg.fontcursormisc
# unifont
wqy_microhei
inconsolata
dejavu_fonts
ipafont
ipaexfont
ubuntu_font_family
source-code-pro
fira fira-mono fira-code
noto-fonts-emoji
noto-fonts-cjk
cantarell_fonts # from gnome3 module
];
};
# prevent satanic torture
programs.qt5ct.enable = true;
programs.sway = {
enable = true;
@ -112,66 +77,6 @@
displayManager.defaultSession = "sway";
};
hardware.uinput.enable = true;
users.extraUsers.gebner.extraGroups = [ "input" "tty" "audio" "video" "uinput" ];
# layout = "us";
# xkbVariant = "altgr-intl";
# xkbOptions = "caps:ctrl_modifier";
services.dbus.packages = with pkgs; [ mako gnome3.gcr ];
services.udev.packages = [ pkgs.gnome3.gnome-settings-daemon ];
# copied from gnome3 module
security.polkit.enable = true;
services.udisks2.enable = true;
services.accounts-daemon.enable = true;
services.geoclue2.enable = true;
services.gnome3.at-spi2-core.enable = true;
services.gnome3.gnome-keyring.enable = true;
services.gvfs.enable = true;
programs.seahorse.enable = true;
services.gnome3.sushi.enable = true;
services.gnome3.gnome-settings-daemon.enable = true;
services.telepathy.enable = true;
networking.networkmanager.enable = true;
services.upower.enable = config.powerManagement.enable;
programs.dconf.enable = true;
services.flatpak.enable = true;
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
# Needed for themes and backgrounds
environment.pathsToLink = [ "/share" ];
environment.variables.GIO_EXTRA_MODULES = with pkgs.gnome3; [
"${pkgs.lib.getLib dconf}/lib/gio/modules"
"${glib_networking.out}/lib/gio/modules"
"${gvfs}/lib/gio/modules" ];
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
};
services.blueman.enable = true;
hardware.pulseaudio = {
enable = true;
zeroconf.discovery.enable = true;
daemon.config = {
flat-volumes = "no";
avoid-resampling = "yes";
resample-method = "speex-float-10";
default-sample-format = "s32le";
default-sample-rate = "96000";
};
package = pkgs.pulseaudioFull;
extraModules = [ pkgs.pulseaudio-modules-bt ];
};
programs.gnupg = {
agent.enable = true;
agent.pinentryFlavor = "gnome3";
};
services.dbus.packages = with pkgs; [ mako ];
}