refactor: move common modules to modules/ directory

This commit is contained in:
toast 2026-04-27 17:45:21 +09:00
parent 3abbd61cfa
commit bf7e249d5b
35 changed files with 67 additions and 63 deletions

View file

@ -7,13 +7,33 @@
inputs.sops-nix.nixosModules.sops
inputs.lanzaboote.nixosModules.lanzaboote
./hardware-configuration.nix
] ++ (
let
modulesPath = ./modules;
moduleFiles = builtins.attrNames (builtins.readDir modulesPath);
in
map (module: modulesPath + ("/" + module)) moduleFiles
);
] ++ [
../../modules/core/packages.nix
../../modules/core/time.nix
../../modules/core/sops.nix
../../modules/graphical/environment.nix
../../modules/graphical/greetd.nix
../../modules/graphical/hyprland.nix
../../modules/graphical/steam.nix
../../modules/graphical/thunar.nix
../../modules/graphical/xfconf.nix
../../modules/graphical/xserver.nix
../../modules/graphical/flatpak.nix
../../modules/graphical/ratbagd.nix
../../modules/programs/nh.nix
../../modules/programs/nix-ld.nix
../../modules/programs/ssh.nix
../../modules/programs/ydotool.nix
../../modules/programs/zsh.nix
../../modules/services/tailscale.nix
../../modules/services/udisks2.nix
../../modules/services/zerotierone.nix
./modules/boot.nix
./modules/network.nix
./modules/users.nix
./modules/hardware.nix
./modules/services/restic.nix
];
system.stateVersion = "25.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ];

View file

@ -1,8 +0,0 @@
{ config, pkgs, ... }:
{
environment.sessionVariables = {
# WLR_NO_HARDWARE_CURSORS = "1";
NIXOS_OZONE_WL = "1";
};
}

View file

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
vim
wget
sbctl
];
nixpkgs.config.allowUnfree = true;
}

View file

@ -1,15 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./zsh.nix
./hyprland.nix
./thunar.nix
./xfconf.nix
./ssh.nix
./ydotool.nix
./steam.nix
./nix-ld.nix
./nh.nix
];
}

View file

@ -1,10 +0,0 @@
{ inputs, pkgs, ... }:
{
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
withUWSM = true;
xwayland.enable = true;
};
}

View file

@ -1,8 +0,0 @@
{
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 7d --keep 3";
flake = "/home/toast/nix-config";
};
}

View file

@ -1,3 +0,0 @@
{
programs.nix-ld.enable = true;
}

View file

@ -1,5 +0,0 @@
{ config, pkgs, ... }:
{
programs.ssh.startAgent = true;
}

View file

@ -1,5 +0,0 @@
{ config, pkgs, ... }:
{
programs.steam.enable = true;
}

View file

@ -1,12 +0,0 @@
{ config, pkgs, ... }:
{
programs.thunar = {
enable = true;
plugins = with pkgs; [
thunar-volman
];
};
services.gvfs.enable = true; # Mount, trash, and other functionalities
services.tumbler.enable = true; # Thumbnail support for images
}

View file

@ -1,5 +0,0 @@
{ config, pkgs, ... }:
{
programs.xfconf.enable = true;
}

View file

@ -1,5 +0,0 @@
{ config, pkgs, ... }:
{
programs.ydotool.enable = true;
}

View file

@ -1,5 +0,0 @@
{ config, pkgs, ... }:
{
programs.zsh.enable = true;
}

View file

@ -1,14 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./xserver.nix
./greetd.nix
./tailscale.nix
./flatpak.nix
./restic.nix
./zerotierone.nix
./udisks2.nix
./ratbagd.nix
];
}

View file

@ -1,19 +0,0 @@
{ config, pkgs, ... }:
{
services.flatpak = {
enable = true;
packages = [
"org.vinegarhq.Sober"
"org.vinegarhq.Vinegar"
];
overrides = {
"org.vinegarhq.Sober".Context = {
filesystems = [
"xdg-run/app/com.discordapp.Discord:create"
"xdg-run/discord-ipc-0"
];
};
};
};
}

View file

@ -1,14 +0,0 @@
{ config, pkgs, ... }:
{
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --remember-session";
user = "greeter";
};
};
useTextGreeter = true;
};
}

View file

@ -1,3 +0,0 @@
{
services.ratbagd.enable = true;
}

View file

@ -1,3 +0,0 @@
{
services.udisks2.enable = true;
}

View file

@ -1,8 +0,0 @@
{ config, pkgs, ... }:
{
services.xserver = {
xkb.layout = "us";
videoDrivers = [ "nvidia" ];
};
}

View file

@ -1,3 +0,0 @@
{
services.zerotierone.enable = true;
}

View file

@ -1,8 +0,0 @@
{ rootPath, ... }:
{
sops.defaultSopsFile = rootPath + /secrets/secrets.yaml;
sops.defaultSopsFormat = "yaml";
sops.age.keyFile = "/home/toast/.config/sops/age/keys.txt";
}

View file

@ -1,24 +0,0 @@
{ config, pkgs, ... }:
{
time.timeZone = "Asia/Seoul";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "ko_KR.UTF-8";
LC_IDENTIFICATION = "ko_KR.UTF-8";
LC_MEASUREMENT = "ko_KR.UTF-8";
LC_MONETARY = "ko_KR.UTF-8";
LC_NAME = "ko_KR.UTF-8";
LC_NUMERIC = "ko_KR.UTF-8";
LC_PAPER = "ko_KR.UTF-8";
LC_TELEPHONE = "ko_KR.UTF-8";
LC_TIME = "ko_KR.UTF-8";
};
inputMethod = {
enable = true;
type = "kime";
kime.iconColor = "White";
};
};
}