nixos-config/user
2024-03-09 16:36:51 -06:00
..
app Trimmed out some unnecessary packages 2024-03-09 16:36:51 -06:00
bin Trimmed out some unnecessary packages 2024-03-09 16:36:51 -06:00
hardware Optimized some specialArgs and module argument use 2024-01-18 15:36:52 -06:00
lang Optimized some specialArgs and module argument use 2024-01-18 15:36:52 -06:00
pkgs Trimmed out some unnecessary packages 2024-03-09 16:36:51 -06:00
shell Trimmed out some unnecessary packages 2024-03-09 16:36:51 -06:00
style Added stylix colors to swaylock-effects + removed some pkgs 2024-02-03 16:15:10 -06:00
wm Updated deprecated hm option name 2024-02-28 19:54:34 -06:00
README.org Boilerplate reduction (I understand strings in nix now!) 2023-06-22 14:53:10 -05:00

User-level Nix Modules

Separate Nix files can be imported as modules using an import block:

imports = [ import1.nix
            import2.nix
            ...
          ];

My user-level Nix modules are organized into this directory:

  • app - Apps or collections of apps bundled with my configs

  • bin - My own scripts

  • lang - Various bundled programming languages

    • I will probably get rid of this in favor of a shell.nix for every project, once I learn how that works
  • pkgs - "Package builds" for packages not in the Nix repositories

  • shell - My default bash and zsh configs

  • style - Stylix setup (system-wide base16 theme generation)
  • wm - Window manager, compositor, wayland compositor, and/or desktop environment setups

Variables imported from flake.nix

Variables can be imported from flake.nix by setting the extraSpecialArgs block inside the flake (see my flake for more details). This allows variables to merely be managed in one place (flake.nix) rather than having to manage them in multiple locations.

I currently import the following variables to the system config:

  • username - Username
  • hostname - Hostname for machine
  • myHomeDir - Absolute path to home directory derived from username
  • email - Email
  • dotfilesDir - Path to my dotfiles directory on the system
  • theme - base16 theme stored in ../themes to be used
  • themePolarity - whether theme is light or dark
  • backgroundUrl - Direct link to background wallpaper (used for login screen)
  • backgroundSha256 - Checksum for background image used when downloading