334 lines
10 KiB
Nix
334 lines
10 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
imports =
|
|
[
|
|
./hardware-configuration.nix
|
|
./mail.nix
|
|
./ipfs.nix
|
|
#./ipv6.nix
|
|
];
|
|
|
|
boot = {
|
|
loader = {
|
|
systemd-boot.enable = true;
|
|
efi.canTouchEfiVariables = true;
|
|
};
|
|
|
|
cleanTmpDir = true;
|
|
initrd.supportedFilesystems = [ "btrfs" ];
|
|
supportedFilesystems = [ "btrfs" ];
|
|
tmpOnTmpfs = true;
|
|
|
|
};
|
|
|
|
environment = {
|
|
variables.EDITOR = pkgs.lib.mkOverride 10 "vim"; # vim is my default editor
|
|
shells = [ pkgs.zsh ];
|
|
systemPackages = with pkgs; [
|
|
(import ./vim.nix)
|
|
arandr
|
|
chromium
|
|
crda # WiFi regulatory domains
|
|
gimp
|
|
lemonbar
|
|
git
|
|
(pkgs.lib.mkOverride 10 st) # patched, see at the end of this file
|
|
gnumeric
|
|
mpv
|
|
nethogs
|
|
optipng
|
|
pavucontrol
|
|
qutebrowser
|
|
stow
|
|
unzip
|
|
wget
|
|
zathura
|
|
];
|
|
};
|
|
|
|
hardware = {
|
|
bluetooth.enable = false;
|
|
cpu.intel.updateMicrocode = true;
|
|
pulseaudio = {
|
|
enable = true;
|
|
package = pkgs.pulseaudioLight;
|
|
};
|
|
trackpoint.enable = true;
|
|
opengl.extraPackages = with pkgs; [ # These are imported by ocl-icd
|
|
beignet # intel gpu
|
|
intel-ocl # intel cpu
|
|
];
|
|
};
|
|
|
|
i18n = {
|
|
consoleFont = "Lat2-Terminus16";
|
|
consoleKeyMap = "fr-bepo";
|
|
defaultLocale = "en_US.UTF-8";
|
|
supportedLocales = [
|
|
"de_DE.UTF-8/UTF-8"
|
|
"en_US.UTF-8/UTF-8"
|
|
"fr_FR.UTF-8/UTF-8"
|
|
"fi_FI.UTF-8/UTF-8" ];
|
|
};
|
|
|
|
networking = {
|
|
firewall.enable = true;
|
|
hostName = "era";
|
|
extraHosts = ''
|
|
192.168.1.1 router
|
|
163.172.81.107 sahkopoika courriel.marvid.fr
|
|
163.172.25.159 protonpack
|
|
195.154.102.65 kromuniste
|
|
192.168.158.23 pimusicbox
|
|
'';
|
|
networkmanager.enable = false;
|
|
|
|
# wireless configs are stored in /etc/wpa_supplicant.conf
|
|
wireless = {
|
|
enable = true;
|
|
interfaces = [ "wlo1" ];
|
|
userControlled.enable = true;
|
|
};
|
|
};
|
|
|
|
# Test (can be removed)
|
|
nix.useSandbox = true;
|
|
|
|
programs = {
|
|
bash.enableCompletion = true;
|
|
zsh.enable = true;
|
|
zsh.enableCompletion = true;
|
|
adb.enable = true;
|
|
mosh.enable = true;
|
|
tmux.enable = true;
|
|
chromium = {
|
|
enable = true;
|
|
defaultSearchProviderSearchURL = "https://duckduckgo.com/?q={searchTerms}";
|
|
defaultSearchProviderSuggestURL = null;
|
|
extensions = [
|
|
"ihlenndgcmojhcghmfjfneahoeklbjjh" # cVim
|
|
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin
|
|
];
|
|
extraOpts = {
|
|
AlternateErrorPagesEnabled = false;
|
|
AlwaysOpenPdfExternally = true;
|
|
AutoFillEnabled = false;
|
|
BackgroundModeEnabled = false;
|
|
BlockThirdPartyCookies = true;
|
|
BookmarkBarEnabled = false;
|
|
BrowserAddPersonEnabled = false;
|
|
BrowserGuestModeEnabled = false;
|
|
BuiltInDnsClientEnabled = false;
|
|
CloudPrintProxyEnabled = false;
|
|
CloudPrintSubmitEnabled = false;
|
|
ContextualSearchEnabled = false;
|
|
DefaultBrowserSettingEnabled = false;
|
|
DefaultGeolocationSetting = 2;
|
|
DownloadDirectory = "/tmp";
|
|
NTPContentSuggestionsEnabled = false;
|
|
NetworkPredictionOptions = 2;
|
|
PasswordManagerEnabled = false;
|
|
SearchSuggestEnabled = false;
|
|
SpellCheckServiceEnabled = false;
|
|
TranslateEnabled = false;
|
|
};
|
|
};
|
|
};
|
|
|
|
security = {
|
|
sud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KrnSNHRBRyrCvmVM75Ke9KNrAen/R9HjVJ2CIo=
|
|
-----END CERTIFICATE-----
|
|
'' ];
|
|
};
|
|
|
|
|
|
services = {
|
|
avahi.enable = false; # for cups printer discovery
|
|
udev.packages = with pkgs; [ crda ];
|
|
peerflix = {
|
|
enable = true;
|
|
stateDir = "/tmp/peerflix";
|
|
};
|
|
cron.enable = false;
|
|
nixosManual.enable = false;
|
|
printing = {
|
|
enable = true;
|
|
drivers = with pkgs; [
|
|
dell-530cdn # dell 5130cdn (typo)
|
|
cups-toshiba-estudio # Yay, my pull request has been accepted
|
|
hplip
|
|
];
|
|
};
|
|
|
|
redshift = {
|
|
enable = true;
|
|
latitude = "48.8534100";
|
|
longitude = "2.3488000";
|
|
};
|
|
|
|
openssh = {
|
|
enable = true;
|
|
permitRootLogin = "no";
|
|
passwordAuthentication = false;
|
|
startWhenNeeded = true;
|
|
};
|
|
|
|
openvpn.servers.era = {
|
|
autoStart = false;
|
|
updateResolvConf = true;
|
|
config = builtins.readFile ./era.ovpn; # Pas top ._.
|
|
};
|
|
|
|
xserver = {
|
|
enable = true;
|
|
layout = "fr";
|
|
xkbVariant = "bepo";
|
|
autorun = true;
|
|
displayManager = {
|
|
sessionCommands = ''
|
|
xset r rate 200 75
|
|
xrandr --output eDP1 --mode 1920x1080
|
|
sh /home/eeva/.fehbg
|
|
mkdir -p /tmp/monitors
|
|
'';
|
|
slim.theme = pkgs.fetchurl {
|
|
url = http://marvid.fr/~eeva/mirror/slim-theme-solarized-debian.tar.bz2;
|
|
sha256 = "e792886a39b97bed0cb1022bec381806b0ca1dcc726b093187231bd1902acd49";
|
|
};
|
|
};
|
|
|
|
libinput = {
|
|
enable = true;
|
|
disableWhileTyping = true;
|
|
};
|
|
#synaptics = {
|
|
# enable = true;
|
|
# palmDetect = true;
|
|
# twoFingerScroll = true;
|
|
#};
|
|
|
|
videoDrivers = [ "intel" "modesetting" ];
|
|
#videoDrivers = [ "amdgpu" "intel" "modsetting" ]; # I wish
|
|
|
|
windowManager.xmonad = {
|
|
enable = true;
|
|
enableContribAndExtras = true;
|
|
};
|
|
desktopManager.xterm.enable = false;
|
|
};
|
|
};
|
|
|
|
|
|
systemd.mounts = [
|
|
{ what = "/dev/sdb1";
|
|
where = "/mnt/usb1";
|
|
mountConfig = {
|
|
TimeoutSec = "1";
|
|
Options = "uid=eeva";
|
|
};
|
|
}
|
|
];
|
|
systemd.automounts = [
|
|
{ where = "/mnt/usb1";
|
|
automountConfig = { TimeoutIdleSec = "1"; };
|
|
wantedBy = [ "default.target" ];
|
|
}
|
|
];
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
users = {
|
|
extraUsers.eeva = {
|
|
isNormalUser = true;
|
|
home = "/home/eeva";
|
|
extraGroups = [ "wheel" ];
|
|
shell = pkgs.zsh;
|
|
uid = 1000;
|
|
};
|
|
|
|
mutableUsers = true; # Need this to change passwords.
|
|
motd = "Death to the DeathStar";
|
|
};
|
|
|
|
# Rasvaton / Fet-fri
|
|
nix.gc.automatic = true;
|
|
nix.gc.options = "--delete-older-than 1w";
|
|
nix.gc.dates = "02:22";
|
|
|
|
# Upgrade when possible
|
|
system.autoUpgrade.enable = true;
|
|
system.stateVersion = "17.03";
|
|
|
|
## Special config
|
|
nixpkgs.overlays = [ (self: super: {
|
|
st = super.st.override {
|
|
patches = builtins.map super.fetchurl [
|
|
{ url = "http://st.suckless.org/patches/st-no_bold_colors-20160727-308bfbf.diff";
|
|
sha256 = "2e8cdbeaaa79ed067ffcfdcf4c5f09fb5c8c984906cde97226d4dd219dda39dc";
|
|
}
|
|
{ url = "http://st.suckless.org/patches/st-solarized-both-20160727-308bfbf.diff";
|
|
sha256 = "b7b25ba01b7ae87ec201ebbb1bf82742d5979788ecc6773a356eebe7d90a9703";
|
|
}
|
|
];
|
|
};
|
|
cups-filters = super.callPackage /home/eeva/pkgs/cups-filters {};
|
|
})
|
|
];
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
}
|