Update nixpkgs & add X2100

This commit is contained in:
Alexander Bantyev 2020-11-09 22:43:06 +03:00
parent 00ec288b8b
commit f3cbc3955d
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
7 changed files with 79 additions and 38 deletions

10
flake.lock generated
View File

@ -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"
}
},

View File

@ -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 = {

View File

@ -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";
}

View File

@ -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
];
};
};

View File

@ -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";

View File

@ -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";

View File

@ -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 {
'';
};
}