From 939d734e9157b0ffc8fbbef0795b1c14aa9a087b Mon Sep 17 00:00:00 2001 From: Odweta Date: Mon, 12 Jan 2026 10:16:59 +0100 Subject: [PATCH] begin modularization --- TODO.md | 2 +- flake.nix | 44 +++++++++---------- home.nix | 23 +++++----- bash.nix => homeManagerModules/bash.nix | 0 homeManagerModules/fastfetch.nix | 5 +++ git.nix => homeManagerModules/git.nix | 0 .../hyprland.nix | 0 keepass.nix => homeManagerModules/keepass.nix | 0 kitty.nix => homeManagerModules/kitty.nix | 0 .../minecraft.nix | 0 .../syncthing.nix | 0 vim.nix => homeManagerModules/vim.nix | 0 waybar.nix => homeManagerModules/waybar.nix | 0 xdg.nix => homeManagerModules/xdg.nix | 0 .../xournalpp.nix | 0 hosts/default/configuration.nix | 0 lock-suspend.nix | 26 ----------- audio.nix => nixosModules/audio.nix | 0 bluetooth.nix => nixosModules/bluetooth.nix | 0 boot.nix => nixosModules/boot.nix | 0 .../display-manager.nix | 0 env-vars.nix => nixosModules/env-vars.nix | 0 fonts.nix => nixosModules/fonts.nix | 0 .../hardware-configuration.nix | 0 .../hyprland-system.nix | 0 networking.nix => nixosModules/networking.nix | 0 .../nix-settings.nix | 0 opengl.nix => nixosModules/opengl.nix | 0 openssh.nix => nixosModules/openssh.nix | 0 printing.nix => nixosModules/printing.nix | 0 screen.nix => nixosModules/screen.nix | 0 security.nix => nixosModules/security.nix | 0 steam.nix => nixosModules/steam.nix | 0 theme.nix => nixosModules/theme.nix | 0 time.nix => nixosModules/time.nix | 0 .../ungoogled-chromium.nix | 0 usb.nix => nixosModules/usb.nix | 0 users.nix => nixosModules/users.nix | 0 .../waybar-system.nix | 0 39 files changed, 40 insertions(+), 60 deletions(-) rename bash.nix => homeManagerModules/bash.nix (100%) create mode 100644 homeManagerModules/fastfetch.nix rename git.nix => homeManagerModules/git.nix (100%) rename hyprland.nix => homeManagerModules/hyprland.nix (100%) rename keepass.nix => homeManagerModules/keepass.nix (100%) rename kitty.nix => homeManagerModules/kitty.nix (100%) rename minecraft.nix => homeManagerModules/minecraft.nix (100%) rename syncthing.nix => homeManagerModules/syncthing.nix (100%) rename vim.nix => homeManagerModules/vim.nix (100%) rename waybar.nix => homeManagerModules/waybar.nix (100%) rename xdg.nix => homeManagerModules/xdg.nix (100%) rename xournalpp.nix => homeManagerModules/xournalpp.nix (100%) create mode 100644 hosts/default/configuration.nix delete mode 100644 lock-suspend.nix rename audio.nix => nixosModules/audio.nix (100%) rename bluetooth.nix => nixosModules/bluetooth.nix (100%) rename boot.nix => nixosModules/boot.nix (100%) rename display-manager.nix => nixosModules/display-manager.nix (100%) rename env-vars.nix => nixosModules/env-vars.nix (100%) rename fonts.nix => nixosModules/fonts.nix (100%) rename hardware-configuration.nix => nixosModules/hardware-configuration.nix (100%) rename hyprland-system.nix => nixosModules/hyprland-system.nix (100%) rename networking.nix => nixosModules/networking.nix (100%) rename nix-settings.nix => nixosModules/nix-settings.nix (100%) rename opengl.nix => nixosModules/opengl.nix (100%) rename openssh.nix => nixosModules/openssh.nix (100%) rename printing.nix => nixosModules/printing.nix (100%) rename screen.nix => nixosModules/screen.nix (100%) rename security.nix => nixosModules/security.nix (100%) rename steam.nix => nixosModules/steam.nix (100%) rename theme.nix => nixosModules/theme.nix (100%) rename time.nix => nixosModules/time.nix (100%) rename ungoogled-chromium.nix => nixosModules/ungoogled-chromium.nix (100%) rename usb.nix => nixosModules/usb.nix (100%) rename users.nix => nixosModules/users.nix (100%) rename waybar-system.nix => nixosModules/waybar-system.nix (100%) diff --git a/TODO.md b/TODO.md index a0fc237..57dd9c9 100644 --- a/TODO.md +++ b/TODO.md @@ -1 +1 @@ -+ somehow sync helium dotfiles into ungoogled-chromium ++ MODULARIZE as per vimjoyer diff --git a/flake.nix b/flake.nix index de440b5..86cb21d 100644 --- a/flake.nix +++ b/flake.nix @@ -15,28 +15,28 @@ nixosConfigurations."nixos" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./audio.nix - ./bluetooth.nix - ./boot.nix - ./display-manager.nix - ./env-vars.nix - ./fonts.nix - ./hardware-configuration.nix - ./hyprland-system.nix - ./networking.nix - ./nix-settings.nix - ./opengl.nix - ./openssh.nix - ./printing.nix - ./screen.nix - ./steam.nix - ./security.nix - ./theme.nix - ./time.nix - ./ungoogled-chromium.nix - ./usb.nix - ./users.nix - ./waybar-system.nix + ./nixosModules/audio.nix + ./nixosModules/bluetooth.nix + ./nixosModules/boot.nix + ./nixosModules/display-manager.nix + ./nixosModules/env-vars.nix + ./nixosModules/fonts.nix + ./nixosModules/hardware-configuration.nix + ./nixosModules/hyprland-system.nix + ./nixosModules/networking.nix + ./nixosModules/nix-settings.nix + ./nixosModules/opengl.nix + ./nixosModules/openssh.nix + ./nixosModules/printing.nix + ./nixosModules/screen.nix + ./nixosModules/steam.nix + ./nixosModules/security.nix + ./nixosModules/theme.nix + ./nixosModules/time.nix + ./nixosModules/ungoogled-chromium.nix + ./nixosModules/usb.nix + ./nixosModules/users.nix + ./nixosModules/waybar-system.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/home.nix b/home.nix index d55a40e..883bcde 100644 --- a/home.nix +++ b/home.nix @@ -7,16 +7,17 @@ programs.home-manager.enable = true; imports = [ - ./bash.nix - ./git.nix - ./hyprland.nix - ./keepass.nix - ./kitty.nix - ./minecraft.nix - ./syncthing.nix - ./vim.nix - ./waybar.nix - ./xdg.nix - ./xournalpp.nix + ./homeManagerModules/bash.nix + ./homeManagerModules/fastfetch.nix + ./homeManagerModules/git.nix + ./homeManagerModules/hyprland.nix + ./homeManagerModules/keepass.nix + ./homeManagerModules/kitty.nix + ./homeManagerModules/minecraft.nix + ./homeManagerModules/syncthing.nix + ./homeManagerModules/vim.nix + ./homeManagerModules/waybar.nix + ./homeManagerModules/xdg.nix + ./homeManagerModules/xournalpp.nix ]; } diff --git a/bash.nix b/homeManagerModules/bash.nix similarity index 100% rename from bash.nix rename to homeManagerModules/bash.nix diff --git a/homeManagerModules/fastfetch.nix b/homeManagerModules/fastfetch.nix new file mode 100644 index 0000000..c598cd1 --- /dev/null +++ b/homeManagerModules/fastfetch.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: + +{ + programs.fastfetch.enable = true; +} diff --git a/git.nix b/homeManagerModules/git.nix similarity index 100% rename from git.nix rename to homeManagerModules/git.nix diff --git a/hyprland.nix b/homeManagerModules/hyprland.nix similarity index 100% rename from hyprland.nix rename to homeManagerModules/hyprland.nix diff --git a/keepass.nix b/homeManagerModules/keepass.nix similarity index 100% rename from keepass.nix rename to homeManagerModules/keepass.nix diff --git a/kitty.nix b/homeManagerModules/kitty.nix similarity index 100% rename from kitty.nix rename to homeManagerModules/kitty.nix diff --git a/minecraft.nix b/homeManagerModules/minecraft.nix similarity index 100% rename from minecraft.nix rename to homeManagerModules/minecraft.nix diff --git a/syncthing.nix b/homeManagerModules/syncthing.nix similarity index 100% rename from syncthing.nix rename to homeManagerModules/syncthing.nix diff --git a/vim.nix b/homeManagerModules/vim.nix similarity index 100% rename from vim.nix rename to homeManagerModules/vim.nix diff --git a/waybar.nix b/homeManagerModules/waybar.nix similarity index 100% rename from waybar.nix rename to homeManagerModules/waybar.nix diff --git a/xdg.nix b/homeManagerModules/xdg.nix similarity index 100% rename from xdg.nix rename to homeManagerModules/xdg.nix diff --git a/xournalpp.nix b/homeManagerModules/xournalpp.nix similarity index 100% rename from xournalpp.nix rename to homeManagerModules/xournalpp.nix diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix new file mode 100644 index 0000000..e69de29 diff --git a/lock-suspend.nix b/lock-suspend.nix deleted file mode 100644 index 61cda35..0000000 --- a/lock-suspend.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ config, pkgs, ... }: - -{ - services.logind = { - settings.Login.HandleLidSwitch = "suspend"; # suspend on lid close - }; - - # Add the config declaratively - environment.etc."hypr/hyprlock.conf" = { - source = pkgs.writeText "hyprlock-config" '' - # hyprlock configuration - blur = 5 - timeout = 0 - ''; - }; - systemd.user.services.hyprlock-pre-suspend = { - description = "Lock screen before suspend"; - wants = [ "sleep.target" ]; - before = [ "sleep.target" ]; - serviceConfig = { - Type = "oneshot"; - ExecStart = "${pkgs.hyprlock}/bin/hyprlock -c /etc/hypr/hyprlock.conf"; - }; - wantedBy = [ "default.target" "sleep.target" ]; - }; -} diff --git a/audio.nix b/nixosModules/audio.nix similarity index 100% rename from audio.nix rename to nixosModules/audio.nix diff --git a/bluetooth.nix b/nixosModules/bluetooth.nix similarity index 100% rename from bluetooth.nix rename to nixosModules/bluetooth.nix diff --git a/boot.nix b/nixosModules/boot.nix similarity index 100% rename from boot.nix rename to nixosModules/boot.nix diff --git a/display-manager.nix b/nixosModules/display-manager.nix similarity index 100% rename from display-manager.nix rename to nixosModules/display-manager.nix diff --git a/env-vars.nix b/nixosModules/env-vars.nix similarity index 100% rename from env-vars.nix rename to nixosModules/env-vars.nix diff --git a/fonts.nix b/nixosModules/fonts.nix similarity index 100% rename from fonts.nix rename to nixosModules/fonts.nix diff --git a/hardware-configuration.nix b/nixosModules/hardware-configuration.nix similarity index 100% rename from hardware-configuration.nix rename to nixosModules/hardware-configuration.nix diff --git a/hyprland-system.nix b/nixosModules/hyprland-system.nix similarity index 100% rename from hyprland-system.nix rename to nixosModules/hyprland-system.nix diff --git a/networking.nix b/nixosModules/networking.nix similarity index 100% rename from networking.nix rename to nixosModules/networking.nix diff --git a/nix-settings.nix b/nixosModules/nix-settings.nix similarity index 100% rename from nix-settings.nix rename to nixosModules/nix-settings.nix diff --git a/opengl.nix b/nixosModules/opengl.nix similarity index 100% rename from opengl.nix rename to nixosModules/opengl.nix diff --git a/openssh.nix b/nixosModules/openssh.nix similarity index 100% rename from openssh.nix rename to nixosModules/openssh.nix diff --git a/printing.nix b/nixosModules/printing.nix similarity index 100% rename from printing.nix rename to nixosModules/printing.nix diff --git a/screen.nix b/nixosModules/screen.nix similarity index 100% rename from screen.nix rename to nixosModules/screen.nix diff --git a/security.nix b/nixosModules/security.nix similarity index 100% rename from security.nix rename to nixosModules/security.nix diff --git a/steam.nix b/nixosModules/steam.nix similarity index 100% rename from steam.nix rename to nixosModules/steam.nix diff --git a/theme.nix b/nixosModules/theme.nix similarity index 100% rename from theme.nix rename to nixosModules/theme.nix diff --git a/time.nix b/nixosModules/time.nix similarity index 100% rename from time.nix rename to nixosModules/time.nix diff --git a/ungoogled-chromium.nix b/nixosModules/ungoogled-chromium.nix similarity index 100% rename from ungoogled-chromium.nix rename to nixosModules/ungoogled-chromium.nix diff --git a/usb.nix b/nixosModules/usb.nix similarity index 100% rename from usb.nix rename to nixosModules/usb.nix diff --git a/users.nix b/nixosModules/users.nix similarity index 100% rename from users.nix rename to nixosModules/users.nix diff --git a/waybar-system.nix b/nixosModules/waybar-system.nix similarity index 100% rename from waybar-system.nix rename to nixosModules/waybar-system.nix