Typo
This commit is contained in:
parent
b92a5da1e5
commit
b298cafeca
9 changed files with 4 additions and 4 deletions
38
general/configuration.nix
Normal file
38
general/configuration.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./packages.nix
|
||||
./system.nix
|
||||
./networking.nix
|
||||
./user/user.nix
|
||||
./specialisation.nix
|
||||
./gaming.nix
|
||||
];
|
||||
|
||||
# Fails for some reason
|
||||
documentation.nixos.enable = false;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
nix.optimise.automatic = true;
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
# 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?
|
||||
}
|
||||
12
general/gaming.nix
Normal file
12
general/gaming.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.steam.enable = true;
|
||||
programs.steam.gamescopeSession.enable = true;
|
||||
programs.gamemode.enable = true;
|
||||
|
||||
users.users.lyes.packages = with pkgs; [
|
||||
mangohud
|
||||
protonup
|
||||
];
|
||||
}
|
||||
46
general/networking.nix
Normal file
46
general/networking.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
# Networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
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
|
||||
'';
|
||||
};
|
||||
|
||||
# Firewall
|
||||
networking.firewall.allowedTCPPorts = [ 24872 8998 ];
|
||||
networking.firewall.allowedUDPPorts = [ 24872 8998 ];
|
||||
#networking.firewall.enable = false;
|
||||
|
||||
# Network services
|
||||
#services.openssh.enable = true;
|
||||
|
||||
#services.syncplay = {
|
||||
# enable = true;
|
||||
# port = 8998;
|
||||
# extraArgs = [ "--password pouicbarilstepson123cassoulet" ];
|
||||
#};
|
||||
}
|
||||
45
general/packages.nix
Normal file
45
general/packages.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Utilities
|
||||
neovim
|
||||
helix
|
||||
wget
|
||||
ripgrep
|
||||
eza
|
||||
bat
|
||||
pciutils
|
||||
man-pages
|
||||
man-pages-posix
|
||||
python3
|
||||
any-nix-shell
|
||||
libcgroup
|
||||
|
||||
# Virtualization
|
||||
qemu
|
||||
virt-manager
|
||||
|
||||
# Printing
|
||||
hplipWithPlugin
|
||||
];
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-lgc-plus
|
||||
noto-fonts-emoji
|
||||
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||
];
|
||||
|
||||
fontDir.enable = true;
|
||||
};
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
}
|
||||
43
general/specialisation.nix
Normal file
43
general/specialisation.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
specialisation = {
|
||||
gaming.configuration = {
|
||||
hardware.nvidia = {
|
||||
prime.sync.enable = lib.mkForce true;
|
||||
prime.offload = {
|
||||
enable = lib.mkForce false;
|
||||
enableOffloadCmd = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
kde.configuration = {
|
||||
# GNOME
|
||||
services.xserver.displayManager.gdm.enable = lib.mkForce false;
|
||||
services.xserver.desktopManager.gnome.enable = lib.mkForce false;
|
||||
|
||||
# KDE
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.displayManager.sddm.enable = true;
|
||||
};
|
||||
|
||||
kde-gaming.configuration = {
|
||||
hardware.nvidia = {
|
||||
prime.sync.enable = lib.mkForce true;
|
||||
prime.offload = {
|
||||
enable = lib.mkForce false;
|
||||
enableOffloadCmd = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
|
||||
# GNOME
|
||||
services.xserver.displayManager.gdm.enable = lib.mkForce false;
|
||||
services.xserver.desktopManager.gnome.enable = lib.mkForce false;
|
||||
|
||||
# KDE
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.displayManager.sddm.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
121
general/system.nix
Normal file
121
general/system.nix
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# OS Configuration
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.configurationLimit = 10;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.plymouth.enable = true;
|
||||
boot.kernelParams = [ "quiet" ];
|
||||
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
zramSwap.enable = true;
|
||||
|
||||
# Firmware
|
||||
services.fwupd.enable = true;
|
||||
services.fprintd.enable = true;
|
||||
security.pam.services.login.fprintAuth = false;
|
||||
security.pam.services.gdm-fingerprint.text = ''
|
||||
auth required pam_shells.so
|
||||
auth requisite pam_nologin.so
|
||||
auth requisite pam_faillock.so preauth
|
||||
auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
||||
auth optional pam_permit.so
|
||||
auth required pam_env.so
|
||||
auth [success=ok default=1] ${pkgs.gnome.gdm}/lib/security/pam_gdm.so
|
||||
auth optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so
|
||||
|
||||
account include login
|
||||
|
||||
password required pam_deny.so
|
||||
|
||||
session include login
|
||||
session optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start
|
||||
'';
|
||||
|
||||
# Time
|
||||
time.timeZone = "Europe/Paris";
|
||||
|
||||
# Keyboard & Touchpad
|
||||
i18n.defaultLocale = "fr_FR.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
#keyMap = "fr";
|
||||
useXkbConfig = true;
|
||||
};
|
||||
|
||||
services.xserver.xkb.layout = "fr";
|
||||
services.xserver.xkb.variant = "oss";
|
||||
|
||||
services.libinput.enable = true;
|
||||
|
||||
# Printing
|
||||
services.printing.enable = true;
|
||||
services.avahi.enable = true;
|
||||
services.avahi.nssmdns4 = true;
|
||||
services.avahi.openFirewall = true;
|
||||
|
||||
# Shell
|
||||
programs.fish.enable = true;
|
||||
programs.fish.promptInit = ''
|
||||
any-nix-shell fish --info-right | source
|
||||
'';
|
||||
environment.shells = with pkgs; [ fish ];
|
||||
|
||||
# # Environment Variables
|
||||
# environment.sessionVariables = {
|
||||
# ELECTRON_OZONE_PLATFORM_HINT = "wayland";
|
||||
# GTK_USE_PORTAL = "1";
|
||||
# };
|
||||
|
||||
# Graphics
|
||||
services.xserver.enable = true;
|
||||
programs.xwayland.enable = true;
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# GNOME
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
# KDE
|
||||
# services.desktopManager.plasma6.enable = true;
|
||||
# programs.ssh.askPassword = lib.mkForce "${pkgs.gnome.seahorse}/libexec/seahorse/ssh-askpass";
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
services.joycond.enable = true;
|
||||
|
||||
# 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;
|
||||
};
|
||||
|
||||
# Documentation
|
||||
documentation.enable = true;
|
||||
documentation.man.enable = true;
|
||||
documentation.dev.enable = true;
|
||||
# Fails for some reason
|
||||
documentation.nixos.enable = false;
|
||||
|
||||
# Virtualisation
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
# Containers
|
||||
virtualisation.containers.enable = true;
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
extraPackages = [ pkgs.zfs ];
|
||||
};
|
||||
}
|
||||
31
general/user/home.nix
Normal file
31
general/user/home.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
# Git config
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Lyes Saadi";
|
||||
userEmail = "dev@lyes.eu";
|
||||
signing = {
|
||||
key = "17418538BAA17767";
|
||||
signByDefault = true;
|
||||
};
|
||||
extraConfig = {
|
||||
code.editor = "nvim";
|
||||
merge.tool = "nvim";
|
||||
color.ui = true;
|
||||
init.defaultBranch = "main";
|
||||
includeIf = {
|
||||
"gitdir:~/Documents/fedpkg/" = {
|
||||
path = "~/Documents/fedpkg/.gitconfig_include";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Protonup config
|
||||
home.sessionVariables = {
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS =
|
||||
"\${HOME}/.steam/root/compatibilitytools.d";
|
||||
};
|
||||
}
|
||||
185
general/user/packages.nix
Normal file
185
general/user/packages.nix
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
let
|
||||
tex = (pkgs.texlive.combine { inherit (pkgs.texlive)
|
||||
scheme-medium
|
||||
lettre
|
||||
wallpaper
|
||||
lastpage
|
||||
hyphenat
|
||||
moresize
|
||||
fontawesome5
|
||||
montserrat
|
||||
titlesec
|
||||
ly1;
|
||||
});
|
||||
in {
|
||||
users.users.lyes.packages = with pkgs; [
|
||||
# Web
|
||||
firefox
|
||||
fragments
|
||||
dropbox
|
||||
varia
|
||||
filezilla
|
||||
whatip
|
||||
|
||||
# Messaging
|
||||
thunderbird
|
||||
discord
|
||||
vesktop
|
||||
whatsapp-for-linux
|
||||
element-desktop
|
||||
fractal
|
||||
zoom-us
|
||||
|
||||
# Image
|
||||
drawing
|
||||
gimp
|
||||
loupe
|
||||
snapshot
|
||||
|
||||
# Video
|
||||
mpv
|
||||
vlc
|
||||
syncplay
|
||||
obs-studio
|
||||
yt-dlp
|
||||
handbrake
|
||||
kooha
|
||||
video-trimmer
|
||||
|
||||
# Audio
|
||||
shortwave
|
||||
gnome-podcasts
|
||||
helvum
|
||||
|
||||
# Reading
|
||||
calibre
|
||||
|
||||
# Utilities
|
||||
impression
|
||||
resources
|
||||
gnome.file-roller
|
||||
baobab
|
||||
|
||||
# Proton
|
||||
protonmail-bridge-gui
|
||||
protonvpn-gui
|
||||
|
||||
# Customization
|
||||
gnome.gnome-tweaks
|
||||
gnome-extension-manager
|
||||
|
||||
# Games
|
||||
heroic
|
||||
# citra-canary
|
||||
cemu
|
||||
minecraft
|
||||
vvvvvv
|
||||
ryujinx
|
||||
|
||||
# Nix
|
||||
home-manager
|
||||
nix-index
|
||||
direnv
|
||||
|
||||
# Commandline
|
||||
starship
|
||||
wl-clipboard
|
||||
|
||||
# System
|
||||
gnome-firmware
|
||||
|
||||
# Customization
|
||||
adw-gtk3
|
||||
paper-icon-theme
|
||||
gnomeExtensions.gsconnect
|
||||
|
||||
# Programming
|
||||
git
|
||||
git-lfs
|
||||
vscode
|
||||
ocaml
|
||||
ledit
|
||||
nodejs
|
||||
nil
|
||||
|
||||
# Containers
|
||||
toolbox
|
||||
distrobox
|
||||
|
||||
# Office
|
||||
libreoffice
|
||||
onlyoffice-bin
|
||||
hunspell
|
||||
hunspellDicts.fr-reforme1990
|
||||
hunspellDicts.en_US
|
||||
hunspellDicts.en_GB-ize
|
||||
|
||||
# Note taking
|
||||
apostrophe
|
||||
setzer
|
||||
tex
|
||||
pandoc
|
||||
|
||||
# Multimedia
|
||||
pipewire.dev
|
||||
pulseaudio
|
||||
libopus
|
||||
];
|
||||
|
||||
# Flatpaks
|
||||
services.flatpak = lib.mkIf (config?services.flatpak.packages) {
|
||||
remotes = lib.mkOptionDefault [{
|
||||
name = "gnome-nightly";
|
||||
location = "https://nightly.gnome.org/gnome-nightly.flatpakrepo";
|
||||
}];
|
||||
|
||||
packages = [
|
||||
# Web
|
||||
"org.gnome.Epiphany"
|
||||
|
||||
# Video
|
||||
"org.nickvision.tubeconverter"
|
||||
|
||||
# Reading
|
||||
"com.github.johnfactotum.Foliate"
|
||||
|
||||
# Science
|
||||
"com.github.alexhuntley.Plots"
|
||||
|
||||
# Office
|
||||
"com.belmoussaoui.Obfuscate"
|
||||
"com.github.muriloventuroso.pdftricks"
|
||||
"com.github.flxzt.rnote"
|
||||
"com.github.jeromerobert.pdfarranger"
|
||||
|
||||
# Utilities
|
||||
"com.belmoussaoui.Decoder"
|
||||
"io.github.nokse22.minitext"
|
||||
"org.gnome.World.PikaBackup"
|
||||
|
||||
# Customization
|
||||
"ca.desrt.dconf-editor"
|
||||
"app.drey.Damask"
|
||||
"com.github.GradienceTeam.Gradience"
|
||||
"com.github.tchx84.Flatseal"
|
||||
|
||||
# Games
|
||||
"com.usebottles.bottles"
|
||||
"dev.tchx84.Gameeky"
|
||||
"dev.tchx84.Gameeky.ThematicPack.FreedomValley"
|
||||
"dev.tchx84.Gameeky.ThematicPack.Blasterman"
|
||||
"dev.tchx84.Gameeky.ThematicPack.Wackman"
|
||||
{ appId = "org.DolphinEmu.dolphin-emu"; commit = "187e367202f4ec0a50b94d700aa50c04142d13561e3054fcf1030380d3ae86a6"; }
|
||||
"org.prismlauncher.PrismLauncher"
|
||||
|
||||
# Programming
|
||||
{ appId = "org.gnome.Builder.Devel"; origin = "gnome-nightly"; }
|
||||
];
|
||||
|
||||
uninstallUnmanaged = true;
|
||||
update.onActivation = true;
|
||||
update.auto.enable = true;
|
||||
};
|
||||
}
|
||||
32
general/user/user.nix
Normal file
32
general/user/user.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ pkgs, home-manager, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./packages.nix
|
||||
home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
users.users.lyes = {
|
||||
description = "Lyes Saadi";
|
||||
home = "/home/lyes";
|
||||
isNormalUser = true;
|
||||
initialHashedPassword = ""; # Set for vms and initial installations
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.users.lyes = { pkgs, ... }: {
|
||||
imports =
|
||||
[
|
||||
./home.nix
|
||||
];
|
||||
|
||||
home.username = "lyes";
|
||||
home.homeDirectory = "/home/lyes";
|
||||
|
||||
home.stateVersion = "22.11";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue