diff options
Diffstat (limited to 'users/ryan/linux.nix')
| -rw-r--r-- | users/ryan/linux.nix | 63 |
1 files changed, 30 insertions, 33 deletions
diff --git a/users/ryan/linux.nix b/users/ryan/linux.nix index 5e6d767..3935de5 100644 --- a/users/ryan/linux.nix +++ b/users/ryan/linux.nix | |||
| @@ -6,31 +6,36 @@ | |||
| 6 | 6 | ||
| 7 | home.username = "ryan"; | 7 | home.username = "ryan"; |
| 8 | home.homeDirectory = "/home/ryan"; | 8 | home.homeDirectory = "/home/ryan"; |
| 9 | home.stateVersion = "23.11"; # Please read the comment before changing. | ||
| 10 | 9 | ||
| 11 | nixpkgs.config.allowUnfree = true; | 10 | nixpkgs.config.allowUnfree = true; |
| 12 | 11 | ||
| 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; | 12 | fonts.fontconfig.enable = true; |
| 30 | fonts.fontconfig.defaultFonts = { | 13 | fonts.fontconfig.defaultFonts = { |
| 31 | monospace = [ "DejaVu Sans Mono" ]; | 14 | monospace = [ "DejaVu Sans Mono" ]; |
| 32 | sansSerif = [ "DejaVu Sans" ]; | 15 | sansSerif = [ "Noto Sans" "DejaVu Sans" ]; |
| 33 | serif = [ "DejaVu Serif" ]; | 16 | serif = [ "Noto Serif" "DejaVu Serif" ]; |
| 17 | }; | ||
| 18 | |||
| 19 | gtk = { | ||
| 20 | enable = true; | ||
| 21 | font = { | ||
| 22 | name = "Noto Sans"; | ||
| 23 | size = 10; | ||
| 24 | }; | ||
| 25 | theme = { | ||
| 26 | name = "Adwaita"; | ||
| 27 | package = pkgs.gnome-themes-extra; | ||
| 28 | }; | ||
| 29 | iconTheme = { | ||
| 30 | name = "Adwaita"; | ||
| 31 | package = pkgs.adwaita-icon-theme; | ||
| 32 | }; | ||
| 33 | colorScheme = "dark"; | ||
| 34 | }; | ||
| 35 | |||
| 36 | qt = { | ||
| 37 | enable = true; | ||
| 38 | platformTheme.name = "gtk3"; | ||
| 34 | }; | 39 | }; |
| 35 | 40 | ||
| 36 | home.pointerCursor = { | 41 | home.pointerCursor = { |
| @@ -47,6 +52,7 @@ | |||
| 47 | wayland.windowManager.hyprland = { | 52 | wayland.windowManager.hyprland = { |
| 48 | enable = true; | 53 | enable = true; |
| 49 | package = pkgs.hyprland; | 54 | package = pkgs.hyprland; |
| 55 | configType = "hyprlang"; | ||
| 50 | portalPackage = pkgs.xdg-desktop-portal-hyprland; | 56 | portalPackage = pkgs.xdg-desktop-portal-hyprland; |
| 51 | extraConfig = builtins.readFile ./linux/hypr/hyprland.conf; | 57 | extraConfig = builtins.readFile ./linux/hypr/hyprland.conf; |
| 52 | }; | 58 | }; |
| @@ -60,6 +66,7 @@ | |||
| 60 | "hypr/scripts" = { source = ./linux/hypr/scripts; recursive = true; }; | 66 | "hypr/scripts" = { source = ./linux/hypr/scripts; recursive = true; }; |
| 61 | "hypr/family_guy.mp4".source = ./linux/hypr/family_guy.mp4; | 67 | "hypr/family_guy.mp4".source = ./linux/hypr/family_guy.mp4; |
| 62 | "hypr/subwaysurfer.webm".source = ./linux/hypr/subwaysurfer.webm; | 68 | "hypr/subwaysurfer.webm".source = ./linux/hypr/subwaysurfer.webm; |
| 69 | "wallpapers".source = ../../files/Wallpapers; | ||
| 63 | 70 | ||
| 64 | "waybar" = { source = ./linux/waybar; recursive = true; }; | 71 | "waybar" = { source = ./linux/waybar; recursive = true; }; |
| 65 | "alacritty" = { source = ./linux/alacritty; recursive = true; }; | 72 | "alacritty" = { source = ./linux/alacritty; recursive = true; }; |
| @@ -103,26 +110,16 @@ | |||
| 103 | waybar | 110 | waybar |
| 104 | fuzzel | 111 | fuzzel |
| 105 | 112 | ||
| 106 | nerd-fonts.anonymice | ||
| 107 | nerd-fonts.monofur | ||
| 108 | nerd-fonts.lilex | ||
| 109 | nerd-fonts.fira-code | ||
| 110 | noto-fonts | 113 | noto-fonts |
| 111 | dejavu_fonts | 114 | dejavu_fonts |
| 112 | liberation_ttf | 115 | liberation_ttf |
| 113 | noto-fonts-cjk-sans | 116 | noto-fonts-cjk-sans |
| 114 | noto-fonts-color-emoji | 117 | noto-fonts-color-emoji |
| 115 | 118 | ||
| 116 | # hyprlock built by nix needs Guix's PAM/fontconfig libs preloaded to run | 119 | inputs.clipboard-sync.packages.${pkgs.stdenv.hostPlatform.system}.default |
| 117 | # under the Guix system profile - same interop hack as before. | ||
| 118 | (pkgs.writeScriptBin "hyprlock" '' | ||
| 119 | #! ${pkgs.bash}/bin/bash | ||
| 120 | export LD_PRELOAD="/run/current-system/profile/lib/libpam.so.0:/run/current-system/profile/lib/libfontconfig.so:$LD_PRELOAD" | ||
| 121 | exec ${pkgs.hyprlock}/bin/hyprlock "$@" | ||
| 122 | '') | ||
| 123 | 120 | ||
| 124 | # Guix's mesa doesn't match nixpkgs', so GL apps built by nix need nixGL. | 121 | # hyprlock itself is provided by the host-specific module (e.g. |
| 125 | inputs.nixgl.packages.${pkgs.system}.nixGLIntel | 122 | # linux/guix.nix wraps it with an LD_PRELOAD shim; a plain NixOS host |
| 126 | inputs.clipboard-sync.packages.${pkgs.system}.default | 123 | # would just add pkgs.hyprlock here instead). |
| 127 | ]; | 124 | ]; |
| 128 | } | 125 | } |
