diff --git a/flake.lock b/flake.lock index 6e4cfe5..62eb249 100755 --- a/flake.lock +++ b/flake.lock @@ -316,6 +316,18 @@ "url": "https://gitgud.foo/thegrind/hypr-shell.git" } }, + "my-assets": { + "flake": false, + "locked": { + "path": "./assets", + "type": "path" + }, + "original": { + "path": "./assets", + "type": "path" + }, + "parent": [] + }, "neovim-nightly-overlay": { "inputs": { "flake-compat": "flake-compat", @@ -433,6 +445,7 @@ "inputs": { "home-manager": "home-manager", "hyprshell": "hyprshell", + "my-assets": "my-assets", "neovim-nightly-overlay": "neovim-nightly-overlay", "nixpkgs": "nixpkgs_3", "stylix": "stylix" diff --git a/flake.nix b/flake.nix index d4c5160..0f6620a 100755 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,5 @@ { description = "Javi's computer configuration"; - inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; home-manager = { @@ -13,28 +12,69 @@ inputs.nixpkgs.follows = "nixpkgs"; }; neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; + + my-assets = { + url = "path:./assets"; + flake = false; + }; }; outputs = { self, nixpkgs, + my-assets, ... }@inputs: let system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; + + # Common overlays for all hosts overlays = [ inputs.neovim-nightly-overlay.overlays.default ]; + + # Helper function to create a host configuration + mkHost = + hostname: modules: + nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs; + inherit hostname; # Pass hostname to modules + assets = my-assets; + }; + modules = [ + # Common modules for all hosts + inputs.home-manager.nixosModules.default + inputs.stylix.nixosModules.stylix + + # Apply overlays to all hosts + ( + { config, pkgs, ... }: + { + nixpkgs.overlays = overlays; + } + ) + + # Host config + ./modules/system/common/fonts.nix + ./modules/system/common/xdg.nix + ./hosts/${hostname} + ] + ++ modules; # Additional modules passed to mkHost + }; in { - nixosConfigurations.default = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - modules = [ - inputs.home-manager.nixosModules.default - inputs.stylix.nixosModules.stylix - ./configuration.nix + nixosConfigurations = { + desktop = mkHost "desktop" [ + ./modules/system/nvidia.nix + ./modules/system/nfs.nix + ./modules/system/display-manager/sddm.nix + ]; + + laptop = mkHost "laptop" [ + ./modules/system/display-manager/sddm.nix ]; }; }; diff --git a/home.nix b/home.nix deleted file mode 100755 index 56786c6..0000000 --- a/home.nix +++ /dev/null @@ -1,146 +0,0 @@ -{ - config, - pkgs, - lib, - inputs, - ... -}: -{ - imports = [ - ./home/kitty.nix - ./home/shell.nix - ./home/starship.nix - ./home/git.nix - ./home/hyprland.nix - ./home/util/darkmode.nix - ./home/neovim.nix - ]; - nixpkgs.config.allowUnfree = true; - # Home Manager needs a bit of information about you and the paths it should - # manage. - home.username = "javi"; - home.homeDirectory = "/home/javi"; - - # This value determines the Home Manager release that your configuration is - # compatible with. This helps avoid breakage when a new Home Manager release - # introduces backwards incompatible changes. - # - # You should not change this value, even if you update Home Manager. If you do - # want to update the value, then make sure to first check the Home Manager - # release notes. - home.stateVersion = "25.05"; # Please read the comment before changing. - - # The home.packages option allows you to install Nix packages into your - # environment. - home.packages = with pkgs; [ - # Basics - quickshell - - # Terminal tools - yazi - ripgrep - fzf - bat - eza - jq - - # Dev tools - jetbrains.datagrip - vscode - nixfmt # Nix formatting - pkgs.libsForQt5.full # QML formatting (for working on quickshell) - - # System tools - btop - fastfetch - gnumake - - # Langs - php - php84Packages.composer - laravel - go - nodejs_22 - bun - ]; - - programs.btop = { - enable = true; - }; - - programs.yazi = { - enable = true; - keymap = { - manager.prepend_keymap = [ - { - on = [ - "b" - "g" - ]; - run = "shell 'hyprctl hyprpaper preload \"$0\" && hyprctl hyprpaper wallpaper \", $0\"'"; - desc = "Set as wallpaper"; - } - ]; - }; - }; - - stylix = { - enable = true; - targets = { - btop.enable = true; - }; - }; - - # Environment variables - home.sessionVariables = { - EDITOR = "code"; - BROWSER = "brave"; - TERMINAL = "kitty"; - NVD_BACKEND = "wayland"; - OZONE_PLATFORM = "wayland"; - OZONE_PLATFORM_HINT = "auto"; - XDG_CACHE_HOME = "${config.home.homeDirectory}/.cache"; - XDG_CONFIG_HOME = "${config.home.homeDirectory}/.config"; - XDG_DATA_HOME = "${config.home.homeDirectory}/.local/share"; - XDG_STATE_HOME = "${config.home.homeDirectory}/.local/state"; - }; - - # Configure all the xdg stuff so apps work correctly - xdg = { - enable = true; - # Normal expected directories - userDirs = { - enable = true; - createDirectories = true; - desktop = "${config.home.homeDirectory}/Desktop"; - documents = "${config.home.homeDirectory}/Documents"; - download = "${config.home.homeDirectory}/Downloads"; - music = "${config.home.homeDirectory}/Music"; - pictures = "${config.home.homeDirectory}/Pictures"; - publicShare = "${config.home.homeDirectory}/Public"; - templates = "${config.home.homeDirectory}/Templates"; - videos = "${config.home.homeDirectory}/Videos"; - }; - - # TODO: Move the http handler to a browser.nix - # # File/app associations - # mimeApps = { - # enable = true; - # defaultApplications = { - # "text/html" = "brave.desktop"; - # "x-scheme-handler/http" = "brave.desktop"; - # "x-scheme-handler/https" = "brave.desktop"; - # "x-scheme-handler/about" = "brave.desktop"; - # "x-scheme-handler/unknown" = "brave.desktop"; - # "application/pdf" = "org.gnome.Evince.desktop"; - # "text/plain" = "code.desktop"; - # "application/json" = "code.desktop"; - # "application/javascript" = "code.desktop"; - # "text/x-php" = "code.desktop"; - # }; - # }; - }; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; -} diff --git a/home/hyprland.nix b/home/hyprland.nix deleted file mode 100644 index e77d97a..0000000 --- a/home/hyprland.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ - config, - pkgs, - inputs, - ... -}: - -{ - imports = [ - # Configs - ./hyprland/binds.nix - # Ecosystem - ./hyprland/hyprpaper.nix - # Desktop environment - ./hyprland/hyprpanel.nix - ./wofi.nix - ./hyprland/desktop-env.nix - ]; - - home.packages = with pkgs; [ - # Running apps - # wofi - - # Notifications - libnotify - - # Screenshots - grim - slurp - wl-clipboard - hyprshot - - # Desktop env - hyprpanel - - # Utility - wl-clipboard - ]; - - # Important for certain apps working - # and dark mode being respected - xdg.portal = { - enable = true; - extraPortals = [ - pkgs.xdg-desktop-portal-gtk - pkgs.xdg-desktop-portal-hyprland - ]; - }; - - wayland.windowManager.hyprland.enable = true; - - wayland.windowManager.hyprland.settings = { - input = { - repeat_delay = 200; - repeat_rate = 20; - }; - - monitor = [ - "DP-5, 3440x1440@179.99, 0x0, 1" - ]; - - general = { - layout = "master"; - gaps_out = 0; - gaps_in = 0; - }; - - workspace = [ - "1, persistent:true" - "2, persistent:true" - "3, persistent:true" - "4, persistent:true" - "5, persistent:true" - "6, persistent:true" - ]; - - # Window rules - windowrulev2 = [ - "opacity 0.85, class:^(Code)$" - ]; - - decoration = { - blur = { - enabled = false; - size = 8; - passes = 2; - }; - - active_opacity = 1.0; - inactive_opacity = 1.0; - }; - - exec-once = [ - # "quickshell -c hyprshell" - "hyprpanel" - ]; - }; - - wayland.windowManager.hyprland.plugins = [ - # inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars - ]; - -} diff --git a/home/util/darkmode.nix b/home/util/darkmode.nix deleted file mode 100644 index d81eb32..0000000 --- a/home/util/darkmode.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ - inputs, - pkgs, - lib, - config, - ... -}: - -{ - -} - -# { -# home.packages = with pkgs; [ -# papirus-icon-theme -# papirus-folders -# ]; -# gtk = { -# enable = true; -# theme = { -# name = "Breeze-Dark"; -# package = pkgs.libsForQt5.breeze-gtk; -# }; -# iconTheme = { -# name = "Papirus-Dark"; -# }; -# gtk3 = { -# extraConfig.gtk-application-prefer-dark-theme = true; -# }; -# }; - -# dconf.settings = { -# "org/gnome/desktop/interface" = { -# gtk-theme = "Breeze-Dark"; -# color-scheme = "prefer-dark"; -# }; -# }; - -# qt = { -# enable = true; -# platformTheme = "gtk"; -# style = { -# name = "gtk2"; -# package = pkgs.libsForQt5.breeze-qt5; -# }; -# }; - -# # Make Qt apps follow dark mode -# home.sessionVariables = { -# QT_QPA_PLATFORMTHEME = "gtk2"; -# QT_STYLE_OVERRIDE = "gtk2"; -# }; -# } diff --git a/home/vscode.nix b/home/vscode.nix deleted file mode 100755 index 9099b75..0000000 --- a/home/vscode.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - config, - pkgs, - ... -}: -{ - programs.vscode = { - enable = true; - package = pkgs.vscode; - }; -} diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix new file mode 100755 index 0000000..1165c76 --- /dev/null +++ b/hosts/desktop/default.nix @@ -0,0 +1,210 @@ +{ + config, + pkgs, + inputs, + hostname, + assets, + ... +}: +{ + imports = [ + ./hardware-configuration.nix + ]; + + # Bootloader. + boot = { + loader = { + systemd-boot = { + enable = true; + }; + + efi = { + canTouchEfiVariables = true; + }; + }; + + # Mount my second drive + supportedFilesystems = [ "ntfs" ]; + }; + + networking = { + hostName = hostname; + + networkmanager = { + enable = true; + }; + }; + + time = { + timeZone = "America/New_York"; + }; + + i18n = { + defaultLocale = "en_US.UTF-8"; + + extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + }; + + services = { + printing = { + enable = true; + }; + + # Flatpak is here just for discord pretty much + flatpak = { + enable = true; + }; + + pulseaudio = { + enable = false; + }; + + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + openssh = { + enable = true; + }; + }; + + systemd.services.flatpak-repo = { + wantedBy = [ "multi-user.target" ]; + path = [ pkgs.flatpak ]; + script = '' + flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + ''; + }; + + security = { + rtkit = { + enable = true; + }; + }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; + + environment = { + systemPackages = with pkgs; [ + brave + git + openssh + pkgs.ntfs3g + xdg-user-dirs-gtk # This helps with Nautilus integration + cachix + ]; + + # Set up my user icon + etc = { + "avatars/javi.png".source = "${assets}/user-icon.png"; + }; + }; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.javi = { + isNormalUser = true; + description = "javi"; + shell = pkgs.zsh; + useDefaultShell = true; + extraGroups = [ + "networkmanager" + "wheel" + ]; + }; + + system = { + stateVersion = "25.05"; # Did you read the comment? + activationScripts.avatar = '' + mkdir -p /var/lib/AccountsService/icons + ln -sf /etc/avatars/javi.png /var/lib/AccountsService/icons/javi + ''; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + nix.settings = { + substituters = [ + "https://cache.nixos.org/" + ]; + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + }; + + programs = { + hyprland.enable = true; + + ssh = { + startAgent = true; + extraConfig = " + Host myhost + Hostname gitgud.foo + "; + }; + + # More thunar support + xfconf = { + enable = true; + + }; + + zsh.enable = true; + }; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + # Mount the second drive + fileSystems."/mnt/working-files" = { + device = "/dev/disk/by-uuid/BE8EBBDA8EBB8A03"; + fsType = "ntfs"; + options = [ + "uid=1000" # your user ID (check with `id -u`) + "gid=100" # your primary group ID (check with `id -g`) + "dmask=022" # dir permissions + "fmask=133" # file permissions + "nofail" + + # make Nautilus show it with a friendly name/icon + "x-gvfs-show" + "x-gvfs-name=Working Files" + ]; + }; + + # Theme + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark.yaml"; + # image = "/home/javi/Documents/wallpapers/Fantasy-Mountain.png"; + polarity = "dark"; + }; + + # Enable home manager + home-manager = { + extraSpecialArgs = { inherit inputs; }; + users = { + "javi" = { + imports = [ + ../../modules/home/home.nix + ]; + }; + }; + }; +} diff --git a/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix similarity index 100% rename from hardware-configuration.nix rename to hosts/desktop/hardware-configuration.nix diff --git a/configuration.nix b/hosts/laptop/configuration.nix similarity index 92% rename from configuration.nix rename to hosts/laptop/configuration.nix index a118294..6b7263e 100755 --- a/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -2,26 +2,20 @@ config, pkgs, inputs, + hostname, ... }: { imports = [ ./hardware-configuration.nix - ./system/nvidia.nix - # ./system/de/gdm.nix - ./system/de/sddm.nix - ./system/de/hypr/hyprland.nix - ./system/nfs.nix - ./system/fonts.nix - inputs.home-manager.nixosModules.default ]; # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "nixos"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + networking.hostName = hostname; + networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; diff --git a/home/git.nix b/modules/home/common/git.nix similarity index 100% rename from home/git.nix rename to modules/home/common/git.nix diff --git a/home/kitty.nix b/modules/home/common/kitty.nix similarity index 100% rename from home/kitty.nix rename to modules/home/common/kitty.nix diff --git a/home/neovim.nix b/modules/home/common/neovim.nix similarity index 100% rename from home/neovim.nix rename to modules/home/common/neovim.nix diff --git a/home/shell.nix b/modules/home/common/shell.nix similarity index 99% rename from home/shell.nix rename to modules/home/common/shell.nix index 12ab9cc..d05afe5 100755 --- a/home/shell.nix +++ b/modules/home/common/shell.nix @@ -14,7 +14,7 @@ shellAliases = { sudo = "sudo "; # Nix - rb = "git add . && sudo nixos-rebuild switch --flake $HOME/nix#default"; + rb = "git add . && sudo nixos-rebuild switch --flake $HOME/nix#desktop"; eza = "eza"; ls = "eza -lh --group-directories-first --icons"; diff --git a/home/starship.nix b/modules/home/common/starship.nix similarity index 100% rename from home/starship.nix rename to modules/home/common/starship.nix diff --git a/modules/home/common/yazi.nix b/modules/home/common/yazi.nix new file mode 100644 index 0000000..5a99983 --- /dev/null +++ b/modules/home/common/yazi.nix @@ -0,0 +1,23 @@ +{ + config, + pkgs, + inputs, + ... +}: +{ + programs.yazi = { + enable = true; + keymap = { + manager.prepend_keymap = [ + { + on = [ + "b" + "g" + ]; + run = "shell 'hyprctl hyprpaper preload \"$0\" && hyprctl hyprpaper wallpaper \", $0\"'"; + desc = "Set as wallpaper"; + } + ]; + }; + }; +} diff --git a/home/gnome.nix b/modules/home/gnome/gnome.nix similarity index 99% rename from home/gnome.nix rename to modules/home/gnome/gnome.nix index fdc3b19..110a23f 100755 --- a/home/gnome.nix +++ b/modules/home/gnome/gnome.nix @@ -9,6 +9,8 @@ ./gnome/keybinds.nix ]; + window + home.packages = with pkgs; [ gnomeExtensions.blur-my-shell gnomeExtensions.dash-to-dock diff --git a/home/gnome/keybinds.nix b/modules/home/gnome/keybinds.nix similarity index 100% rename from home/gnome/keybinds.nix rename to modules/home/gnome/keybinds.nix diff --git a/modules/home/home.nix b/modules/home/home.nix new file mode 100755 index 0000000..3988b5a --- /dev/null +++ b/modules/home/home.nix @@ -0,0 +1,128 @@ +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ + imports = [ + ./common/git.nix + ./common/kitty.nix + ./common/neovim.nix + ./common/shell.nix + ./common/starship.nix + ./common/yazi.nix + ./hyprland + ]; + + nixpkgs.config.allowUnfree = true; + + # gtk = { + # enable = true; + # iconTheme = { + # name = "Papirus"; + # package = pkgs.papirus-icon-theme; + # }; + # }; + + home = { + username = "javi"; + homeDirectory = "/home/javi"; + stateVersion = "25.05"; # Home manager version. Do not update carelessly + packages = with pkgs; [ + # Basics + quickshell + + # Terminal tools + ripgrep + fzf + bat + eza + jq + + # Dev tools + jetbrains.datagrip + vscode + nixfmt # Nix formatting + pkgs.libsForQt5.full # QML formatting (for working on quickshell) + + # System tools + btop + fastfetch + gnumake + + # Langs + php + php84Packages.composer + laravel + go + nodejs_22 + bun + ]; + + sessionVariables = { + EDITOR = "code"; + BROWSER = "brave"; + TERMINAL = "kitty"; + NVD_BACKEND = "wayland"; + OZONE_PLATFORM = "wayland"; + OZONE_PLATFORM_HINT = "auto"; + XDG_CACHE_HOME = "${config.home.homeDirectory}/.cache"; + XDG_CONFIG_HOME = "${config.home.homeDirectory}/.config"; + XDG_DATA_HOME = "${config.home.homeDirectory}/.local/share"; + XDG_STATE_HOME = "${config.home.homeDirectory}/.local/state"; + }; + }; + + # Programs home manager should manage + programs = { + btop = { + enable = true; + }; + }; + + stylix = { + enable = true; + targets = { + btop.enable = true; + }; + }; + + xdg = { + # Normal expected directories + userDirs = { + enable = true; + createDirectories = true; + desktop = "${config.home.homeDirectory}/Desktop"; + documents = "${config.home.homeDirectory}/Documents"; + download = "${config.home.homeDirectory}/Downloads"; + music = "${config.home.homeDirectory}/Music"; + pictures = "${config.home.homeDirectory}/Pictures"; + publicShare = "${config.home.homeDirectory}/Public"; + templates = "${config.home.homeDirectory}/Templates"; + videos = "${config.home.homeDirectory}/Videos"; + }; + + # TODO: Move the http handler to a browser.nix + # # File/app associations + # mimeApps = { + # enable = true; + # defaultApplications = { + # "text/html" = "brave.desktop"; + # "x-scheme-handler/http" = "brave.desktop"; + # "x-scheme-handler/https" = "brave.desktop"; + # "x-scheme-handler/about" = "brave.desktop"; + # "x-scheme-handler/unknown" = "brave.desktop"; + # "application/pdf" = "org.gnome.Evince.desktop"; + # "text/plain" = "code.desktop"; + # "application/json" = "code.desktop"; + # "application/javascript" = "code.desktop"; + # "text/x-php" = "code.desktop"; + # }; + # }; + }; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +} diff --git a/home/hyprland/background.png b/modules/home/hyprland/background.png similarity index 100% rename from home/hyprland/background.png rename to modules/home/hyprland/background.png diff --git a/home/hyprland/binds.nix b/modules/home/hyprland/binds.nix similarity index 97% rename from home/hyprland/binds.nix rename to modules/home/hyprland/binds.nix index c4aad6b..d92805d 100644 --- a/home/hyprland/binds.nix +++ b/modules/home/hyprland/binds.nix @@ -33,7 +33,7 @@ # "$mod ALT, p, exec, $terminal --start-as=normal -- bash -ic 'proj'" "$mod ALT, p, exec, eza -ld $HOME/projects/* --color=never | awk '{print $7}' | wofi --dmenu --prompt \"Open project:\" | xargs -I{} code {} -n && exit" - "$mod, RETURN, exec, $webapphttps://chatgpt.com" + "$mod, RETURN, exec, $webapphttps://claude.ai" # Window and workspace navigation # Move between windows with vim keys diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix new file mode 100644 index 0000000..ac7659f --- /dev/null +++ b/modules/home/hyprland/default.nix @@ -0,0 +1,114 @@ +{ + config, + pkgs, + inputs, + ... +}: + +{ + imports = [ + ./binds.nix + ./hyprpaper.nix + ./hyprpanel.nix + ./wofi.nix + ./desktop-env.nix + ]; + + home = { + sessionVariables = { + NIXOS_OZON_WL = "1"; + }; + + packages = with pkgs; [ + # Notifications + libnotify + + # Screenshots + grim + slurp + wl-clipboard + hyprshot + + # Desktop env + hyprpanel + + # Utility + wl-clipboard + ]; + }; + + # Important for certain apps working + # and dark mode being respected + xdg.portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal-hyprland + ]; + }; + + gtk = { + enable = true; + iconTheme = { + name = "Papirus"; + package = pkgs.papirus-icon-theme; + }; + }; + + wayland.windowManager.hyprland = { + + enable = true; + + settings = { + + input = { + repeat_delay = 200; + repeat_rate = 20; + }; + + monitor = [ + "DP-5, 3440x1440@179.99, 0x0, 1" + ]; + + general = { + layout = "master"; + gaps_out = 0; + gaps_in = 0; + }; + + workspace = [ + "1, persistent:true" + "2, persistent:true" + "3, persistent:true" + "4, persistent:true" + "5, persistent:true" + "6, persistent:true" + ]; + + # Window rules + windowrulev2 = [ + "opacity 0.85, class:^(Code)$" + ]; + + decoration = { + blur = { + enabled = false; + size = 8; + passes = 2; + }; + + active_opacity = 1.0; + inactive_opacity = 1.0; + }; + + exec-once = [ + # "quickshell -c hyprshell" + "hyprpanel" + ]; + }; + + plugins = [ + # inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars + ]; + }; +} diff --git a/home/hyprland/desktop-env.nix b/modules/home/hyprland/desktop-env.nix similarity index 97% rename from home/hyprland/desktop-env.nix rename to modules/home/hyprland/desktop-env.nix index f7d705b..8ffef19 100644 --- a/home/hyprland/desktop-env.nix +++ b/modules/home/hyprland/desktop-env.nix @@ -98,10 +98,14 @@ "application/x-rar" = "org.kde.ark.desktop"; # Directory - "inode/directory" = "org.kde.dolphin.desktop"; + "inode/directory" = "thunar.desktop"; }; }; + home.sessionVariables = { + FILE_MANAGER = "thunar"; + }; + # Configure specific programs programs = { # Configure mpv for advanced video playback diff --git a/home/hyprland/hyprpanel.nix b/modules/home/hyprland/hyprpanel.nix similarity index 100% rename from home/hyprland/hyprpanel.nix rename to modules/home/hyprland/hyprpanel.nix diff --git a/home/hyprland/hyprpanel/theme-gruvbox.nix b/modules/home/hyprland/hyprpanel/theme-gruvbox.nix similarity index 100% rename from home/hyprland/hyprpanel/theme-gruvbox.nix rename to modules/home/hyprland/hyprpanel/theme-gruvbox.nix diff --git a/home/hyprland/hyprpaper.nix b/modules/home/hyprland/hyprpaper.nix similarity index 100% rename from home/hyprland/hyprpaper.nix rename to modules/home/hyprland/hyprpaper.nix diff --git a/home/hyprland/windowrules.nix b/modules/home/hyprland/windowrules.nix similarity index 100% rename from home/hyprland/windowrules.nix rename to modules/home/hyprland/windowrules.nix diff --git a/home/wofi.nix b/modules/home/hyprland/wofi.nix similarity index 100% rename from home/wofi.nix rename to modules/home/hyprland/wofi.nix diff --git a/system/fonts.nix b/modules/system/common/fonts.nix similarity index 100% rename from system/fonts.nix rename to modules/system/common/fonts.nix diff --git a/modules/system/common/xdg.nix b/modules/system/common/xdg.nix new file mode 100644 index 0000000..0624071 --- /dev/null +++ b/modules/system/common/xdg.nix @@ -0,0 +1,20 @@ +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ + + # Configure all the xdg stuff so apps work correctly + xdg = { + portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal-hyprland + ]; + }; + }; +} diff --git a/system/de/gdm.nix b/modules/system/display-manager/gdm.nix similarity index 100% rename from system/de/gdm.nix rename to modules/system/display-manager/gdm.nix diff --git a/modules/system/display-manager/sddm.nix b/modules/system/display-manager/sddm.nix new file mode 100644 index 0000000..afc7afb --- /dev/null +++ b/modules/system/display-manager/sddm.nix @@ -0,0 +1,63 @@ +{ + config, + pkgs, + inputs, + assets, + ... +}: +let + basePath = "/home/javi/Documents/wallpapers"; + wallpaper = "Fantasy-Mountain.png"; +in +{ + environment = { + etc = { + "sddm-wallpaper.png".source = "${assets}/sddm-background.png"; + "gtk-3.0/settings.ini".text = '' + [Settings] + gtk-icon-theme-name=Papirus + gtk-theme-name=Adwaita + gtk-cursor-theme-name=Adwaita + ''; + }; + + systemPackages = with pkgs; [ + papirus-icon-theme + (sddm-chili-theme.override { + themeConfig = { + background = "/etc/sddm-wallpaper.png"; + ScreenWidth = "3440"; + ScreenHeight = "1440"; + recursiveBlurLoops = 1; + recursiveBlurRadius = 10; + }; + }) + libsForQt5.qt5.qtgraphicaleffects + ]; + + pathsToLink = [ + "/share/icons" + ]; + + variables = { + GTK_ICON_THEME = "Papirus"; + }; + }; + + programs.dconf.enable = true; + + services.displayManager.sddm = { + enable = true; + wayland.enable = true; + theme = "chili"; + autoNumlock = true; + package = pkgs.libsForQt5.sddm; + extraPackages = with pkgs.libsForQt5.qt5; [ + qtgraphicaleffects + qtquickcontrols2 + qtquickcontrols + qtsvg + qtdeclarative # QtQuick core + ]; + }; +} diff --git a/system/gnome.nix b/modules/system/gnome.nix similarity index 100% rename from system/gnome.nix rename to modules/system/gnome.nix diff --git a/system/nfs.nix b/modules/system/nfs.nix similarity index 68% rename from system/nfs.nix rename to modules/system/nfs.nix index 22db378..278ce1d 100644 --- a/system/nfs.nix +++ b/modules/system/nfs.nix @@ -33,7 +33,16 @@ let in { - services.gvfs.enable = true; - services.udisks2.enable = true; + # Enable NFS client support + boot.supportedFilesystems = [ "nfs" ]; + services = { + rpcbind.enable = true; # Required for NFS + gvfs.enable = true; + udisks2.enable = true; + }; + fileSystems = fsConfig; + + # # Optional: Create mount directories + # systemd.tmpfiles.rules = map (share: "d /mnt/${share} 0755 root root -") shares; } diff --git a/system/nvidia.nix b/modules/system/nvidia.nix similarity index 100% rename from system/nvidia.nix rename to modules/system/nvidia.nix diff --git a/result b/result deleted file mode 120000 index 2d32ed5..0000000 --- a/result +++ /dev/null @@ -1 +0,0 @@ -/nix/store/cy863mrchnaj8v0y419jc7hnwrll43z9-walker-0.13.14 \ No newline at end of file diff --git a/system/de/hypr/hyprland.nix b/system/de/hypr/hyprland.nix deleted file mode 100644 index 356a4b7..0000000 --- a/system/de/hypr/hyprland.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - config, - pkgs, - inputs, - ... -}: - -{ - # Install hyprland and all the stuff it needs - programs.hyprland.enable = true; - environment.sessionVariables.NIXOS_OZON_WL = "1"; - - environment.systemPackages = with pkgs; [ - hyprlock - ]; -} diff --git a/system/de/sddm.nix b/system/de/sddm.nix deleted file mode 100644 index 37f14e5..0000000 --- a/system/de/sddm.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - config, - pkgs, - inputs, - ... -}: -let - basePath = "/home/javi/Documents/wallpapers"; - wallpaper = "Fantasy-Mountain.png"; -in -{ - environment.etc."sddm-wallpaper.png".source = ../../assets/sddm-background.png; - environment.systemPackages = with pkgs; [ - (sddm-chili-theme.override { - themeConfig = { - background = "/etc/sddm-wallpaper.png"; - ScreenWidth = "3440"; - ScreenHeight = "1440"; - recursiveBlurLoops = 1; - recursiveBlurRadius = 10; - }; - }) - libsForQt5.qt5.qtgraphicaleffects - papirus-icon-theme - ]; - - programs.dconf.enable = true; - environment.etc."gtk-3.0/settings.ini".text = '' - [Settings] - gtk-icon-theme-name=Papirus - gtk-theme-name=Adwaita - gtk-cursor-theme-name=Adwaita - ''; - - services.displayManager.sddm = { - enable = true; - wayland.enable = true; - theme = "chili"; - autoNumlock = true; - package = pkgs.libsForQt5.sddm; - extraPackages = with pkgs.libsForQt5.qt5; [ - qtgraphicaleffects - qtquickcontrols2 - qtquickcontrols - qtsvg - qtdeclarative # QtQuick core - ]; - }; -}