From cd3a057d2a0ffcdccd53198eb67ccda67663a518 Mon Sep 17 00:00:00 2001 From: Laurent Gueret Date: Mon, 10 Aug 2026 00:16:26 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20et=20ajout=20de=20proton?= =?UTF-8?q?-ge=20&=20steam?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.nix | 1 + hosts/nixos/home/users/alistreaza.nix | 12 +++- hosts/nixos/system/hardware-configuration.nix | 47 ++++++--------- hosts/nixos/system/os.nix | 11 +++- modules/home/nixos/apps/firefox.nix | 1 + modules/home/nixos/shells/gnome.nix | 60 ++++++++++++++++--- modules/system/nixos/flatpak.nix | 14 ++++- modules/system/nixos/games/proton.nix | 22 +++++++ modules/system/nixos/games/steam.nix | 29 +++++++++ modules/system/nixos/shells/gnome.nix | 11 ++-- .../system/nixos/virtualisations/podman.nix | 12 ++-- overlays/nixos/overlays.nix | 4 ++ 12 files changed, 168 insertions(+), 56 deletions(-) create mode 100644 modules/system/nixos/games/proton.nix create mode 100644 modules/system/nixos/games/steam.nix diff --git a/flake.nix b/flake.nix index 1ab9e46..3447d30 100755 --- a/flake.nix +++ b/flake.nix @@ -59,6 +59,7 @@ home-manager = home-manager; nixpkgs = nixpkgs; nixpkgs-unstable = nixpkgs-unstable; + flatpaks = nix-flatpak; }; modules = [ (import-tree ./overlays/nixos) diff --git a/hosts/nixos/home/users/alistreaza.nix b/hosts/nixos/home/users/alistreaza.nix index ac68feb..996e63e 100644 --- a/hosts/nixos/home/users/alistreaza.nix +++ b/hosts/nixos/home/users/alistreaza.nix @@ -1,9 +1,16 @@ -{ import-tree, ... }: +{ + pkgs, + flatpaks, + import-tree, + ... +}: { home-manager.users.alistreaza = { imports = [ (import-tree ../../../../modules/home/common) (import-tree ../../../../modules/home/nixos) + + flatpaks.homeManagerModules.nix-flatpak ]; home = { @@ -31,6 +38,9 @@ home.firefox.enable = true; home.firefox.privacy = true; + # Apps installation + home.packages = with pkgs; [ zed-editor ]; + # The state version is required and should stay at the version you # originally installed. home.stateVersion = "26.05"; diff --git a/hosts/nixos/system/hardware-configuration.nix b/hosts/nixos/system/hardware-configuration.nix index 590e573..fbda035 100644 --- a/hosts/nixos/system/hardware-configuration.nix +++ b/hosts/nixos/system/hardware-configuration.nix @@ -1,45 +1,32 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ - config, - lib, - modulesPath, - ... -}: +{ config, lib, pkgs, modulesPath, ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ - "xhci_pci" - "ahci" - "nvme" - "usb_storage" - "usbhid" - "sd_mod" - ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "uas" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/eb35b14e-3473-40f4-96ad-284204b9d615"; - fsType = "btrfs"; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/7dec9162-bb50-43c9-b889-b371f0991394"; + fsType = "ext4"; + }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/5D52-D5CA"; - fsType = "vfat"; - options = [ - "fmask=0022" - "dmask=0022" + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/67A5-1ECA"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/06328505-6421-46e8-b82e-f74f5d7656c9"; } ]; - }; - - swapDevices = [ ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/hosts/nixos/system/os.nix b/hosts/nixos/system/os.nix index 5b36175..0c6bd41 100755 --- a/hosts/nixos/system/os.nix +++ b/hosts/nixos/system/os.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { # System services @@ -17,13 +17,18 @@ # System configurations os.keyboard.apple.enable = true; - # Virtualisation Apps - os.virtualisation.cuda.enable = false; + # Podman & Cuda + os.virtualisation.cuda.enable = true; os.virtualisation.podman.enable = true; # Shells configurations + os.flatpak.enable = true; os.shells.gnome.enable = true; + # Apps configurations + os.flatpak.gtk = true; + os.virtualisation.podman.gtk = true; + # Terminal programs.ssh.enableAskPassword = false; # No-window git push fix diff --git a/modules/home/nixos/apps/firefox.nix b/modules/home/nixos/apps/firefox.nix index 87c40f1..72fec53 100644 --- a/modules/home/nixos/apps/firefox.nix +++ b/modules/home/nixos/apps/firefox.nix @@ -43,6 +43,7 @@ in settings = mkMerge [ { # Vertical tabs + "browser.nova.enabled" = true; "sidebar.revamp" = true; "sidebar.verticalTabs" = true; "sidebar.new-sidebar.has-used" = true; diff --git a/modules/home/nixos/shells/gnome.nix b/modules/home/nixos/shells/gnome.nix index fc9956c..238f543 100644 --- a/modules/home/nixos/shells/gnome.nix +++ b/modules/home/nixos/shells/gnome.nix @@ -17,23 +17,29 @@ in default = true; description = "Enable the PaperWM extension."; }; - app-hider = mkOption { type = types.bool; default = true; description = "Enable the App Hider extension."; }; - dash-to-panel = mkOption { type = types.bool; default = true; description = "Enable the Dash to Panel extension."; }; - + blur-my-shell = mkOption { + type = types.bool; + default = true; + description = "Enable the Blur My Shell extension."; + }; + dynamic-music-pill = mkOption { + type = types.bool; + default = true; + description = "Enable the Dynamic Music Pill extension."; + }; }; }; config = mkIf cfg.enable { - home.packages = mkMerge [ [ pkgs.numix-icon-theme @@ -42,8 +48,9 @@ in (mkIf cfg.extensions.paperwm [ pkgs.gnomeExtensions.paperwm ]) (mkIf cfg.extensions.app-hider [ pkgs.gnomeExtensions.app-hider ]) (mkIf cfg.extensions.dash-to-panel [ pkgs.gnomeExtensions.dash-to-panel ]) + (mkIf cfg.extensions.blur-my-shell [ pkgs.gnomeExtensions.blur-my-shell ]) + (mkIf cfg.extensions.dynamic-music-pill [ pkgs.gnomeExtensions.dynamic-music-pill ]) ]; - dconf = { enable = true; settings = mkMerge [ @@ -57,7 +64,6 @@ in ]) ]; }; - # We define the interface settings to use a teal accent color and prefer dark color scheme. "org/gnome/desktop/interface" = { accent-color = "teal"; @@ -68,7 +74,6 @@ in "org/gnome/desktop/wm/preferences" = { button-layout = "appmenu:maximize,minimize,close"; }; - # We define the shell settings to enable user extensions # and enable the PaperWM, App Hider, and Dash to Panel extensions if they are enabled in the configuration. "org/gnome/shell" = { @@ -79,9 +84,30 @@ in (mkIf cfg.extensions.paperwm [ paperwm.extensionUuid ]) (mkIf cfg.extensions.app-hider [ app-hider.extensionUuid ]) (mkIf cfg.extensions.dash-to-panel [ dash-to-panel.extensionUuid ]) + (mkIf cfg.extensions.blur-my-shell [ blur-my-shell.extensionUuid ]) + (mkIf cfg.extensions.dynamic-music-pill [ dynamic-music-pill.extensionUuid ]) ]; }; } + (mkIf cfg.extensions.dynamic-music-pill { + "org/gnome/shell/extensions/dynamic-music-pill" = { + vertical-offset = 0; + target-container = 3; + + edge-margin = 10; + border-radius = 5; + panel-pill-height = 32; + + visualizer-height = 16; + visualizer-padding = 10; + visualizer-bar-width = 1; + + enable-shadow = false; + has-seen-first-hint = true; + pill-dynamic-width = false; + enable-transparency = false; + }; + }) (mkIf cfg.extensions.app-hider { "org/gnome/shell/extensions/app-hider" = { hidden-apps = [ @@ -92,6 +118,26 @@ in ]; }; }) + (mkIf cfg.extensions.blur-my-shell { + "org/gnome/shell/extensions/blur-my-shell" = { + rounded-blur-found = false; + }; + "org/gnome/shell/extensions/blur-my-shell/panel" = { + blur = false; + }; + "org/gnome/shell/extensions/blur-my-shell/appfolder" = { + sigma = 30; + blur = true; + brightness = 0.6; + style-dialogs = 3; + }; + "org/gnome/shell/extensions/blur-my-shell/applications" = { + blur = false; + }; + "org/gnome/shell/extensions/blur-my-shell/coverflow-alt-tab" = { + blur = false; + }; + }) (mkIf cfg.extensions.dash-to-panel { "org/gnome/shell/extensions/dash-to-panel" = { prefs-opened = false; diff --git a/modules/system/nixos/flatpak.nix b/modules/system/nixos/flatpak.nix index 1e0075b..06f042d 100644 --- a/modules/system/nixos/flatpak.nix +++ b/modules/system/nixos/flatpak.nix @@ -5,14 +5,22 @@ let in { options.os.flatpak = { + gtk = mkEnableOption "Flatpak app install"; enable = mkEnableOption "System pipewire service"; }; config = mkIf cfg.enable { - services.flatpak.enable = true; - services.flatpak.update.auto = { + services.flatpak = { enable = true; - onCalendar = "weekly"; # Default value + update.auto = { + enable = true; + onCalendar = "weekly"; # Default value + }; + packages = + [ ] + ++ lib.optionals cfg.gtk [ + "io.github.flattool.Warehouse" + ]; }; }; diff --git a/modules/system/nixos/games/proton.nix b/modules/system/nixos/games/proton.nix new file mode 100644 index 0000000..c3546c5 --- /dev/null +++ b/modules/system/nixos/games/proton.nix @@ -0,0 +1,22 @@ +{ + lib, + config, + pkgs, + ... +}: +with lib; +let + cfg = config.os.protonge; +in +{ + options.os.protonge = { + enable = mkEnableOption "System pipewire service"; + }; + config = mkIf cfg.enable { + + environment.systemPackages = with pkgs; [ + umu-launcher + ]; + + }; +} diff --git a/modules/system/nixos/games/steam.nix b/modules/system/nixos/games/steam.nix new file mode 100644 index 0000000..f7f9cbb --- /dev/null +++ b/modules/system/nixos/games/steam.nix @@ -0,0 +1,29 @@ +{ + lib, + config, + pkgs, + ... +}: +with lib; +let + cfg = config.os.steam; +in +{ + options.os.steam = { + enable = mkEnableOption "System pipewire service"; + }; + config = mkIf cfg.enable { + + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + extraCompatPackages = with pkgs; [ + proton-ge-bin + ]; + }; + + programs.gamemode.enable = true; + + }; +} diff --git a/modules/system/nixos/shells/gnome.nix b/modules/system/nixos/shells/gnome.nix index e7c2485..16922cc 100644 --- a/modules/system/nixos/shells/gnome.nix +++ b/modules/system/nixos/shells/gnome.nix @@ -30,13 +30,10 @@ in gnome-user-docs ]; - systemPackages = - with pkgs; - [ - papers - nautilus - gnome-text-editor - ]; + systemPackages = with pkgs; [ + papers + nautilus + ]; }; }; diff --git a/modules/system/nixos/virtualisations/podman.nix b/modules/system/nixos/virtualisations/podman.nix index d9041f8..ad689a7 100644 --- a/modules/system/nixos/virtualisations/podman.nix +++ b/modules/system/nixos/virtualisations/podman.nix @@ -12,12 +12,16 @@ let in { options.os.virtualisation.podman = { - enable = mkEnableOption "System docker service"; + gtk = mkEnableOption "Podman app install"; + enable = mkEnableOption "System podman service"; }; config = mkIf cfg.enable { virtualisation = { - containers.enable = true; + containers = { + enable = true; + registries.search = [ "docker.io" ]; + }; podman = { enable = true; dockerCompat = true; @@ -27,9 +31,7 @@ in }; environment = { - systemPackages = with pkgs; [ - podman-compose - ]; + systemPackages = with pkgs; [ podman-compose ] ++ lib.optionals cfg.gtk [ pods ]; }; users.groups.podman.members = users; diff --git a/overlays/nixos/overlays.nix b/overlays/nixos/overlays.nix index 145e457..37ae6d0 100644 --- a/overlays/nixos/overlays.nix +++ b/overlays/nixos/overlays.nix @@ -19,6 +19,10 @@ ) (nixpkgs.lib.toList pkg.meta.license) || builtins.elem (nixpkgs.lib.getName pkg) [ "nvidia-x11" + ] + || builtins.elem (nixpkgs.lib.getName pkg) [ + "steam" + "steam-unwrapped" ]; nixpkgs.overlays = [