diff --git a/archachatina.nix b/archachatina.nix index 9e3b651..ad2b52a 100644 --- a/archachatina.nix +++ b/archachatina.nix @@ -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 ]; diff --git a/common-gui.nix b/common-gui.nix new file mode 100644 index 0000000..3ab4dcc --- /dev/null +++ b/common-gui.nix @@ -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"; + }; + +} diff --git a/common-headless.nix b/common-headless.nix index 6ea0187..6805f15 100644 --- a/common-headless.nix +++ b/common-headless.nix @@ -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 diff --git a/common.nix b/common.nix deleted file mode 100644 index 513e8ce..0000000 --- a/common.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = - [ - ./common-headless.nix - ./i3.nix - ]; - -} diff --git a/decoysnail.nix b/decoysnail.nix index 55f278b..6987b22 100644 --- a/decoysnail.nix +++ b/decoysnail.nix @@ -3,7 +3,8 @@ { imports = [ - ./common.nix + ./common-headless.nix + ./i3.nix ./large-sw.nix ./uefi.nix ./fstrim.nix diff --git a/euhadra.nix b/euhadra.nix index 0a3f7cf..c234654 100644 --- a/euhadra.nix +++ b/euhadra.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; - } diff --git a/i3.nix b/i3.nix index 79c64f1..8267263 100644 --- a/i3.nix +++ b/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 ]; } diff --git a/large-sw.nix b/large-sw.nix index aad75c6..903b2b2 100644 --- a/large-sw.nix +++ b/large-sw.nix @@ -34,6 +34,10 @@ meshlab audacious + flac + clementine + + uvccapture yarn diff --git a/petalius.nix b/petalius.nix index 536aca7..9858dc9 100644 --- a/petalius.nix +++ b/petalius.nix @@ -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"; diff --git a/pulseaudio.nix b/pulseaudio.nix new file mode 100644 index 0000000..b349135 --- /dev/null +++ b/pulseaudio.nix @@ -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 ]; + }; + +} diff --git a/sway.nix b/sway.nix index c19fc0f..b91abc9 100644 --- a/sway.nix +++ b/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 ]; }