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

f34e77efa50eadbb93ec43093ff5ea7063ff1aa0 · 6.0 KB · 192 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 yt-dlp
88 #pass
89 rustup
90 zoxide
91 nodePackages.pnpm
92 gcc
93 aerc
94 pkg-config
95 wttrbar
96 wl-clip-persist
97 gifski
98 waypaper
99 gdu
100 spotify-player
101 #hyprpicker
102 xwayland
103 xdg-desktop-portal
104 xdg-desktop-portal-gtk
105 mpv
106 imv
107 libva
108 libvdpau
109 #wpaperd
110 hypridle
111 #latest.firefox-nightly-bin
112 eza
113 wl-mirror
114 starship
115 taskwarrior3
116 delta
117 (flameshot.override { enableWlrSupport = true; })
118
119 # Here until i can fix firefox's stupid devtools issue
120 chromium
121
122 # Maybe will work?
123 customZen
124
125 # Wrapped programs for some env variables
126 (pkgs.writeScriptBin "hyprlock" ''
127 #! ${pkgs.bash}/bin/bash
128 export LD_PRELOAD="/run/current-system/profile/lib/libpam.so.0:/run/current-system/profile/lib/libfontconfig.so:$LD_PRELOAD"
129 exec ${hyprlock.packages.${pkgs.system}.hyprlock}/bin/hyprlock "$@"
130 '')
131
132 # Flakes specific things defined in flake.nix
133 #hyprland.packages.${pkgs.system}.default
134 #hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
135 nixgl.packages.${pkgs.system}.nixGLIntel
136 wpaperd.packages.${pkgs.system}.wpaperd
137 hyprpicker-git.packages.${pkgs.system}.hyprpicker
138 clipboard-sync.packages.${pkgs.system}.default
139
140 # Fonts!
141 noto-fonts
142 dejavu_fonts
143 liberation_ttf
144 noto-fonts-cjk-sans
145 noto-fonts-emoji
146
147 # # It is sometimes useful to fine-tune packages, for example, by applying
148 # # overrides. You can do that directly here, just don't forget the
149 # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
150 # # fonts?
151 # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
152
153 # # You can also create simple shell scripts directly inside your
154 # # configuration. For example, this adds a command 'my-hello' to your
155 # # environment:
156 # (pkgs.writeShellScriptBin "my-hello" ''
157 # echo "Hello, ${config.home.username}!"
158 # '')
159 ];
160
161 # Home Manager is pretty good at managing dotfiles. The primary way to manage
162 # plain files is through 'home.file'.
163 home.file = {
164 # # Building this configuration will create a copy of 'dotfiles/screenrc' in
165 # # the Nix store. Activating the configuration will then make '~/.screenrc' a
166 # # symlink to the Nix store copy.
167 # ".screenrc".source = dotfiles/screenrc;
168
169 # # You can also set the file content immediately.
170 # ".gradle/gradle.properties".text = ''
171 # org.gradle.console=verbose
172 # org.gradle.daemon.idletimeout=3600000
173 # '';
174 };
175
176 # You can also manage environment variables but you will have to manually
177 # source
178 #
179 # ~/.nix-profile/etc/profile.d/hm-session-vars.sh
180 #
181 # or
182 #
183 # /etc/profiles/per-user/ryan/etc/profile.d/hm-session-vars.sh
184 #
185 # if you don't want to manage your shell through Home Manager.
186 home.sessionVariables = {
187 # EDITOR = "emacs";
188 };
189
190 # Let Home Manager install and manage itself.
191 programs.home-manager.enable = true;
192 }