Nix Flakes configuration for MacOS, NixOS and WSL
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: shell module

+81 -2
+2 -2
flake.nix
··· 35 35 channels-config.allowUnfree = true; 36 36 37 37 systems.modules.nixos = with inputs; [ 38 - home-manager.nixosModules.home-manager 38 + # home-manager.nixosModules.home-manager 39 39 ]; 40 40 41 41 systems.modules.darwin = with inputs; [ 42 - home-manager.darwinModules.home-manager 42 + # home-manager.darwinModules.home-manager 43 43 ]; 44 44 45 45 systems.hosts.vali.modules = with inputs; [
+32
modules/nixos/home/default.nix
··· 1 + { options, config, lib, inputs, namespace, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + { 5 + imports = with inputs; [ 6 + home-manager.nixosModules.home-manager 7 + ]; 8 + 9 + options.${namespace}.home = with types; { 10 + file = mkOpt attrs {} "A set of files to be managed by home-manager's <option>home.file</option>."; 11 + configFile = mkOpt attrs {} "A set of files to be managed by home-manager's <option>xdg.configFile</option>."; 12 + programs = mkOpt attrs {} "Programs to be managed by home-manager."; 13 + extraOptions = mkOpt attrs {} "Options to pass directly to home-manager."; 14 + }; 15 + 16 + config = { 17 + asgard.home.extraOptions = { 18 + home.stateVersion = config.system.stateVersion; 19 + home.file = mkAliasDefinitions options.${namespace}.home.file; 20 + xdg.enable = true; 21 + xdg.configFile = mkAliasDefinitions options.${namespace}.home.configFile; 22 + programs = mkAliasDefinitions options.${namespace}.home.programs; 23 + }; 24 + 25 + snowfallorg.users.cosmeak.home.config = config.${namespace}.home.extraOptions; 26 + 27 + home-manager = { 28 + useUserPackages = true; 29 + useGlobalPkgs = true; 30 + }; 31 + }; 32 + }
+45
modules/nixos/system/shell/default.nix
··· 1 + { options, config, lib, pkgs, namespace, ... }: 2 + with lib; 3 + with lib.${namespace}; 4 + let 5 + cfg = config.${namespace}.system.shell; 6 + in 7 + { 8 + options.${namespace}.system.shell = with types; { 9 + enable = mkBoolOpt false "Whether or not to manage shell configuration."; 10 + }; 11 + 12 + config = mkIf cfg.enable { 13 + environment.systemPackages = with pkgs; [ 14 + bat 15 + eza 16 + fzf 17 + zoxide 18 + starship 19 + zsh 20 + tree 21 + ]; 22 + 23 + users.defaultUserShell = pkgs.zsh; 24 + users.users.root.shell = pkgs.bashInteractive; 25 + programs.zsh.enable = true; 26 + 27 + asgard.home.programs.starship = { 28 + enable = true; 29 + enableZshIntegration = true; 30 + }; 31 + 32 + asgard.home.programs.zsh = { 33 + enable = true; 34 + enableCompletion = true; 35 + shellAliases = { 36 + ls = "eza -la --icons --no-user --no-time --git -s type"; 37 + cat = "bat"; 38 + cd = "z"; 39 + }; 40 + initExtra = '' 41 + eval "$(zoxide init zsh)" 42 + ''; 43 + }; 44 + }; 45 + }
+2
systems/x86_64-linux/loki/default.nix
··· 13 13 locale.enable = true; 14 14 15 15 xkb.enable = true; 16 + 17 + shell.enable = true; 16 18 }; 17 19 18 20 hardware = {