nixos-config/hosts/dell-5590/nixos/configuration.nix

207 lines
4.9 KiB
Nix
Raw Normal View History

2021-12-16 13:04:27 +00:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
./hardware-configuration.nix
./services.nix
./packages.nix
2023-01-08 13:22:17 +00:00
# ./vpn.nix
# ./VPN.nix
2022-08-05 12:16:06 +00:00
../modules/prometheus-node.nix
../modules/syncthing.nix
2021-12-16 13:04:27 +00:00
];
# Use the systemd-boot EFI boot loader.
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
programs = {
zsh.enable = true;
htop = {
enable = true;
settings.show_cpu_temperature = 1;
};
2022-10-15 16:04:27 +00:00
fish = {
enable = true;
shellAliases = {
ll = "ls -l";
ls = "lsd";
cat = "bat";
sysrs = "sudo nixos-rebuild switch";
sysup = "sudo nixos-rebuild switch --upgrade";
sysclean = "sudo nix-collect-garbage -d; and sudo nix-store --optimise";
};
};
ssh = {
setXAuthLocation = true;
forwardX11 = true;
};
};
sound.enable = true;
# hardware
hardware = {
logitech = {
wireless.enable = true;
wireless.enableGraphical = true;
};
pulseaudio = {
enable = true;
extraConfig =''
load-module module-switch-on-connect
2023-01-08 13:22:17 +00:00
extraModules = [ pkgs.pulseaudio-modules-bt ];
'';
2023-01-08 13:22:17 +00:00
package = pkgs.pulseaudioFull;
};
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
];
};
};
2021-12-16 13:04:27 +00:00
# Video acceleration
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
2022-02-10 15:09:13 +00:00
2021-12-16 13:04:27 +00:00
security = {
apparmor.enable = true;
pam = {
u2f = {
enable = true;
control = "requisite";
};
services = {
login.u2fAuth = true;
lightdm.u2fAuth = true;
};
};
};
2021-12-16 13:04:27 +00:00
networking.hostName = "Alexos"; # Define your hostname.
# Set your time zone.
time.timeZone = "Europe/Paris";
networking = {
dhcpcd.enable = true;
networkmanager = {
enable = true;
unmanaged = [ "interface-name:ve-*" ];
};
2023-06-12 12:30:21 +00:00
firewall = {
enable = true;
allowedTCPPorts = [ 24800 6600 1194 ];
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
};
2021-12-16 13:04:27 +00:00
};
i18n.defaultLocale = "fr_FR.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "fr";
};
fonts = {
fontDir.enable = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
corefonts
vistafonts
powerline-fonts
2021-12-16 13:04:27 +00:00
inconsolata
terminus_font
proggyfonts
dejavu_fonts
font-awesome
nerdfonts
source-code-pro
source-sans-pro
source-serif-pro
2022-09-14 18:08:11 +00:00
iosevka
roboto-mono
fira-code
2021-12-16 13:04:27 +00:00
];
};
2023-06-12 12:30:21 +00:00
nix.settings.auto-optimise-store = true;
2023-06-05 11:43:03 +00:00
nix.gc = {
automatic = true;
dates = "weekly";
persistent = true;
options = "--delete-older-than 10d";
};
# clean /tmp at boot
UPGRADE TO 23.05 renommé : hosts/dell-5590/nixpkgs/VPN.conf -> hosts/dell-5590/home-manager/VPN.conf renommé : hosts/dell-5590/nixpkgs/bat.nix -> hosts/dell-5590/home-manager/bat.nix renommé : hosts/dell-5590/nixpkgs/bat/default.nix -> hosts/dell-5590/home-manager/bat/default.nix renommé : hosts/dell-5590/nixpkgs/colorschemes/nord.theme -> hosts/dell-5590/home-manager/colorschemes/nord.theme renommé : hosts/dell-5590/nixpkgs/configs/.mbsyncrc -> hosts/dell-5590/home-manager/configs/.mbsyncrc renommé : hosts/dell-5590/nixpkgs/configs/i3config -> hosts/dell-5590/home-manager/configs/i3config nouveau fichier : hosts/dell-5590/home-manager/configs/i3status-rust.toml renommé : hosts/dell-5590/nixpkgs/configs/init.el -> hosts/dell-5590/home-manager/configs/init.el nouveau fichier : hosts/dell-5590/home-manager/configs/init.el-bak renommé : hosts/dell-5590/nixpkgs/configs/msmtp_config -> hosts/dell-5590/home-manager/configs/msmtp_config renommé : hosts/dell-5590/nixpkgs/configs/nextcloud.cfg -> hosts/dell-5590/home-manager/configs/nextcloud.cfg renommé : hosts/dell-5590/nixpkgs/configs/xfce4/terminal/accels.scm -> hosts/dell-5590/home-manager/configs/xfce4/terminal/accels.scm renommé : hosts/dell-5590/nixpkgs/configs/xfce4/terminal/colorschemes/nord.theme -> hosts/dell-5590/home-manager/configs/xfce4/terminal/colorschemes/nord.theme renommé : hosts/dell-5590/nixpkgs/configs/xfce4/terminal/terminalrc -> hosts/dell-5590/home-manager/configs/xfce4/terminal/terminalrc renommé : hosts/dell-5590/nixpkgs/configs/zellij -> hosts/dell-5590/home-manager/configs/zellij renommé : hosts/dell-5590/nixpkgs/dunst.nix -> hosts/dell-5590/home-manager/dunst.nix renommé : hosts/dell-5590/nixpkgs/emacs.nix -> hosts/dell-5590/home-manager/emacs.nix renommé : hosts/dell-5590/nixpkgs/git.nix -> hosts/dell-5590/home-manager/git.nix renommé : hosts/dell-5590/nixpkgs/gnupg.nix -> hosts/dell-5590/home-manager/gnupg.nix nouveau fichier : hosts/dell-5590/home-manager/home-manager renommé : hosts/dell-5590/nixpkgs/home.nix -> hosts/dell-5590/home-manager/home.nix nouveau fichier : hosts/dell-5590/home-manager/i3status.nix renommé : hosts/dell-5590/nixpkgs/kdeconnect.nix -> hosts/dell-5590/home-manager/kdeconnect.nix renommé : hosts/dell-5590/nixpkgs/mails.nix -> hosts/dell-5590/home-manager/mails.nix renommé : hosts/dell-5590/nixpkgs/packages.nix -> hosts/dell-5590/home-manager/packages.nix renommé : hosts/dell-5590/nixpkgs/redshift.nix -> hosts/dell-5590/home-manager/redshift.nix renommé : hosts/dell-5590/nixpkgs/starship.nix -> hosts/dell-5590/home-manager/starship.nix renommé : hosts/dell-5590/nixpkgs/terminalrc -> hosts/dell-5590/home-manager/terminalrc renommé : hosts/dell-5590/nixpkgs/variables.nix -> hosts/dell-5590/home-manager/variables.nix renommé : hosts/dell-5590/nixpkgs/xidlehook.nix -> hosts/dell-5590/home-manager/xidlehook.nix modifié : hosts/dell-5590/nixos/configuration.nix modifié : hosts/dell-5590/nixos/packages.nix modifié : hosts/dell-5590/nixos/services.nix supprimé : hosts/dell-5590/nixpkgs/i3status.nix modifié : modules/neovim.nix
2023-07-23 09:02:54 +00:00
boot.tmp.cleanOnBoot = true;
nixpkgs.config = {
allowUnfree = true;
};
2021-12-16 13:04:27 +00:00
system.stateVersion = "21.05"; # Did you read the comment?
2022-09-14 18:08:11 +00:00
environment.variables = {
EDITOR = "vim";
BROWSER = "firefox";
LESS = "--quit-if-one-screen --RAW-CONTROL-CHARS";
TERMINAL = "xfce4-terminal";
PRIVATE_BROWSER = "firefox -private";
};
UPGRADE TO 23.05 renommé : hosts/dell-5590/nixpkgs/VPN.conf -> hosts/dell-5590/home-manager/VPN.conf renommé : hosts/dell-5590/nixpkgs/bat.nix -> hosts/dell-5590/home-manager/bat.nix renommé : hosts/dell-5590/nixpkgs/bat/default.nix -> hosts/dell-5590/home-manager/bat/default.nix renommé : hosts/dell-5590/nixpkgs/colorschemes/nord.theme -> hosts/dell-5590/home-manager/colorschemes/nord.theme renommé : hosts/dell-5590/nixpkgs/configs/.mbsyncrc -> hosts/dell-5590/home-manager/configs/.mbsyncrc renommé : hosts/dell-5590/nixpkgs/configs/i3config -> hosts/dell-5590/home-manager/configs/i3config nouveau fichier : hosts/dell-5590/home-manager/configs/i3status-rust.toml renommé : hosts/dell-5590/nixpkgs/configs/init.el -> hosts/dell-5590/home-manager/configs/init.el nouveau fichier : hosts/dell-5590/home-manager/configs/init.el-bak renommé : hosts/dell-5590/nixpkgs/configs/msmtp_config -> hosts/dell-5590/home-manager/configs/msmtp_config renommé : hosts/dell-5590/nixpkgs/configs/nextcloud.cfg -> hosts/dell-5590/home-manager/configs/nextcloud.cfg renommé : hosts/dell-5590/nixpkgs/configs/xfce4/terminal/accels.scm -> hosts/dell-5590/home-manager/configs/xfce4/terminal/accels.scm renommé : hosts/dell-5590/nixpkgs/configs/xfce4/terminal/colorschemes/nord.theme -> hosts/dell-5590/home-manager/configs/xfce4/terminal/colorschemes/nord.theme renommé : hosts/dell-5590/nixpkgs/configs/xfce4/terminal/terminalrc -> hosts/dell-5590/home-manager/configs/xfce4/terminal/terminalrc renommé : hosts/dell-5590/nixpkgs/configs/zellij -> hosts/dell-5590/home-manager/configs/zellij renommé : hosts/dell-5590/nixpkgs/dunst.nix -> hosts/dell-5590/home-manager/dunst.nix renommé : hosts/dell-5590/nixpkgs/emacs.nix -> hosts/dell-5590/home-manager/emacs.nix renommé : hosts/dell-5590/nixpkgs/git.nix -> hosts/dell-5590/home-manager/git.nix renommé : hosts/dell-5590/nixpkgs/gnupg.nix -> hosts/dell-5590/home-manager/gnupg.nix nouveau fichier : hosts/dell-5590/home-manager/home-manager renommé : hosts/dell-5590/nixpkgs/home.nix -> hosts/dell-5590/home-manager/home.nix nouveau fichier : hosts/dell-5590/home-manager/i3status.nix renommé : hosts/dell-5590/nixpkgs/kdeconnect.nix -> hosts/dell-5590/home-manager/kdeconnect.nix renommé : hosts/dell-5590/nixpkgs/mails.nix -> hosts/dell-5590/home-manager/mails.nix renommé : hosts/dell-5590/nixpkgs/packages.nix -> hosts/dell-5590/home-manager/packages.nix renommé : hosts/dell-5590/nixpkgs/redshift.nix -> hosts/dell-5590/home-manager/redshift.nix renommé : hosts/dell-5590/nixpkgs/starship.nix -> hosts/dell-5590/home-manager/starship.nix renommé : hosts/dell-5590/nixpkgs/terminalrc -> hosts/dell-5590/home-manager/terminalrc renommé : hosts/dell-5590/nixpkgs/variables.nix -> hosts/dell-5590/home-manager/variables.nix renommé : hosts/dell-5590/nixpkgs/xidlehook.nix -> hosts/dell-5590/home-manager/xidlehook.nix modifié : hosts/dell-5590/nixos/configuration.nix modifié : hosts/dell-5590/nixos/packages.nix modifié : hosts/dell-5590/nixos/services.nix supprimé : hosts/dell-5590/nixpkgs/i3status.nix modifié : modules/neovim.nix
2023-07-23 09:02:54 +00:00
2021-12-16 13:04:27 +00:00
users = {
users.ntp.group = "ntp";
groups.ntp = {};
defaultUserShell = "/run/current-system/sw/bin/fish";
2023-02-14 09:05:06 +00:00
extraUsers.oem = {
isNormalUser = true;
home = "/home/oem";
description = "oem";
extraGroups = [ "wheel" "networkmanager" "plocate" ];
hashedPassword = "$6$TWZqEbF3s7f4Yx8s$xsUheHLM75u1IdvD/6AWnk9c8El2FgGiU5C4mnZddWl8hFaGF2nPojHqvj2l7muJwQ6c8f7A4MRpAKh7PezuN/";
};
2021-12-16 13:04:27 +00:00
extraUsers.alexandre = {
isNormalUser = true;
home = "/home/alexandre";
description = "alexandre";
extraGroups = [ "wheel" "networkmanager" "docker" "libvirtd" "qemu-libvirtd" "vboxusers" "scanner" "lp" "plocate" ];
2021-12-16 13:04:27 +00:00
hashedPassword = "$6$7m77oPQxa$W9YnRLo1X2eqztBHwpoH8diHGkBno5O39AMyL9Qm8y8I6uW63H2Nwx4p239OG5zhOxA8J1lZvHTQ3hKPSP9mT/";
};
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
2021-12-16 13:04:27 +00:00
}