Skip to content

Commit

Permalink
Refactor the directory structure of /modules/ dir
Browse files Browse the repository at this point in the history
  • Loading branch information
foofrog committed Jun 17, 2024
1 parent 17b08e0 commit bd85b16
Show file tree
Hide file tree
Showing 25 changed files with 41 additions and 66 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Prefer `nix <commmand>` command rather than `nix-<something>` commmands if flake
system = "x86_64-linux";
modules = [
./hosts/foobar/systemwide.nix

/*
INFO:
Including Home Manager as a module automatically deploys it during rebuild
Expand Down
47 changes: 29 additions & 18 deletions hosts/foobar/systemwide.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
{pkgs, ...}: {
# HACK: Modularity via explicit importing
imports = [
./filesystems.nix
../../modules/applications/packages.nix
../../modules/applications/programs/opengl.nix
../../modules/applications/programs/steam.nix
../../modules/applications/programs.nix
../../modules/applications/services.nix
../../modules/bootloader.nix
../../modules/fonts.nix
../../modules/graphics/amd.nix
../../modules/graphics/nvidia.nix
../../modules/internet.nix
../../modules/kernel.nix
../../modules/localization.nix
../../modules/peripherals/audio.nix
../../modules/peripherals/bluetooth.nix
../../modules/peripherals/tablet.nix
../../modules/power-management.nix
../../modules/users/foo/user.nix

../../modules/environment/packages

../../modules/environment/programs
../../modules/environment/programs/steam

../../modules/environment/services
../../modules/environment/services/power-profiles-daemon

../../modules/environment/users/foo

../../modules/foundations/bootloader/systemd-boot

../../modules/foundations/graphics/api/opengl
../../modules/foundations/graphics/processing-units/amd
../../modules/foundations/graphics/processing-units/nvidia

../../modules/foundations/i18n/fonts
../../modules/foundations/i18n/l10n

../../modules/foundations/internet

../../modules/foundations/kernel

../../modules/peripherals/audio
../../modules/peripherals/bluetooth
# ../../modules/peripherals/tablet
];

# Enable flakes for this configuration
Expand All @@ -26,7 +37,7 @@
/*
INFO:
The value of `stateVersion` is the NixOS release version installed initially for this system
This is required for determining the default system state for that NixOS release
This is required for determining the default system state for the NixOS release
NOTE:
Expand Down
6 changes: 4 additions & 2 deletions hosts/foobar/userspace.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{...}: {
imports = [
../../modules/users/foo/home-depot/packages.nix
../../modules/users/foo/home-depot/programs.nix
../../modules/environment/users/foo/home-depot/packages
../../modules/environment/users/foo/home-depot/programs
# XXX: `services` is empty
# ../../modules/environment/users/foo/home-depot/services
];

programs.home-manager.enable = true;
Expand Down
21 changes: 0 additions & 21 deletions modules/applications/programs/steam.nix

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
fonts = [
"NerdFontsSymbolsOnly"
"0xProto"
# "JetBrainsMono"
# "FireCode"
# "FiraCode"
# "Iosevka"
# "JetBrainsMono"
"SpaceMono"
];
})
];
Expand All @@ -29,7 +30,7 @@
defaultFonts = {
serif = ["Noto Serif" "Noto Serif CJK JP" "Noto Color Emoji"];
sansSerif = ["Noto Sans" "Noto Sans CJK JP" "Noto Color Emoji"];
monospace = ["0xProto Nerd Font" "Noto Color Emoji"];
monospace = ["SpaceMono Nerd Font" "Noto Color Emoji"];
emoji = ["Noto Color Emoji"];
};
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
_: {
# Set the local Time Zone
# Set the local Time zone
time.timeZone = "Asia/Dhaka";

# Set locale settings for applications
i18n = {
defaultLocale = "en_US.UTF-8";

supportedLocales = [
"en_US.UTF-8/UTF-8"
"ja_JP.UTF-8/UTF-8"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{pkgs, ...}: {
boot = {

# Fetch the latest kernel! \(^ヮ^)/
kernelPackages = pkgs.linuxPackages_latest;
# kernelPackages = pkgs.linuxPackages_xanmod_latest; # INFO: https://xanmod.org/

kernelParams = [
# "quiet"
"mitigations=off"
Expand Down
7 changes: 0 additions & 7 deletions modules/graphics/opengl.nix

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 0 additions & 11 deletions modules/users/root.nix

This file was deleted.

0 comments on commit bd85b16

Please sign in to comment.