Compare commits

..

No commits in common. "60f89aeaec6c5857e6f742c9dd6a4268d71ae6c5" and "f61980caefda3e126acd1e62c32cf8ce477b5c84" have entirely different histories.

6 changed files with 122 additions and 92 deletions

View File

@ -10,6 +10,7 @@
<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
./hardware-configuration.nix
./services.nix
./scanner.nix
./packages.nix
../modules/prometheus-node.nix
];
@ -20,44 +21,17 @@
efi.canTouchEfiVariables = true;
};
programs = {
zsh.enable = true;
fish.enable = true;
ssh = {
setXAuthLocation = true;
forwardX11 = true;
hardware.logitech.wireless.enable = true;
hardware.logitech.wireless.enableGraphical = true;
services.printing.enable = true;
services.printing.drivers = [ pkgs.brlaser ];
# Video acceleration
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = 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 = {
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
@ -66,13 +40,29 @@
libvdpau-va-gl
];
};
# hardware.opengl.extraPackages;
# Enable Bluetooth
hardware.bluetooth.enable = true;
hardware.bluetooth.settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
# Video acceleration
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
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 = {
@ -86,7 +76,6 @@
};
};
};
networking.hostName = "Alexos"; # Define your hostname.
# Set your time zone.
@ -136,12 +125,7 @@
# 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
dmenu i3lock polybar
mplayer
pkgs.dconf
pulseaudio pavucontrol paprefs

View File

@ -0,0 +1,14 @@
{ 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,9 +1,26 @@
{ config, pkgs, ... }:
{
services.printing.enable = true;
services.printing.drivers = [ pkgs.brlaser ];
services.blueman.enable = true;
hardware = {
pulseaudio = {
enable = true;
};
};
# upgrade
programs = {
mtr.enable = true ;
zsh.enable = true;
fish.enable = true;
ssh = {
setXAuthLocation = true;
forwardX11 = true;
};
};
# SERVICES
services = {
@ -18,7 +35,7 @@
settings = {
CPU_SCALING_GOVERNOR_ON_BAT="powersave";
CPU_SCALING_GOVERNOR_ON_AC="powersave";
# The following prevents the battery from charging fully to
# 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
@ -30,9 +47,8 @@
CPU_MAX_PERF_ON_AC=75;
CPU_MAX_PERF_ON_BAT=60;
};
};
# ADD group plocate to your user
};
# ADD group mlocate to your user
locate = {
enable = true;
locate = pkgs.plocate;
@ -40,6 +56,7 @@
localuser = null;
};
xserver = {
enable = true;
autorun = true;
@ -53,8 +70,8 @@
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'";
};
displayManager.defaultSession = "none+i3";
layout = "fr";
xkbOptions = "eurosign:e";
@ -64,9 +81,14 @@
xfce.thunarPlugins = with pkgs; [ xfce.thunar-volman xfce.thunar-archive-plugin ];
};
};
udev.extraRules = ''
ACTION=="remove", ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", RUN+="${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png";
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

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

View File

@ -47,7 +47,6 @@
vimPlugins.vim-markdown-composer
neovim
python3
mtr
ferdi
];
}