87 lines
1.7 KiB
Nix
87 lines
1.7 KiB
Nix
|
{ config, pkgs, ... }:
|
||
|
|
||
|
{
|
||
|
|
||
|
hardware = {
|
||
|
pulseaudio = {
|
||
|
enable = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
# upgrade
|
||
|
|
||
|
programs = {
|
||
|
mtr.enable = true ;
|
||
|
zsh.enable = true;
|
||
|
fish.enable = true;
|
||
|
ssh = {
|
||
|
setXAuthLocation = true;
|
||
|
forwardX11 = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
|
||
|
# SERVICES
|
||
|
services = {
|
||
|
|
||
|
clamav = {
|
||
|
daemon.enable = true;
|
||
|
updater.enable = true;
|
||
|
};
|
||
|
|
||
|
postgresql = {
|
||
|
enable = true;
|
||
|
package = pkgs.postgresql_10;
|
||
|
enableTCPIP = true;
|
||
|
authentication = pkgs.lib.mkOverride 10 ''
|
||
|
local all all trust
|
||
|
host all all ::1/128 trust
|
||
|
host all all 127.0.0.1/32 trust
|
||
|
'';
|
||
|
initialScript = pkgs.writeText "backend-initScript" ''
|
||
|
CREATE ROLE foreman WITH LOGIN PASSWORD 'word' CREATEDB;
|
||
|
CREATE ROLE sylvain CREATEDB;
|
||
|
ALTER USER foreman WITH SUPERUSER;
|
||
|
CREATE DATABASE foremandb;
|
||
|
GRANT ALL PRIVILEGES ON DATABASE foremandb TO foreman;
|
||
|
'';
|
||
|
|
||
|
};
|
||
|
|
||
|
ntp.enable = true;
|
||
|
tlp.enable = true;
|
||
|
|
||
|
# udev.extraRules = ''
|
||
|
# ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", RUN+="/usr/bin/lockscreen-all"
|
||
|
# '';
|
||
|
|
||
|
xserver = {
|
||
|
enable = true;
|
||
|
autorun = true;
|
||
|
#desktopManager.gnome.enable = true;
|
||
|
windowManager.i3.enable = true;
|
||
|
displayManager.defaultSession = "none+i3";
|
||
|
layout = "fr";
|
||
|
xkbOptions = "eurosign:e";
|
||
|
desktopManager = {
|
||
|
xterm.enable = false;
|
||
|
xfce.enable = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
};
|
||
|
|
||
|
nixpkgs.config = {
|
||
|
|
||
|
packageOverrides = pkgs: {
|
||
|
polybar = pkgs.polybar.override {
|
||
|
i3Support = true;
|
||
|
pulseSupport = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
allowUnfree = true;
|
||
|
};
|
||
|
|
||
|
}
|