# 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. ./hardware-configuration.nix ./services.nix ./extra_hw.nix ./gnome.nix ./nitrokey.nix ]; boot = { loader.systemd-boot.enable = true; loader.grub.efiSupport = true; loader.grub.efiInstallAsRemovable = true; loader.grub.device = "nodev"; plymouth.enable = true; tmp.cleanOnBoot = true ; kernelParams = [ "i915.enable_fbc=1" ]; }; networking = { hostName = "d2nix"; # Define your hostname. networkmanager.enable = true; firewall.enable = true; }; # Set your time zone. time.timeZone = "Europe/Paris"; 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 inconsolata terminus_font proggyfonts dejavu_fonts font-awesome nerdfonts source-code-pro source-sans-pro source-serif-pro iosevka roboto-mono fira-code ]; }; #sound.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. users = { groups.ntp = {}; defaultUserShell = "/run/current-system/sw/bin/fish"; extraUsers.alexandre = { isNormalUser = true; home = "/home/alexandre"; description = "alexandre"; extraGroups = [ "wheel" "networkmanager" "docker" "libvirtd" "scanner" "plocate" "lp" ]; packages = with pkgs; [ #firefox gitAndTools.gitFull ]; }; extraUsers.oem = { isNormalUser = true; home = "/home/oem"; description = "oem"; extraGroups = [ "wheel" "networkmanager" ]; }; }; environment.variables = { EDITOR = "nvim"; BROWSER = "firefox"; LESS = "--quit-if-one-screen --RAW-CONTROL-CHARS"; TERMINAL = "xfce4-terminal"; PRIVATE_BROWSER = "firefox -private"; }; security = { rtkit.enable = true; # for pipewire apparmor.enable = true; pam = { u2f = { enable = true; control = "requisite"; }; services = { login.u2fAuth = true; lightdm.u2fAuth = true; gdm.u2fAuth = true; }; }; }; nix.settings.experimental-features = [ "nix-command" "flakes" ]; nixpkgs.config = { allowUnfree = true; }; nix.settings.auto-optimise-store = true; nix.gc = { automatic = true; dates = "weekly"; persistent = true; options = "--delete-older-than 10d"; }; programs = { htop = { enable = true; settings.show_cpu_temperature = 1; }; fish = { enable = true; interactiveShellInit = '' set -gx EDITOR nvim ''; 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"; # nvim = "nvim -u ~/.config/nvim/init.lua"; }; }; }; environment.systemPackages = with pkgs; [ neovim bat lsd pam_u2f gsmartcontrol lm_sensors wezterm ]; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.gnupg.agent = { # enable = true; # enableSSHSupport = true; # }; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It's perfectly fine and recommended to leave # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.05"; # Did you read the comment? nixpkgs.config.packageOverrides = pkgs: { nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { inherit pkgs; }; }; }