Initial config
This commit is contained in:
commit
09e3cc520a
1 changed files with 305 additions and 0 deletions
305
configuration.nix
Normal file
305
configuration.nix
Normal file
|
|
@ -0,0 +1,305 @@
|
|||
# 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, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
|
||||
in {
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
<nixos-hardware/lenovo/thinkpad/x1-extreme/gen4>
|
||||
./hardware-configuration.nix
|
||||
<home-manager/nixos>
|
||||
];
|
||||
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.extraEntries = {
|
||||
"fedora.conf" = ''
|
||||
title Fedora
|
||||
efi /EFI/fedora/grubx64.efi
|
||||
'';
|
||||
};
|
||||
boot.loader.systemd-boot.configurationLimit = 10;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.plymouth.enable = true;
|
||||
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
networking.hostName = "lyes-nix"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
networking.nameservers = [
|
||||
"1.1.1.1#one.one.one.one"
|
||||
"1.0.0.1#one.one.one.one"
|
||||
"9.9.9.9"
|
||||
"149.112.112.112"
|
||||
"2620:fe::fe"
|
||||
"2620:fe::9"
|
||||
];
|
||||
|
||||
services.resolved = {
|
||||
enable = true;
|
||||
dnssec = "true";
|
||||
domains = [ "~." ];
|
||||
fallbackDns = [
|
||||
"1.1.1.1#one.one.one.one"
|
||||
"1.0.0.1#one.one.one.one"
|
||||
"9.9.9.9"
|
||||
"149.112.112.112"
|
||||
"2620:fe::fe"
|
||||
"2620:fe::9"
|
||||
];
|
||||
extraConfig = ''
|
||||
DNSOverTLS=yes
|
||||
'';
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Paris";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "fr_FR.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
#keyMap = "fr";
|
||||
useXkbConfig = true; # use xkbOptions in tty.
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
programs.xwayland.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.layout = "fr";
|
||||
services.xserver.xkbVariant = "oss";
|
||||
# services.xserver.xkbOptions = {
|
||||
# "eurosign:e";
|
||||
# "caps:escape" # map caps to escape.
|
||||
# };
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
services.avahi.enable = true;
|
||||
services.avahi.nssmdns = true;
|
||||
# for a WiFi printer
|
||||
services.avahi.openFirewall = true;
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = false;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
#jack.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.xserver.libinput.enable = true;
|
||||
|
||||
services.mozillavpn.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.lyes = {
|
||||
description = "Lyes Saadi";
|
||||
home = "/home/lyes";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
shell = pkgs.fish;
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
thunderbird
|
||||
ocaml
|
||||
starship
|
||||
fprintd
|
||||
adw-gtk3
|
||||
home-manager
|
||||
git
|
||||
nodejs
|
||||
gnome.gnome-tweaks
|
||||
joycond
|
||||
citra-canary
|
||||
ledit
|
||||
paper-icon-theme
|
||||
steam
|
||||
minecraft
|
||||
gnomeExtensions.gsconnect
|
||||
gnome-extension-manager
|
||||
mpv
|
||||
vlc
|
||||
yt-dlp
|
||||
discord
|
||||
toolbox
|
||||
distrobox
|
||||
pandoc
|
||||
texlive.combined.scheme-medium
|
||||
wl-clipboard
|
||||
pipewire.dev
|
||||
pulseaudio
|
||||
nix-index
|
||||
appimage-run
|
||||
hplipWithPlugin
|
||||
syncplay
|
||||
direnv
|
||||
libopus
|
||||
unstable.protonmail-bridge-gui
|
||||
dropbox
|
||||
vvvvvv
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.lyes = { pkgs, ... }: {
|
||||
home.stateVersion = "22.11";
|
||||
};
|
||||
|
||||
services.fprintd.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
services.joycond.enable = true;
|
||||
zramSwap.enable = true;
|
||||
|
||||
programs.fish.enable = true;
|
||||
programs.fish.promptInit = ''
|
||||
any-nix-shell fish --info-right | source
|
||||
'';
|
||||
environment.shells = with pkgs; [ fish ];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
helix
|
||||
wget
|
||||
ripgrep
|
||||
eza
|
||||
bat
|
||||
pciutils
|
||||
man-pages
|
||||
man-pages-posix
|
||||
qemu
|
||||
virt-manager
|
||||
python3
|
||||
any-nix-shell
|
||||
];
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||
];
|
||||
|
||||
fontDir.enable = true;
|
||||
};
|
||||
|
||||
documentation.enable = true;
|
||||
documentation.man.enable = true;
|
||||
documentation.dev.enable = true;
|
||||
documentation.nixos.enable = true;
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
# Modesetting is needed for most wayland compositors
|
||||
modesetting.enable = true;
|
||||
|
||||
# Use the open source version of the kernel module
|
||||
# Only available on driver 515.43.04+
|
||||
open = true;
|
||||
|
||||
# Enable the nvidia settings menu
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
virtualisation.containers.enable = true;
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
extraPackages = [ pkgs.zfs ];
|
||||
enableNvidia = true;
|
||||
};
|
||||
};
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 24872 8998 ];
|
||||
networking.firewall.allowedUDPPorts = [ 24872 8998 ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
#services.syncplay = {
|
||||
# enable = true;
|
||||
# port = 8998;
|
||||
# extraArgs = [ "--password pouicbarilstepson123cassoulet" ];
|
||||
#};
|
||||
|
||||
fileSystems = {
|
||||
"/".options = [ "compress=zstd:1" ];
|
||||
"/home".options = [ "compress=zstd:1" ];
|
||||
"/nix".options = [ "compress=zstd:1" "noatime" ];
|
||||
};
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
system.copySystemConfiguration = 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 = "22.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue