From 90bc1eb63d9dda4ecafd76badcd9725c4211a723 Mon Sep 17 00:00:00 2001 From: Laurent Gueret Date: Thu, 9 Apr 2026 09:09:13 +0200 Subject: [PATCH] Lot of change on structs --- .../darwin/home/partials/ghostty/ghostty.nix | 8 ++++ .../ghostty}/ghostty/config | 0 hosts/darwin/home/partials/shells.nix | 6 --- .../home/partials/{ => wallpaper}/walls.jpg | Bin .../partials/{env.nix => wallpaper/walls.nix} | 0 hosts/darwin/system/partials/homebrew.nix | 5 -- hosts/darwin/system/partials/nix-homebrew.nix | 28 ------------ hosts/nixos/home/partials/gnome/dconf.nix | 3 ++ hosts/nixos/home/partials/xdg.nix | 10 ---- hosts/nixos/home/users/alistreaza.nix | 2 + hosts/nixos/system/os.nix | 12 ++--- hosts/nixos/system/partials/apps.nix | 7 +++ hosts/nixos/system/partials/flatpak.nix | 12 ----- hosts/nixos/system/partials/zsh.nix | 7 --- modules/home/darwin/{ => app}/paneru.nix | 0 modules/home/darwin/{env => devenv}/jdk.nix | 0 .../home/darwin/{env => devenv}/python.nix | 0 modules/home/darwin/{env => devenv}/rust.nix | 0 modules/home/nixos/xdg.nix | 20 ++++++++ modules/home/nixos/zed.nix | 22 --------- modules/system/darwin/{ => apps}/eul.nix | 0 modules/system/darwin/{ => apps}/ghostty.nix | 0 modules/system/darwin/{ => apps}/iina.nix | 0 modules/system/darwin/{ => apps}/iterm.nix | 0 modules/system/darwin/{ => apps}/jetbrain.nix | 0 modules/system/darwin/{ => apps}/keka.nix | 0 .../system/darwin/{ => apps}/microsoft.nix | 0 modules/system/darwin/{ => apps}/obsidian.nix | 0 modules/system/darwin/{ => apps}/zed.nix | 0 modules/system/darwin/{ => apps}/zen.nix | 0 modules/system/darwin/homebrew.nix | 43 ++++++++++++++++++ modules/system/nixos/apps/gnome/apps.nix | 31 ------------- modules/system/nixos/flatpak.nix | 19 ++++++++ .../nixos/{ => keyboards}/keyboard-apple.nix | 0 .../nixos/{network => networks}/dns.nix | 0 .../nixos/{network => networks}/manager.nix | 0 .../nixos/{network => networks}/printing.nix | 5 -- .../nixos/{network => networks}/samba.nix | 0 .../gnome/shell.nix => shells/gnome.nix} | 0 .../docker.nix | 0 .../podman.nix | 1 - overlays/darwin/{paneru.nix => overlays.nix} | 0 42 files changed, 108 insertions(+), 133 deletions(-) create mode 100644 hosts/darwin/home/partials/ghostty/ghostty.nix rename hosts/darwin/home/{users/config => partials/ghostty}/ghostty/config (100%) delete mode 100644 hosts/darwin/home/partials/shells.nix rename hosts/darwin/home/partials/{ => wallpaper}/walls.jpg (100%) rename hosts/darwin/home/partials/{env.nix => wallpaper/walls.nix} (100%) delete mode 100644 hosts/darwin/system/partials/homebrew.nix delete mode 100644 hosts/darwin/system/partials/nix-homebrew.nix delete mode 100644 hosts/nixos/home/partials/xdg.nix create mode 100644 hosts/nixos/system/partials/apps.nix delete mode 100644 hosts/nixos/system/partials/flatpak.nix delete mode 100644 hosts/nixos/system/partials/zsh.nix rename modules/home/darwin/{ => app}/paneru.nix (100%) rename modules/home/darwin/{env => devenv}/jdk.nix (100%) rename modules/home/darwin/{env => devenv}/python.nix (100%) rename modules/home/darwin/{env => devenv}/rust.nix (100%) create mode 100644 modules/home/nixos/xdg.nix delete mode 100644 modules/home/nixos/zed.nix rename modules/system/darwin/{ => apps}/eul.nix (100%) rename modules/system/darwin/{ => apps}/ghostty.nix (100%) rename modules/system/darwin/{ => apps}/iina.nix (100%) rename modules/system/darwin/{ => apps}/iterm.nix (100%) rename modules/system/darwin/{ => apps}/jetbrain.nix (100%) rename modules/system/darwin/{ => apps}/keka.nix (100%) rename modules/system/darwin/{ => apps}/microsoft.nix (100%) rename modules/system/darwin/{ => apps}/obsidian.nix (100%) rename modules/system/darwin/{ => apps}/zed.nix (100%) rename modules/system/darwin/{ => apps}/zen.nix (100%) create mode 100644 modules/system/darwin/homebrew.nix delete mode 100644 modules/system/nixos/apps/gnome/apps.nix create mode 100644 modules/system/nixos/flatpak.nix rename modules/system/nixos/{ => keyboards}/keyboard-apple.nix (100%) rename modules/system/nixos/{network => networks}/dns.nix (100%) rename modules/system/nixos/{network => networks}/manager.nix (100%) rename modules/system/nixos/{network => networks}/printing.nix (75%) rename modules/system/nixos/{network => networks}/samba.nix (100%) rename modules/system/nixos/{apps/gnome/shell.nix => shells/gnome.nix} (100%) rename modules/system/nixos/{apps/virtualisation => virtualisations}/docker.nix (100%) rename modules/system/nixos/{apps/virtualisation => virtualisations}/podman.nix (97%) rename overlays/darwin/{paneru.nix => overlays.nix} (100%) diff --git a/hosts/darwin/home/partials/ghostty/ghostty.nix b/hosts/darwin/home/partials/ghostty/ghostty.nix new file mode 100644 index 0000000..5b10389 --- /dev/null +++ b/hosts/darwin/home/partials/ghostty/ghostty.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + home.file = { + ".config/ghostty/" = { + source = ./ghostty; + }; + }; +} diff --git a/hosts/darwin/home/users/config/ghostty/config b/hosts/darwin/home/partials/ghostty/ghostty/config similarity index 100% rename from hosts/darwin/home/users/config/ghostty/config rename to hosts/darwin/home/partials/ghostty/ghostty/config diff --git a/hosts/darwin/home/partials/shells.nix b/hosts/darwin/home/partials/shells.nix deleted file mode 100644 index 643791a..0000000 --- a/hosts/darwin/home/partials/shells.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ - aria2 - ]; -} diff --git a/hosts/darwin/home/partials/walls.jpg b/hosts/darwin/home/partials/wallpaper/walls.jpg similarity index 100% rename from hosts/darwin/home/partials/walls.jpg rename to hosts/darwin/home/partials/wallpaper/walls.jpg diff --git a/hosts/darwin/home/partials/env.nix b/hosts/darwin/home/partials/wallpaper/walls.nix similarity index 100% rename from hosts/darwin/home/partials/env.nix rename to hosts/darwin/home/partials/wallpaper/walls.nix diff --git a/hosts/darwin/system/partials/homebrew.nix b/hosts/darwin/system/partials/homebrew.nix deleted file mode 100644 index 9b42547..0000000 --- a/hosts/darwin/system/partials/homebrew.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, ... }: -{ - homebrew.enable = true; - homebrew.taps = builtins.attrNames config.nix-homebrew.taps; -} diff --git a/hosts/darwin/system/partials/nix-homebrew.nix b/hosts/darwin/system/partials/nix-homebrew.nix deleted file mode 100644 index 17446a1..0000000 --- a/hosts/darwin/system/partials/nix-homebrew.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - homebrew-core, - homebrew-cask, - ... -}: -{ - nix-homebrew = { - # User owning the Homebrew prefix - user = "alistreaza"; - - # Install Homebrew under the default prefix - enable = true; - - # Apple Silicon Only: Also install Homebrew under the default Intel prefix for Rosetta 2 - enableRosetta = false; - - # Optional: Declarative tap management - taps = { - "homebrew/homebrew-core" = homebrew-core; - "homebrew/homebrew-cask" = homebrew-cask; - }; - - # Optional: Enable fully-declarative tap management - # - # With mutableTaps disabled, taps can no longer be added imperatively with `brew tap`. - mutableTaps = false; - }; -} diff --git a/hosts/nixos/home/partials/gnome/dconf.nix b/hosts/nixos/home/partials/gnome/dconf.nix index 42fbdaf..2997f70 100644 --- a/hosts/nixos/home/partials/gnome/dconf.nix +++ b/hosts/nixos/home/partials/gnome/dconf.nix @@ -7,6 +7,9 @@ with lib.hm.gvariant; { home.packages = with pkgs; [ papirus-icon-theme + gnomeExtensions.paperwm + gnomeExtensions.app-hider + gnomeExtensions.dash-to-dock ]; dconf = { diff --git a/hosts/nixos/home/partials/xdg.nix b/hosts/nixos/home/partials/xdg.nix deleted file mode 100644 index 3a51d89..0000000 --- a/hosts/nixos/home/partials/xdg.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ ... }: - -{ - xdg = { - userDirs = { - enable = true; - createDirectories = true; - }; - }; -} diff --git a/hosts/nixos/home/users/alistreaza.nix b/hosts/nixos/home/users/alistreaza.nix index 49cbde0..dcde754 100644 --- a/hosts/nixos/home/users/alistreaza.nix +++ b/hosts/nixos/home/users/alistreaza.nix @@ -12,6 +12,8 @@ homeDirectory = "/home/alistreaza"; }; + home.xdg.enable = true; + # Shell apps home.shell.nh.enable = true; home.shell.zsh.enable = true; diff --git a/hosts/nixos/system/os.nix b/hosts/nixos/system/os.nix index b205f90..5ae129a 100755 --- a/hosts/nixos/system/os.nix +++ b/hosts/nixos/system/os.nix @@ -12,23 +12,23 @@ os.networks.manager.enable = true; # Printing and sharing - os.networks.printing.enable = true; os.networks.samba.enable = true; + os.networks.printing.enable = true; # System configurations os.keyboard.apple.enable = true; - # Gnome configurations - os.gnome.shell.enable = true; - os.gnome.apps.enable = true; - # Virtualisation Apps os.virtualisation.cuda.enable = true; os.virtualisation.podman.enable = true; - # Ssh + # Terminal + os.flatpak.enable = true; programs.ssh.enableAskPassword = false; # No-window git push fix + # Shells configurations + os.shells.gnome.enable = true; + # System version system.stateVersion = "25.11"; } diff --git a/hosts/nixos/system/partials/apps.nix b/hosts/nixos/system/partials/apps.nix new file mode 100644 index 0000000..f8e667c --- /dev/null +++ b/hosts/nixos/system/partials/apps.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + + services.flatpak.packages = [ + "io.github.flattool.Warehouse" + ]; +} diff --git a/hosts/nixos/system/partials/flatpak.nix b/hosts/nixos/system/partials/flatpak.nix deleted file mode 100644 index 0b5ea02..0000000 --- a/hosts/nixos/system/partials/flatpak.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ ... }: -{ - services.flatpak.enable = true; - services.flatpak.update.auto = { - enable = true; - onCalendar = "weekly"; # Default value - }; - - services.flatpak.packages = [ - "io.github.flattool.Warehouse" - ]; -} diff --git a/hosts/nixos/system/partials/zsh.nix b/hosts/nixos/system/partials/zsh.nix deleted file mode 100644 index 38c654b..0000000 --- a/hosts/nixos/system/partials/zsh.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: -{ - programs.zsh = { - enable = true; - enableCompletion = true; - }; -} diff --git a/modules/home/darwin/paneru.nix b/modules/home/darwin/app/paneru.nix similarity index 100% rename from modules/home/darwin/paneru.nix rename to modules/home/darwin/app/paneru.nix diff --git a/modules/home/darwin/env/jdk.nix b/modules/home/darwin/devenv/jdk.nix similarity index 100% rename from modules/home/darwin/env/jdk.nix rename to modules/home/darwin/devenv/jdk.nix diff --git a/modules/home/darwin/env/python.nix b/modules/home/darwin/devenv/python.nix similarity index 100% rename from modules/home/darwin/env/python.nix rename to modules/home/darwin/devenv/python.nix diff --git a/modules/home/darwin/env/rust.nix b/modules/home/darwin/devenv/rust.nix similarity index 100% rename from modules/home/darwin/env/rust.nix rename to modules/home/darwin/devenv/rust.nix diff --git a/modules/home/nixos/xdg.nix b/modules/home/nixos/xdg.nix new file mode 100644 index 0000000..537516c --- /dev/null +++ b/modules/home/nixos/xdg.nix @@ -0,0 +1,20 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.home.xdg; +in +{ + options.home.xdg = { + enable = mkEnableOption "Xdg service"; + }; + config = mkIf cfg.enable { + + xdg = { + userDirs = { + enable = true; + createDirectories = true; + }; + }; + + }; +} diff --git a/modules/home/nixos/zed.nix b/modules/home/nixos/zed.nix deleted file mode 100644 index 06cc209..0000000 --- a/modules/home/nixos/zed.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -with lib; -let - cfg = config.home.ide.zed; -in -{ - options.home.ide.zed = { - enable = mkEnableOption "Zen Editor options"; - }; - config = mkIf cfg.enable { - - home.packages = with pkgs; [ - zed-editor - ]; - - }; -} diff --git a/modules/system/darwin/eul.nix b/modules/system/darwin/apps/eul.nix similarity index 100% rename from modules/system/darwin/eul.nix rename to modules/system/darwin/apps/eul.nix diff --git a/modules/system/darwin/ghostty.nix b/modules/system/darwin/apps/ghostty.nix similarity index 100% rename from modules/system/darwin/ghostty.nix rename to modules/system/darwin/apps/ghostty.nix diff --git a/modules/system/darwin/iina.nix b/modules/system/darwin/apps/iina.nix similarity index 100% rename from modules/system/darwin/iina.nix rename to modules/system/darwin/apps/iina.nix diff --git a/modules/system/darwin/iterm.nix b/modules/system/darwin/apps/iterm.nix similarity index 100% rename from modules/system/darwin/iterm.nix rename to modules/system/darwin/apps/iterm.nix diff --git a/modules/system/darwin/jetbrain.nix b/modules/system/darwin/apps/jetbrain.nix similarity index 100% rename from modules/system/darwin/jetbrain.nix rename to modules/system/darwin/apps/jetbrain.nix diff --git a/modules/system/darwin/keka.nix b/modules/system/darwin/apps/keka.nix similarity index 100% rename from modules/system/darwin/keka.nix rename to modules/system/darwin/apps/keka.nix diff --git a/modules/system/darwin/microsoft.nix b/modules/system/darwin/apps/microsoft.nix similarity index 100% rename from modules/system/darwin/microsoft.nix rename to modules/system/darwin/apps/microsoft.nix diff --git a/modules/system/darwin/obsidian.nix b/modules/system/darwin/apps/obsidian.nix similarity index 100% rename from modules/system/darwin/obsidian.nix rename to modules/system/darwin/apps/obsidian.nix diff --git a/modules/system/darwin/zed.nix b/modules/system/darwin/apps/zed.nix similarity index 100% rename from modules/system/darwin/zed.nix rename to modules/system/darwin/apps/zed.nix diff --git a/modules/system/darwin/zen.nix b/modules/system/darwin/apps/zen.nix similarity index 100% rename from modules/system/darwin/zen.nix rename to modules/system/darwin/apps/zen.nix diff --git a/modules/system/darwin/homebrew.nix b/modules/system/darwin/homebrew.nix new file mode 100644 index 0000000..b046dec --- /dev/null +++ b/modules/system/darwin/homebrew.nix @@ -0,0 +1,43 @@ +{ + lib, + config, + homebrew-core, + homebrew-cask, + ... +}: +let + cfg = config.os.homebrew; +in +{ + options.os.homebrew = { + enable = lib.mkEnableOption "Homebrew options"; + }; + config = lib.mkIf cfg.enable { + + nix-homebrew = { + # User owning the Homebrew prefix + user = "alistreaza"; + + # Install Homebrew under the default prefix + enable = true; + + # Apple Silicon Only: Also install Homebrew under the default Intel prefix for Rosetta 2 + enableRosetta = false; + + # Optional: Declarative tap management + taps = { + "homebrew/homebrew-core" = homebrew-core; + "homebrew/homebrew-cask" = homebrew-cask; + }; + + # Optional: Enable fully-declarative tap management + # + # With mutableTaps disabled, taps can no longer be added imperatively with `brew tap`. + mutableTaps = false; + }; + + homebrew.enable = true; + homebrew.taps = builtins.attrNames config.nix-homebrew.taps; + + }; +} diff --git a/modules/system/nixos/apps/gnome/apps.nix b/modules/system/nixos/apps/gnome/apps.nix deleted file mode 100644 index c236417..0000000 --- a/modules/system/nixos/apps/gnome/apps.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - lib, - pkgs, - config, - ... -}: -with lib; -let - cfg = config.os.gnome.apps; -in -{ - options.os.gnome.apps = { - enable = mkEnableOption "System gnome apps service"; - }; - config = mkIf cfg.enable { - - environment = { - systemPackages = - with pkgs; - [ nautilus ] - ++ [ - papers - loupe - celluloid - ]; - }; - - services.gvfs.enable = true; # SMB, FTP, ... access - - }; -} diff --git a/modules/system/nixos/flatpak.nix b/modules/system/nixos/flatpak.nix new file mode 100644 index 0000000..1e0075b --- /dev/null +++ b/modules/system/nixos/flatpak.nix @@ -0,0 +1,19 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.os.flatpak; +in +{ + options.os.flatpak = { + enable = mkEnableOption "System pipewire service"; + }; + config = mkIf cfg.enable { + + services.flatpak.enable = true; + services.flatpak.update.auto = { + enable = true; + onCalendar = "weekly"; # Default value + }; + + }; +} diff --git a/modules/system/nixos/keyboard-apple.nix b/modules/system/nixos/keyboards/keyboard-apple.nix similarity index 100% rename from modules/system/nixos/keyboard-apple.nix rename to modules/system/nixos/keyboards/keyboard-apple.nix diff --git a/modules/system/nixos/network/dns.nix b/modules/system/nixos/networks/dns.nix similarity index 100% rename from modules/system/nixos/network/dns.nix rename to modules/system/nixos/networks/dns.nix diff --git a/modules/system/nixos/network/manager.nix b/modules/system/nixos/networks/manager.nix similarity index 100% rename from modules/system/nixos/network/manager.nix rename to modules/system/nixos/networks/manager.nix diff --git a/modules/system/nixos/network/printing.nix b/modules/system/nixos/networks/printing.nix similarity index 75% rename from modules/system/nixos/network/printing.nix rename to modules/system/nixos/networks/printing.nix index 0001aed..86e7eb7 100644 --- a/modules/system/nixos/network/printing.nix +++ b/modules/system/nixos/networks/printing.nix @@ -1,5 +1,4 @@ { - pkgs, lib, config, ... @@ -16,10 +15,6 @@ in services.printing = { enable = true; - drivers = with pkgs; [ - cups-filters - cups-browsed - ]; }; }; diff --git a/modules/system/nixos/network/samba.nix b/modules/system/nixos/networks/samba.nix similarity index 100% rename from modules/system/nixos/network/samba.nix rename to modules/system/nixos/networks/samba.nix diff --git a/modules/system/nixos/apps/gnome/shell.nix b/modules/system/nixos/shells/gnome.nix similarity index 100% rename from modules/system/nixos/apps/gnome/shell.nix rename to modules/system/nixos/shells/gnome.nix diff --git a/modules/system/nixos/apps/virtualisation/docker.nix b/modules/system/nixos/virtualisations/docker.nix similarity index 100% rename from modules/system/nixos/apps/virtualisation/docker.nix rename to modules/system/nixos/virtualisations/docker.nix diff --git a/modules/system/nixos/apps/virtualisation/podman.nix b/modules/system/nixos/virtualisations/podman.nix similarity index 97% rename from modules/system/nixos/apps/virtualisation/podman.nix rename to modules/system/nixos/virtualisations/podman.nix index 29b4e74..a9684ca 100644 --- a/modules/system/nixos/apps/virtualisation/podman.nix +++ b/modules/system/nixos/virtualisations/podman.nix @@ -26,7 +26,6 @@ in environment = { systemPackages = with pkgs; [ - pods podman-compose ]; }; diff --git a/overlays/darwin/paneru.nix b/overlays/darwin/overlays.nix similarity index 100% rename from overlays/darwin/paneru.nix rename to overlays/darwin/overlays.nix