home-config/nix-home-manager/home.nix

8e7ca7042d472b758bfdb74bc24928d782926470 · 6.0 KB · 193 lines raw

1 { config, pkgs, hyprland, nixgl, wpaperd, hyprpicker-git, hyprlock, mozff, clipboard-sync, hypr-dynamic-cursors, zen-browser, ... }:
2 let
3 # THIS IS NOT PERFECT AT ALL YET!!! Gets the basics done (my important
4 # policies regarding accounts and extensions. Does not set up profile
5 # stuff, like search. Most importantly, it DOES NOT add system CAs.
6 # To do that, run:
7 # `certutil -A -n "name" -t "CT,c" -i ./path/to/cert -d ~/.zen/profile-folder`
8 # I do this for my root and intermediate. BEWARE WHEN INSTALLING NEW
9 # SYSTEMS!!!!
10 ffPolicies = import ./zenPolicies.nix;
11 customZen = zen-browser.packages.${pkgs.system}.default.overrideAttrs (old: {
12 installPhase = old.installPhase + ''
13 rm -f $out/lib/zen-${old.version}/distribution/policies.json
14 rm -rf $out/lib
15 mkdir $out/opt/zen/distribution
16 ln -s ${pkgs.writeText "firefox-policies.json" (builtins.toJSON ffPolicies)} \
17 "$out/opt/zen/distribution/policies.json"
18 '';
19 });
20
21 in
22
23 {
24 imports = [
25 ./firefox-nightly/default.nix
26 ];
27 # Home Manager needs a bit of information about you and the paths it should
28 # manage.
29 home.username = "ryan";
30 home.homeDirectory = "/home/ryan";
31
32 # Ignore news
33 news.display = "silent";
34
35 # This value determines the Home Manager release that your configuration is
36 # compatible with. This helps avoid breakage when a new Home Manager release
37 # introduces backwards incompatible changes.
38 #
39 # You should not change this value, even if you update Home Manager. If you do
40 # want to update the value, then make sure to first check the Home Manager
41 # release notes.
42 home.stateVersion = "23.11"; # Please read the comment before changing.
43
44 # This value will set some environment variables to allow home-manager to
45 # function better outside of NixOS
46 nixpkgs.config.allowUnfree = true;
47 #targets.genericLinux.enable = true;
48 fonts.fontconfig.enable = true;
49 fonts.fontconfig.defaultFonts = {
50 monospace = [ "DejaVu Sans Mono" ];
51 sansSerif = [ "DejaVu Sans" ];
52 serif = [ "DejaVu Serif" ];
53 };
54
55 wayland.windowManager.hyprland = {
56 enable = true;
57 package = hyprland.packages.${pkgs.system}.hyprland;
58 portalPackage = hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
59 extraConfig = ''
60 ${builtins.readFile ../hypr/hyprland.conf}
61 '';
62 plugins = [ hypr-dynamic-cursors.packages.${pkgs.system}.hypr-dynamic-cursors ];
63 };
64
65 programs.starship = {
66 enable = true;
67 settings = {
68 add_newline = false;
69 character = {
70 success_symbol = "[➜](bold green)";
71 error_symbol = "[➜](bold red)";
72 };
73 time = {
74 disabled = false;
75 format = "\[ $time \]($style)";
76 time_format = "%T";
77 };
78 };
79 };
80
81 # The home.packages option allows you to install Nix packages into your
82 # environment.
83 home.packages = with pkgs; [
84 # # Adds the 'hello' command to your environment. It prints a friendly
85 # # "Hello, world!" when run.
86 # pkgs.hello
87 nix # Used to keep nix up to date when I don't update the guix package
88 yt-dlp
89 #pass
90 rustup
91 zoxide
92 nodePackages.pnpm
93 gcc
94 aerc
95 pkg-config
96 wttrbar
97 wl-clip-persist
98 gifski
99 waypaper
100 gdu
101 spotify-player
102 #hyprpicker
103 xwayland
104 xdg-desktop-portal
105 xdg-desktop-portal-gtk
106 mpv
107 imv
108 libva
109 libvdpau
110 #wpaperd
111 hypridle
112 #latest.firefox-nightly-bin
113 eza
114 wl-mirror
115 starship
116 taskwarrior3
117 delta
118 #(flameshot.override { enableWlrSupport = true; })
119
120 # Here until i can fix firefox's stupid devtools issue
121 chromium
122
123 # Maybe will work?
124 customZen
125
126 # Wrapped programs for some env variables
127 (pkgs.writeScriptBin "hyprlock" ''
128 #! ${pkgs.bash}/bin/bash
129 export LD_PRELOAD="/run/current-system/profile/lib/libpam.so.0:/run/current-system/profile/lib/libfontconfig.so:$LD_PRELOAD"
130 exec ${hyprlock.packages.${pkgs.system}.hyprlock}/bin/hyprlock "$@"
131 '')
132
133 # Flakes specific things defined in flake.nix
134 #hyprland.packages.${pkgs.system}.default
135 #hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
136 nixgl.packages.${pkgs.system}.nixGLIntel
137 wpaperd.packages.${pkgs.system}.wpaperd
138 hyprpicker-git.packages.${pkgs.system}.hyprpicker
139 clipboard-sync.packages.${pkgs.system}.default
140
141 # Fonts!
142 noto-fonts
143 dejavu_fonts
144 liberation_ttf
145 noto-fonts-cjk-sans
146 noto-fonts-emoji
147
148 # # It is sometimes useful to fine-tune packages, for example, by applying
149 # # overrides. You can do that directly here, just don't forget the
150 # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
151 # # fonts?
152 # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
153
154 # # You can also create simple shell scripts directly inside your
155 # # configuration. For example, this adds a command 'my-hello' to your
156 # # environment:
157 # (pkgs.writeShellScriptBin "my-hello" ''
158 # echo "Hello, ${config.home.username}!"
159 # '')
160 ];
161
162 # Home Manager is pretty good at managing dotfiles. The primary way to manage
163 # plain files is through 'home.file'.
164 home.file = {
165 # # Building this configuration will create a copy of 'dotfiles/screenrc' in
166 # # the Nix store. Activating the configuration will then make '~/.screenrc' a
167 # # symlink to the Nix store copy.
168 # ".screenrc".source = dotfiles/screenrc;
169
170 # # You can also set the file content immediately.
171 # ".gradle/gradle.properties".text = ''
172 # org.gradle.console=verbose
173 # org.gradle.daemon.idletimeout=3600000
174 # '';
175 };
176
177 # You can also manage environment variables but you will have to manually
178 # source
179 #
180 # ~/.nix-profile/etc/profile.d/hm-session-vars.sh
181 #
182 # or
183 #
184 # /etc/profiles/per-user/ryan/etc/profile.d/hm-session-vars.sh
185 #
186 # if you don't want to manage your shell through Home Manager.
187 home.sessionVariables = {
188 # EDITOR = "emacs";
189 };
190
191 # Let Home Manager install and manage itself.
192 programs.home-manager.enable = true;
193 }