diff --git a/archachatina.nix b/archachatina.nix index 671a739..09e6417 100644 --- a/archachatina.nix +++ b/archachatina.nix @@ -44,6 +44,8 @@ uvccapture ]; + # programs.ratbag.enable = true; + services.thermald.enable = true; virtualisation.docker.enable = true; @@ -85,9 +87,18 @@ services.xserver = { videoDrivers = [ "amdgpu" ]; - # useGlamor = true; + deviceSection = '' + Option "TearFree" "on" + ''; }; services.transmission.enable = true; + nix.package = pkgs.nixUnstable; + + services.postgresql = { + enable = true; + extraPlugins = [ pkgs.postgis.v_2_4_0 ]; + }; + } diff --git a/basic-tools.nix b/basic-tools.nix index b978a84..17178bd 100644 --- a/basic-tools.nix +++ b/basic-tools.nix @@ -6,6 +6,7 @@ # nox wget neovim + neovim-remote zsh gitFull gitAndTools.hub tig gnumake diff --git a/common-headless.nix b/common-headless.nix index ded8328..3bc9b2d 100644 --- a/common-headless.nix +++ b/common-headless.nix @@ -56,19 +56,19 @@ fileSystems."/mnt/vaccaria" = { device = "//vaccaria.mtlaa.gebner.org/export"; fsType = "cifs"; - options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/vaccaria" ]; + options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/vaccaria" "vers=1.0" ]; }; fileSystems."/mnt/aplysia" = { device = "//aplysia.mtlaa.gebner.org/export"; fsType = "cifs"; - options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/aplysia" ]; + options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/aplysia" "vers=1.0" ]; }; fileSystems."/mnt/aruanus" = { device = "//aruanus.htdf.gebner.org/export"; fsType = "cifs"; - options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/aruanus" ]; + options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/aruanus" "vers=1.0" ]; }; users.extraUsers.gebner = { diff --git a/common-sw.nix b/common-sw.nix index 1b6b6bb..00a9f61 100644 --- a/common-sw.nix +++ b/common-sw.nix @@ -2,16 +2,13 @@ { environment.systemPackages = with pkgs.haskellPackages; with pkgs; [ - # gitg + gitg gmpc m4 subversion openjdk8 sbt scala - # firefoxWrapper - # qutebrowser chromium - # thunderbird qalculate-gtk speedcrunch viewnior @@ -33,6 +30,9 @@ imagemagick mercurial + alacritty + neovim-qt + androidenv.platformTools # adb & fastboot lm_sensors @@ -52,7 +52,7 @@ ghostscript # for auctex aspell - nodejs + nodejs-8_x mediainfo @@ -61,7 +61,7 @@ msmtp vdirsyncer khard khal - # linuxPackages.perf + linuxPackages.perf veriT minisat @@ -75,7 +75,6 @@ cvc4 graphviz # toysolver - stable.haskellPackages.tip-lib emacsPackages.proofgeneral @@ -90,8 +89,8 @@ repo = "nixpkgs-channels"; }; stablePkgs = fetchNixPkgs { - rev = "5237768d62a40236d24fafbd9f4f97f3227399ce"; - sha256 = "1j707pwm6ll2cvmqvwfxxq21gd9q7l6s3vi3vc01jklplj2v20is"; + rev = "1a8a95e87962bc8ff8514b28e026fc987fbdb010"; + sha256 = "1rx14g8wlw6vdjalsv6rnznmfsazwf218rv75z9ac2vdgwihclxh"; }; in { # idea-community-eap = pkgs.idea.idea-community.overrideDerivation (oldAttrs: rec { @@ -114,12 +113,14 @@ # }); clion-eap = pkgs.idea.clion; - neovim = pkgs.neovim.override { - extraPythonPackages = [ pkgs.pythonPackages.websocket_client ]; - }; + # neovim = pkgs.neovim.override { + # extraPythonPackages = [ pkgs.pythonPackages.websocket_client ]; + # }; stablePkgs = stablePkgs; stable = import stablePkgs {}; + + qutebrowser = pkgs.qutebrowser.override { withWebEngineDefault = true; }; }; nixpkgs.config.allowTexliveBuilds = true; diff --git a/decoysnail.nix b/decoysnail.nix new file mode 100644 index 0000000..4ec197e --- /dev/null +++ b/decoysnail.nix @@ -0,0 +1,42 @@ +{ config, pkgs, ... }: + +{ + imports = + [ + ./common.nix + ./large-sw.nix + ./uefi.nix + ]; + + boot.initrd.luks.devices = [ + { + name = "sda2_crypt"; + device = "/dev/disk/by-uuid/6c687d35-1b43-4799-b71c-a5b5c21b3e2a"; + preLVM = true; + } + ]; + + networking = { + hostName = "decoysnail"; + hostId = "cf04f682"; + }; + + services.openssh.enable = true; + + hardware.cpu.intel.updateMicrocode = true; + + services.thermald.enable = true; + + virtualisation.docker = { + enable = true; + storageDriver = "overlay2"; + }; + users.extraUsers.gebner.extraGroups = [ "docker" ]; + + hardware.opengl.driSupport32Bit = true; + + services.avahi.nssmdns = true; + + nix.package = pkgs.nixUnstable; + +} diff --git a/euhadra.nix b/euhadra.nix index cccde7e..bbafe20 100644 --- a/euhadra.nix +++ b/euhadra.nix @@ -40,12 +40,27 @@ restore_paused "yes" ''; }; - networking.firewall.allowedTCPPorts = [ config.services.mpd.network.port ]; + + networking.firewall.allowedTCPPorts = [ + config.services.mpd.network.port + 4713 # pulseaudio + ]; environment.systemPackages = with pkgs; [ mpc_cli ]; - services.xserver.vaapiDrivers = [ pkgs.vaapiIntel ]; + hardware.opengl.extraPackages = [ pkgs.vaapiIntel ]; nixpkgs.config.mpv.vaapiSupport = true; + hardware.pulseaudio = { + zeroconf.publish.enable = true; + tcp = { + enable = true; + anonymousClients.allowedIpRanges = [ + "127.0.0.1" + "10.57.0.0/16" + ]; + }; + }; + } diff --git a/i3.nix b/i3.nix index 1dab198..c56b00d 100644 --- a/i3.nix +++ b/i3.nix @@ -26,6 +26,7 @@ xdotool scrot pavucontrol + dconf-editor # gnome3 core packages desktop_file_utils shared_mime_info @@ -37,22 +38,32 @@ ]; 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 - unifont + # unifont ubuntu_font_family source-code-pro fira + noto-fonts-emoji cantarell_fonts # from gnome3 module ]; - fontconfig = { - allowBitmaps = false; - }; }; services.xserver = { @@ -73,15 +84,20 @@ session = [ { name = "i3wm"; start = '' + export XDG_DATA_DIRS=/run/current-system/sw/share/''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS export $(${pkgs.gnome3.gnome_keyring}/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gpg) export XDG_CURRENT_DESKTOP=GNOME - ${pkgs.gnome3.gnome_settings_daemon}/libexec/gnome-settings-daemon-localeexec & + for m in xsettings; do + ${pkgs.gnome3.gnome_settings_daemon}/libexec/gsd-$m & + done i3 & waitPID=$! ''; } ]; }; + updateDbusEnvironment = true; + windowManager = { default = "i3"; i3.enable = true; @@ -93,6 +109,7 @@ }; services.dbus.packages = with pkgs; [ dunst gnome3.gcr ]; + services.udev.packages = [ pkgs.gnome3.gnome_settings_daemon ]; # copied from gnome3 module security.polkit.enable = true; @@ -109,7 +126,6 @@ services.gnome3.seahorse.enable = true; services.gnome3.sushi.enable = true; # services.gnome3.tracker.enable = true; - hardware.pulseaudio.enable = true; services.telepathy.enable = true; networking.networkmanager.enable = true; services.upower.enable = config.powerManagement.enable; @@ -117,8 +133,13 @@ # Needed for themes and backgrounds environment.pathsToLink = [ "/share" ]; environment.variables.GIO_EXTRA_MODULES = with pkgs.gnome3; [ - "${dconf}/lib/gio/modules" - "${glib_networking}/lib/gio/modules" + "${pkgs.lib.getLib dconf}/lib/gio/modules" + "${glib_networking.out}/lib/gio/modules" "${gvfs}/lib/gio/modules" ]; + hardware.pulseaudio = { + enable = true; + zeroconf.discovery.enable = true; + }; + } diff --git a/large-sw.nix b/large-sw.nix index 1327ead..c499afd 100644 --- a/large-sw.nix +++ b/large-sw.nix @@ -5,16 +5,22 @@ idea-community-eap clion-eap texlive.combined.scheme-full biber - # androidsdk gimp inkscape jabref - libreoffice + libreoffice-fresh calibre + # qutebrowser + + open-wbo # only in 17.09+ + vscode clang + stack + + lean coq_8_6 # cargo rustc diff --git a/len0073.patch b/len0073.patch new file mode 100644 index 0000000..d87594d --- /dev/null +++ b/len0073.patch @@ -0,0 +1,25 @@ +diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c +index 16c3046..ca912ce 100644 +--- a/drivers/input/mouse/synaptics.c ++++ b/drivers/input/mouse/synaptics.c +@@ -173,6 +173,7 @@ static const char * const smbus_pnp_ids[] = { + "LEN0046", /* X250 */ + "LEN004a", /* W541 */ + "LEN200f", /* T450s */ ++ "LEN0073", /* X1 Carbon 5 (Elantech) */ + NULL + }; + +diff --git a/drivers/input/rmi4/rmi_smbus.c b/drivers/input/rmi4/rmi_smbus.c +index 225025a..2939a2f 100644 +--- a/drivers/input/rmi4/rmi_smbus.c ++++ b/drivers/input/rmi4/rmi_smbus.c +@@ -322,7 +322,7 @@ static int rmi_smb_probe(struct i2c_client *client, + rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d", + smbus_version); + +- if (smbus_version != 2) { ++ if (smbus_version != 2 && smbus_version != 3) { + dev_err(&client->dev, "Unrecognized SMB version %d\n", + smbus_version); + return -ENODEV; diff --git a/theba.nix b/petalius.nix similarity index 62% rename from theba.nix rename to petalius.nix index 882097d..392a09c 100644 --- a/theba.nix +++ b/petalius.nix @@ -16,14 +16,16 @@ ''; boot.initrd.luks.devices = [ { - name = "sda2_crypt"; - device = "/dev/disk/by-uuid/a7482f34-1d7b-4181-9f3c-f6bbbdb8679d"; + name = "nvme0n1p2"; + device = "/dev/disk/by-uuid/5ca3d7ec-3f9e-4a08-8bc2-b26bfc3459c5"; preLVM = true; allowDiscards = true; } ]; services.xserver = { + dpi = 120; + libinput.enable = true; config = '' Section "InputClass" @@ -41,12 +43,13 @@ services.tlp.enable = true; - networking.hostName = "theba"; # Define your hostname. - networking.hostId = "b29b900f"; + networking.hostName = "petalius"; + networking.hostId = "cf58caa9"; - # services.colord.enable = true; - - systemd.services.ModemManager.enable = true; + # systemd.services.ModemManager = { + # enable = true; + # wantedBy = [ "multi-user.target" ]; + # }; hardware.opengl.extraPackages = [ pkgs.vaapiIntel ]; @@ -66,9 +69,23 @@ virtualisation.virtualbox.host.enable = true; # boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages; + boot.kernelPatches = [ + # { patch = ./len0073.patch; name = "len0073"; } + ]; + boot.kernelParams = [ + # "psmouse.synaptics_intertouch=1" + "psmouse.proto=imps" + ]; + boot.kernelModules = [ + "rmi_smbus" + "i2c_hid" + "psmouse" + ]; - # time.timeZone = pkgs.lib.mkOverride 10 "Europe/London"; + # time.timeZone = pkgs.lib.mkOverride 10 "Asia/Tokyo"; - services.avahi.nssmdns = true; + #services.avahi.nssmdns = true; + + nix.package = pkgs.nixUnstable; } diff --git a/pkgs/mutrace.nix b/pkgs/mutrace.nix new file mode 100644 index 0000000..9dfd726 --- /dev/null +++ b/pkgs/mutrace.nix @@ -0,0 +1,21 @@ +with import {}; +stdenv.mkDerivation rec { + name = "mutrace-${version}"; + version = "20150510"; + + src = fetchFromGitHub { + owner = "dbpercona"; + repo = "mutrace"; + rev = "3f71fc9752f6b5c673f9fd5d2dd30ac9af1b045d"; + sha256 = "0h1vsfbvm70mw4i7dyai9c8i5yfjyinqd18is7cmjn7l6my532qi"; + }; + + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ binutils libiberty ]; + + CFLAGS = [ "-DPACKAGE" "-I${libiberty}/include/libiberty" ]; + + postInstall = '' + sed -i "s,libm,$out/lib/\\0," $out/bin/* + ''; +} diff --git a/pkgs/ubcsat.nix b/pkgs/ubcsat.nix new file mode 100644 index 0000000..e5239d6 --- /dev/null +++ b/pkgs/ubcsat.nix @@ -0,0 +1,16 @@ +with import {}; +stdenv.mkDerivation rec { + name = "ubcsat-${version}"; + version = "1.2beta"; + + src = fetchFromGitHub { + owner = "gebner"; + repo = "ubcsat"; + rev = "4cb85e4ae9278746d6ee371dd676daafdc2efd59"; + sha256 = "0bnakj4w0p4q4dzppmw06vjq4ysd8d50wqfmwn8k6frypgsdnbw7"; + }; + + installPhase = '' + install -Dm0755 ubcsat $out/bin/ubcsat + ''; +}