From 9819da5c5eb552abffd875562b8eeb2d0d5a4772 Mon Sep 17 00:00:00 2001 From: joy Date: Fri, 4 Oct 2024 18:30:45 +0200 Subject: [PATCH] ... --- hosts/desktop/default.nix | 2 +- hosts/desktop/hardware.nix | 1 - hosts/laptop/default.nix | 2 +- hosts/phone/default.nix | 21 ++----------------- hosts/phone/home/default.nix | 2 +- hosts/phone/home/git/default.nix | 2 +- hosts/phone/home/helix/default.nix | 2 +- hosts/phone/home/zsh/default.nix | 9 +------- modules/apps/cli/git/default.nix | 2 +- modules/apps/cli/newsboat/default.nix | 2 +- modules/apps/cli/ssh/default.nix | 2 +- modules/apps/cli/tools/git/default.nix | 2 +- modules/apps/cli/tools/ssh/default.nix | 2 +- modules/apps/gui/firefox/user.nix | 2 +- modules/apps/gui/games/default.nix | 1 - modules/apps/gui/games/mangohud/default.nix | 3 --- modules/apps/gui/games/mics/default.nix | 1 + modules/apps/gui/mpv/default.nix | 2 +- modules/hardware/bluetooth/default.nix | 2 +- modules/hardware/boot/default.nix | 2 +- modules/hardware/default.nix | 1 + modules/hardware/powerkey/default.nix | 3 +++ modules/hardware/sound/default.nix | 2 +- modules/services/docker/default.nix | 2 +- modules/services/gdm/default.nix | 2 +- modules/services/invidious/default.nix | 2 +- modules/services/misc/default.nix | 2 +- modules/services/syncthing/default.nix | 2 +- .../services/syncthing/services/default.nix | 2 +- modules/system/default.nix | 2 +- modules/system/homemanger/default.nix | 2 +- modules/system/misc/default.nix | 3 +-- modules/system/networking/default.nix | 2 +- modules/system/user/default.nix | 2 +- modules/system/xdg/default.nix | 4 ++-- modules/wm/hyprland/default.nix | 18 ++++++---------- modules/wm/theme/gtk/default.nix | 5 ----- modules/wm/theme/stylix/default.nix | 11 ++++------ 38 files changed, 46 insertions(+), 85 deletions(-) delete mode 100644 modules/apps/gui/games/mangohud/default.nix create mode 100644 modules/hardware/powerkey/default.nix diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index afb3847..19c06d1 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ networking.hostName = "desktop"; services.hardware.openrgb.enable = true; hardware.amdgpu.opencl.enable = true; diff --git a/hosts/desktop/hardware.nix b/hosts/desktop/hardware.nix index 93a6be6..5193764 100644 --- a/hosts/desktop/hardware.nix +++ b/hosts/desktop/hardware.nix @@ -4,7 +4,6 @@ { config, lib, - pkgs, modulesPath, ... }: { diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix index 6e84480..69265c3 100644 --- a/hosts/laptop/default.nix +++ b/hosts/laptop/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ networking.hostName = "laptop"; # services.xserver.desktopManager.gnome.enable = true; diff --git a/hosts/phone/default.nix b/hosts/phone/default.nix index cda0f71..e028d41 100644 --- a/hosts/phone/default.nix +++ b/hosts/phone/default.nix @@ -1,13 +1,6 @@ -{ - config, - lib, - pkgs, - ... -}: { - # Simply install just the packages +{pkgs, ...}: { environment.packages = with pkgs; [ - # User-facing stuff that you really really want to have - vim # or some other editor, e.g. nano or neovim + vim zsh fish font-awesome @@ -16,19 +9,15 @@ ffmpeg yt-dlp lazygit - # toybox unixtools.ping cowsay - # Some common stuff that people expect to have procps - # killall openssh_hpn git diffutils findutils utillinux tzdata - # hostname man gnugrep gnupg @@ -41,18 +30,14 @@ unzip ]; - # Backup etc files instead of failing to activate generation if a file already exists in /etc environment.etcBackupExtension = ".bak"; - # Read the changelog before changing this value system.stateVersion = "24.05"; - # Set up nix for flakes nix.extraOptions = '' experimental-features = nix-command flakes ''; - # Set your time zone time.timeZone = "Europe/Berlin"; home-manager.config = { @@ -61,8 +46,6 @@ imports = [ ./home ]; - - # config = ./home.nix; }; user.shell = "${pkgs.zsh}/bin/zsh"; diff --git a/hosts/phone/home/default.nix b/hosts/phone/home/default.nix index 18d7899..21085b1 100644 --- a/hosts/phone/home/default.nix +++ b/hosts/phone/home/default.nix @@ -1,4 +1,4 @@ -{inputs, ...}: { +{ imports = [ ./zsh ./git diff --git a/hosts/phone/home/git/default.nix b/hosts/phone/home/git/default.nix index d3126b5..72006fd 100644 --- a/hosts/phone/home/git/default.nix +++ b/hosts/phone/home/git/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ programs.git = { enable = true; userEmail = "mail@joygnu.org"; diff --git a/hosts/phone/home/helix/default.nix b/hosts/phone/home/helix/default.nix index aac99a5..b6c5898 100644 --- a/hosts/phone/home/helix/default.nix +++ b/hosts/phone/home/helix/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ programs.helix = { enable = true; defaultEditor = true; diff --git a/hosts/phone/home/zsh/default.nix b/hosts/phone/home/zsh/default.nix index 5c7ac13..b4841bb 100644 --- a/hosts/phone/home/zsh/default.nix +++ b/hosts/phone/home/zsh/default.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ programs.zsh = { enable = true; enableCompletion = true; @@ -16,12 +16,5 @@ history.size = 1000000; history.path = ".config/zsh/history"; - - oh-my-zsh = { - enable = true; - plugins = [ - # "history-substring-search" - ]; - }; }; } diff --git a/modules/apps/cli/git/default.nix b/modules/apps/cli/git/default.nix index 154f162..fb6985b 100644 --- a/modules/apps/cli/git/default.nix +++ b/modules/apps/cli/git/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ home-manager.users.joy.programs.git = { enable = true; userEmail = "mail@joygnu.org"; diff --git a/modules/apps/cli/newsboat/default.nix b/modules/apps/cli/newsboat/default.nix index d3a773f..5cf3569 100644 --- a/modules/apps/cli/newsboat/default.nix +++ b/modules/apps/cli/newsboat/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ home-manager.users.joy.programs.newsboat = { enable = true; browser = "firefox"; diff --git a/modules/apps/cli/ssh/default.nix b/modules/apps/cli/ssh/default.nix index 9bd17c0..cca8282 100644 --- a/modules/apps/cli/ssh/default.nix +++ b/modules/apps/cli/ssh/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ services.openssh = { enable = true; settings = { diff --git a/modules/apps/cli/tools/git/default.nix b/modules/apps/cli/tools/git/default.nix index 154f162..fb6985b 100644 --- a/modules/apps/cli/tools/git/default.nix +++ b/modules/apps/cli/tools/git/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ home-manager.users.joy.programs.git = { enable = true; userEmail = "mail@joygnu.org"; diff --git a/modules/apps/cli/tools/ssh/default.nix b/modules/apps/cli/tools/ssh/default.nix index 9bd17c0..cca8282 100644 --- a/modules/apps/cli/tools/ssh/default.nix +++ b/modules/apps/cli/tools/ssh/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ services.openssh = { enable = true; settings = { diff --git a/modules/apps/gui/firefox/user.nix b/modules/apps/gui/firefox/user.nix index 8820e87..0c151b9 100644 --- a/modules/apps/gui/firefox/user.nix +++ b/modules/apps/gui/firefox/user.nix @@ -1,4 +1,4 @@ -{...}: { +{ home-manager.users.joy.programs.firefox = { enable = true; profiles.joy = { diff --git a/modules/apps/gui/games/default.nix b/modules/apps/gui/games/default.nix index 46a9127..db54346 100644 --- a/modules/apps/gui/games/default.nix +++ b/modules/apps/gui/games/default.nix @@ -3,7 +3,6 @@ ./suyu ./steam ./norisk - ./mangohud ./mics ]; } diff --git a/modules/apps/gui/games/mangohud/default.nix b/modules/apps/gui/games/mangohud/default.nix deleted file mode 100644 index 9d96098..0000000 --- a/modules/apps/gui/games/mangohud/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{...}: { - home-manager.users.joy.programs.mangohud.enable = true; -} diff --git a/modules/apps/gui/games/mics/default.nix b/modules/apps/gui/games/mics/default.nix index 819aa1c..b22d050 100644 --- a/modules/apps/gui/games/mics/default.nix +++ b/modules/apps/gui/games/mics/default.nix @@ -3,6 +3,7 @@ prismlauncher zulu17 dolphin-emu + mangohud lutris-free ]; } diff --git a/modules/apps/gui/mpv/default.nix b/modules/apps/gui/mpv/default.nix index 8c29c21..65d5037 100644 --- a/modules/apps/gui/mpv/default.nix +++ b/modules/apps/gui/mpv/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ home-manager.users.joy.programs.mpv = { enable = true; bindings = { diff --git a/modules/hardware/bluetooth/default.nix b/modules/hardware/bluetooth/default.nix index 5c3033a..865dceb 100644 --- a/modules/hardware/bluetooth/default.nix +++ b/modules/hardware/bluetooth/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ services.blueman.enable = true; hardware.bluetooth.enable = true; } diff --git a/modules/hardware/boot/default.nix b/modules/hardware/boot/default.nix index 0521d6b..2f5433b 100644 --- a/modules/hardware/boot/default.nix +++ b/modules/hardware/boot/default.nix @@ -1,3 +1,3 @@ -{...}: { +{ boot.loader.systemd-boot.enable = true; } diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index f659e1d..d1b1447 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./powerkey ./bluetooth ./sound ./boot diff --git a/modules/hardware/powerkey/default.nix b/modules/hardware/powerkey/default.nix new file mode 100644 index 0000000..acb8320 --- /dev/null +++ b/modules/hardware/powerkey/default.nix @@ -0,0 +1,3 @@ +{ + services.logind.powerKey = "suspend"; +} diff --git a/modules/hardware/sound/default.nix b/modules/hardware/sound/default.nix index 4bb78e4..6ba582c 100644 --- a/modules/hardware/sound/default.nix +++ b/modules/hardware/sound/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { diff --git a/modules/services/docker/default.nix b/modules/services/docker/default.nix index 6cc1210..3b16170 100644 --- a/modules/services/docker/default.nix +++ b/modules/services/docker/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ virtualisation.docker.rootless.enable = true; virtualisation.docker.enable = true; users.users.joy.extraGroups = ["docker"]; diff --git a/modules/services/gdm/default.nix b/modules/services/gdm/default.nix index 69e11f2..5db7232 100644 --- a/modules/services/gdm/default.nix +++ b/modules/services/gdm/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ services.xserver.enable = true; services.xserver.displayManager.gdm.enable = true; diff --git a/modules/services/invidious/default.nix b/modules/services/invidious/default.nix index 5ae201a..b30fc2b 100644 --- a/modules/services/invidious/default.nix +++ b/modules/services/invidious/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ services.invidious = { enable = true; settings = { diff --git a/modules/services/misc/default.nix b/modules/services/misc/default.nix index 520e1fd..1653d5f 100644 --- a/modules/services/misc/default.nix +++ b/modules/services/misc/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ services.devmon.enable = true; services.udisks2.enable = true; services.printing.enable = true; diff --git a/modules/services/syncthing/default.nix b/modules/services/syncthing/default.nix index cb6b713..23d528e 100644 --- a/modules/services/syncthing/default.nix +++ b/modules/services/syncthing/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ services = { syncthing = { enable = true; diff --git a/modules/services/syncthing/services/default.nix b/modules/services/syncthing/services/default.nix index fdebb3f..d43624e 100644 --- a/modules/services/syncthing/services/default.nix +++ b/modules/services/syncthing/services/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ services.devmon.enable = true; services.udisks2.enable = true; services.gvfs.enable = true; diff --git a/modules/system/default.nix b/modules/system/default.nix index 039a278..7d91db1 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ imports = [ ./user ./homemanger diff --git a/modules/system/homemanger/default.nix b/modules/system/homemanger/default.nix index bf6a6df..ee1880f 100644 --- a/modules/system/homemanger/default.nix +++ b/modules/system/homemanger/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ home-manager = { backupFileExtension = "bkp"; users.joy = { diff --git a/modules/system/misc/default.nix b/modules/system/misc/default.nix index 8bfbd61..1d42dfd 100644 --- a/modules/system/misc/default.nix +++ b/modules/system/misc/default.nix @@ -1,6 +1,5 @@ -{...}: { +{ nix.settings.experimental-features = ["nix-command" "flakes"]; time.timeZone = "Europe/Zurich"; system.stateVersion = "23.11"; - services.logind.powerKey = "suspend"; } diff --git a/modules/system/networking/default.nix b/modules/system/networking/default.nix index e1e9450..f29d881 100644 --- a/modules/system/networking/default.nix +++ b/modules/system/networking/default.nix @@ -1,3 +1,3 @@ -{...}: { +{ networking.networkmanager.enable = true; } diff --git a/modules/system/user/default.nix b/modules/system/user/default.nix index 2952e06..77b429e 100644 --- a/modules/system/user/default.nix +++ b/modules/system/user/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ users.users.joy = { isNormalUser = true; description = "joy"; diff --git a/modules/system/xdg/default.nix b/modules/system/xdg/default.nix index c7f8b2f..53b4304 100644 --- a/modules/system/xdg/default.nix +++ b/modules/system/xdg/default.nix @@ -1,4 +1,4 @@ -{...}: { +{ home-manager.users.joy.xdg = { desktopEntries = { hx = { @@ -20,7 +20,7 @@ }; }; userDirs = { - enable = false; + enable = true; desktop = "~/media/pic/screen"; download = "~/dl"; }; diff --git a/modules/wm/hyprland/default.nix b/modules/wm/hyprland/default.nix index 8d2cd21..aca8985 100644 --- a/modules/wm/hyprland/default.nix +++ b/modules/wm/hyprland/default.nix @@ -1,8 +1,8 @@ -{ pkgs, ... }: { +{pkgs, ...}: { programs.hyprland = { enable = true; }; - + home-manager.users.joy = { wayland.windowManager.hyprland = { enable = true; @@ -16,10 +16,6 @@ "HYPRCURSOR_THEME = Bibata-Modern-Ice" "HYPRCURSOR_SIZE = 24" "NIXOS_OZONE_WL = 1" - "QT_QPA_PLATFORM=wayland;xcb" - "QT_QPA_PLATFORMTHEME = qt5ct" - "QT_AUTO_SCREEN_SCALE_FACTOR = 1" - "QT_WAYLAND_DISABLE_WINDOWDECORATION =1" ]; xwayland = { force_zero_scaling = true; @@ -32,10 +28,8 @@ exec-once = [ "ags" ]; - windowrule = [ - ]; windowrulev2 = [ - "float,:title:^(mpv)(.*)$" + "float,:title:^(mpv)(.*)$" "float,title:(Pipewire)" "float,title:(Disks)" "float,title:(Calculator)" @@ -85,7 +79,7 @@ "$mod, Z, exec, sh $sciPath/screen.sh" "$mod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy" "$mod, O, exec, sh $sciPath/mpv.sh" - "$mod+Shift, TAB,hyprexpo:expo, toggleoverview" + "$mod+Shift, TAB,hyprexpo:expo, toggleoverview" # controls "$mod, Q, killactive" "$mod, W, togglefloating" @@ -96,7 +90,7 @@ "$mod+shift, B, exec, sh $sciPath/ags.sh" "$mod, up, exec, sh $sciPath/volume.sh -i" "$mod, down, exec, sh $sciPath/volume.sh -d" - "$mod, P, exec, hyprctl dispatch togglefloating active; hyprctl dispatch pin active; hyprctl dispatch resizeactive 800 600; hyprctl dispatch movewindowpixel exact 0 100%-600" + "$mod, P, exec, hyprctl dispatch togglefloating active; hyprctl dispatch pin active; hyprctl dispatch resizeactive -100000 -10000; hyprctl dispatch movewindowpixel exact 0 100%-600" # cmus "$mod, D, exec, sh $sciPath/cmus.sh" @@ -159,7 +153,7 @@ }; plugins = with pkgs.hyprlandPlugins; [ hyprexpo - ]; + ]; }; }; } diff --git a/modules/wm/theme/gtk/default.nix b/modules/wm/theme/gtk/default.nix index 71285b0..7403a1a 100644 --- a/modules/wm/theme/gtk/default.nix +++ b/modules/wm/theme/gtk/default.nix @@ -10,9 +10,4 @@ in { iconTheme.package = gruvboxPlus; iconTheme.name = "GruvboxPlus"; }; - - # qt.enable = true; - # qt.style.name = "adwaita-dark"; - # qt.style.package = pkgs.adwaita-qt; - # qt.platformTheme.name = "adwaita"; } diff --git a/modules/wm/theme/stylix/default.nix b/modules/wm/theme/stylix/default.nix index 8df1d25..c7bdcfe 100644 --- a/modules/wm/theme/stylix/default.nix +++ b/modules/wm/theme/stylix/default.nix @@ -1,10 +1,8 @@ -{ pkgs, ... }: -let backgroundUrl = "https://wallpapers.joygnu.org/wallpapers/anime/ghibli-japanese-walled-garden.png"; +{pkgs, ...}: let + backgroundUrl = "https://wallpapers.joygnu.org/wallpapers/anime/ghibli-japanese-walled-garden.png"; backgroundSha256 = "sha256-10Lv25V0RG0mnw/O90DeVchCNWJbdktUADtuI+enEwM="; -in - -{ - stylix = { +in { + stylix = { enable = true; base16Scheme = { @@ -50,5 +48,4 @@ in }; }; }; - }