diff --git a/README b/README index 0068d79..385d0c8 100644 --- a/README +++ b/README @@ -5,6 +5,14 @@ another user level package management method was baffling. Obviously I understan it can be useful (so I do use it). But where possible I will instead use the functionality of Nix rather than Home Manager. +###### Structuring Modules +Modules are organised into groups (ie "Core"), from here a module is structured as either: +1. a single `.nix` file (ie bluetooth.nix). I do this when I won't implement an alternative +2. a directory (ie `sound`) containing a set of alternative implementations and a `default.nix` +that simply imports one of the implementations. For the `sound` example I currently have it structured +to default to `pipewire.nix`. I haven't made alternatives yet but the idea is that it is HIGHLY likely +I do in future. + ### TODO There are a lot of `TODO` items in this repository. To improve these dotfiles @@ -13,7 +21,32 @@ recommendation I left behind :) +##### Small Explanation of Fonts +There are four types of fonts (to my knowledge at least): +1. serif (funny squigles / small elegant strokes included) +2. sans-serif (meaning "without serifs") +3. monospace (all glyphs are of a uniform size) +4. emoji (cute lil faces) + +Fun fact: on Android, the emojis you are seeing are part of the noto-emoji font :) + +For finding a font for programming I highly recommend trying https://www.codingfont.com/ + + +### My config + +Font: +Iosevka nerd font set as default/prefered font +Terminal uses IosevkaTerm nerd font + + + + ### Credits 1. https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles The simplicity of their layout is amazing, was really good to pick out small modules and learn how something works / is configured. +2. https://github.com/Misterio77/nix-starter-configs +Really great starter config for learning how parts interact and how to generally structure flakes +3. https://nixos.wiki/wiki/Fonts +Wiki page explaining how to install fonts and nerd fonts on NixOS diff --git a/flake.nix b/flake.nix index b308364..7dc4640 100644 --- a/flake.nix +++ b/flake.nix @@ -26,9 +26,9 @@ pkgs = import nixpkgs { inherit system; - #config = { - # allowUnfree = true; - #}; + config = { + allowUnfree = false; + }; }; # this is just something I'm experimenting with @@ -62,7 +62,7 @@ inherit pkgs; modules = [ - ./home/emile # ./home/me + ./home/me ]; }; }; diff --git a/homes/me/home.nix b/homes/me/home.nix new file mode 100644 index 0000000..9cea35c --- /dev/null +++ b/homes/me/home.nix @@ -0,0 +1,123 @@ +{ + inputs, + outputs, + lib, + config, + pkgs, + ... +}: + +{ + imports = [ + # ./nvim.nix + ]; + + nixpkgs = { + config.allowUnfree = false; + }; + + home = { + username = "me"; + homeDirectory = "/home/me"; + }; + + programs = { + # Required for home-manager + home-manager.enable = true; + git.enable = true; + + # The terminal I use + # TODO: this is dependent on nvim being installed + # TODO: make this into a module with a configurable editor option + rio = { + enable = true; + # Rio Config Docs: https://raphamorim.io/rio/docs/config + settings = { + theme = "dracula"; + hide-mouse-cursor-when-typing = true; + + use-fork = true; # fork (dont spawn) Rio + + fonts = { + size = 18; + features = []; + + regular = { + family = "IosevkaTerm"; + style = "normal"; + weight = 400; + }; + + bold = { + family = "IosevkaTerm"; + style = "normal"; + weight = 800; + }; + + italic = { + family = "IosevkaTerm"; + style = "italic"; + weight = 400; + }; + + bold-italic = { + family = "IosevkaTerm"; + style = "italic"; + weight = 800; + }; + }; + + # Run when the `OpenConfigEditor` keybinding is triggered + editor = { + program = "nvim"; + args = []; + }; + }; + }; + }; + + # Nicely reload system units when changing configs + systemd.user.startServices = "sd-switch"; + + home.stateVersion = "24.05"; # don't change this + + /* + services = { + # Change monitor positions + # TODO: find a way to make this modular (ie put something different for my laptop) + # my idea is to have a "monitors" module and use kanshi for wayland + kanshi = { + enable = true; + systemdTarget = "hyprland-session.target"; + # You can find your monitors in hyprland by using `hyprctl monitors all` + settings = [ + { # 1920x1080@144 gaming monitor + output.criteria = "HDMI-A-1"; + output.mode = "1920x1080@119.98Hz"; + output.scale = 1.0; + output.adaptiveSync = false; # Variable Refresh Rate (this can be changed for gaming) + } + { # 4k side monitor + output.criteria = "DP-2"; + output.mode = "3840x2160@60.00Hz"; + output.scale = 2.0; + } + + { # This is my default setup + profile.name = "default"; + profile.outputs = [ + { + criteria = "DP-2"; + position = "0,0"; + } + { + criteria = "HDMI-A-1"; + position = "3840,0"; + } + ]; + } + ]; + }; + }; + */ +} diff --git a/hosts/myputer/default.nix b/hosts/myputer/default.nix index 6475c09..b28950a 100644 --- a/hosts/myputer/default.nix +++ b/hosts/myputer/default.nix @@ -78,8 +78,8 @@ packages = with pkgs; [ firefox nitch + starfetch tldr - tree ]; }; @@ -89,7 +89,6 @@ extraGroups = [ "wheel" ]; shell = pkgs.zsh; packages = with pkgs; [ - tree ]; }; @@ -99,7 +98,6 @@ extraGroups = [ "wheel" ]; shell = pkgs.fish; packages = with pkgs; [ - tree ]; }; }; @@ -108,10 +106,16 @@ # ---- SYSTEM PACKAGES ----- environment.systemPackages = with pkgs; [ - vim - wget + # Personally I think these kitty + + # Pretty necessary + #vim git + + # Super duper necessary + wget + tree ]; @@ -120,8 +124,45 @@ hyprland.enable = true; fish.enable = true; zsh.enable = true; + + neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + configure = { + customRC = '' + set number + set tabstop=4 + set shiftwidth=4 + ''; + # set cc=80 + }; + }; }; + + # ----- FONTS ----- + fonts = { + enableDefaultPackages = true; # no clue what this line does tbh + fonts = with pkgs; [ + (nerdfonts.override { fonts = [ "Cousine" "Iosevka" "IosevkaTerm" ]; }) + + # texlive maintains a noto-emoji flake + texlivePackages.noto-emoji + ]; + + fontconfig = { + defaultFonts = { + serif = [ "Iosevka" ]; # TODO: package Iosevka Etoile since Iosevka isn't a serif font + sansSerif = [ "Iosevka "]; + monospace = [ "Cousine" ]; + emoji = [ "Noto Emoji" ]; + }; + }; + }; + + # Enable the new CLI commands and the flakes as experimental features nix.settings.experimental-features = [ "nix-command" diff --git a/modules/core/bootloader/default.nix b/modules/core/bootloader/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/core/bootloader/grub.nix b/modules/core/bootloader/grub.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/core/bootloader/systemd-boot.nix b/modules/core/bootloader/systemd-boot.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/core/sound/default.nix b/modules/core/sound/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/core/pipewire.nix b/modules/core/sound/pipewire.nix similarity index 100% rename from modules/core/pipewire.nix rename to modules/core/sound/pipewire.nix diff --git a/modules/hyprland/default.nix b/modules/hyprland/default.nix new file mode 100644 index 0000000..71ee559 --- /dev/null +++ b/modules/hyprland/default.nix @@ -0,0 +1,30 @@ +{ + pkgs, + inputs, + config, + lib, + ... +}: + +{ + options.hyprland = { + enable = lib.mkEnableOption "Hyprland"; + }; + + config = lib.mkIf config.hyprland.enable { + programs.hyprland = { + enable = true; + #package = inputs.hyprland.packages.${pkgs.system}.hyprland; + xwayland.enable = true; + }; + + xdg.portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + ]; + }; + + # TODO: finish this (I didn't like the dotfiles I was getting inspo from and stopped) + }; +}