From 0e866b1cb0ae58311b88dc3d1b91c344b90f4ddb Mon Sep 17 00:00:00 2001 From: Lyes Saadi Date: Sun, 10 Nov 2024 18:06:07 +0100 Subject: [PATCH] Refactoring the config --- flake.lock | 12 +- flake.nix | 23 ++- general/packages.nix | 59 -------- general/specialisation.nix | 47 ------ .../iso/default.nix | 2 +- .../lyes-pc/default.nix | 57 +++----- .../lyes-pc/hardware-configuration.nix | 0 .../common/default.nix | 44 ++---- modules/common/packages.nix | 32 +++++ modules/common/system.nix | 38 +++++ modules/default.nix | 8 ++ modules/desktop/default.nix | 10 ++ {general => modules/desktop}/networking.nix | 6 +- .../user => modules/desktop}/packages.nix | 136 ++++++++++-------- {general => modules/desktop}/system.nix | 50 +------ .../gaming.nix => modules/gaming/default.nix | 2 +- modules/nvidia/default.nix | 39 +++++ modules/specialisations/gaming.nix | 15 ++ modules/specialisations/kde-gaming.nix | 23 +++ modules/specialisations/kde.nix | 15 ++ modules/specialisations/old-kernel.nix | 9 ++ .../user/user.nix => users/lyes/default.nix | 0 {general/user => users/lyes}/home.nix | 0 users/lyes/packages.nix | 32 +++++ 24 files changed, 355 insertions(+), 304 deletions(-) delete mode 100644 general/packages.nix delete mode 100644 general/specialisation.nix rename specific/iso/configuration.nix => hosts/iso/default.nix (88%) rename specific/lyes-pc/configuration.nix => hosts/lyes-pc/default.nix (79%) rename {specific => hosts}/lyes-pc/hardware-configuration.nix (100%) rename general/configuration.nix => modules/common/default.nix (57%) create mode 100644 modules/common/packages.nix create mode 100644 modules/common/system.nix create mode 100644 modules/default.nix create mode 100644 modules/desktop/default.nix rename {general => modules/desktop}/networking.nix (87%) rename {general/user => modules/desktop}/packages.nix (85%) rename {general => modules/desktop}/system.nix (74%) rename general/gaming.nix => modules/gaming/default.nix (79%) create mode 100644 modules/nvidia/default.nix create mode 100644 modules/specialisations/gaming.nix create mode 100644 modules/specialisations/kde-gaming.nix create mode 100644 modules/specialisations/kde.nix create mode 100644 modules/specialisations/old-kernel.nix rename general/user/user.nix => users/lyes/default.nix (100%) rename {general/user => users/lyes}/home.nix (100%) create mode 100644 users/lyes/packages.nix diff --git a/flake.lock b/flake.lock index be46f45..f2aa728 100644 --- a/flake.lock +++ b/flake.lock @@ -39,11 +39,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1730886862, - "narHash": "sha256-wCZtRGM1NGxq6VG4+TMzfsa4cuG2VJVtowtYuWW5W3g=", + "lastModified": 1730919458, + "narHash": "sha256-yMO0T0QJlmT/x4HEyvrCyigGrdYfIXX3e5gWqB64wLg=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "90642a0deae927fa911d49d4f7c5616257105141", + "rev": "e1cc1f6483393634aee94514186d21a4871e78d7", "type": "github" }, "original": { @@ -55,11 +55,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1730741070, - "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", + "lastModified": 1730963269, + "narHash": "sha256-rz30HrFYCHiWEBCKHMffHbMdWJ35hEkcRVU0h7ms3x0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", + "rev": "83fb6c028368e465cd19bb127b86f971a5e41ebc", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 0958cbd..55c080a 100644 --- a/flake.nix +++ b/flake.nix @@ -16,22 +16,35 @@ system = "x86_64-linux"; specialArgs = attrs; modules = [ - ./general/configuration.nix + ./hosts/lyes-pc + + ./users/lyes + + ./modules + ./modules/desktop + ./modules/gaming + ./modules/nvidia + ./modules/specialisations/old-kernel.nix + nix-flatpak.nixosModules.nix-flatpak - ./specific/lyes-pc/configuration.nix nixos-hardware.nixosModules.lenovo-thinkpad-x1-extreme-gen4 ]; }; - iso = nixpkgs.lib.nixosSystem { + desktop-iso = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = attrs; modules = [ - ./general/configuration.nix + ./hosts/iso + + ./modules + ./modules/desktop + ./modules/gaming + ./modules/nvidia + nix-flatpak.nixosModules.nix-flatpak "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" - ./specific/iso/configuration.nix ]; }; }; diff --git a/general/packages.nix b/general/packages.nix deleted file mode 100644 index 5f9b1b1..0000000 --- a/general/packages.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ pkgs, ... }: - -{ - environment.systemPackages = with pkgs; [ - # Utilities - neovim - helix - wget - ripgrep - eza - bat - tree - dust - pciutils - man-pages - man-pages-posix - python3 - any-nix-shell - libcgroup - nushell - - # Virtualization - qemu - virt-manager - - # Printing - hplipWithPlugin - ]; - - fonts = { - enableDefaultPackages = true; - packages = with pkgs; [ - noto-fonts - noto-fonts-cjk-sans - noto-fonts-lgc-plus - noto-fonts-emoji - cantarell-fonts - twitter-color-emoji - (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) - ]; - - fontDir.enable = true; - - fontconfig = { - defaultFonts = { - sansSerif = [ "Cantarell" "Noto Sans" ]; - monospace = [ "JetBrainsMono Nerd Font" ]; - emoji = [ "Twitter Color Emoji" "Noto Color Emoji" ]; - }; - }; - }; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; -} diff --git a/general/specialisation.nix b/general/specialisation.nix deleted file mode 100644 index 589534c..0000000 --- a/general/specialisation.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ lib, pkgs, ... }: - -{ - specialisation = { - old-kernel.configuration = { - boot.kernelPackages = lib.mkForce pkgs.linuxPackages_6_1; - }; - - 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; - }; - }; -} diff --git a/specific/iso/configuration.nix b/hosts/iso/default.nix similarity index 88% rename from specific/iso/configuration.nix rename to hosts/iso/default.nix index 76e189d..21ebc0f 100644 --- a/specific/iso/configuration.nix +++ b/hosts/iso/default.nix @@ -17,5 +17,5 @@ in { networking.hostName = "lyes-iso"; networking.wireless.enable = lib.mkForce false; - services.displayManager.autoLogin.user = lib.mkForce "lyes"; + # services.displayManager.autoLogin.user = lib.mkForce "lyes"; } diff --git a/specific/lyes-pc/configuration.nix b/hosts/lyes-pc/default.nix similarity index 79% rename from specific/lyes-pc/configuration.nix rename to hosts/lyes-pc/default.nix index 9291933..21b53f8 100644 --- a/specific/lyes-pc/configuration.nix +++ b/hosts/lyes-pc/default.nix @@ -1,19 +1,35 @@ -{ pkgs, ... }: +{ ... }: { imports = [ ./hardware-configuration.nix ]; + # Networking + networking.hostName = "lyes-pc"; + + # Kernel # boot.kernelPackages = pkgs.linuxPackages_latest; # Boot + boot.loader.systemd-boot.enable = true; + boot.loader.systemd-boot.configurationLimit = 10; + boot.loader.efi.canTouchEfiVariables = true; boot.loader.systemd-boot.extraEntries = { "fedora.conf" = '' title Fedora efi /EFI/fedora/grubx64.efi ''; }; + boot.kernelParams = [ "quiet" ]; + + # Reboot Timeout + systemd.extraConfig = '' + DefaultTimeoutStopSec=10s + ''; + + # Swap + zramSwap.enable = true; # Filesystem fileSystems = { @@ -21,46 +37,7 @@ "/home".options = [ "compress=zstd:1" ]; "/nix".options = [ "compress=zstd:1" "noatime" ]; }; - - # Networking - networking.hostName = "lyes-pc"; - # NVidia - services.xserver.videoDrivers = [ "nvidia" ]; - - hardware.graphics = { - enable = true; - enable32Bit = 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.vulkan_beta; - - prime = { - offload = { - enable = true; - enableOffloadCmd = true; - }; - - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - }; - - # For containers - hardware.nvidia-container-toolkit.enable = true; - # Optimisation # nixpkgs.hostPlatform = { diff --git a/specific/lyes-pc/hardware-configuration.nix b/hosts/lyes-pc/hardware-configuration.nix similarity index 100% rename from specific/lyes-pc/hardware-configuration.nix rename to hosts/lyes-pc/hardware-configuration.nix diff --git a/general/configuration.nix b/modules/common/default.nix similarity index 57% rename from general/configuration.nix rename to modules/common/default.nix index 7137f85..5e7d74c 100644 --- a/general/configuration.nix +++ b/modules/common/default.nix @@ -1,26 +1,26 @@ -{ pkgs, ... }: +{ nixpkgs-unstable, ... }: { imports = [ ./packages.nix ./system.nix - ./networking.nix - ./user/user.nix - ./specialisation.nix - ./gaming.nix ]; # Import local packages nixpkgs.overlays = [ (final: prev: { - local = import ../pkgs { pkgs = final; }; + local = import ../../pkgs { pkgs = final; }; + }) + + # Unstable + (final: prev: { + unstable = import nixpkgs-unstable { + system = prev.system; + }; }) ]; - # Fails for some reason - documentation.nixos.enable = false; - nixpkgs.config.allowUnfree = true; nix.extraOptions = '' @@ -35,32 +35,6 @@ options = "--delete-older-than 30d"; }; - # programs.nix-ld = { - # enable = true; - # libraries = with pkgs; [ - # glib - # nss - # nspr - # cups - # dbus - # expat - # xorg.libxcb - # libxkbcommon - # cairo - # pango - # at-spi2-atk - # libdrm - # xorg.libX11 - # xorg.libXcomposite - # xorg.libXdamage - # xorg.libXext - # xorg.libXfixes - # xorg.libXrandr - # mesa - # alsa-lib - # ]; - # }; - # 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 diff --git a/modules/common/packages.nix b/modules/common/packages.nix new file mode 100644 index 0000000..db52849 --- /dev/null +++ b/modules/common/packages.nix @@ -0,0 +1,32 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + # Utilities + neovim + helix + wget + ripgrep + eza + bat + tree + dust + pciutils + man-pages + man-pages-posix + python3 + any-nix-shell + + # Nix + home-manager + nix-index + direnv + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; +} diff --git a/modules/common/system.nix b/modules/common/system.nix new file mode 100644 index 0000000..434a959 --- /dev/null +++ b/modules/common/system.nix @@ -0,0 +1,38 @@ +{ pkgs, ... }: + +{ + # Time + time.timeZone = "Europe/Paris"; + + # Locale + i18n.defaultLocale = "fr_FR.UTF-8"; + + # Keyboard + console = { + font = "Lat2-Terminus16"; + # keyMap = "fr"; + useXkbConfig = true; + }; + + services.xserver.xkb.layout = "fr"; + services.xserver.xkb.variant = "oss"; + + # Shell + programs.fish.enable = true; + programs.fish.promptInit = '' + any-nix-shell fish --info-right | source + ''; + environment.shells = with pkgs; [ fish ]; + + # Environment Variables + environment.sessionVariables = { + EDITOR = "hx"; + }; + + # Documentation + documentation.enable = true; + documentation.man.enable = true; + documentation.dev.enable = true; + # Fails for some reason + documentation.nixos.enable = true; +} diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..e02d7ed --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,8 @@ +{ ... }: + +{ + imports = + [ + ./common + ]; +} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix new file mode 100644 index 0000000..2a73e25 --- /dev/null +++ b/modules/desktop/default.nix @@ -0,0 +1,10 @@ +{ ... }: + +{ + imports = + [ + ./networking.nix + ./packages.nix + ./system.nix + ]; +} diff --git a/general/networking.nix b/modules/desktop/networking.nix similarity index 87% rename from general/networking.nix rename to modules/desktop/networking.nix index 104d7ca..85e30fb 100644 --- a/general/networking.nix +++ b/modules/desktop/networking.nix @@ -37,9 +37,9 @@ }; # Firewall - # networking.firewall.allowedTCPPorts = [ 24872 8998 ]; - # networking.firewall.allowedUDPPorts = [ 24872 8998 ]; - networking.firewall.enable = false; + networking.firewall.allowedTCPPorts = [ 24872 8998 ]; + networking.firewall.allowedUDPPorts = [ 24872 8998 ]; + # networking.firewall.enable = false; # Network services #services.openssh.enable = true; diff --git a/general/user/packages.nix b/modules/desktop/packages.nix similarity index 85% rename from general/user/packages.nix rename to modules/desktop/packages.nix index 966044c..3435d7b 100644 --- a/general/user/packages.nix +++ b/modules/desktop/packages.nix @@ -1,4 +1,4 @@ -{ pkgs, nixpkgs-unstable, lib, config, ... }: +{ pkgs, lib, config, ... }: let tex = (pkgs.texlive.combine { inherit (pkgs.texlive) @@ -19,9 +19,8 @@ let comment; }); in { - # Packages - users.users.lyes.packages = with pkgs; [ + environment.systemPackages = with pkgs; [ # Web fragments dropbox @@ -62,22 +61,6 @@ in { helvum local.quadcastrgb - # Reading - # calibre - papers - - # Utilities - impression - resources - gnome.file-roller - baobab - - # Proton - protonmail-bridge-gui - protonmail-desktop - protonvpn-gui - unstable.proton-pass - # Games heroic # cemu @@ -87,26 +70,29 @@ in { # dolphin-emu parsec-bin - # Nix - home-manager - nix-index - direnv + # Reading + # calibre + papers - # Commandline - starship - wl-clipboard - sl - - # System - gnome-firmware - - # Customization - gnome.gnome-tweaks - gnome-extension-manager - adw-gtk3 - paper-icon-theme - # gnomeExtensions.gsconnect + # Office + libreoffice + onlyoffice-bin + hunspell + hunspellDicts.fr-reforme1990 + hunspellDicts.fr-any + hunspellDicts.fr-moderne + hunspellDicts.en_US + hunspellDicts.en_GB-ize + # Note taking + apostrophe + setzer + tex + pandoc + typst + tinymist + zotero + # Programming git git-lfs @@ -128,29 +114,39 @@ in { distrobox gnome.gnome-boxes - # Office - libreoffice - onlyoffice-bin - hunspell - hunspellDicts.fr-reforme1990 - hunspellDicts.fr-any - hunspellDicts.fr-moderne - hunspellDicts.en_US - hunspellDicts.en_GB-ize + # Virtualization + qemu + virt-manager + + # System + gnome-firmware + + # Utilities + impression + resources + gnome.file-roller + baobab + + # Proton + protonmail-bridge-gui + protonmail-desktop + protonvpn-gui + unstable.proton-pass + + # Customization + gnome.gnome-tweaks + gnome-extension-manager + adw-gtk3 + paper-icon-theme + # gnomeExtensions.gsconnect - # Note taking - apostrophe - setzer - tex - pandoc - typst - tinymist - zotero - # Multimedia pipewire.dev pulseaudio libopus + + # Printing + hplipWithPlugin ]; # Flatpaks @@ -205,6 +201,29 @@ in { update.auto.enable = true; }; + fonts = { + enableDefaultPackages = true; + packages = with pkgs; [ + noto-fonts + noto-fonts-cjk-sans + noto-fonts-lgc-plus + noto-fonts-emoji + cantarell-fonts + twitter-color-emoji + (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) + ]; + + fontDir.enable = true; + + fontconfig = { + defaultFonts = { + sansSerif = [ "Cantarell" "Noto Sans" ]; + monospace = [ "JetBrainsMono Nerd Font" ]; + emoji = [ "Twitter Color Emoji" "Noto Color Emoji" ]; + }; + }; + }; + nixpkgs.overlays = [ # Version pins (final: prev: { @@ -228,12 +247,5 @@ in { ]; }); }) - - # Unstable - (final: prev: { - unstable = import nixpkgs-unstable { - system = prev.system; - }; - }) ]; } diff --git a/general/system.nix b/modules/desktop/system.nix similarity index 74% rename from general/system.nix rename to modules/desktop/system.nix index e764087..7076cfc 100644 --- a/general/system.nix +++ b/modules/desktop/system.nix @@ -1,24 +1,16 @@ { pkgs, ... }: { - # OS Configuration - boot.loader.systemd-boot.enable = true; - boot.loader.systemd-boot.configurationLimit = 10; - boot.loader.efi.canTouchEfiVariables = true; + # Boot boot.plymouth.enable = true; - boot.kernelParams = [ "quiet" ]; + # Filesystems boot.supportedFilesystems = [ "ntfs" ]; - zramSwap.enable = true; - - # Reboot Timeout - systemd.extraConfig = '' - DefaultTimeoutStopSec=10s - ''; - # Firmware services.fwupd.enable = true; + + # Fingerprint services.fprintd.enable = true; security.pam.services.login.fprintAuth = false; security.pam.services.gdm-fingerprint.text = '' @@ -39,20 +31,7 @@ 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"; - + # Touchpad services.libinput.enable = true; # Printing @@ -61,18 +40,6 @@ 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 = { - EDITOR = "hx"; - }; - # Graphics services.xserver.enable = true; programs.xwayland.enable = true; @@ -115,13 +82,6 @@ #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; # virtualisation.virtualbox.host.enable = true; diff --git a/general/gaming.nix b/modules/gaming/default.nix similarity index 79% rename from general/gaming.nix rename to modules/gaming/default.nix index 8135175..a4ad219 100644 --- a/general/gaming.nix +++ b/modules/gaming/default.nix @@ -5,7 +5,7 @@ programs.steam.gamescopeSession.enable = true; programs.gamemode.enable = true; - users.users.lyes.packages = with pkgs; [ + environment.systemPackages = with pkgs; [ mangohud protonup ]; diff --git a/modules/nvidia/default.nix b/modules/nvidia/default.nix new file mode 100644 index 0000000..d662884 --- /dev/null +++ b/modules/nvidia/default.nix @@ -0,0 +1,39 @@ +{ ... }: + +{ + # NVidia + services.xserver.videoDrivers = [ "nvidia" ]; + + hardware.graphics = { + enable = true; + enable32Bit = 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.vulkan_beta; + + prime = { + offload = { + enable = true; + enableOffloadCmd = true; + }; + + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; + + # For containers + hardware.nvidia-container-toolkit.enable = true; +} diff --git a/modules/specialisations/gaming.nix b/modules/specialisations/gaming.nix new file mode 100644 index 0000000..ffd71a0 --- /dev/null +++ b/modules/specialisations/gaming.nix @@ -0,0 +1,15 @@ +{ lib, ... }: + +{ + specialisation = { + gaming.configuration = { + hardware.nvidia = { + prime.sync.enable = lib.mkForce true; + prime.offload = { + enable = lib.mkForce false; + enableOffloadCmd = lib.mkForce false; + }; + }; + }; + }; +} diff --git a/modules/specialisations/kde-gaming.nix b/modules/specialisations/kde-gaming.nix new file mode 100644 index 0000000..f11922f --- /dev/null +++ b/modules/specialisations/kde-gaming.nix @@ -0,0 +1,23 @@ +{ lib, ... }: + +{ + specialisation = { + 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; + }; + }; +} diff --git a/modules/specialisations/kde.nix b/modules/specialisations/kde.nix new file mode 100644 index 0000000..2dae101 --- /dev/null +++ b/modules/specialisations/kde.nix @@ -0,0 +1,15 @@ +{ lib, ... }: + +{ + specialisation = { + 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; + }; + }; +} diff --git a/modules/specialisations/old-kernel.nix b/modules/specialisations/old-kernel.nix new file mode 100644 index 0000000..d38f317 --- /dev/null +++ b/modules/specialisations/old-kernel.nix @@ -0,0 +1,9 @@ +{ lib, pkgs, ... }: + +{ + specialisation = { + old-kernel.configuration = { + boot.kernelPackages = lib.mkForce pkgs.linuxPackages_6_1; + }; + }; +} diff --git a/general/user/user.nix b/users/lyes/default.nix similarity index 100% rename from general/user/user.nix rename to users/lyes/default.nix diff --git a/general/user/home.nix b/users/lyes/home.nix similarity index 100% rename from general/user/home.nix rename to users/lyes/home.nix diff --git a/users/lyes/packages.nix b/users/lyes/packages.nix new file mode 100644 index 0000000..9bcd343 --- /dev/null +++ b/users/lyes/packages.nix @@ -0,0 +1,32 @@ +{ pkgs, nixpkgs-unstable, lib, config, ... }: + +{ + # Packages + users.users.lyes.packages = with pkgs; [ + # Commandline + starship + wl-clipboard + sl + + # Programming + git + git-lfs + vscode + unstable.zed-editor + gcc + rustup + python3 + ocaml + ocamlPackages.ocaml-lsp + ocamlPackages.ocamlformat + opam + ledit + nodejs + nil + + # Containers & VMs + toolbox + distrobox + gnome.gnome-boxes + ]; +}