Refactored almost everything into smaller modules.

This commit is contained in:
James Patrick 2021-11-28 18:44:10 -05:00
parent 6461a9fb35
commit 2e19952358
8 changed files with 60 additions and 51 deletions

View File

@ -35,7 +35,6 @@
nil = lib.nixosSystem { nil = lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./configuration.nix
nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1 nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
./hosts/nil.nix ./hosts/nil.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager

View File

@ -6,11 +6,6 @@
home.username = "james"; home.username = "james";
home.homeDirectory = "/home/james"; home.homeDirectory = "/home/james";
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
home.packages = with pkgs; [ emacs wofi i3 zsh kitty tmux ]; home.packages = with pkgs; [ emacs wofi i3 zsh kitty tmux ];
# This value determines the Home Manager release that your # This value determines the Home Manager release that your

10
modules/boot.nix Normal file
View File

@ -0,0 +1,10 @@
{ config, lib, ... }: {
# Enable bootloader & clear /tmp on boot.
boot = {
cleanTmpDir = true;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
}

5
modules/cli.nix Normal file
View File

@ -0,0 +1,5 @@
# Need to read?
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [ htop ripgrep jq silver-searcher ];
}

24
modules/fonts.nix Normal file
View File

@ -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" ];
};
};
};
}

View File

@ -1,41 +1,7 @@
{ config, pkgs, ... }: { { config, lib, pkgs, ... }: {
programs.sway = { imports = [ ../boot.nix ../cli.nix ../fonts.nix ../sway.nix ./minimal.nix ];
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
];
};
# Enable sound. # Enable sound.
sound.enable = true; sound.enable = true;
hardware.pulseaudio.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" ];
};
};
};
} }

View File

@ -20,15 +20,6 @@ in {
''; '';
}; };
# Enable bootloader & clear /tmp on boot.
boot = {
cleanTmpDir = true;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
# Locale # Locale
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";

19
modules/sway.nix Normal file
View File

@ -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
];
};
}