diff --git a/systems/ASUS-G46VW/configuration.nix b/systems/ASUS-G46VW/configuration.nix index bec120c90..bf187681e 100644 --- a/systems/ASUS-G46VW/configuration.nix +++ b/systems/ASUS-G46VW/configuration.nix @@ -6,13 +6,12 @@ { imports = - [ # Include the results of the hardware scan. + [ + ../common.nix ./hardware-configuration.nix ]; nixpkgs.overlays = [ - (import ../../overlays/sudo.nix) - (import ../../overlays/neovim.nix) (import ../../overlays/steam.nix) (import ../../overlays/steamcontroller-udev-rules.nix) (import ../../overlays/ledger-udev-rules.nix) @@ -46,38 +45,17 @@ defaultLocale = "fr_FR.UTF-8"; }; - # Set your time zone. - time.timeZone = "Europe/Paris"; - # List packages installed in system profile. To search by name, run: # $ nix-env -qaP | grep wget nixpkgs.config.allowUnfree = true; environment.systemPackages = with pkgs; [ - gitFull - tig - neovim - usbutils filezilla - lftp wineStaging winetricks - youtube-dl - nix-bash-completions - nix-zsh-completions - python3Full - openvpn qbittorrent transmission-remote-gtk - yarn2nix - file - binutils - patchelf - gcc - nix-index appimage-run bat - wireguard - nfsUtils gopass xclip @@ -127,17 +105,9 @@ glxinfo i7z - lshw - nmap - nox obs-studio - sassc - telnet ]; - programs.tmux.enable = true; - programs.tmux.clock24 = true; - programs.wireshark.enable = true; programs.wireshark.package = pkgs.wireshark; @@ -210,18 +180,6 @@ uid = 1000; extraGroups = [ "wheel" "networkmanager" "wireshark" ]; }; - - users.defaultUserShell = pkgs.zsh; - programs.zsh.enable = true; - programs.zsh.autosuggestions.enable = true; - programs.zsh.enableCompletion = true; - programs.zsh.syntaxHighlighting.enable = true; - programs.zsh.ohMyZsh.enable = true; - programs.zsh.ohMyZsh.plugins = [ "git" "colored-man-pages" "command-not-found" "extract" ]; - programs.zsh.ohMyZsh.theme = "bureau"; - - nix.gc.automatic = true; - nix.gc.options = "--delete-older-than 15d"; services.syncthing.enable = true; services.syncthing.user = "paul"; diff --git a/systems/LoutreOS/configuration.nix b/systems/LoutreOS/configuration.nix index 5fe8a08b9..a15e8f892 100644 --- a/systems/LoutreOS/configuration.nix +++ b/systems/LoutreOS/configuration.nix @@ -6,6 +6,7 @@ { imports = [ + ../common.nix ./hardware-configuration.nix ./users.nix ./services.nix @@ -32,57 +33,13 @@ hostId = "7e66e347"; }; - time.timeZone = "Europe/Paris"; - nixpkgs.overlays = [ (import ../../overlays/riot-web.nix) - (import ../../overlays/sudo.nix) - (import ../../overlays/neovim.nix) (import ../../overlays/site-max.nix) (import ../../overlays/site-musique.nix) (import ../../overlays/dogetipbot-telegram.nix) (import ../../overlays/unstable_pkgs.nix) ]; - environment.systemPackages = with pkgs; [ - neovim - git - tmux - ncdu - beets - rclone - borgbackup - bind - tig - openssl - lftp - nix-prefetch-scripts - smartmontools - htop - telnet - tldr - fzf - file - ]; - - nixpkgs.config.allowUnfree = true; - - users.defaultUserShell = pkgs.zsh; - programs.zsh = { - enable = true; - enableAutosuggestions = true; - enableCompletion = true; - syntaxHighlighting.enable = true; - interactiveShellInit = '' - source "$(${pkgs.fzf}/bin/fzf-share)/key-bindings.zsh" - ''; - ohMyZsh = { - enable = true; - plugins = [ "git" "colored-man-pages" "command-not-found" "extract" ]; - theme = "bureau"; - }; - }; - - environment.variables = { EDITOR = "nvim"; }; services.openssh = { enable = true; @@ -101,8 +58,5 @@ system.autoUpgrade.enable = true; systemd.services.nixos-upgrade.path = with pkgs; [ gzip gnutar xz.bin config.nix.package.out ]; - nix.gc.automatic = true; - nix.gc.options = "--delete-older-than 15d"; - system.stateVersion = "18.03"; } diff --git a/systems/common.nix b/systems/common.nix new file mode 100644 index 000000000..c159b2ab8 --- /dev/null +++ b/systems/common.nix @@ -0,0 +1,83 @@ +{ config, pkgs, ... }: + +{ + + time.timeZone = "Europe/Paris"; + + nixpkgs.overlays = [ + (import ../overlays/sudo.nix) + (import ../overlays/neovim.nix) + ]; + + nixpkgs.config.allowUnfree = true; + environment.systemPackages = with pkgs; [ + # Editeurs + neovim + + # Gestionnaires de version + gitFull + tig + + # Gestion de paquets + nix-prefetch-scripts + nox + nix-index + + # Système + smartmontools + htop + lshw + usbutils + + # Réseau + telnet + rclone + lftp + wireguard + nfsUtils + nmap + + # Divers + fzf + file + ncdu + youtube-dl + tldr + + # Audio + beets + + # Outils + borgbackup + + # Développement + openssl + ]; + + programs.tmux = { + enable = true; + clock24 = true; + }; + + users.defaultUserShell = pkgs.zsh; + programs.zsh = { + enable = true; + enableAutosuggestions = true; + enableCompletion = true; + syntaxHighlighting.enable = true; + interactiveShellInit = '' + source "$(${pkgs.fzf}/bin/fzf-share)/key-bindings.zsh" + ''; + ohMyZsh = { + enable = true; + plugins = [ "git" "colored-man-pages" "command-not-found" "extract" ]; + theme = "bureau"; + }; + }; + + environment.variables = { EDITOR = "nvim"; }; + + nix.gc.automatic = true; + nix.gc.options = "--delete-older-than 15d"; + +}