diff --git a/flake.lock b/flake.lock index ee5684e..019d8b1 100644 --- a/flake.lock +++ b/flake.lock @@ -247,17 +247,17 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1601171649, - "narHash": "sha256-G3RUAi2DUq6r3ntASLS+LZC/Eamot55W1+xmBOgEh3M=", + "lastModified": 1604369895, + "narHash": "sha256-uB/ihiWdfTjVQ9sKdtj6xeyvb41uC2J4MXiOLkwJccs=", "owner": "nixos", - "repo": "nixpkgs-channels", - "rev": "84d74ae9c9cbed73274b8e4e00be14688ffc93fe", + "repo": "nixpkgs", + "rev": "34ad166a830d3ac1541dcce571c52231f2f0865a", "type": "github" }, "original": { "owner": "nixos", "ref": "nixos-unstable", - "repo": "nixpkgs-channels", + "repo": "nixpkgs", "type": "github" } }, diff --git a/flake.nix b/flake.nix index c83c3ea..ba87c9b 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ "A collection of crap, hacks and copy-paste to make my localhosts boot"; inputs = { - nixpkgs.url = github:nixos/nixpkgs-channels/nixos-unstable; + nixpkgs.url = github:nixos/nixpkgs/nixos-unstable; # nixpkgs-mesa.url = github:nixos/nixpkgs-channels/bdac777becdbb8780c35be4f552c9d4518fe0bdb; lambda-launcher.url = github:balsoft/lambda-launcher; NUR = { diff --git a/hardware-configuration/X2100-Laptop.nix b/hardware-configuration/X2100-Laptop.nix new file mode 100755 index 0000000..d0b52ad --- /dev/null +++ b/hardware-configuration/X2100-Laptop.nix @@ -0,0 +1,31 @@ +# 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, inputs, ... }: + +{ + imports = + [ "${inputs.nixpkgs}/nixos/modules/installer/scan/not-detected.nix" ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/nvme0n1p2"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/nvme0n1p1"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; + + nix.maxJobs = lib.mkDefault 8; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; +} diff --git a/modules/applications/firefox.nix b/modules/applications/firefox.nix index 2e6d621..76d32cc 100644 --- a/modules/applications/firefox.nix +++ b/modules/applications/firefox.nix @@ -7,16 +7,6 @@ in { MOZ_DBUS_REMOTE = "1"; }; home-manager.users.balsoft = lib.mkIf (config.deviceSpecific.goodMachine) { - home.packages = with pkgs; [ - plasma-integration - plasma-browser-integration - ]; - home.file.".mozilla/native-messaging-hosts".source = pkgs.symlinkJoin { - name = "native-messaging-hosts"; - paths = [ - "${pkgs.plasma-browser-integration}/lib/mozilla/native-messaging-hosts" - ]; - }; programs.firefox = { enable = true; package = pkgs.firefox-wayland; @@ -67,7 +57,6 @@ in { close-other-windows adsum-notabs ublock-origin - plasma-integration ]; }; }; diff --git a/modules/devices.nix b/modules/devices.nix index 0d7d94d..0e0d42c 100644 --- a/modules/devices.nix +++ b/modules/devices.nix @@ -94,6 +94,19 @@ with types; { }; ram = 2; }; + X2100-Laptop = { + cpu = { + vendor = "intel"; + clock = 4800; + cores = 4; + }; + drive = { + type = "ssd"; + speed = 6000; + size = 256; + }; + ram = 16; + }; NixOS-VM = { cpu = { vendor = "intel"; diff --git a/modules/workspace/kde/default.nix b/modules/workspace/kde/default.nix index 364c02a..91a5eac 100644 --- a/modules/workspace/kde/default.nix +++ b/modules/workspace/kde/default.nix @@ -27,7 +27,6 @@ with import ../../../support.nix { inherit lib config; }; { pkgs.media-player-info ]; - nixpkgs.config.firefox.enablePlasmaBrowserIntegration = true; environment.sessionVariables = { DESKTOP_SESSION = "kde"; QT_XFT = "true"; diff --git a/modules/workspace/sway/default.nix b/modules/workspace/sway/default.nix index cb432a6..30a238b 100755 --- a/modules/workspace/sway/default.nix +++ b/modules/workspace/sway/default.nix @@ -2,8 +2,10 @@ let thm = config.themes.colors; apps = config.defaultApplications; - lock_fork = pkgs.writeShellScript "lock_fork" "sudo /run/current-system/sw/bin/lock &"; - lock = pkgs.writeShellScript "lock" "swaymsg 'output * dpms off'; sudo /run/current-system/sw/bin/lock; swaymsg 'output * dpms on'"; + lock_fork = + pkgs.writeShellScript "lock_fork" "sudo /run/current-system/sw/bin/lock &"; + lock = pkgs.writeShellScript "lock" + "swaymsg 'output * dpms off'; sudo /run/current-system/sw/bin/lock; swaymsg 'output * dpms on'"; in { environment.sessionVariables._JAVA_AWT_WM_NONREPARENTING = "1"; @@ -11,12 +13,15 @@ in { programs.sway.extraPackages = lib.mkForce (with pkgs; [ swayidle xwayland ]); - home-manager.users.balsoft.wayland.windowManager.sway = { enable = true; config = rec { assigns = { - "" = [ { class = "Chromium"; } { app_id = "firefox"; } { class = "Firefox"; } ]; + "" = [ + { class = "Chromium"; } + { app_id = "firefox"; } + { class = "Firefox"; } + ]; "" = [ { app_id = "org.kde.trojita"; } { title = ".* - Sylpheed.*"; } @@ -89,14 +94,14 @@ in { { command = "${pkgs.cantata}/bin/cantata"; } { - command = "swayidle -w before-sleep '${lock_fork}' lock '${lock_fork}' unlock 'pkill -9 swaylock'"; + command = + "swayidle -w before-sleep '${lock_fork}' lock '${lock_fork}' unlock 'pkill -9 swaylock'"; } { - command = "${pkgs.xdg-desktop-portal-kde}/libexec/xdg-desktop-portal-kde"; - } - { - command = "${pkgs.xdg-desktop-portal}/libexec/xdg-desktop-portal"; + command = + "${pkgs.xdg-desktop-portal-kde}/libexec/xdg-desktop-portal-kde"; } + { command = "${pkgs.xdg-desktop-portal}/libexec/xdg-desktop-portal"; } ]; keybindings = let @@ -192,8 +197,10 @@ in { "XF86AudioLowerVolume" = "exec ${pkgs.pamixer}/bin/pamixer -d 2"; "XF86AudioRaiseVolume" = "exec ${pkgs.pamixer}/bin/pamixer -i 2"; "XF86AudioMute" = "exec ${pkgs.pamixer}/bin/pamixer -t"; - "${modifier}+XF86AudioLowerVolume" = "exec ${pkgs.pamixer}/bin/pamixer -d 1"; - "${modifier}+XF86AudioRaiseVolume" = "exec ${pkgs.pamixer}/bin/pamixer -i 1"; + "${modifier}+XF86AudioLowerVolume" = + "exec ${pkgs.pamixer}/bin/pamixer -d 1"; + "${modifier}+XF86AudioRaiseVolume" = + "exec ${pkgs.pamixer}/bin/pamixer -i 1"; "button2" = "kill"; "--whole-window ${modifier}+button2" = "kill"; } // builtins.listToAttrs (builtins.map (x: { @@ -203,8 +210,7 @@ in { name = "${modifier}+Shift+${builtins.elemAt x 0}"; value = "move container to workspace ${builtins.elemAt x 1}"; }) workspaces)); - keycodebindings = { - }; + keycodebindings = { }; workspaceLayout = "tabbed"; workspaceAutoBackAndForth = true; input = { @@ -213,20 +219,24 @@ in { natural_scroll = "enabled"; dwt = "enabled"; }; - "2:14:ETPS/2_Elantech_TrackPoint" = { - pointer_accel = "-0.7"; + "2:14:ETPS/2_Elantech_TrackPoint" = { pointer_accel = "-0.7"; }; + "2:10:TPPS/2_IBM_TrackPoint" = { + pointer_accel = "0.4"; + accel_profile = "adaptive"; }; }; output = { "*".bg = "${thm.bg} solid_color"; } // lib.optionalAttrs (config.device == "AMD-Workstation") { DP-1.position = "0 400"; - HDMI-A-1 = { transform = "90"; position = "2560 0"; }; + HDMI-A-1 = { + transform = "90"; + position = "2560 0"; + }; + "Unknown 0x0000 0x00000000".scale = "2"; }; }; - wrapperFeatures = { - gtk = true; - }; + wrapperFeatures = { gtk = true; }; extraConfig = '' default_border pixel 1 mouse_warping container @@ -235,4 +245,3 @@ in { ''; }; } -