users/ryan/linux.nix
08d200c7b0c9210afe5bc2819b99a2726b4421a7
· 3.4 KB · 125 lines
raw
| 1 | { config, pkgs, lib, inputs, ... }: |
| 2 | |
| 3 | { |
| 4 | imports = [ |
| 5 | ]; |
| 6 | |
| 7 | home.username = "ryan"; |
| 8 | home.homeDirectory = "/home/ryan"; |
| 9 | home.stateVersion = "23.11"; # Please read the comment before changing. |
| 10 | |
| 11 | nixpkgs.config.allowUnfree = true; |
| 12 | |
| 13 | xdg.configFile."nix/nix.conf".text = "experimental-features = nix-command flakes\n"; |
| 14 | xdg.configFile."nix/registry.json".text = builtins.toJSON { |
| 15 | version = 2; |
| 16 | flakes = [ |
| 17 | { |
| 18 | from = { type = "indirect"; id = "nixpkgs"; }; |
| 19 | to = { |
| 20 | type = "path"; |
| 21 | path = inputs.nixpkgs.outPath; |
| 22 | lastModified = inputs.nixpkgs.lastModified; |
| 23 | narHash = inputs.nixpkgs.narHash; |
| 24 | }; |
| 25 | } |
| 26 | ]; |
| 27 | }; |
| 28 | |
| 29 | fonts.fontconfig.enable = true; |
| 30 | fonts.fontconfig.defaultFonts = { |
| 31 | monospace = [ "DejaVu Sans Mono" ]; |
| 32 | sansSerif = [ "DejaVu Sans" ]; |
| 33 | serif = [ "DejaVu Serif" ]; |
| 34 | }; |
| 35 | |
| 36 | home.pointerCursor = { |
| 37 | enable = true; |
| 38 | package = pkgs.bibata-cursors; |
| 39 | name = "Bibata-Modern-Classic"; |
| 40 | size = 24; |
| 41 | gtk.enable = true; |
| 42 | x11.enable = true; |
| 43 | }; |
| 44 | |
| 45 | services.gpg-agent.pinentry.package = pkgs.pinentry-qt; |
| 46 | |
| 47 | wayland.windowManager.hyprland = { |
| 48 | enable = true; |
| 49 | package = pkgs.hyprland; |
| 50 | portalPackage = pkgs.xdg-desktop-portal-hyprland; |
| 51 | extraConfig = builtins.readFile ./linux/hypr/hyprland.conf; |
| 52 | }; |
| 53 | |
| 54 | xdg.configFile = { |
| 55 | "hypr/monitors.conf".source = ./linux/hypr/monitors.conf; |
| 56 | "hypr/kanshi.conf".source = ./linux/hypr/kanshi.conf; |
| 57 | "hypr/pyprland.toml".source = ./linux/hypr/pyprland.toml; |
| 58 | "hypr/hypridle.conf".source = ./linux/hypr/hypridle.conf; |
| 59 | "hypr/hyprlock.conf".source = ./linux/hypr/hyprlock.conf; |
| 60 | "hypr/scripts" = { source = ./linux/hypr/scripts; recursive = true; }; |
| 61 | "hypr/family_guy.mp4".source = ./linux/hypr/family_guy.mp4; |
| 62 | "hypr/subwaysurfer.webm".source = ./linux/hypr/subwaysurfer.webm; |
| 63 | |
| 64 | "waybar" = { source = ./linux/waybar; recursive = true; }; |
| 65 | "alacritty" = { source = ./linux/alacritty; recursive = true; }; |
| 66 | "foot" = { source = ./linux/foot; recursive = true; }; |
| 67 | "wpaperd" = { source = ./linux/wpaperd; recursive = true; }; |
| 68 | "mpv" = { source = ./linux/mpv; recursive = true; }; |
| 69 | |
| 70 | "pulse/client.conf".source = ./linux/pulseaudio/client.conf; |
| 71 | }; |
| 72 | |
| 73 | home.file = { |
| 74 | # Files that need to be in ~ go here |
| 75 | }; |
| 76 | |
| 77 | home.packages = with pkgs; [ |
| 78 | gcc |
| 79 | pkg-config |
| 80 | wttrbar |
| 81 | wl-clip-persist |
| 82 | waypaper |
| 83 | xwayland |
| 84 | xdg-desktop-portal |
| 85 | xdg-desktop-portal-gtk |
| 86 | mpv |
| 87 | imv |
| 88 | libva |
| 89 | libvdpau |
| 90 | hypridle |
| 91 | hyprpicker |
| 92 | wpaperd |
| 93 | wl-mirror |
| 94 | pyprland |
| 95 | satty |
| 96 | sops |
| 97 | restic |
| 98 | bluetui |
| 99 | supercell-wx |
| 100 | chromium |
| 101 | foot |
| 102 | |
| 103 | nerd-fonts.anonymice |
| 104 | nerd-fonts.monofur |
| 105 | nerd-fonts.lilex |
| 106 | nerd-fonts.fira-code |
| 107 | noto-fonts |
| 108 | dejavu_fonts |
| 109 | liberation_ttf |
| 110 | noto-fonts-cjk-sans |
| 111 | noto-fonts-color-emoji |
| 112 | |
| 113 | # hyprlock built by nix needs Guix's PAM/fontconfig libs preloaded to run |
| 114 | # under the Guix system profile - same interop hack as before. |
| 115 | (pkgs.writeScriptBin "hyprlock" '' |
| 116 | #! ${pkgs.bash}/bin/bash |
| 117 | export LD_PRELOAD="/run/current-system/profile/lib/libpam.so.0:/run/current-system/profile/lib/libfontconfig.so:$LD_PRELOAD" |
| 118 | exec ${pkgs.hyprlock}/bin/hyprlock "$@" |
| 119 | '') |
| 120 | |
| 121 | # Guix's mesa doesn't match nixpkgs', so GL apps built by nix need nixGL. |
| 122 | inputs.nixgl.packages.${pkgs.system}.nixGLIntel |
| 123 | inputs.clipboard-sync.packages.${pkgs.system}.default |
| 124 | ]; |
| 125 | } |