mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-01-11 20:40:24 +01:00
fix: config for foot, add NIX_PATH for compatibility
This commit is contained in:
6
flake.lock
generated
6
flake.lock
generated
@@ -773,11 +773,11 @@
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703694125,
|
||||
"narHash": "sha256-7gdwhPcMpaHZzjg9Cw6FKTm2k4OotSJcwAQ9iwYfnCE=",
|
||||
"lastModified": 1703782686,
|
||||
"narHash": "sha256-nZ8eWb4NYAHn02eUF+PUgdx77vWOmtVxYHKC3eai0FM=",
|
||||
"owner": "ryan4yin",
|
||||
"repo": "nur-packages",
|
||||
"rev": "630c1a26ffa11ed2bfd9407bcf03e3238a2e83cc",
|
||||
"rev": "189eb3df8734c698edc5664f0a3bae68ece2a8dd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -1,8 +1,30 @@
|
||||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
nur-ryan4yin,
|
||||
...
|
||||
}: {
|
||||
# refer to https://codeberg.org/dnkl/foot/src/branch/master/foot.ini
|
||||
xdg.configFile."foot/foot.ini".text =
|
||||
(builtins.readFile "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-foot}/catppuccin-mocha.conf")
|
||||
+ ''
|
||||
term=foot
|
||||
font=JetBrainsMono Nerd Font:size=13
|
||||
dpi-aware=yes
|
||||
shell=${pkgs.bash}/bin/bash --login -c 'nu --login --interactive'
|
||||
'';
|
||||
|
||||
programs = {
|
||||
# a wayland only terminal emulator
|
||||
foot = {
|
||||
enable = true;
|
||||
# foot can also be run in a server mode. In this mode, one process hosts multiple windows.
|
||||
# All Wayland communication, VT parsing and rendering is done in the server process.
|
||||
# New windows are opened by running footclient, which remains running until the terminal window is closed.
|
||||
#
|
||||
# Advantages to run foot in server mode including reduced memory footprint and startup time.
|
||||
# The downside is a performance penalty. If one window is very busy with, for example, producing output,
|
||||
# then other windows will suffer. Also, should the server process crash, all windows will be gone.
|
||||
server.enable = false;
|
||||
};
|
||||
|
||||
# source code: https://github.com/nix-community/home-manager/blob/master/modules/programs/chromium.nix
|
||||
|
||||
@@ -23,7 +23,12 @@ in
|
||||
{
|
||||
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
nix.channel.enable = false; # disable nix-channel, we use flakes instead.
|
||||
nix.channel.enable = false; # remove nix-channel related tools & configs, we use flakes instead.
|
||||
|
||||
# but NIX_PATH is still used by many useful tools, so we set it to the same value as the one used by this flake.
|
||||
# Make `nix repl '<nixpkgs>'` use the same nixpkgs as the one used by this flake.
|
||||
environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}";
|
||||
environment.sessionVariables.NIX_PATH = nixpkgs.lib.mkForce "nixpkgs=/etc/nix/inputs/nixpkgs";
|
||||
}
|
||||
]
|
||||
++ (
|
||||
|
||||
@@ -17,7 +17,12 @@ in
|
||||
{
|
||||
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
nix.channel.enable = false; # disable nix-channel, we use flakes instead.
|
||||
nix.channel.enable = false; # remove nix-channel related tools & configs, we use flakes instead.
|
||||
|
||||
# but NIX_PATH is still used by many useful tools, so we set it to the same value as the one used by this flake.
|
||||
# Make `nix repl '<nixpkgs>'` use the same nixpkgs as the one used by this flake.
|
||||
environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}";
|
||||
environment.sessionVariables.NIX_PATH = nixpkgs.lib.mkForce "nixpkgs=/etc/nix/inputs/nixpkgs";
|
||||
}
|
||||
|
||||
nixos-generators.nixosModules.all-formats
|
||||
|
||||
Reference in New Issue
Block a user