diff --git a/machines/MacBookPro12.1-configuration.nix b/machines/MacBookPro12.1-configuration.nix index 3e375b5..23f96b6 100644 --- a/machines/MacBookPro12.1-configuration.nix +++ b/machines/MacBookPro12.1-configuration.nix @@ -12,6 +12,7 @@ boot.kernelParams = [ "hid_apple.fnmode=1" "hid_apple.swap_fn_leftctrl=1" + "hid_apple.iso_layout=0" ]; boot.kernel.sysctl = { "vm.swappiness" = 10;}; diff --git a/machines/MacBookPro12.1-hardware-configuration.nix b/machines/MacBookPro12.1-hardware-configuration.nix index e833b0c..704b387 100644 --- a/machines/MacBookPro12.1-hardware-configuration.nix +++ b/machines/MacBookPro12.1-hardware-configuration.nix @@ -39,7 +39,22 @@ #nixpkgs.config.allowBroken = true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - # high-resolution display - #hardware.video.hidpi.enable = lib.mkDefault true; hardware.opengl.enable = true; + hardware.opengl.driSupport = true; + powerManagement = { + # Enable gradually increasing/decreasing CPU frequency, rather than using + # "powersave", which would keep CPU frequency at 0.8GHz. + cpuFreqGovernor = lib.mkDefault "conservative"; + + # brcmfmac being loaded during hibernation would not let a successful resume + # https://bugzilla.kernel.org/show_bug.cgi?id=101681#c116. + # Also brcmfmac could randomly crash on resume from sleep. + powerUpCommands = lib.mkBefore "${pkgs.kmod}/bin/modprobe brcmfmac"; + powerDownCommands = lib.mkBefore "${pkgs.kmod}/bin/rmmod brcmfmac"; + }; + + # USB subsystem wakes up MBP right after suspend unless we disable it. + services.udev.extraRules = lib.mkDefault '' + SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled" + ''; } diff --git a/modules/console.nix b/modules/console.nix index 9600104..87f8328 100644 --- a/modules/console.nix +++ b/modules/console.nix @@ -35,6 +35,7 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ + ansible bat bitwarden-cli coreutils @@ -54,7 +55,9 @@ mosh neofetch pandoc + pass pciutils + pinentry starship tmux tree diff --git a/modules/desktop.nix b/modules/desktop.nix index d450748..b3e390f 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -12,8 +12,12 @@ in services = { #blueman.enable = true; + #openvpn.restartAfterSleep = false; openvpn.servers = { - arn = { config = '' config /home/mrflos/Nextcloud/vpn\ ARN/2023/vpn510.conf ''; }; + arn = { + config = '' config /home/mrflos/Nextcloud/vpn\ ARN/2023/vpn510.conf ''; + autoStart = false; + }; }; pipewire = { enable = true; @@ -28,25 +32,18 @@ in #media-session.enable = true; }; printing.enable = true; # Enable CUPS to print documents. - redshift.enable = true; + redshift.enable = false; # may be causing flickers xserver = { enable = true; layout = "us"; - displayManager.sddm.enable = true; - desktopManager.plasma5.enable = true; # desktopManager.gnome.enable = true; - + desktopManager.plasma5.enable = true; + displayManager.sddm.enable = true; # libinput.enable = true; # Enable touchpad support (enabled default in most desktopManager). }; }; programs = { - # conflict between kde and gnome cf. https://github.com/NixOS/nixpkgs/issues/75867 - ssh.askPassword = pkgs.lib.mkForce "${pkgs.ksshaskpass.out}/bin/ksshaskpass"; - ssh.startAgent = true; - dconf.enable = true; - steam.enable = true; - firefox.enable = true; chromium = { enable = true; homepageLocation = "about:blank"; @@ -67,6 +64,13 @@ in ]; }; }; + dconf.enable = true; + droidcam.enable = true; + firefox.enable = true; + kdeconnect.enable = true; + ssh.askPassword = pkgs.lib.mkForce "${pkgs.ksshaskpass.out}/bin/ksshaskpass"; # conflict between kde and gnome cf. https://github.com/NixOS/nixpkgs/issues/75867 + ssh.startAgent = true; + steam.enable = true; }; # Allow unfree packages @@ -78,12 +82,13 @@ in }; }; }; - + environment.plasma5.excludePackages = with pkgs.libsForQt5; [ + baloo elisa gwenview - oxygen khelpcenter + oxygen plasma-browser-integration ]; # List packages installed in system profile. To search, run: @@ -96,23 +101,16 @@ in mkhl.direnv jnoortheen.nix-ide dracula-theme.theme-dracula - ms-vscode-remote.remote-ssh gruntfuggly.todo-tree eamodio.gitlens mhutchie.git-graph - ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ - { - name = "remote-ssh-edit"; - publisher = "ms-vscode-remote"; - version = "0.47.2"; - sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g"; - } ]; }) (chromium.override { enableWideVine = true; # DRM support }) bitwarden + calibre digikam dracula-theme palenight-theme @@ -129,12 +127,13 @@ in libsForQt5.ark libsForQt5.bismuth mattermost-desktop + mixxx nextcloud-client obsidian - onlyoffice-bin + libreoffice signal-desktop tdesktop - thunderbird + unstable.thunderbird transmission-qt vlc ]; diff --git a/modules/local-dev.nix b/modules/local-dev.nix index 71700b1..a1ff887 100644 --- a/modules/local-dev.nix +++ b/modules/local-dev.nix @@ -115,12 +115,14 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - (import (fetchTarball https://github.com/cachix/devenv/archive/v0.6.2.tar.gz)).default + (import (fetchTarball https://github.com/cachix/devenv/archive/v0.6.3.tar.gz)).default direnv - php - symfony-cli docker-compose nodejs + php + php82Packages.composer + rpi-imager + symfony-cli virt-manager yarn zola