From b30376cdcf514a15e420cd9b175f1ea94df51994 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sun, 5 Jan 2025 19:14:37 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Moved=20almost=20all=20files=20t?= =?UTF-8?q?o=20/modules.=20Moved=20some=20code=20to=20separate=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 - configuration.nix | 78 +----------------- flake.nix | 2 +- .../default-applications.nix | 0 {home => home-manager}/default.nix | 0 {home => home-manager}/fish.nix | 0 {home => home-manager}/hyprland/default.nix | 0 .../hyprland/hyprcursor/default.nix | 0 .../hyprcursor/hyprcursors/X_cursor.hlc | Bin .../hyprcursor/hyprcursors/all-scroll.hlc | Bin .../hyprcursors/bd_double_arrow.hlc | Bin .../hyprcursors/bottom_left_corner.hlc | Bin .../hyprcursors/bottom_right_corner.hlc | Bin .../hyprcursor/hyprcursors/bottom_side.hlc | Bin .../hyprcursor/hyprcursors/center_ptr.hlc | Bin .../hyprcursor/hyprcursors/col-resize.hlc | Bin .../hyprcursor/hyprcursors/color-picker.hlc | Bin .../hyprcursor/hyprcursors/context-menu.hlc | Bin .../hyprland/hyprcursor/hyprcursors/copy.hlc | Bin .../hyprland/hyprcursor/hyprcursors/cross.hlc | Bin .../hyprcursor/hyprcursors/crossed_circle.hlc | Bin .../hyprcursor/hyprcursors/dnd_no_drop.hlc | Bin .../hyprcursor/hyprcursors/dotbox.hlc | Bin .../hyprcursors/fd_double_arrow.hlc | Bin .../hyprland/hyprcursor/hyprcursors/hand1.hlc | Bin .../hyprland/hyprcursor/hyprcursors/hand2.hlc | Bin .../hyprcursor/hyprcursors/left_ptr.hlc | Bin .../hyprcursor/hyprcursors/left_side.hlc | Bin .../hyprland/hyprcursor/hyprcursors/link.hlc | Bin .../hyprland/hyprcursor/hyprcursors/move.hlc | Bin .../hyprcursor/hyprcursors/pencil.hlc | Bin .../hyprcursor/hyprcursors/pirate.hlc | Bin .../hyprland/hyprcursor/hyprcursors/plus.hlc | Bin .../hyprcursor/hyprcursors/question_arrow.hlc | Bin .../hyprcursor/hyprcursors/right_ptr.hlc | Bin .../hyprcursor/hyprcursors/right_side.hlc | Bin .../hyprcursor/hyprcursors/row-resize.hlc | Bin .../hyprcursor/hyprcursors/sb_down_arrow.hlc | Bin .../hyprcursors/sb_h_double_arrow.hlc | Bin .../hyprcursor/hyprcursors/sb_left_arrow.hlc | Bin .../hyprcursor/hyprcursors/sb_right_arrow.hlc | Bin .../hyprcursor/hyprcursors/sb_up_arrow.hlc | Bin .../hyprcursors/sb_v_double_arrow.hlc | Bin .../hyprcursors/top_left_corner.hlc | Bin .../hyprcursors/top_right_corner.hlc | Bin .../hyprcursor/hyprcursors/top_side.hlc | Bin .../hyprcursor/hyprcursors/vertical-text.hlc | Bin .../hyprcursor/hyprcursors/wayland-cursor.hlc | Bin .../hyprland/hyprcursor/hyprcursors/xterm.hlc | Bin .../hyprcursor/hyprcursors/zoom-in.hlc | Bin .../hyprcursor/hyprcursors/zoom-out.hlc | Bin .../hyprland/hyprcursor/manifest.hl | 0 .../hyprland/hypridle/default.nix | 10 +-- {home => home-manager}/hyprland/hyprland.conf | 0 .../hyprland/hyprlock/default.nix | 0 .../hyprland/swaync/default.nix | 0 .../hyprland/swaync/mocha.css | 0 .../hyprland/waybar/config/config.jsonc | 0 .../hyprland/waybar/config/mocha.css | 0 .../hyprland/waybar/config/style.css | 0 .../hyprland/waybar/default.nix | 0 {home => home-manager}/nixvim/default.nix | 0 .../rofi/catppuccin-mocha.rasi | 0 {home => home-manager}/rofi/config.rasi | 0 {home => home-manager}/rofi/default.nix | 0 {home => home-manager}/rofi/rofimoji.rc | 0 {home => home-manager}/starship.toml | 0 {home => home-manager}/wlogout/default.nix | 0 {home => home-manager}/wlogout/hibernate.svg | 0 {home => home-manager}/wlogout/lock.svg | 0 {home => home-manager}/wlogout/logout.svg | 0 {home => home-manager}/wlogout/reboot.svg | 0 {home => home-manager}/wlogout/shutdown.svg | 0 {home => home-manager}/wlogout/style.css | 0 {home => home-manager}/wlogout/suspend.svg | 0 modules/default.nix | 19 +++++ development.nix => modules/development.nix | 0 modules/fonts.nix | 14 ++++ {gnome => modules/gnome}/default.nix | 2 +- {gnome => modules/gnome}/nautilus.nix | 0 audio.nix => modules/hardware/audio.nix | 0 modules/hardware/default.nix | 10 +++ modules/hardware/graphics/default.nix | 19 +++++ modules/hardware/graphics/nvidia.nix | 15 ++++ .../hardware/hardware-configuration.nix | 0 keyboard.nix => modules/hardware/keyboard.nix | 0 {hyprland => modules/hyprland}/default.nix | 0 {hyprland => modules/hyprland}/wallpaper.nix | 0 {hyprland => modules/hyprland}/waybar.nix | 0 locale.nix => modules/locale.nix | 0 networking.nix => modules/networking.nix | 4 +- nixHelper.nix => modules/nix-helper.nix | 0 sddm.nix => modules/sddm.nix | 2 +- security.nix => modules/security.nix | 3 + modules/steam.nix | 10 +++ modules/stylix.nix | 16 ++++ modules/terminal/default.nix | 11 +++ {terminal => modules/terminal}/shell.nix | 0 starter.nix | 5 -- switch | 5 +- terminal/default.nix | 7 -- 101 files changed, 133 insertions(+), 102 deletions(-) rename {home => home-manager}/default-applications.nix (100%) rename {home => home-manager}/default.nix (100%) rename {home => home-manager}/fish.nix (100%) rename {home => home-manager}/hyprland/default.nix (100%) rename {home => home-manager}/hyprland/hyprcursor/default.nix (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/X_cursor.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/all-scroll.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/bd_double_arrow.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/bottom_left_corner.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/bottom_right_corner.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/bottom_side.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/center_ptr.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/col-resize.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/color-picker.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/context-menu.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/copy.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/cross.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/crossed_circle.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/dnd_no_drop.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/dotbox.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/fd_double_arrow.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/hand1.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/hand2.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/left_ptr.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/left_side.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/link.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/move.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/pencil.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/pirate.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/plus.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/question_arrow.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/right_ptr.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/right_side.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/row-resize.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/sb_down_arrow.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/sb_h_double_arrow.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/sb_left_arrow.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/sb_right_arrow.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/sb_up_arrow.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/sb_v_double_arrow.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/top_left_corner.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/top_right_corner.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/top_side.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/vertical-text.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/wayland-cursor.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/xterm.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/zoom-in.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/hyprcursors/zoom-out.hlc (100%) rename {home => home-manager}/hyprland/hyprcursor/manifest.hl (100%) rename {home => home-manager}/hyprland/hypridle/default.nix (79%) rename {home => home-manager}/hyprland/hyprland.conf (100%) rename {home => home-manager}/hyprland/hyprlock/default.nix (100%) rename {home => home-manager}/hyprland/swaync/default.nix (100%) rename {home => home-manager}/hyprland/swaync/mocha.css (100%) rename {home => home-manager}/hyprland/waybar/config/config.jsonc (100%) rename {home => home-manager}/hyprland/waybar/config/mocha.css (100%) rename {home => home-manager}/hyprland/waybar/config/style.css (100%) rename {home => home-manager}/hyprland/waybar/default.nix (100%) rename {home => home-manager}/nixvim/default.nix (100%) rename {home => home-manager}/rofi/catppuccin-mocha.rasi (100%) rename {home => home-manager}/rofi/config.rasi (100%) rename {home => home-manager}/rofi/default.nix (100%) rename {home => home-manager}/rofi/rofimoji.rc (100%) rename {home => home-manager}/starship.toml (100%) rename {home => home-manager}/wlogout/default.nix (100%) rename {home => home-manager}/wlogout/hibernate.svg (100%) rename {home => home-manager}/wlogout/lock.svg (100%) rename {home => home-manager}/wlogout/logout.svg (100%) rename {home => home-manager}/wlogout/reboot.svg (100%) rename {home => home-manager}/wlogout/shutdown.svg (100%) rename {home => home-manager}/wlogout/style.css (100%) rename {home => home-manager}/wlogout/suspend.svg (100%) create mode 100644 modules/default.nix rename development.nix => modules/development.nix (100%) create mode 100644 modules/fonts.nix rename {gnome => modules/gnome}/default.nix (94%) rename {gnome => modules/gnome}/nautilus.nix (100%) rename audio.nix => modules/hardware/audio.nix (100%) create mode 100644 modules/hardware/default.nix create mode 100644 modules/hardware/graphics/default.nix create mode 100644 modules/hardware/graphics/nvidia.nix rename hardware-configuration.nix => modules/hardware/hardware-configuration.nix (100%) rename keyboard.nix => modules/hardware/keyboard.nix (100%) rename {hyprland => modules/hyprland}/default.nix (100%) rename {hyprland => modules/hyprland}/wallpaper.nix (100%) rename {hyprland => modules/hyprland}/waybar.nix (100%) rename locale.nix => modules/locale.nix (100%) rename networking.nix => modules/networking.nix (92%) rename nixHelper.nix => modules/nix-helper.nix (100%) rename sddm.nix => modules/sddm.nix (90%) rename security.nix => modules/security.nix (91%) create mode 100644 modules/steam.nix create mode 100644 modules/stylix.nix create mode 100644 modules/terminal/default.nix rename {terminal => modules/terminal}/shell.nix (100%) delete mode 100644 starter.nix delete mode 100644 terminal/default.nix diff --git a/.gitignore b/.gitignore index d3d2003..f12ddc1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -# Autogenerated -hardware-configuration.nix - # Symlink create by `nix build` result diff --git a/configuration.nix b/configuration.nix index 361610f..4c15034 100644 --- a/configuration.nix +++ b/configuration.nix @@ -9,20 +9,7 @@ }: { - imports = [ - ./gnome - ./hardware-configuration.nix - ./keyboard.nix - ./terminal - ./hyprland - ./audio.nix - ./networking.nix - ./nixHelper.nix - ./development.nix - ./security.nix - ./locale.nix - ./sddm.nix - ]; + imports = [ ./modules ]; nixpkgs.overlays = [ outputs.overlays.unstable-packages ]; @@ -46,27 +33,14 @@ environment.sessionVariables = { # Tells Electron apps to use Wayland NIXOS_OZONE_WL = "1"; - NIXOS_CONFIG_PATH = "/etc/nixos"; - LIBVA_DRIVER_NAME = "iHD"; # For hardware acceleration - }; - - fonts = { - fontconfig.enable = true; - packages = with pkgs; [ - (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) - jetbrains-mono - # The line below will replace the lines above in 25.05 - # nerd-fonts.jetbrains-mono - ]; }; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - gnupg wget - kitty xdg-utils + xdg-desktop-portal xdg-desktop-portal-gtk kdePackages.qtwayland kdePackages.qtsvg @@ -92,16 +66,7 @@ # programs.mtr.enable = true; programs = { - gnupg.agent.enable = true; - kdeconnect.enable = true; - - steam = { - enable = true; - remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play - dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server - localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers - }; }; # List services that you want to enable: @@ -111,48 +76,11 @@ services = { flatpak.enable = true; - - xserver = { - enable = true; - # Load Nvidia driver for Xorg and Wayland - videoDrivers = [ "nvidia" ]; - }; - }; - - stylix = { - enable = true; - image = ./catppuccin.png; - base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; - polarity = "dark"; - opacity.terminal = 0.8; - override = { - base02 = "b0b0b0"; # Comments in shell - base03 = "b0b0b0"; # Comments in nvim - base04 = "b0b0b0"; # Secondary text in shell - }; + xserver.enable = true; }; qt.enable = true; - hardware = { - # Enable OpenGL - graphics = { - enable = true; - extraPackages = with pkgs; [ - intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD - ]; - }; - - nvidia = { - # Required - modesetting.enable = true; - # Use closed-source drivers - open = false; - # Enable the Nvidia settings menu - nvidiaSettings = true; - }; - }; - # 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/flake.nix b/flake.nix index 6ed6383..344440c 100644 --- a/flake.nix +++ b/flake.nix @@ -50,7 +50,7 @@ useUserPackages = true; # Passes inputs as an argument to home-manager extraSpecialArgs = { inherit inputs; }; - users.martin = import ./home; + users.martin = import ./home-manager; }; } stylix.nixosModules.stylix diff --git a/home/default-applications.nix b/home-manager/default-applications.nix similarity index 100% rename from home/default-applications.nix rename to home-manager/default-applications.nix diff --git a/home/default.nix b/home-manager/default.nix similarity index 100% rename from home/default.nix rename to home-manager/default.nix diff --git a/home/fish.nix b/home-manager/fish.nix similarity index 100% rename from home/fish.nix rename to home-manager/fish.nix diff --git a/home/hyprland/default.nix b/home-manager/hyprland/default.nix similarity index 100% rename from home/hyprland/default.nix rename to home-manager/hyprland/default.nix diff --git a/home/hyprland/hyprcursor/default.nix b/home-manager/hyprland/hyprcursor/default.nix similarity index 100% rename from home/hyprland/hyprcursor/default.nix rename to home-manager/hyprland/hyprcursor/default.nix diff --git a/home/hyprland/hyprcursor/hyprcursors/X_cursor.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/X_cursor.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/X_cursor.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/X_cursor.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/all-scroll.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/all-scroll.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/all-scroll.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/all-scroll.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/bd_double_arrow.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/bd_double_arrow.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/bd_double_arrow.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/bd_double_arrow.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/bottom_left_corner.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/bottom_left_corner.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/bottom_left_corner.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/bottom_left_corner.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/bottom_right_corner.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/bottom_right_corner.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/bottom_right_corner.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/bottom_right_corner.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/bottom_side.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/bottom_side.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/bottom_side.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/bottom_side.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/center_ptr.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/center_ptr.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/center_ptr.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/center_ptr.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/col-resize.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/col-resize.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/col-resize.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/col-resize.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/color-picker.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/color-picker.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/color-picker.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/color-picker.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/context-menu.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/context-menu.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/context-menu.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/context-menu.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/copy.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/copy.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/copy.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/copy.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/cross.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/cross.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/cross.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/cross.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/crossed_circle.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/crossed_circle.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/crossed_circle.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/crossed_circle.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/dnd_no_drop.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/dnd_no_drop.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/dnd_no_drop.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/dnd_no_drop.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/dotbox.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/dotbox.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/dotbox.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/dotbox.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/fd_double_arrow.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/fd_double_arrow.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/fd_double_arrow.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/fd_double_arrow.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/hand1.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/hand1.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/hand1.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/hand1.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/hand2.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/hand2.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/hand2.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/hand2.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/left_ptr.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/left_ptr.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/left_ptr.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/left_ptr.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/left_side.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/left_side.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/left_side.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/left_side.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/link.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/link.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/link.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/link.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/move.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/move.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/move.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/move.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/pencil.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/pencil.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/pencil.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/pencil.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/pirate.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/pirate.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/pirate.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/pirate.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/plus.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/plus.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/plus.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/plus.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/question_arrow.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/question_arrow.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/question_arrow.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/question_arrow.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/right_ptr.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/right_ptr.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/right_ptr.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/right_ptr.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/right_side.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/right_side.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/right_side.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/right_side.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/row-resize.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/row-resize.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/row-resize.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/row-resize.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/sb_down_arrow.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/sb_down_arrow.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/sb_down_arrow.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/sb_down_arrow.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/sb_h_double_arrow.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/sb_h_double_arrow.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/sb_h_double_arrow.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/sb_h_double_arrow.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/sb_left_arrow.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/sb_left_arrow.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/sb_left_arrow.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/sb_left_arrow.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/sb_right_arrow.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/sb_right_arrow.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/sb_right_arrow.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/sb_right_arrow.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/sb_up_arrow.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/sb_up_arrow.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/sb_up_arrow.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/sb_up_arrow.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/sb_v_double_arrow.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/sb_v_double_arrow.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/sb_v_double_arrow.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/sb_v_double_arrow.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/top_left_corner.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/top_left_corner.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/top_left_corner.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/top_left_corner.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/top_right_corner.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/top_right_corner.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/top_right_corner.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/top_right_corner.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/top_side.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/top_side.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/top_side.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/top_side.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/vertical-text.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/vertical-text.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/vertical-text.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/vertical-text.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/wayland-cursor.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/wayland-cursor.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/wayland-cursor.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/wayland-cursor.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/xterm.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/xterm.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/xterm.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/xterm.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/zoom-in.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/zoom-in.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/zoom-in.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/zoom-in.hlc diff --git a/home/hyprland/hyprcursor/hyprcursors/zoom-out.hlc b/home-manager/hyprland/hyprcursor/hyprcursors/zoom-out.hlc similarity index 100% rename from home/hyprland/hyprcursor/hyprcursors/zoom-out.hlc rename to home-manager/hyprland/hyprcursor/hyprcursors/zoom-out.hlc diff --git a/home/hyprland/hyprcursor/manifest.hl b/home-manager/hyprland/hyprcursor/manifest.hl similarity index 100% rename from home/hyprland/hyprcursor/manifest.hl rename to home-manager/hyprland/hyprcursor/manifest.hl diff --git a/home/hyprland/hypridle/default.nix b/home-manager/hyprland/hypridle/default.nix similarity index 79% rename from home/hyprland/hypridle/default.nix rename to home-manager/hyprland/hypridle/default.nix index b7c5403..6f71dfa 100644 --- a/home/hyprland/hypridle/default.nix +++ b/home-manager/hyprland/hypridle/default.nix @@ -21,11 +21,11 @@ in on-timeout = "loginctl lock-session"; } # Turn off screens TODO buggy main monitor, turns off and on after resume -# { -# timeout = 120; -# on-timeout = "hyprctl dispatch dpms off"; -# on-resume = "hyprctl dispatch dpms on"; -# } + # { + # timeout = 120; + # on-timeout = "hyprctl dispatch dpms off"; + # on-resume = "hyprctl dispatch dpms on"; + # } # Suspend { timeout = suspendAfter; diff --git a/home/hyprland/hyprland.conf b/home-manager/hyprland/hyprland.conf similarity index 100% rename from home/hyprland/hyprland.conf rename to home-manager/hyprland/hyprland.conf diff --git a/home/hyprland/hyprlock/default.nix b/home-manager/hyprland/hyprlock/default.nix similarity index 100% rename from home/hyprland/hyprlock/default.nix rename to home-manager/hyprland/hyprlock/default.nix diff --git a/home/hyprland/swaync/default.nix b/home-manager/hyprland/swaync/default.nix similarity index 100% rename from home/hyprland/swaync/default.nix rename to home-manager/hyprland/swaync/default.nix diff --git a/home/hyprland/swaync/mocha.css b/home-manager/hyprland/swaync/mocha.css similarity index 100% rename from home/hyprland/swaync/mocha.css rename to home-manager/hyprland/swaync/mocha.css diff --git a/home/hyprland/waybar/config/config.jsonc b/home-manager/hyprland/waybar/config/config.jsonc similarity index 100% rename from home/hyprland/waybar/config/config.jsonc rename to home-manager/hyprland/waybar/config/config.jsonc diff --git a/home/hyprland/waybar/config/mocha.css b/home-manager/hyprland/waybar/config/mocha.css similarity index 100% rename from home/hyprland/waybar/config/mocha.css rename to home-manager/hyprland/waybar/config/mocha.css diff --git a/home/hyprland/waybar/config/style.css b/home-manager/hyprland/waybar/config/style.css similarity index 100% rename from home/hyprland/waybar/config/style.css rename to home-manager/hyprland/waybar/config/style.css diff --git a/home/hyprland/waybar/default.nix b/home-manager/hyprland/waybar/default.nix similarity index 100% rename from home/hyprland/waybar/default.nix rename to home-manager/hyprland/waybar/default.nix diff --git a/home/nixvim/default.nix b/home-manager/nixvim/default.nix similarity index 100% rename from home/nixvim/default.nix rename to home-manager/nixvim/default.nix diff --git a/home/rofi/catppuccin-mocha.rasi b/home-manager/rofi/catppuccin-mocha.rasi similarity index 100% rename from home/rofi/catppuccin-mocha.rasi rename to home-manager/rofi/catppuccin-mocha.rasi diff --git a/home/rofi/config.rasi b/home-manager/rofi/config.rasi similarity index 100% rename from home/rofi/config.rasi rename to home-manager/rofi/config.rasi diff --git a/home/rofi/default.nix b/home-manager/rofi/default.nix similarity index 100% rename from home/rofi/default.nix rename to home-manager/rofi/default.nix diff --git a/home/rofi/rofimoji.rc b/home-manager/rofi/rofimoji.rc similarity index 100% rename from home/rofi/rofimoji.rc rename to home-manager/rofi/rofimoji.rc diff --git a/home/starship.toml b/home-manager/starship.toml similarity index 100% rename from home/starship.toml rename to home-manager/starship.toml diff --git a/home/wlogout/default.nix b/home-manager/wlogout/default.nix similarity index 100% rename from home/wlogout/default.nix rename to home-manager/wlogout/default.nix diff --git a/home/wlogout/hibernate.svg b/home-manager/wlogout/hibernate.svg similarity index 100% rename from home/wlogout/hibernate.svg rename to home-manager/wlogout/hibernate.svg diff --git a/home/wlogout/lock.svg b/home-manager/wlogout/lock.svg similarity index 100% rename from home/wlogout/lock.svg rename to home-manager/wlogout/lock.svg diff --git a/home/wlogout/logout.svg b/home-manager/wlogout/logout.svg similarity index 100% rename from home/wlogout/logout.svg rename to home-manager/wlogout/logout.svg diff --git a/home/wlogout/reboot.svg b/home-manager/wlogout/reboot.svg similarity index 100% rename from home/wlogout/reboot.svg rename to home-manager/wlogout/reboot.svg diff --git a/home/wlogout/shutdown.svg b/home-manager/wlogout/shutdown.svg similarity index 100% rename from home/wlogout/shutdown.svg rename to home-manager/wlogout/shutdown.svg diff --git a/home/wlogout/style.css b/home-manager/wlogout/style.css similarity index 100% rename from home/wlogout/style.css rename to home-manager/wlogout/style.css diff --git a/home/wlogout/suspend.svg b/home-manager/wlogout/suspend.svg similarity index 100% rename from home/wlogout/suspend.svg rename to home-manager/wlogout/suspend.svg diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..e3ee12f --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,19 @@ +{ ... }: + +{ + imports = [ + ./development.nix + ./fonts.nix + ./gnome + ./hardware + ./locale.nix + ./networking.nix + ./nix-helper.nix + ./hyprland + ./sddm.nix + ./security.nix + ./steam.nix + ./stylix.nix + ./terminal + ]; +} diff --git a/development.nix b/modules/development.nix similarity index 100% rename from development.nix rename to modules/development.nix diff --git a/modules/fonts.nix b/modules/fonts.nix new file mode 100644 index 0000000..8203855 --- /dev/null +++ b/modules/fonts.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: +{ + + fonts = { + fontconfig.enable = true; + packages = with pkgs; [ + (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) + jetbrains-mono + # The line below will replace the lines above in 25.05 + # nerd-fonts.jetbrains-mono + ]; + }; + +} diff --git a/gnome/default.nix b/modules/gnome/default.nix similarity index 94% rename from gnome/default.nix rename to modules/gnome/default.nix index 4d5776e..84488ab 100644 --- a/gnome/default.nix +++ b/modules/gnome/default.nix @@ -10,7 +10,7 @@ glib adwaita-icon-theme gnomeExtensions.appindicator -# gnome-extension-manager + # gnome-extension-manager loupe gnome-calculator gnome-disk-utility diff --git a/gnome/nautilus.nix b/modules/gnome/nautilus.nix similarity index 100% rename from gnome/nautilus.nix rename to modules/gnome/nautilus.nix diff --git a/audio.nix b/modules/hardware/audio.nix similarity index 100% rename from audio.nix rename to modules/hardware/audio.nix diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix new file mode 100644 index 0000000..8bbda62 --- /dev/null +++ b/modules/hardware/default.nix @@ -0,0 +1,10 @@ +{ ... }: + +{ + imports = [ + ./audio.nix + ./graphics + ./hardware-configuration.nix + ./keyboard.nix + ]; +} diff --git a/modules/hardware/graphics/default.nix b/modules/hardware/graphics/default.nix new file mode 100644 index 0000000..2712b6f --- /dev/null +++ b/modules/hardware/graphics/default.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: + +{ + imports = [ + ./nvidia.nix + ]; + + # For hardware acceleration + environment.sessionVariables.LIBVA_DRIVER_NAME = "iHD"; + + # Enable OpenGL + hardware.graphics = { + enable = true; + extraPackages = with pkgs; [ + # Used for hardware-acceleration + intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD + ]; + }; +} diff --git a/modules/hardware/graphics/nvidia.nix b/modules/hardware/graphics/nvidia.nix new file mode 100644 index 0000000..fc07b8b --- /dev/null +++ b/modules/hardware/graphics/nvidia.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + hardware.nvidia = { + # Required + modesetting.enable = true; + # Use closed-source drivers + open = false; + # Enable the Nvidia settings menu + nvidiaSettings = true; + }; + + # Load Nvidia driver for Xorg and Wayland + services.xserver.videoDrivers = [ "nvidia" ]; +} diff --git a/hardware-configuration.nix b/modules/hardware/hardware-configuration.nix similarity index 100% rename from hardware-configuration.nix rename to modules/hardware/hardware-configuration.nix diff --git a/keyboard.nix b/modules/hardware/keyboard.nix similarity index 100% rename from keyboard.nix rename to modules/hardware/keyboard.nix diff --git a/hyprland/default.nix b/modules/hyprland/default.nix similarity index 100% rename from hyprland/default.nix rename to modules/hyprland/default.nix diff --git a/hyprland/wallpaper.nix b/modules/hyprland/wallpaper.nix similarity index 100% rename from hyprland/wallpaper.nix rename to modules/hyprland/wallpaper.nix diff --git a/hyprland/waybar.nix b/modules/hyprland/waybar.nix similarity index 100% rename from hyprland/waybar.nix rename to modules/hyprland/waybar.nix diff --git a/locale.nix b/modules/locale.nix similarity index 100% rename from locale.nix rename to modules/locale.nix diff --git a/networking.nix b/modules/networking.nix similarity index 92% rename from networking.nix rename to modules/networking.nix index e9b6db5..86889eb 100644 --- a/networking.nix +++ b/modules/networking.nix @@ -16,7 +16,5 @@ # Or disable the firewall altogether. # networking.firewall.enable = false; - services.tailscale = { - enable = true; - }; + services.tailscale.enable = true; } diff --git a/nixHelper.nix b/modules/nix-helper.nix similarity index 100% rename from nixHelper.nix rename to modules/nix-helper.nix diff --git a/sddm.nix b/modules/sddm.nix similarity index 90% rename from sddm.nix rename to modules/sddm.nix index f010b9a..f40af06 100644 --- a/sddm.nix +++ b/modules/sddm.nix @@ -6,7 +6,7 @@ flavor = "mocha"; font = "Noto Sans"; fontSize = "9"; - background = "${./catppuccin_high.png}"; + background = "${../catppuccin_high.png}"; loginBackground = true; }) ]; diff --git a/security.nix b/modules/security.nix similarity index 91% rename from security.nix rename to modules/security.nix index 84e8a34..5bc45cb 100644 --- a/security.nix +++ b/modules/security.nix @@ -2,9 +2,12 @@ { environment.systemPackages = with pkgs; [ + gnupg yubioath-flutter ]; + programs.gnupg.agent.enable = true; + security.pam = { services = { login.u2fAuth = false; # U2F and password diff --git a/modules/steam.nix b/modules/steam.nix new file mode 100644 index 0000000..14b5c3a --- /dev/null +++ b/modules/steam.nix @@ -0,0 +1,10 @@ +{ ... }: + +{ + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers + }; +} diff --git a/modules/stylix.nix b/modules/stylix.nix new file mode 100644 index 0000000..2d05701 --- /dev/null +++ b/modules/stylix.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: + +{ + stylix = { + enable = true; + image = ../catppuccin.png; + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; + polarity = "dark"; + opacity.terminal = 0.8; + override = { + base02 = "b0b0b0"; # Comments in shell + base03 = "b0b0b0"; # Comments in nvim + base04 = "b0b0b0"; # Secondary text in shell + }; + }; +} diff --git a/modules/terminal/default.nix b/modules/terminal/default.nix new file mode 100644 index 0000000..265d24a --- /dev/null +++ b/modules/terminal/default.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: + +{ + imports = [ + ./shell.nix + ]; + + environment.systemPackages = with pkgs; [ + kitty + ]; +} diff --git a/terminal/shell.nix b/modules/terminal/shell.nix similarity index 100% rename from terminal/shell.nix rename to modules/terminal/shell.nix diff --git a/starter.nix b/starter.nix deleted file mode 100644 index adc92a0..0000000 --- a/starter.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: - -{ - imports = [ ]; -} diff --git a/switch b/switch index d200b2a..996db1e 100755 --- a/switch +++ b/switch @@ -1,6 +1,9 @@ #!/usr/bin/env sh +# Accepts all arguments to nh os switch +# For example --ask to prompt if the user want to switch configs + # Rebuild and switch the environment if successful git add . ./fmt -nh os switch . +nh os switch . "$@" diff --git a/terminal/default.nix b/terminal/default.nix deleted file mode 100644 index 5404bc1..0000000 --- a/terminal/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - imports = [ - ./shell.nix - ]; -}