diff --git a/systems/modules/systemd-boot.nix b/systems/modules/bootloaders/systemd-boot.nix similarity index 100% rename from systems/modules/systemd-boot.nix rename to systems/modules/bootloaders/systemd-boot.nix diff --git a/systems/modules/common.nix b/systems/modules/common.nix index c7bf9cf..5445c04 100644 --- a/systems/modules/common.nix +++ b/systems/modules/common.nix @@ -5,10 +5,29 @@ extraGroups = ["networkmanager" "wheel"]; }; + # Enable basic fonts for reasonable Unicode coverage + fonts.enableDefaultPackages = true; + nixpkgs.config.allowUnfree = true; nix.settings.experimental-features = ["nix-command" "flakes"]; environment.systemPackages = with pkgs; [ git ]; + + time.timeZone = "Asia/Singapore"; + + i18n.defaultLocale = "en_SG.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_SG.UTF-8"; + LC_IDENTIFICATION = "en_SG.UTF-8"; + LC_MEASUREMENT = "en_SG.UTF-8"; + LC_MONETARY = "en_SG.UTF-8"; + LC_NAME = "en_SG.UTF-8"; + LC_NUMERIC = "en_SG.UTF-8"; + LC_PAPER = "en_SG.UTF-8"; + LC_TELEPHONE = "en_SG.UTF-8"; + LC_TIME = "en_SG.UTF-8"; + }; } diff --git a/systems/modules/desktop.nix b/systems/modules/desktop.nix new file mode 100644 index 0000000..59bef55 --- /dev/null +++ b/systems/modules/desktop.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./programs/hyprland.nix + ]; +} diff --git a/systems/modules/fonts.nix b/systems/modules/fonts.nix deleted file mode 100644 index e2ac795..0000000 --- a/systems/modules/fonts.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs, ... }: { - # Enable basic fonts for reasonable Unicode coverage - fonts.enableDefaultPackages = true; - - fonts.packages = with pkgs; [ - nerd-fonts.terminess-ttf - ]; -} diff --git a/systems/modules/fonts/terminess.nix b/systems/modules/fonts/terminess.nix new file mode 100644 index 0000000..88095db --- /dev/null +++ b/systems/modules/fonts/terminess.nix @@ -0,0 +1,20 @@ +{ pkgs, config, ... }: { + fonts.packages = with pkgs; [ + nerd-fonts.terminess-ttf + ]; + stylix.fonts = { + serif = config.stylix.fonts.monospace; + sansSerif = config.stylix.fonts.monospace; + emoji = config.stylix.fonts.monospace; + monospace = { + package = pkgs.nerd-fonts.terminess-ttf; + name = "Terminess Nerd Font Mono"; + }; + sizes = { + applications = 16; + desktop = 12; + popups = 12; + terminal = 16; + }; + }; +} diff --git a/systems/modules/nvidia.nix b/systems/modules/hardware/nvidia.nix similarity index 100% rename from systems/modules/nvidia.nix rename to systems/modules/hardware/nvidia.nix diff --git a/systems/modules/locale.nix b/systems/modules/locale.nix deleted file mode 100644 index 9a6d935..0000000 --- a/systems/modules/locale.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - time.timeZone = "Asia/Singapore"; - - i18n.defaultLocale = "en_SG.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_SG.UTF-8"; - LC_IDENTIFICATION = "en_SG.UTF-8"; - LC_MEASUREMENT = "en_SG.UTF-8"; - LC_MONETARY = "en_SG.UTF-8"; - LC_NAME = "en_SG.UTF-8"; - LC_NUMERIC = "en_SG.UTF-8"; - LC_PAPER = "en_SG.UTF-8"; - LC_TELEPHONE = "en_SG.UTF-8"; - LC_TIME = "en_SG.UTF-8"; - }; -} diff --git a/systems/modules/networking.nix b/systems/modules/networking.nix index 0340a3d..0230138 100644 --- a/systems/modules/networking.nix +++ b/systems/modules/networking.nix @@ -3,6 +3,10 @@ # Anything system-specific should not be here. # { + imports = [ + ./programs/tailscale.nix + ]; + networking = { # Enable networkManager # TODO: Look into the networkManager options. @@ -35,5 +39,4 @@ # TODO: look into openssh and tailscale settings. services.openssh.enable = true; - services.tailscale.enable = true; } diff --git a/systems/modules/personalisation.nix b/systems/modules/personalisation.nix deleted file mode 100644 index 5b02579..0000000 --- a/systems/modules/personalisation.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ inputs, pkgs, config, ... }: { - imports = [ inputs.stylix.nixosModules.stylix ]; - stylix = { - enable = true; - base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; - fonts = { - serif = config.stylix.fonts.monospace; - sansSerif = config.stylix.fonts.monospace; - emoji = config.stylix.fonts.monospace; - monospace = { - package = pkgs.nerd-fonts.terminess-ttf; - name = "Terminess Nerd Font Mono"; - }; - sizes = { - applications = 16; - desktop = 12; - popups = 12; - terminal = 16; - }; - }; - }; -} diff --git a/systems/modules/hyprland.nix b/systems/modules/programs/hyprland.nix similarity index 85% rename from systems/modules/hyprland.nix rename to systems/modules/programs/hyprland.nix index e80d800..2bfc526 100644 --- a/systems/modules/hyprland.nix +++ b/systems/modules/programs/hyprland.nix @@ -8,7 +8,4 @@ package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; }; - environment.systemPackages = with pkgs; [ - dunst - ]; } diff --git a/systems/modules/programs/tailscale.nix b/systems/modules/programs/tailscale.nix new file mode 100644 index 0000000..d886410 --- /dev/null +++ b/systems/modules/programs/tailscale.nix @@ -0,0 +1,3 @@ +{ + services.tailscale.enable = true; +} diff --git a/systems/modules/stylix.nix b/systems/modules/stylix.nix new file mode 100644 index 0000000..d091bbc --- /dev/null +++ b/systems/modules/stylix.nix @@ -0,0 +1,8 @@ +{ inputs, ... }: { + imports = [ + inputs.stylix.nixosModules.stylix + ./themes/catppuccin.nix + ./fonts/terminess.nix + ]; + stylix.enable = true; +} diff --git a/systems/modules/themes/catppuccin.nix b/systems/modules/themes/catppuccin.nix new file mode 100644 index 0000000..0184e83 --- /dev/null +++ b/systems/modules/themes/catppuccin.nix @@ -0,0 +1,3 @@ +{ pkgs, ... }: { + stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; +} diff --git a/systems/nemesis.nix b/systems/nemesis.nix index 2745c2d..e0db0c3 100644 --- a/systems/nemesis.nix +++ b/systems/nemesis.nix @@ -1,14 +1,12 @@ { imports = [ ./hw-nemesis.nix - ./modules/common.nix # Common options for all systems - ./modules/systemd-boot.nix # Systemd-boot as bootloader - ./modules/locale.nix # SG locale settings - ./modules/fonts.nix # Fonts - ./modules/networking.nix # Common networking settings - ./modules/hyprland.nix # Hyprland compositor - ./modules/nvidia.nix # Nvidia settings - ./modules/personalisation.nix + ./modules/bootloaders/systemd-boot.nix + ./modules/common.nix + ./modules/hardware/nvidia.nix + ./modules/networking.nix + ./modules/desktop.nix + ./modules/stylix.nix ]; networking.hostName = "nemesis"; diff --git a/users/modules/de.nix b/users/modules/de.nix index a7c40e0..84e3cc2 100644 --- a/users/modules/de.nix +++ b/users/modules/de.nix @@ -2,9 +2,9 @@ { imports = [ ./programs/firefox.nix - #./programs/font-terminess.nix ./programs/kitty.nix ./programs/hyprland.nix ./programs/waybar.nix + ./programs/dunst.nix ]; } diff --git a/users/modules/programs/dunst.nix b/users/modules/programs/dunst.nix new file mode 100644 index 0000000..f7a1138 --- /dev/null +++ b/users/modules/programs/dunst.nix @@ -0,0 +1,3 @@ +{ + services.dunst.enable = true; +}