diff --git a/flake.nix b/flake.nix index 069bf17..a11a489 100644 --- a/flake.nix +++ b/flake.nix @@ -35,7 +35,6 @@ nil = lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./configuration.nix nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1 ./hosts/nil.nix home-manager.nixosModules.home-manager diff --git a/home.nix b/home.nix index 4b5fe7d..ca9f109 100644 --- a/home.nix +++ b/home.nix @@ -6,11 +6,6 @@ home.username = "james"; home.homeDirectory = "/home/james"; - wayland.windowManager.sway = { - enable = true; - wrapperFeatures.gtk = true; - }; - home.packages = with pkgs; [ emacs wofi i3 zsh kitty tmux ]; # This value determines the Home Manager release that your diff --git a/modules/boot.nix b/modules/boot.nix new file mode 100644 index 0000000..8f3c609 --- /dev/null +++ b/modules/boot.nix @@ -0,0 +1,10 @@ +{ config, lib, ... }: { + # Enable bootloader & clear /tmp on boot. + boot = { + cleanTmpDir = true; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + }; +} diff --git a/modules/cli.nix b/modules/cli.nix new file mode 100644 index 0000000..3837502 --- /dev/null +++ b/modules/cli.nix @@ -0,0 +1,5 @@ +# Need to read? +{ config, pkgs, ... }: { + + environment.systemPackages = with pkgs; [ htop ripgrep jq silver-searcher ]; +} diff --git a/modules/fonts.nix b/modules/fonts.nix new file mode 100644 index 0000000..75bca08 --- /dev/null +++ b/modules/fonts.nix @@ -0,0 +1,24 @@ +# Need to read? +{ config, pkgs, ... }: { + fonts = { + enableDefaultFonts = true; + fonts = with pkgs; [ + alegreya + fira-code + fira-code-symbols + hasklig + inter + liberation_ttf + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + ]; + fontconfig = { + defaultFonts = { + serif = [ "inter" ]; + sansSerif = [ "alegreya" ]; + monospace = [ "hasklig" ]; + }; + }; + }; +} diff --git a/modules/profiles/graphical.nix b/modules/profiles/graphical.nix index 8e5e273..ba1a3ee 100644 --- a/modules/profiles/graphical.nix +++ b/modules/profiles/graphical.nix @@ -1,41 +1,7 @@ -{ config, pkgs, ... }: { - programs.sway = { - enable = true; - wrapperFeatures.gtk = true; # so that gtk works properly - extraPackages = with pkgs; [ - swaylock - swayidle - wl-clipboard - mako # notification daemon - kitty - dmenu # Dmenu is the default in the config but i recommend wofi since its wayland native - wofi - ]; - }; +{ config, lib, pkgs, ... }: { + imports = [ ../boot.nix ../cli.nix ../fonts.nix ../sway.nix ./minimal.nix ]; # Enable sound. sound.enable = true; hardware.pulseaudio.enable = true; - - fonts = { - enableDefaultFonts = true; - fonts = with pkgs; [ - alegreya - fira-code - fira-code-symbols - hasklig - inter - liberation_ttf - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - ]; - fontconfig = { - defaultFonts = { - serif = [ "inter" ]; - sansSerif = [ "alegreya" ]; - monospace = [ "hasklig" ]; - }; - }; - }; } diff --git a/configuration.nix b/modules/profiles/minimal.nix similarity index 90% rename from configuration.nix rename to modules/profiles/minimal.nix index 4cf6110..6d4af25 100644 --- a/configuration.nix +++ b/modules/profiles/minimal.nix @@ -20,15 +20,6 @@ in { ''; }; - # Enable bootloader & clear /tmp on boot. - boot = { - cleanTmpDir = true; - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - }; - # Locale time.timeZone = "America/New_York"; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/modules/sway.nix b/modules/sway.nix new file mode 100644 index 0000000..c0e0910 --- /dev/null +++ b/modules/sway.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: { + home-manager.users.james = { + wayland.windowManager.sway = { + enable = true; + wrapperFeatures.gtk = true; + }; + + home.packages = with pkgs; [ + autotiling + dmenu + kitty + mako + swayidle + swaylock + wl-clipboard + wofi + ]; + }; +}