Merge branch 'main' of git.datarift.nl:erwin/nixos-config

This commit is contained in:
Erwin Boskma 2022-11-19 17:47:57 +01:00
commit c042fe2a77
Signed by: erwin
SSH key fingerprint: SHA256:CyeNoWXd3kjX2Nwu6pDxxdS7OqmPVOy0NavA/KU/ntU
9 changed files with 66 additions and 39 deletions

View file

@ -5,8 +5,6 @@
}:
with lib; let
cfg = config.eboskma.programs.emacs;
emacsX11 = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (epkgs: [ epkgs.emacsql epkgs.emacsql-sqlite ]));
emacsWayland = with pkgs; ((emacsPackagesFor emacsPgtkNativeComp).emacsWithPackages (epkgs: [ epkgs.emacsql epkgs.emacsql-sqlite ]));
orgProtocolDesktop = pkgs.makeDesktopItem {
name = "org-protocol";
@ -37,7 +35,7 @@ in
package = mkOption {
description = "The emacs package to install";
type = types.package;
default = emacsWayland;
default = pkgs.emacs;
};
daemon = mkOption {

View file

@ -44,6 +44,8 @@ in
config = mkIf cfg.enable {
xsession = {
enable = true;
numlock.enable = true;
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
@ -249,16 +251,16 @@ in
command = "${pkgs.networkmanagerapplet}/bin/nm-applet";
notification = false;
}
{
command = ''${pkgs.xorg.xinput}/bin/xinput set-int-prop "Logitech USB Laser Mouse" "libinput Natural Scrolling Enabled" 8 1'';
notification = false;
always = true;
}
{
command = ''${pkgs.xorg.xinput}/bin/xinput set-float-prop "Logitech USB Laser Mouse" "libinput Accel Speed" 1'';
notification = false;
always = true;
}
# {
# command = ''${pkgs.xorg.xinput}/bin/xinput set-int-prop "Logitech USB Laser Mouse" "libinput Natural Scrolling Enabled" 8 1'';
# notification = false;
# always = true;
# }
# {
# command = ''${pkgs.xorg.xinput}/bin/xinput set-float-prop "Logitech USB Laser Mouse" "libinput Accel Speed" 1'';
# notification = false;
# always = true;
# }
{
command = "${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --primary --left-of DP-4";
notification = false;

View file

@ -21,5 +21,7 @@ in
enable = true;
notifications = true;
};
home.packages = with pkgs; [ mpc-cli ];
};
}

View file

@ -4,14 +4,21 @@ let
cfg = config.eboskma.programs.zellij;
in
{
options.eboskma.programs.zellij = { enable = mkEnableOption "zellij"; };
options.eboskma.programs.zellij = {
enable = mkEnableOption "zellij";
copyCommand = mkOption {
description = "Command used to copy a selection";
type = types.str;
example = literalExpression ''"''${pkgs.wl-clipboard}/bin/wl-copy"'';
};
};
config = mkIf (cfg.enable) {
programs.zellij = {
enable = true;
settings = {
theme = "dracula";
copy_command = "${pkgs.wl-clipboard}/bin/wl-copy";
copy_command = cfg.copyCommand;
scrollback_editor = "${config.eboskma.programs.emacs.package}/bin/emacsclient";
pane_frames = false;

View file

@ -3,9 +3,7 @@
# and in the NixOS manual (accessible by running nixos-help).
{ self, nixpkgs, nixos-hardware, ... }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in
{ pkgs, ... }:
{
imports =
[
@ -87,10 +85,11 @@ in
systemd.network = {
enable = true;
wait-online.anyInterface = true;
wait-online.extraArgs = [ "--interface=enp4s0" ];
networks = {
"40-enp4s0" = {
enable = true;
DHCP = "yes";
matchConfig = {
@ -99,8 +98,9 @@ in
};
"40-enp5s0f1" = {
enable = true;
linkConfig = {
RequiredForOnline = false;
RequiredForOnline = "no";
};
matchConfig = {
Name = "enp5s0f1";
@ -112,6 +112,14 @@ in
services.openssh.enable = true;
programs.ssh.startAgent = true;
services.xserver.libinput = {
enable = true;
mouse = {
accelSpeed = "1.0";
naturalScrolling = true;
};
};
# sops = {
# defaultSopsFile = ./secrets.yaml;

View file

@ -14,26 +14,28 @@
options amd-pstate shared_mem=true
'';
fileSystems."/" =
{
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot/efi" =
{
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
fileSystems."/home" =
{
device = "/dev/disk/by-label/home";
fsType = "ext4";
};
fileSystems."/home" = {
device = "/dev/disk/by-label/home";
fsType = "ext4";
};
fileSystems."/yocto" = {
device = "/dev/disk/by-label/yocto";
fsType = "ext4";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/82969dda-8804-4314-b916-2d4b5db904d5"; }];
[{ device = "/dev/disk/by-label/swap"; }];
powerManagement.cpuFreqGovernor = "ondemand";
hardware = {

View file

@ -92,7 +92,7 @@ in
};
environment = {
sessionVariables = {
sessionVariables = mkIf cfg.wayland {
_JAVA_AWT_WM_NONREPARENTING = "1";
MOZ_ENABLE_WAYLAND = "1";
MOZ_DBUS_REMOTE = "1";

View file

@ -47,6 +47,7 @@ in
dunst.enable = false;
emacs = {
enable = true;
package = with pkgs; ((emacsPackagesFor emacsPgtkNativeComp).emacsWithPackages (epkgs: [ epkgs.emacsql epkgs.emacsql-sqlite ]));
daemon = true;
};
electron = {
@ -114,7 +115,10 @@ in
tmux.enable = true;
waybar.enable = true;
zathura.enable = true;
zellij.enable = true;
zellij = {
enable = true;
copyCommand = "${pkgs.wl-clipboard}/bin/wl-copy";
};
};
};

View file

@ -32,6 +32,7 @@ in
dunst.enable = true;
emacs = {
enable = true;
package = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (epkgs: [ epkgs.emacsql epkgs.emacsql-sqlite ]));
daemon = true;
};
firefox = {
@ -68,7 +69,10 @@ in
};
rofi.enable = true;
ssh.enable = true;
zellij.enable = true;
zellij = {
enable = true;
copyCommand = "${pkgs.xsel}/bin/xsel --clipboard";
};
};
services = {
xbanish.enable = true;