Compare commits

...

3 Commits

Author SHA1 Message Date
Alexandre LUCAZEAU 60f89aeaec
FIX : udev rules for yubikey 2022-09-14 19:26:52 +02:00
Alexandre LUCAZEAU 7bee44b0c5
DEL synergyC.nix scanner.nix : not use
MOD configuration.nix services.nix : refactoring
2022-09-14 17:33:46 +02:00
Alexandre LUCAZEAU a802a50479
Move mtr package from services.nix to home-manager package 2022-09-14 16:58:11 +02:00
6 changed files with 92 additions and 122 deletions

View File

@ -10,7 +10,6 @@
<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix> <nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
./hardware-configuration.nix ./hardware-configuration.nix
./services.nix ./services.nix
./scanner.nix
./packages.nix ./packages.nix
../modules/prometheus-node.nix ../modules/prometheus-node.nix
]; ];
@ -21,17 +20,44 @@
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
hardware.logitech.wireless.enable = true; programs = {
hardware.logitech.wireless.enableGraphical = true; zsh.enable = true;
fish.enable = true;
services.printing.enable = true; ssh = {
services.printing.drivers = [ pkgs.brlaser ]; setXAuthLocation = true;
forwardX11 = true;
# Video acceleration
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
}; };
hardware.opengl = { };
# 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; enable = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD intel-media-driver # LIBVA_DRIVER_NAME=iHD
@ -40,29 +66,13 @@
libvdpau-va-gl 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 # Video acceleration
hardware = { nixpkgs.config.packageOverrides = pkgs: {
sane = { vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
enable = true;
brscan4 = {
enable = true;
};
};
}; };
security = { security = {
apparmor.enable = true; apparmor.enable = true;
pam = { pam = {
@ -76,6 +86,7 @@
}; };
}; };
}; };
networking.hostName = "Alexos"; # Define your hostname. networking.hostName = "Alexos"; # Define your hostname.
# Set your time zone. # Set your time zone.
@ -125,7 +136,12 @@
# clean /tmp at boot # clean /tmp at boot
boot.cleanTmpDir = true; boot.cleanTmpDir = true;
nixpkgs.config = {
allowUnfree = true;
};
system.stateVersion = "21.05"; # Did you read the comment? system.stateVersion = "21.05"; # Did you read the comment?
users = { users = {
users.ntp.group = "ntp"; users.ntp.group = "ntp";
groups.ntp = {}; groups.ntp = {};

View File

@ -6,7 +6,7 @@
wget lshw openssh bc scrot zsh unzip zip file which vim gnumake tmux wget lshw openssh bc scrot zsh unzip zip file which vim gnumake tmux
gitAndTools.gitFull gitAndTools.gitFull
dmenu i3lock polybar dmenu i3lock
mplayer mplayer
pkgs.dconf pkgs.dconf
pulseaudio pavucontrol paprefs 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, ... }: { config, pkgs, ... }:
{ {
services.printing.enable = true;
hardware = { services.printing.drivers = [ pkgs.brlaser ];
pulseaudio = { services.blueman.enable = true;
enable = true;
};
};
# upgrade
programs = {
mtr.enable = true ;
zsh.enable = true;
fish.enable = true;
ssh = {
setXAuthLocation = true;
forwardX11 = true;
};
};
# SERVICES # SERVICES
services = { services = {
@ -35,7 +18,7 @@
settings = { settings = {
CPU_SCALING_GOVERNOR_ON_BAT="powersave"; CPU_SCALING_GOVERNOR_ON_BAT="powersave";
CPU_SCALING_GOVERNOR_ON_AC="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 # preserve lifetime. Run `tlp fullcharge` to temporarily force
# full charge. # full charge.
# https://linrunner.de/tlp/faq/battery.html#how-to-choose-good-battery-charge-thresholds # https://linrunner.de/tlp/faq/battery.html#how-to-choose-good-battery-charge-thresholds
@ -47,8 +30,9 @@
CPU_MAX_PERF_ON_AC=75; CPU_MAX_PERF_ON_AC=75;
CPU_MAX_PERF_ON_BAT=60; CPU_MAX_PERF_ON_BAT=60;
}; };
}; };
# ADD group mlocate to your user
# ADD group plocate to your user
locate = { locate = {
enable = true; enable = true;
locate = pkgs.plocate; locate = pkgs.plocate;
@ -56,7 +40,6 @@
localuser = null; localuser = null;
}; };
xserver = { xserver = {
enable = true; enable = true;
autorun = true; autorun = true;
@ -70,8 +53,8 @@
enable = true; enable = true;
time = 10; time = 10;
locker = "${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png"; 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"; displayManager.defaultSession = "none+i3";
layout = "fr"; layout = "fr";
xkbOptions = "eurosign:e"; xkbOptions = "eurosign:e";
@ -81,14 +64,9 @@
xfce.thunarPlugins = with pkgs; [ xfce.thunar-volman xfce.thunar-archive-plugin ]; xfce.thunarPlugins = with pkgs; [ xfce.thunar-volman xfce.thunar-archive-plugin ];
}; };
}; };
udev.extraRules = '' 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"; 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";
''; '';
}; };
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;
};
};
}

View File

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