diff --git a/README.md b/README.md index 1e943e3..a1bfd8c 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,6 @@ It just works™ ## Structure - -Any directory or file that is prefixed with an `_` (underscore) means that the -whole directory/file is unused in this repository. - ```  . │ # Darwin configuration is not actively maintained and sometimes it might @@ -17,7 +13,7 @@ whole directory/file is unused in this repository. │ ├──  modules │ └──  profiles │ -│ # Personal packages, please see github:Guanran928/nur-packages instead +│ # Internal packages, please see github:Guanran928/nur-packages instead ├──  pkgs ├──  hosts ├──  overlays @@ -27,54 +23,3 @@ whole directory/file is unused in this repository. │ └──  README.md ``` - -## Installation: - -Please don't. - -### NixOS: - -1. Clone this repository - - `$ git clone https://github.com/Guanran928/flake.git` - -2. Add your device's hardware configuration in `./flake.nix` and - `./hosts/` - -3. Install NixOS - - `$ nixos-install --flake #` - -### macOS: - -1. Install Nix using [`Determinate Nix Installer`](https://github.com/DeterminateSystems/nix-installer) - - `$ curl --proto '=https' --tlsv1.2 -fsSL https://install.determinate.systems/nix | sh -s -- install` - -2. Clone this repository - - `$ git clone https://github.com/Guanran928/flake.git` - -3. Add your device's hardware configuration in `./flake.nix` and - `./hosts/` - -4. Install [`nix-darwin`](https://github.com/LnL7/nix-darwin?tab=readme-ov-file#flakes) - - `$ nix run nix-darwin -- --flake # switch` - -### Nix-On-Droid: - -1. Install [`nix-on-droid`](https://github.com/nix-community/nix-on-droid) and bootstrap with Flakes - - F-Droid: https://f-droid.org/packages/com.termux.nix - -2. Clone this repository - - `$ nix shell nixpkgs#git` - `$ git clone https://github.com/Guanran928/flake.git` - -3. Add your device's configuration in `./flake.nix` and `./hosts/` - -4. Setup Nix-On-Droid - - `$ nix-on-droid --flake #switch` diff --git a/home/applications/neovim/default.nix b/home/applications/neovim/default.nix index 9cf0bf0..ea8665f 100644 --- a/home/applications/neovim/default.nix +++ b/home/applications/neovim/default.nix @@ -8,17 +8,7 @@ viAlias = true; vimAlias = true; }) - #pkgs.lunarvim ]; home.sessionVariables."EDITOR" = "nvim"; - - # TODO: still couldn't make it work - #programs.neovim = { - # enable = true; - # viAlias = true; - # vimAlias = true; - # - # package = inputs.neovim.packages.${pkgs.stdenv.hostPlatform.system}.default; - #}; } diff --git a/home/applications/skim/default.nix b/home/applications/skim/default.nix deleted file mode 100644 index 4d90d21..0000000 --- a/home/applications/skim/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - programs.skim = { - enable = true; - - # SPEED: fd > rg > find - # STARTUP TIME: find > rg > fd - defaultCommand = "fd --color never || rg --files --color never || find"; - }; -} diff --git a/home/default.nix b/home/default.nix index 4e00e0a..be9b824 100644 --- a/home/default.nix +++ b/home/default.nix @@ -42,7 +42,6 @@ ./applications/git ./applications/gpg ./applications/neovim - ./applications/skim ./applications/starship ./applications/tealdeer ./applications/tmux @@ -50,6 +49,7 @@ programs.jq.enable = true; programs.ripgrep.enable = true; + programs.skim.enable = true; programs.zoxide.enable = true; home.packages = (with pkgs; [ diff --git a/hosts/aristotle/README.md b/hosts/aristotle/README.md deleted file mode 100644 index b24a27c..0000000 --- a/hosts/aristotle/README.md +++ /dev/null @@ -1,13 +0,0 @@ -### About this device - -### Hardware - -``` -$ hostnamectl --json short | jq -r '.HardwareVendor, .HardwareModel' -Lenovo -Lenovo Legion Y7000 -``` - -### Description - -My first computer & my main device (as of Feb. 2024). diff --git a/hosts/aristotle/default.nix b/hosts/aristotle/default.nix index d2fc9e8..d751f8b 100644 --- a/hosts/aristotle/default.nix +++ b/hosts/aristotle/default.nix @@ -5,7 +5,6 @@ ./anti-feature.nix ./disko.nix - ./graphical ./hardware-configuration.nix ./impermanence.nix ./lanzaboote.nix @@ -55,37 +54,98 @@ services.pcscd.enable = true; services.udev.packages = [pkgs.yubikey-personalization]; - # polkit - security.polkit.enable = true; - systemd.user.services.polkit-gnome-authentication-agent-1 = { - description = "polkit-gnome-authentication-agent-1"; - wantedBy = ["graphical-session.target"]; - wants = ["graphical-session.target"]; - after = ["graphical-session.target"]; - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; + fonts = { + enableDefaultPackages = false; + packages = with pkgs; [ + (nerdfonts.override { + fonts = ["NerdFontsSymbolsOnly"]; + }) + (inter.overrideAttrs { + installPhase = '' + runHook preInstall + install -Dm644 -t $out/share/fonts/truetype/ InterVariable*.ttf + runHook postInstall + ''; + }) + (jetbrains-mono.overrideAttrs { + installPhase = '' + runHook preInstall + install -Dm644 -t $out/share/fonts/truetype/ fonts/variable/*.ttf + runHook postInstall + ''; + }) + (source-sans.overrideAttrs { + installPhase = '' + runHook preInstall + install -Dm444 VF/*.otf -t $out/share/fonts/variable + runHook postInstall + ''; + }) + (source-serif.overrideAttrs { + installPhase = '' + runHook preInstall + install -Dm444 VAR/*.otf -t $out/share/fonts/variable + runHook postInstall + ''; + }) + source-han-sans-vf-otf + source-han-serif-vf-otf + noto-fonts-color-emoji + ]; + fontconfig.defaultFonts = { + emoji = [ + "Noto Color Emoji" + ]; + # Append emoji font for Qt apps, they might use the monochrome emoji + monospace = [ + "Symbols Nerd Font" + "JetBrains Mono" + "Source Han Sans SC VF" + "Noto Color Emoji" + ]; + sansSerif = [ + "Inter Variable" + "Source Han Sans SC VF" + "Noto Color Emoji" + ]; + serif = [ + "Source Serif 4 Variable" + "Source Han Serif SC VF" + "Noto Color Emoji" + ]; }; }; - fonts.enableDefaultPackages = false; - security.pam.services.swaylock = {}; - xdg.portal = { - enable = true; - xdgOpenUsePortal = true; - wlr.enable = true; - extraPortals = [pkgs.xdg-desktop-portal-gtk]; - # https://gitlab.archlinux.org/archlinux/packaging/packages/sway/-/blob/main/sway-portals.conf - config."sway" = { - default = "gtk"; - "org.freedesktop.impl.portal.ScreenCast" = "wlr"; - "org.freedesktop.impl.portal.Screenshot" = "wlr"; - "org.freedesktop.impl.portal.Inhibit" = "none"; - }; - }; + # polkit + security.polkit.enable = true; + # systemd.user.services.polkit-gnome-authentication-agent-1 = { + # description = "polkit-gnome-authentication-agent-1"; + # wantedBy = ["graphical-session.target"]; + # wants = ["graphical-session.target"]; + # after = ["graphical-session.target"]; + # serviceConfig = { + # Type = "simple"; + # ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # }; + # }; + + # security.pam.services.swaylock = {}; + # xdg.portal = { + # enable = true; + # xdgOpenUsePortal = true; + # wlr.enable = true; + # extraPortals = [pkgs.xdg-desktop-portal-gtk]; + # # https://gitlab.archlinux.org/archlinux/packaging/packages/sway/-/blob/main/sway-portals.conf + # config."sway" = { + # default = "gtk"; + # "org.freedesktop.impl.portal.ScreenCast" = "wlr"; + # "org.freedesktop.impl.portal.Screenshot" = "wlr"; + # "org.freedesktop.impl.portal.Inhibit" = "none"; + # }; + # }; ### Removes debounce time # https://www.reddit.com/r/linux_gaming/comments/ku6gth diff --git a/hosts/aristotle/home/fonts/default.nix b/hosts/aristotle/home/fonts/default.nix deleted file mode 100644 index 2c1dde1..0000000 --- a/hosts/aristotle/home/fonts/default.nix +++ /dev/null @@ -1,76 +0,0 @@ -{pkgs, ...}: { - # WARN: I don't know fontconfig and I have no idea what am I doing. Please do not use as reference. - xdg.configFile = { - "fontconfig/fonts.conf".source = ./fonts.conf; - - "fontconfig/conf.d/10-web-ui-fonts.conf".source = pkgs.fetchurl { - url = "https://raw.githubusercontent.com/lilydjwg/dotconfig/1b22d4f0740bb5bbd7c65b6c468920775171b207/fontconfig/web-ui-fonts.conf"; - hash = "sha256-A4DcV6HTW/IRxXN3NaI1GUfoFdalwgFLpCjgbWENdZU="; - }; - "fontconfig/conf.d/10-source-han-for-noto-cjk.conf".source = pkgs.fetchurl { - url = "https://raw.githubusercontent.com/lilydjwg/dotconfig/1b22d4f0740bb5bbd7c65b6c468920775171b207/fontconfig/source-han-for-noto-cjk.conf"; - hash = "sha256-jcdDr5VW1qZXbApgfT5FZgxonpRnLs9AY0QagfdL8ic="; - postFetch = '' - substitutionInPlace $out \ - --replace-warn "Source Han Sans" "Source Han Sans VF" \ - --replace-warn "Source Han Serif" "Source Han Serif VF" - ''; - }; - - "fontconfig/conf.d/10-nerd-font-symbols.conf".source = pkgs.fetchurl { - url = "https://raw.githubusercontent.com/ryanoasis/nerd-fonts/${pkgs.nerdfonts.version}/10-nerd-font-symbols.conf"; - hash = "sha256-XwJMkcDtGlI+LFMrjCl/gicAnoBWnq3p9adrmieNZwU="; - }; - }; - - # Make GTK listen to fontconfig - dconf.settings = { - "org/gnome/desktop/wm/preferences" = { - "titlebar-font" = "Sans Bold 11"; - }; - "org/gnome/desktop/interface" = { - "font-name" = "Sans 11"; - "document-font-name" = "Sans 11"; - "monospace-font-name" = "Monospace 10"; - }; - }; - - # HM managed fonts - fonts.fontconfig.enable = true; - home.packages = with pkgs; [ - (nerdfonts.override { - fonts = ["NerdFontsSymbolsOnly"]; - }) - (inter.overrideAttrs { - installPhase = '' - runHook preInstall - install -Dm644 -t $out/share/fonts/truetype/ InterVariable*.ttf - runHook postInstall - ''; - }) - (jetbrains-mono.overrideAttrs { - installPhase = '' - runHook preInstall - install -Dm644 -t $out/share/fonts/truetype/ fonts/variable/*.ttf - runHook postInstall - ''; - }) - (source-sans.overrideAttrs { - installPhase = '' - runHook preInstall - install -Dm444 VF/*.otf -t $out/share/fonts/variable - runHook postInstall - ''; - }) - (source-serif.overrideAttrs { - installPhase = '' - runHook preInstall - install -Dm444 VAR/*.otf -t $out/share/fonts/variable - runHook postInstall - ''; - }) - source-han-sans-vf-otf - source-han-serif-vf-otf - noto-fonts-color-emoji - ]; -} diff --git a/hosts/aristotle/home/fonts/fonts.conf b/hosts/aristotle/home/fonts/fonts.conf deleted file mode 100644 index 002433e..0000000 --- a/hosts/aristotle/home/fonts/fonts.conf +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - trash Font Config 4.0 - - - - serif - - Source Serif 4 Variable - Source Han Serif SC VF - Noto Color Emoji - - - - - sans-serif - - Inter Variable - Source Han Sans SC VF - Noto Color Emoji - - - - - monospace - - JetBrains Mono - Source Han Sans SC VF - Noto Color Emoji - - - - diff --git a/hosts/aristotle/home/theme.nix b/hosts/aristotle/home/theme.nix index 3666771..d345c16 100644 --- a/hosts/aristotle/home/theme.nix +++ b/hosts/aristotle/home/theme.nix @@ -30,7 +30,21 @@ }; }; - dconf.settings."org/gnome/desktop/interface"."color-scheme" = "prefer-dark"; + dconf.settings = { + "org/gnome/desktop/interface" = { + "color-scheme" = "prefer-dark"; + }; + + # Make GTK listen to fontconfig + "org/gnome/desktop/wm/preferences" = { + "titlebar-font" = "Sans Bold 11"; + }; + "org/gnome/desktop/interface" = { + "font-name" = "Sans 11"; + "document-font-name" = "Sans 11"; + "monospace-font-name" = "Monospace 10"; + }; + }; # ??? this commit broke nautilus's spacing ??? # https://github.com/nix-community/home-manager/commit/e9b9ecef4295a835ab073814f100498716b05a96 diff --git a/hosts/blacksteel/README.md b/hosts/blacksteel/README.md deleted file mode 100644 index 6145495..0000000 --- a/hosts/blacksteel/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# About this device - -### Hardware - -``` -$ hostnamectl --json short | jq -r '.HardwareVendor, .HardwareModel' -Apple Inc. -MacBookPro11,3 -``` - -### Description - -Homelab, hosting random stuff through tailscale and rathole. - -### TODOs: - -- [ ] backlight is always 33% when booted up -- [ ] encrypted swap -- [ ] impermanence -- [ ] luks1 -> luks2 - - [ ] tpm luks unlocking -- [ ] nouveau -> nvidia -- [x] networkmanager -> iwd -- [ ] jellyfin hardware acceleration