diff options
33 files changed, 347 insertions, 114 deletions
diff --git a/derivations/crazydiskinfo/default.nix b/derivations/crazydiskinfo/default.nix index 69d9fa1..61de338 100644 --- a/derivations/crazydiskinfo/default.nix +++ b/derivations/crazydiskinfo/default.nix @@ -19,19 +19,22 @@ stdenv.mkDerivation rec { }; patches = [ - # Fix build warnings, original maintainer is MIA + # Patch to fix build warnings (fetchpatch { - url = "https://patch-diff.githubusercontent.com/raw/otakuto/crazydiskinfo/pull/33.diff"; + url = "https://github.com/otakuto/crazydiskinfo/compare/1.1.0...8563aa8.diff"; sha256 = "sha256-z9aOQFsivu6sYgsZBOlnTvqnoR2ro/jyuO/WOimLSXk="; }) ]; - buildInputs = [ cmake libatasmart ncurses5 ]; + nativeBuildInputs = [ cmake ]; + buildInputs = [ libatasmart ncurses5 ]; - cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=$out" ]; + cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=$(out)" ]; meta = with lib; { description = "CrazyDiskInfo is an interactive TUI S.M.A.R.T viewer for Unix systems"; + homepage = "https://github.com/otakuto/crazydiskinfo"; + mainProgram = "crazy"; license = licenses.mit; maintainers = [ maintainers.tjkeller ]; }; diff --git a/derivations/pavolctld/default.nix b/derivations/pavolctld/default.nix deleted file mode 100644 index fde1430..0000000 --- a/derivations/pavolctld/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - lib, - stdenv, - fetchgit, - libpulseaudio, -}: - -stdenv.mkDerivation (finalAttrs: { - pname = "pavolctld"; - version = "1.0.1"; - - src = fetchgit { - url = "https://git.tjkeller.xyz/pavolctld"; - tag = "v${finalAttrs.version}"; - hash = "sha256-nmN8bQKQNGpCGvHQnZK9YQgB80SxRSds0V9Y7h/Guh8="; - }; - - buildInputs = [ libpulseaudio ]; - - installFlags = [ "PREFIX=$(out)" ]; - - meta = { - description = "Minimal volume control/monitoring daemon for PulseAudio and PipeWire"; - homepage = "https://tjkeller.xyz/projects/pavolctld"; - platforms = lib.platforms.linux; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.tjkeller ]; - mainProgram = "pavolctld"; - }; -}) - diff --git a/derivations/xerox-workcentre-7800-series-driver/default.nix b/derivations/xerox-workcentre-7800-series-driver/default.nix new file mode 100644 index 0000000..cfdaaae --- /dev/null +++ b/derivations/xerox-workcentre-7800-series-driver/default.nix @@ -0,0 +1,86 @@ +{ + stdenv, + lib, + fetchurl, + dpkg, + autoPatchelfHook, + cups, + xorg, +}: +let + debPlatform = + if stdenv.hostPlatform.system == "x86_64-linux" then + "x86_64" + else if stdenv.hostPlatform.system == "i686-linux" then + "i686" + else + throw "Unsupported system: ${stdenv.hostPlatform.system}"; +in +stdenv.mkDerivation rec { + pname = "xerox-workcentre-7800-series-driver"; + version = "5.20.661.4684"; + debpkg = "XeroxOfficev5Pkg-Linux${debPlatform}-${version}.deb"; + + src = fetchurl { + url = "https://download.support.xerox.com/pub/drivers/CQ8580/drivers/linux/pt_BR/${debpkg}"; + sha256 = "014k0r9ij3401mnab1qzv96bjl9x7rf11aw1ibf0q370pk9jqqjb"; # TODO correct hash for i686 + }; + + nativeBuildInputs = [ dpkg autoPatchelfHook ]; + # TODO add support for disable xorg + buildInputs = [ + cups + stdenv.cc.cc.lib + xorg.libX11 + xorg.libXrender + xorg.libXfixes + xorg.libXdamage + xorg.libXcomposite + xorg.libXcursor + xorg.libXrandr + xorg.libXext + xorg.libXinerama + ]; + + sourceRoot = "."; + unpackCmd = "dpkg-deb -x $curSrc ."; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out + + # Copy and patch the binaries and libraries + cp -r opt $out/ + cp -r usr $out/ + + # Move the PPD to CUPS model dir + mkdir -p $out/share/cups/model + cp opt/XeroxOffice/prtsys/ppd/*.ppd $out/share/cups/model/ + + # Install the CUPS filters + mkdir -p $out/lib/cups/filter + cp usr/lib/cups/filter/* $out/lib/cups/filter/ + + # Install man pages + mkdir -p $out/share/man + cp -r usr/share/man/* $out/share/man/ + + runHook postInstall + ''; + + meta = with lib; { + description = "Xerox WorkCentre 7800 Series Linux Printer Driver"; + longDescription = '' + WorkCentre 7830/7835/7845/7855 + ''; + homepage = "https://www.support.xerox.com/en-us/product/workcentre-7800-series/downloads?platform=linux"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + #license = licenses.unfree; + maintainers = []; + platforms = platforms.linux; + }; +} @@ -83,16 +83,16 @@ ] }, "locked": { - "lastModified": 1744117652, - "narHash": "sha256-t7dFCDl4vIOOUMhEZnJF15aAzkpaup9x4ZRGToDFYWI=", + "lastModified": 1748226808, + "narHash": "sha256-GaBRgxjWO1bAQa8P2+FDxG4ANBVhjnSjBms096qQdxo=", "owner": "nix-community", "repo": "home-manager", - "rev": "b4e98224ad1336751a2ac7493967a4c9f6d9cb3f", + "rev": "83665c39fa688bd6a1f7c43cf7997a70f6a109f9", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.11", + "ref": "release-25.05", "repo": "home-manager", "type": "github" } @@ -115,16 +115,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1744168086, - "narHash": "sha256-S9M4HddBCxbbX1CKSyDYgZ8NCVyHcbKnBfoUXeRu2jQ=", + "lastModified": 1748162331, + "narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "60e405b241edb6f0573f3d9f944617fe33ac4a73", + "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.11", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } @@ -2,14 +2,14 @@ rec { description = "TimmyOS System Config"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { - url = "github:nix-community/home-manager/release-24.11"; + url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; arkenfox = { @@ -24,13 +24,14 @@ rec { pkgs = nixpkgs.legacyPackages.${system}; userDetails = { username = "timmy"; - email = "tjkeller.xyz"; + email = "tjk@tjkeller.xyz"; fullname = "Tim Keller"; - home = with userDetails; with home; { - root = "/home/${username}"; - downloads = "${root}/dls"; - documents = "${root}/docs"; - pictures = "${root}/pics"; + home = "/home/${userDetails.username}"; + userDirs = with userDetails; { + desktop = "${home}"; + download = "${home}/dls"; + documents = "${home}/docs"; + pictures = "${home}/pics"; }; }; homeStateVersion = "24.05"; # Lowest of systems is fine @@ -70,6 +71,7 @@ rec { # Configured system hostnames go here "T430" "T495" + "X230" "hp-envy-office" "libreX60" "optiplex" diff --git a/modules/home/default.nix b/modules/home/default.nix index 8748fb9..9abf1b5 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,7 +1,7 @@ { lib, userDetails, homeStateVersion, ... }: { home = { username = userDetails.username; - homeDirectory = userDetails.home.root; + homeDirectory = userDetails.home; stateVersion = homeStateVersion; }; @@ -13,10 +13,13 @@ ./htop.nix ./initial-home-setup.nix ./pcmanfm.nix # TODO mk name changeable & doesn't seem to work right now + ./theme-st.nix ./theme.nix + ./userdirs.nix ./wallpapers.nix ]; + theme.st.enable = lib.mkDefault false; theme.mint.enable = lib.mkDefault true; wallpapers.enable = lib.mkDefault false; } diff --git a/modules/home/firefox.nix b/modules/home/firefox.nix index 000277f..30fd08a 100644 --- a/modules/home/firefox.nix +++ b/modules/home/firefox.nix @@ -50,7 +50,7 @@ "app.normandy.first_run" = false; "browser.aboutConfig.showWarning" = false; # arkenfox does - "browser.download.dir" = userDetails.home.downloads; + #"browser.download.dir" = userDetails.userDirs.downloads; "browser.newtabpage.activity-stream.feeds.section.topstories" = false; "browser.newtabpage.activity-stream.feeds.topsites" = false; "browser.urlbar.suggest.topsites" = false; diff --git a/modules/home/gtk-bookmarks.nix b/modules/home/gtk-bookmarks.nix index e6c1ec7..24c6563 100644 --- a/modules/home/gtk-bookmarks.nix +++ b/modules/home/gtk-bookmarks.nix @@ -8,10 +8,10 @@ }; config = { - gtk.gtk3.bookmarks = with userDetails.home; [ - "file://${downloads} Downloads" - "file://${documents} Documents" - "file://${pictures} Pictures" - ] ++ config.additional-gtk-bookmarks; + gtk.gtk3.bookmarks = ( + lib.mapAttrsToList (name: path: + "file://${path} ${lib.toUpper (lib.substring 0 1 name)}${lib.substring 1 (-1) name}" + ) userDetails.userDirs + ) ++ config.additional-gtk-bookmarks; }; } diff --git a/modules/home/initial-home-setup.nix b/modules/home/initial-home-setup.nix index 6aa6ac7..4132386 100644 --- a/modules/home/initial-home-setup.nix +++ b/modules/home/initial-home-setup.nix @@ -15,8 +15,8 @@ export PATH="$HOME/.local/bin/misc:$PATH" run mimewiz -i # already verbose ''; - createDirs = with userDetails.home; lib.hm.dag.entryAfter ["writeBoundary"] '' - run mkdir -p $VERBOSE_ARG "${downloads}" "${documents}" "${pictures}" + createDirs = lib.hm.dag.entryAfter ["writeBoundary"] '' + run mkdir -p $VERBOSE_ARG ${ lib.concatStringsSep " " (lib.attrValues userDetails.userDirs) } ''; }; } diff --git a/modules/home/resources/firefox/userChrome.css b/modules/home/resources/firefox/userChrome.css index de0e112..624ab26 100644 --- a/modules/home/resources/firefox/userChrome.css +++ b/modules/home/resources/firefox/userChrome.css @@ -14,6 +14,17 @@ background: var(--toolbar-field-border-color) !important; } +/* Change background color of bookmarks toolbar */ +#PersonalToolbar { + background: var(--toolbox-bgcolor) !important; +} + +/* Adjust spacing of toolbar items */ +#PlacesToolbarItems { + gap: .35rem; + margin-block: .2rem; +} + /* Fix vertical spacing of tabs */ #TabsToolbar { margin-top: -1px; diff --git a/modules/home/theme-st.nix b/modules/home/theme-st.nix new file mode 100644 index 0000000..bc22791 --- /dev/null +++ b/modules/home/theme-st.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: { + options = { + theme.st = { + enable = lib.mkEnableOption "enables theming st with home manager"; + font = lib.mkOption { + type = lib.types.str; + default = "JetBrainsMonoNL Nerd Font Mono:size=12:antialias=true:autohint=true"; + }; + }; + }; + config = let + themed-st = pkgs.st.overrideAttrs (old: { + buildInputs = old.buildInputs or [] ++ [ pkgs.makeWrapper ]; + postInstall = old.postInstall or "" + '' + wrapProgram $out/bin/st \ + --add-flags '-f${config.theme.st.font}' + ''; + }); + in { + home.packages = [ themed-st ]; + }; +} diff --git a/modules/home/theme.nix b/modules/home/theme.nix index 4edaffa..2288610 100644 --- a/modules/home/theme.nix +++ b/modules/home/theme.nix @@ -47,15 +47,20 @@ in { description = "default gtk font"; }; size = lib.mkOption { - type = lib.types.int; + type = with lib.types; nullOr int; default = null; description = "default gtk font size"; }; }; }; theme.cursor = { + name = lib.mkOption { + type = lib.types.str; + default = "Adwaita"; + description = "gtk cursor theme"; + }; size = lib.mkOption { - type = lib.types.int; + type = with lib.types; nullOr int; default = null; description = "gtk cursor size"; }; @@ -78,7 +83,7 @@ in { size = config.theme.font.gtk.size; }; cursorTheme = { - name = "Adwaita"; + name = config.theme.cursor.name; size = config.theme.cursor.size; }; gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; diff --git a/modules/home/userdirs.nix b/modules/home/userdirs.nix new file mode 100644 index 0000000..58c1d59 --- /dev/null +++ b/modules/home/userdirs.nix @@ -0,0 +1,5 @@ +{ userDetails, ... }: { + xdg.userDirs = { + enable = true; + } // userDetails.userDirs; +} diff --git a/modules/hosts/X230/configuration.nix b/modules/hosts/X230/configuration.nix new file mode 100644 index 0000000..385b383 --- /dev/null +++ b/modules/hosts/X230/configuration.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: { + imports = [ + ./hardware-configuration.nix + ]; + bootloader.mode = "efi"; + + # Enable extra software pkgs + software.desktop = { + crypto.enable = true; + office.enable = true; + }; + + system.stateVersion = "24.05"; +} diff --git a/modules/hosts/X230/hardware-configuration.nix b/modules/hosts/X230/hardware-configuration.nix new file mode 100644 index 0000000..0791585 --- /dev/null +++ b/modules/hosts/X230/hardware-configuration.nix @@ -0,0 +1,48 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/41036740-73bc-4004-a302-01233b4d83b8"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/6019772f-4a1c-4abd-9c70-b1d71cc2de65"; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/41036740-73bc-4004-a302-01233b4d83b8"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/72D4-F66A"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/hosts/X230/home.nix b/modules/hosts/X230/home.nix new file mode 100644 index 0000000..87a16ea --- /dev/null +++ b/modules/hosts/X230/home.nix @@ -0,0 +1,18 @@ +{ ... }: { + imports = [ ../../home ]; + + theme = { + mint.theme.color = "Dark-Teal"; + mint.icons.color = "Teal"; + font = { + monospace = "Tamzen"; + gtk.name = "monospace"; + gtk.size = 8; + }; + cursor.size = 24; + st = { + enable = true; + font = "Tamzen:pixelsize=14"; + }; + }; +} diff --git a/modules/hosts/hp-envy-office/home.nix b/modules/hosts/hp-envy-office/home.nix index ed02130..2e4f61f 100644 --- a/modules/hosts/hp-envy-office/home.nix +++ b/modules/hosts/hp-envy-office/home.nix @@ -5,8 +5,8 @@ theme.mint.icons.color = "Green"; wallpapers.enable = true; - additional-gtk-bookmarks = with userDetails; [ - "file://${home.documents}/src/sites/admin Admin" + additional-gtk-bookmarks = with userDetails.userDirs; [ + "file://${documents}/src/sites/admin Admin" "file:///media/chexx/chexx cHEXx" ]; } diff --git a/modules/hosts/libreX60/bios-flashing.nix b/modules/hosts/libreX60/bios-flashing.nix new file mode 100644 index 0000000..6117813 --- /dev/null +++ b/modules/hosts/libreX60/bios-flashing.nix @@ -0,0 +1,8 @@ +# https://libreboot.org/docs/install/#thinkpad-t60x60x60tabletx60s + +{ pkgs, ... }: { + environment.systemPackages = [ pkgs.flashprog ]; + + boot.kernelParams = [ "iomem=relaxed" ]; +} + diff --git a/modules/hosts/libreX60/configuration.nix b/modules/hosts/libreX60/configuration.nix index b2acd8c..55f1774 100644 --- a/modules/hosts/libreX60/configuration.nix +++ b/modules/hosts/libreX60/configuration.nix @@ -1,5 +1,10 @@ { config, lib, pkgs, ... }: { - imports = [ ./hardware-configuration.nix ]; + imports = [ + ./hardware-configuration.nix + ./powertop-auto-tune.nix + # Uncomment this module and reboot to enable bios flashing + #./bios-flashing.nix + ]; # Use grub bootloader = { @@ -17,18 +22,5 @@ # i915 Gpu requires intel driver services.xserver.videoDrivers = [ "intel" ]; - # Tamzen font in st - nixpkgs.overlays = [ - (final: prev: { - st = prev.st.overrideAttrs (old: { - buildInputs = old.buildInputs or [] ++ [ pkgs.makeWrapper ]; - postInstall = old.postInstall or "" + '' - wrapProgram $out/bin/st \ - --add-flags '-fTamzen:pixelsize=14' - ''; - }); - }) - ]; - system.stateVersion = "24.11"; } diff --git a/modules/hosts/libreX60/home.nix b/modules/hosts/libreX60/home.nix index 01496db..5b35457 100644 --- a/modules/hosts/libreX60/home.nix +++ b/modules/hosts/libreX60/home.nix @@ -10,5 +10,9 @@ gtk.size = 8; }; cursor.size = 24; + st = { + enable = true; + font = "Tamzen:pixelsize=14"; + }; }; } diff --git a/modules/hosts/libreX60/powertop-auto-tune.nix b/modules/hosts/libreX60/powertop-auto-tune.nix new file mode 100644 index 0000000..0eb9578 --- /dev/null +++ b/modules/hosts/libreX60/powertop-auto-tune.nix @@ -0,0 +1,17 @@ +# https://en.wikibooks.org/wiki/Libreboot/ThinkPad_X60#Remove_High_Pitched_Whining_Noise +# TLDR; running `powertop --auto-tune` is supposed to kill the high pitched noises produced by the X60 + +{ pkgs, ... }: { + environment.systemPackages = [ pkgs.powertop ]; + + # Create systemd service + systemd.services.powertop-autotune = { + description = "Powertop Auto-Tune"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.powertop}/bin/powertop --auto-tune"; + }; + }; +} diff --git a/modules/hosts/optiplex/configuration.nix b/modules/hosts/optiplex/configuration.nix index d018c02..16ba475 100644 --- a/modules/hosts/optiplex/configuration.nix +++ b/modules/hosts/optiplex/configuration.nix @@ -14,6 +14,9 @@ office.enable = true; utilities.enable = true; }; + software.development = { + docker.enable = true; + }; # Install more programs environment.systemPackages = with pkgs; [ @@ -36,6 +39,7 @@ nvidiaSettings = true; open = false; # Not compatible w/ GTX-1050 package = config.boot.kernelPackages.nvidiaPackages.stable; # Still good for 1050 + forceFullCompositionPipeline = true; # Enables vsync }; # Disable suspend diff --git a/modules/root/fonts.nix b/modules/root/fonts.nix index 3ae8eef..256e1ab 100644 --- a/modules/root/fonts.nix +++ b/modules/root/fonts.nix @@ -7,10 +7,8 @@ fonts.packages = with pkgs; [ commit-mono inter + nerd-fonts.jetbrains-mono tamzen - (nerdfonts.override { - fonts = [ "JetBrainsMono" ]; - }) ]; }; } diff --git a/modules/root/normaluser.nix b/modules/root/normaluser.nix index b4be0cc..88eb338 100644 --- a/modules/root/normaluser.nix +++ b/modules/root/normaluser.nix @@ -4,7 +4,7 @@ }; users.users.${userDetails.username} = { description = userDetails.fullname; - #home = userDetails.home.root; + #home = userDetails.home; isNormalUser = true; hashedPasswordFile = config.sops.secrets.hashed-root-password.path; extraGroups = [ diff --git a/modules/root/printing.nix b/modules/root/printing.nix index 69ff573..f0d0dd8 100644 --- a/modules/root/printing.nix +++ b/modules/root/printing.nix @@ -10,6 +10,7 @@ enable = true; drivers = [ pkgs.epson-escpr2 + pkgs.workcentre-7800-series ]; }; diff --git a/modules/root/resources/x11/xinit-startx-xdg.patch b/modules/root/resources/x11/xinit-startx-xdg.patch deleted file mode 100644 index 2c2bf62..0000000 --- a/modules/root/resources/x11/xinit-startx-xdg.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/startx.cpp b/startx.cpp -index dfbebe1..472a1b0 100644 ---- a/startx.cpp -+++ b/startx.cpp -@@ -272,7 +272,7 @@ if [ x"$enable_xauth" = x1 ] ; then - dummy=0 - - XCOMM create a file with auth information for the server. ':0' is a dummy. -- xserverauthfile=$HOME/.serverauth.$$ -+ xserverauthfile="${XAUTHORITY:-$HOME/.Xauthority}.$$" - trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP BUS TERM - xauth -q -f "$xserverauthfile" << EOF - add :$dummy . $mcookie - diff --git a/modules/root/secrets.nix b/modules/root/secrets.nix index 47262fd..045e3f4 100644 --- a/modules/root/secrets.nix +++ b/modules/root/secrets.nix @@ -4,7 +4,7 @@ sops = { defaultSopsFile = ./resources/secrets/secrets.yaml; defaultSopsFormat = "yaml"; - age.keyFile = "${userDetails.home.root}/.config/sops/age/keys.txt"; + age.keyFile = "${userDetails.home}/.config/sops/age/keys.txt"; secrets = { wpa_supplicant-conf = { }; diff --git a/modules/root/software/desktop.nix b/modules/root/software/desktop.nix index b194029..dbcce1e 100644 --- a/modules/root/software/desktop.nix +++ b/modules/root/software/desktop.nix @@ -53,6 +53,7 @@ inkscape ] ++ pkgs.lib.optionals config.software.desktop.office.enable [ # Office + kdePackages.okular libreoffice pdfchain thunderbird diff --git a/modules/root/software/development.nix b/modules/root/software/development.nix index 2a4dfba..af8a8a7 100644 --- a/modules/root/software/development.nix +++ b/modules/root/software/development.nix @@ -5,7 +5,7 @@ config = lib.mkIf config.software.development.enable { environment.systemPackages = with pkgs; [ - adb-sync + #adb-sync android-tools gcc git @@ -14,5 +14,10 @@ lua pkg-config ]; + + # Open 1313 for hugo serve + networking.firewall.allowedTCPPorts = [ + 1313 + ]; }; } diff --git a/modules/root/software/overlays.nix b/modules/root/software/overlays.nix index 670acfb..04ad398 100644 --- a/modules/root/software/overlays.nix +++ b/modules/root/software/overlays.nix @@ -2,15 +2,19 @@ nixpkgs.overlays = with pkgs; [ (final: prev: { crazydiskinfo = (callPackage ./derivations/crazydiskinfo {}); - }) - (final: prev: { - lowbat = (callPackage ./derivations/lowbat {}); - }) - (final: prev: { - pavolctld = (callPackage ./derivations/pavolctld {}); - }) - (final: prev: { - st = (callPackage ./derivations/st {}); + lowbat = (callPackage ./derivations/lowbat {}); + st = (callPackage ./derivations/st {}); + workcentre-7800-series = (callPackage ./derivations/xerox-workcentre-7800-series-driver {}); + + # Use my vimv-rs until pr gets merged + vimv-rs = prev.vimv-rs.overrideAttrs (oldAttrs: { + src = fetchFromGitHub { + owner = "tjkeller-xyz"; + repo = "vimv-rs"; + rev = "5deb76fb81dd4acf3c4809087ff3a1d846ab4769"; + sha256 = "sha256-XMn+5mIxSEHaR31ixMi6o7PSkN1iYjDT4aOiQkfEwpA="; + }; + }); }) ]; } diff --git a/modules/root/software/utilities.nix b/modules/root/software/utilities.nix index 9bd76a6..79285a1 100644 --- a/modules/root/software/utilities.nix +++ b/modules/root/software/utilities.nix @@ -25,6 +25,7 @@ testdisk tmux uhubctl + vimv-rs wget wireguard-tools xxHash diff --git a/modules/root/x11.nix b/modules/root/x11.nix index 7311cba..b7b23ae 100644 --- a/modules/root/x11.nix +++ b/modules/root/x11.nix @@ -8,6 +8,30 @@ services.xserver.displayManager.startx.enable = true; services.libinput.enable = true; # Enable touchpad support + # Apply startx patch to create serverauth file in /tmp instead of home directory + nixpkgs.overlays = with pkgs; [ + (final: prev: { + xorg = prev.xorg // { + xinit = (prev.xorg.xinit.overrideAttrs (oldAttrs: rec { + version = "1.4.4"; + patchtag = "${version}-1"; # Archlinux xinit package tagged release to fetch patch from + # Override src since is hardcoded to 1.4.2 + src = prev.fetchurl { + url = "mirror://xorg/individual/app/xinit-${version}.tar.xz"; + sha256 = "sha256-QKR8ehZMf5gc43h7Szf35BH7QyMdzeVD1wCUB12s/vk="; + }; + patches = [ + (prev.fetchpatch { + url = "https://gitlab.archlinux.org/archlinux/packaging/packages/xorg-xinit/-/raw/${patchtag}/06_move_serverauthfile_into_tmp.diff"; + sha256 = "1whzs5bw7ph12r3abs1g9fydibkr291jh56a0zp17d4x070jnkda"; + }) + ]; + })); + }; + }) + ]; + + # Install basic X utilities environment.systemPackages = with pkgs; [ unclutter xcape @@ -19,12 +43,12 @@ xorg.xrandr xorg.xset xwallpaper - # Patch startx to be compliant with xdg base dir spec - #(xorg.xinit.overrideAttrs (old: rec { - # patches = [ - # ./resources/x11/xinit-startx-xdg.patch - # ]; - #})) ]; + + # Enable TearFree option by default + # Not all video drivers support this option + services.xserver.deviceSection = '' + Option "TearFree" "true" + ''; }; } @@ -0,0 +1,2 @@ +#!/bin/sh +nixos-rebuild switch --use-remote-sudo --flake "$(dirname "$0")/#$(hostname)" |