DEL synergyC.nix scanner.nix : not use

MOD configuration.nix services.nix : refactoring
alacritty
Alexandre LUCAZEAU 2022-09-14 17:33:46 +02:00
parent a802a50479
commit 7bee44b0c5
No known key found for this signature in database
GPG Key ID: 3C8ADB07A8217BD3
5 changed files with 90 additions and 121 deletions

View File

@ -10,7 +10,6 @@
<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
./hardware-configuration.nix
./services.nix
./scanner.nix
./packages.nix
../modules/prometheus-node.nix
];
@ -21,48 +20,59 @@
efi.canTouchEfiVariables = true;
};
hardware.logitech.wireless.enable = true;
hardware.logitech.wireless.enableGraphical = true;
services.printing.enable = true;
services.printing.drivers = [ pkgs.brlaser ];
programs = {
zsh.enable = true;
fish.enable = true;
ssh = {
setXAuthLocation = true;
forwardX11 = true;
};
};
# hardware
hardware = {
logitech = {
wireless.enable = true;
wireless.enableGraphical = true;
};
pulseaudio = {
enable = true;
extraConfig = "
load-module module-switch-on-connect
";
};
sane = {
enable = true;
brscan4 = {
enable = true;
};
dsseries = {
enable = true;
};
};
bluetooth = {
enable = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
};
opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
vaapiVdpau
libvdpau-va-gl
];
};
};
# Video acceleration
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
vaapiVdpau
libvdpau-va-gl
];
};
# hardware.opengl.extraPackages;
# Enable Bluetooth
hardware.bluetooth.enable = true;
hardware.bluetooth.settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
services.blueman.enable = true;
hardware.pulseaudio.enable = true;
hardware.pulseaudio.extraConfig = "
load-module module-switch-on-connect
";
# Enable sane and brscan4 for DSP-7055
hardware = {
sane = {
enable = true;
brscan4 = {
enable = true;
};
};
};
security = {
apparmor.enable = true;
pam = {
@ -76,6 +86,7 @@
};
};
};
networking.hostName = "Alexos"; # Define your hostname.
# Set your time zone.
@ -115,17 +126,22 @@
];
};
# run garbage collector at 19h00 everyday
# and remove stuff older than 60 days
nix.gc.automatic = true;
nix.gc.dates = "19:00";
nix.gc.persistent = true;
nix.gc.options = "--delete-older-than 60d";
# run garbage collector at 19h00 everyday
# and remove stuff older than 60 days
nix.gc.automatic = true;
nix.gc.dates = "19:00";
nix.gc.persistent = true;
nix.gc.options = "--delete-older-than 60d";
# clean /tmp at boot
boot.cleanTmpDir = true;
# clean /tmp at boot
boot.cleanTmpDir = true;
nixpkgs.config = {
allowUnfree = true;
};
system.stateVersion = "21.05"; # Did you read the comment?
users = {
users.ntp.group = "ntp";
groups.ntp = {};

View File

@ -6,7 +6,7 @@
wget lshw openssh bc scrot zsh unzip zip file which vim gnumake tmux
gitAndTools.gitFull
dmenu i3lock polybar
dmenu i3lock
mplayer
pkgs.dconf
pulseaudio pavucontrol paprefs

View File

@ -1,14 +0,0 @@
{ config, lib, pkgs, ... } : {
#<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>:w
hardware.sane = {
enable = true;
dsseries.enable = true;
};
# Allow unfree software for libsane-dsseries only
nixpkgs.config.allowUnfreePredicate = (pkg: builtins.elem (builtins.parseDrvName pkg.pname).name
[
"libsane-dsseries"
]);
}

View File

@ -1,26 +1,9 @@
{ config, pkgs, ... }:
{
hardware = {
pulseaudio = {
enable = true;
};
};
# upgrade
programs = {
mtr.enable = true ;
zsh.enable = true;
fish.enable = true;
ssh = {
setXAuthLocation = true;
forwardX11 = true;
};
};
services.printing.enable = true;
services.printing.drivers = [ pkgs.brlaser ];
services.blueman.enable = true;
# SERVICES
services = {
@ -33,22 +16,23 @@
tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_BAT="powersave";
CPU_SCALING_GOVERNOR_ON_AC="powersave";
# The following prevents the battery from charging fully to
# preserve lifetime. Run `tlp fullcharge` to temporarily force
# full charge.
# https://linrunner.de/tlp/faq/battery.html#how-to-choose-good-battery-charge-thresholds
START_CHARGE_THRESH_BAT0=40;
STOP_CHARGE_THRESH_BAT0=50;
CPU_SCALING_GOVERNOR_ON_BAT="powersave";
CPU_SCALING_GOVERNOR_ON_AC="powersave";
# The following prevents the battery from charging fully to
# preserve lifetime. Run `tlp fullcharge` to temporarily force
# full charge.
# https://linrunner.de/tlp/faq/battery.html#how-to-choose-good-battery-charge-thresholds
START_CHARGE_THRESH_BAT0=40;
STOP_CHARGE_THRESH_BAT0=50;
# 100 being the maximum, limit the speed of my CPU to reduce
# heat and increase battery usage:
CPU_MAX_PERF_ON_AC=75;
CPU_MAX_PERF_ON_BAT=60;
# 100 being the maximum, limit the speed of my CPU to reduce
# heat and increase battery usage:
CPU_MAX_PERF_ON_AC=75;
CPU_MAX_PERF_ON_BAT=60;
};
};
};
# ADD group mlocate to your user
# ADD group plocate to your user
locate = {
enable = true;
locate = pkgs.plocate;
@ -56,39 +40,33 @@
localuser = null;
};
xserver = {
enable = true;
autorun = true;
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
i3lock
];
enable = true;
extraPackages = with pkgs; [
i3lock
];
};
xautolock = {
enable = true;
time = 10;
locker = "${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png";
#notifier = "${pkgs.libnotify}/bin/notify-send 'Locking in 10 seconds'";
enable = true;
time = 10;
locker = "${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png";
};
displayManager.defaultSession = "none+i3";
layout = "fr";
xkbOptions = "eurosign:e";
desktopManager = {
xterm.enable = false;
xfce.enable = true;
xfce.thunarPlugins = with pkgs; [ xfce.thunar-volman xfce.thunar-archive-plugin ];
xfce.thunarPlugins = with pkgs; [ xfce.thunar-volman xfce.thunar-archive-plugin ];
};
};
udev.extraRules = ''
ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", RUN+="${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png";
'';
};
nixpkgs.config = {
allowUnfree = true;
};
}

View File

@ -1,11 +0,0 @@
{ config, lib, pkgs, ...} : {
services = {
synergy.client = {
enable = true;
screenName = "Alexos";
serverAddress = "192.168.10.106";
autoStart = true;
};
};
}