Facebook
From dob, 1 Month ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 182
  1. # --------------------------------------------------
  2. # pqq/poq
  3. # -----
  4. # home manager options:
  5. #   search:
  6. #     https://home-manager-options.extranix.com/?query=
  7. #   list
  8. #     https://nix-community.github.io/home-manager/options.xhtml
  9. # --------------------------------------------------
  10.  
  11. {
  12.     inputs,
  13.     outputs,
  14.     lib,
  15.     config,
  16.     pkgs,
  17.     ...
  18. }: {
  19.     # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
  20.     home.stateVersion = "23.11";
  21.  
  22.     # import home-manager modules
  23.     imports = [
  24.         ../packages/waybar/waybar.nix
  25.         ../packages/hyprland/hyprland.nix
  26.     ];
  27.  
  28.     # enable home-manager
  29.     programs.home-manager.enable = true;
  30.  
  31.     # define information about the user and the path(s) it should manage
  32.     home = {
  33.         username = "poq";
  34.         homeDirectory = "/home/poq";
  35.     };
  36.  
  37.     # enable fontconfig configuration
  38.     # https://nix-community.github.io/home-manager/options.xhtml#opt-fonts.fontconfig.enable
  39.     fonts.fontconfig.enable = true;
  40.  
  41.     # add overlays
  42.     # https://nix-community.github.io/home-manager/options.xhtml#opt-nixpkgs.overlays
  43.     nixpkgs.overlays = [
  44.         outputs.unstable-packages
  45.     ];
  46.  
  47.     # add user packages
  48.     home.packages = with pkgs; [
  49.         neofetch                # display system information
  50.         htop                    # interactive process viewer
  51.         nerdfonts               # full nerfonts package, alt: "(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })"
  52.         pavucontrol             # pulseaudio volume control
  53.         pulseaudio              # sound server system / proxy for your sound applications
  54.         pcmanfm                 # file manager
  55.         playerctl               # cli utility for controlling media players
  56.         unstable.hyprlock
  57.  
  58.         (pkgs.writeShellScriptBin "helloWorld_1" ''
  59.             echo "Hello, World! (pkgs.writeShellScriptBin)";
  60.         '')
  61.  
  62.         (pkgs.writeShellScriptBin "helloWorld_2"
  63.             (builtins.readFile ../sources/scripts/helloWorld.sh)
  64.         )
  65.  
  66.     ];
  67.  
  68.     # -----
  69.     # add home-manager packages
  70.     # -----
  71.     programs.kitty.enable = true;
  72.  
  73.     programs.wofi.enable = true;
  74.  
  75.     services.mako.enable = true;
  76.  
  77.     # bash :: https://home-manager-options.extranix.com/?query=bash
  78.     programs.bash.enable = true;
  79.  
  80.         # extra commands to run when initializing an interactive shell
  81.         programs.bash.initExtra = ''
  82.             #chmod a-x ~/.local/bin/*
  83.  
  84.             helloWorld_3 () {
  85.                 echo "Hello, World! (programs.bash.initExtra)";
  86.             }
  87.  
  88.             alias curae="/home/.curae/curae.sh"
  89.  
  90.             # execute it immediately
  91.             #setxkbmap -model pc105 -layout us,no -option grp:caps_toggle,grp_led:scroll
  92.             # create alias for manual execution
  93.             #alias keymap="setxkbmap -model pc105 -layout us,no -option grp:caps_toggle,grp_led:scroll"
  94.  
  95.         '';
  96.  
  97.         # extra commands placed in ~/.bashrc (will run even in non-interactive shells)
  98.         programs.bash.bashrcExtra = ''
  99.         '';
  100.  
  101.     # enable git
  102.     programs.git.enable = true;
  103.  
  104.     # nicely reload system units when changing configs
  105.     systemd.user.startServices = "sd-switch";
  106.  
  107.     # include sources
  108.     #   please note that source files has to be executable before the import
  109.     #   https://discourse.nixos.org/t/how-to-make-scripts-imported-via-home-manager-executable/41909
  110.     home.file = {
  111.         ".local/bin" = {
  112.             source = ../sources/scripts;
  113.             recursive = true;
  114.         };
  115.         ".local/wp" = {
  116.             source = ../sources/wallpapers;
  117.             recursive = true;
  118.         };
  119.     };
  120.  
  121. }
  122.