forked from Shinonome/dots-hyprland
Update dist-nix
- Not use NixGL but let home-manager automatically handle it (since hm 25.11) - Add libqalculate
This commit is contained in:
@@ -37,8 +37,38 @@ As [commented](https://github.com/end-4/dots-hyprland/issues/1061#issuecomment-3
|
|||||||
|
|
||||||
See also [caelestia-dots/shell#668](https://github.com/caelestia-dots/shell/issues/668).
|
See also [caelestia-dots/shell#668](https://github.com/caelestia-dots/shell/issues/668).
|
||||||
|
|
||||||
### NixGL
|
### GPU
|
||||||
On non-NixOS distros, packages installed via home-manager have problem accessing GPU, especially Hyprland because it requires GPU acceleration to launch. `nixGL` should be used to address the problem.
|
On non-NixOS distros, packages installed via home-manager have problem accessing GPU, especially Hyprland because it requires GPU acceleration to launch.
|
||||||
|
|
||||||
|
~~`nixGL` should be used to address the problem.~~
|
||||||
|
|
||||||
|
Since home-manager 25.11, for non-NixOS just set the following:
|
||||||
|
```nix
|
||||||
|
targets.genericLinux.enable = true;
|
||||||
|
```
|
||||||
|
Then during building, home-manager will show a message to tell you running a command manually to configure GPU, like:
|
||||||
|
```bash
|
||||||
|
sudo /nix/store/<HASH>-non-nixos-gpu/bin/non-nixos-gpu-setup
|
||||||
|
```
|
||||||
|
It runs a bash script with following content:
|
||||||
|
```
|
||||||
|
#!/nix/store/<HASH>-bash-<VERSION>/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Install the systemd service file and ensure that the store path won't be
|
||||||
|
# garbage-collected as long as it's installed.
|
||||||
|
unit_path=/etc/systemd/system/non-nixos-gpu.service
|
||||||
|
ln -sf /nix/store/<HASH>-non-nixos-gpu/resources/non-nixos-gpu.service "$unit_path"
|
||||||
|
ln -sf "$unit_path" "/nix/var/nix"/gcroots/non-nixos-gpu.service
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable non-nixos-gpu.service
|
||||||
|
systemctl restart non-nixos-gpu.service
|
||||||
|
```
|
||||||
|
_Note: it uses `systemctl`, maybe won't work for OpenRC..._
|
||||||
|
|
||||||
|
See [gpu-non-nixos](https://nix-community.github.io/home-manager/index.xhtml#sec-usage-gpu-non-nixos).
|
||||||
|
|
||||||
# Handling dot files
|
# Handling dot files
|
||||||
## Status
|
## Status
|
||||||
|
|||||||
@@ -3,23 +3,24 @@
|
|||||||
description = "illogical-impulse";
|
description = "illogical-impulse";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Qt 6.10 is not yet available from released version of nixpkgs.
|
nixpkgs.url = "nixpkgs/nixos-25.11";
|
||||||
#nixpkgs.url = "nixpkgs/nixos-25.05";
|
#nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
#url = "github:nix-community/home-manager/release-25.05";
|
url = "github:nix-community/home-manager/release-25.11";
|
||||||
url = "github:nix-community/home-manager/master";
|
#url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixgl.url = "github:nix-community/nixGL";
|
#nixgl.url = "github:nix-community/nixGL";
|
||||||
quickshell = {
|
quickshell = {
|
||||||
url = "github:quickshell-mirror/quickshell/db1777c20b936a86528c1095cbcb1ebd92801402";
|
url = "github:quickshell-mirror/quickshell/db1777c20b936a86528c1095cbcb1ebd92801402";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, home-manager, nixgl, quickshell, ... }:
|
outputs = { nixpkgs, home-manager,
|
||||||
|
#nixgl,
|
||||||
|
quickshell, ... }:
|
||||||
let
|
let
|
||||||
home_attrs = rec {
|
home_attrs = rec {
|
||||||
username = import ./username.nix;
|
username = import ./username.nix;
|
||||||
@@ -36,7 +37,9 @@
|
|||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
illogical_impulse = home-manager.lib.homeManagerConfiguration {
|
illogical_impulse = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
extraSpecialArgs = { inherit home_attrs nixgl quickshell; };
|
extraSpecialArgs = { inherit home_attrs
|
||||||
|
#nixgl
|
||||||
|
quickshell; };
|
||||||
modules = [
|
modules = [
|
||||||
./home.nix
|
./home.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
{ config, lib, pkgs, nixgl, quickshell, home_attrs, ... }:
|
{ config, lib, pkgs,
|
||||||
|
#nixgl,
|
||||||
|
quickshell, home_attrs, ... }:
|
||||||
{
|
{
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
nixGL.packages = nixgl.packages;
|
|
||||||
nixGL.defaultWrapper = "mesa";
|
# Necessary for non-NixOS to handle GPU (since home-manager version 25.11)
|
||||||
|
targets.genericLinux.enable = true;
|
||||||
|
#nixGL.packages = nixgl.packages;
|
||||||
|
#nixGL.defaultWrapper = "mesa";
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -27,7 +32,8 @@
|
|||||||
systemd.enable = false; plugins = []; settings = {}; extraConfig = "";
|
systemd.enable = false; plugins = []; settings = {}; extraConfig = "";
|
||||||
enable = true;
|
enable = true;
|
||||||
## Use NixGL
|
## Use NixGL
|
||||||
package = config.lib.nixGL.wrap pkgs.hyprland;
|
#package = config.lib.nixGL.wrap pkgs.hyprland;
|
||||||
|
package = pkgs.hyprland;
|
||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
@@ -167,6 +173,7 @@
|
|||||||
songrec #songrec
|
songrec #songrec
|
||||||
translate-shell #translate-shell
|
translate-shell #translate-shell
|
||||||
wlogout #wlogout
|
wlogout #wlogout
|
||||||
|
libqalculate #libqalculate
|
||||||
|
|
||||||
]
|
]
|
||||||
++ [
|
++ [
|
||||||
@@ -174,7 +181,9 @@
|
|||||||
|
|
||||||
### illogical-impulse-quickshell-git
|
### illogical-impulse-quickshell-git
|
||||||
#(config.lib.nixGL.wrap quickshell.packages.x86_64-linux.default)
|
#(config.lib.nixGL.wrap quickshell.packages.x86_64-linux.default)
|
||||||
(import ./quickshell.nix { inherit pkgs quickshell; nixGLWrap = config.lib.nixGL.wrap; })
|
(import ./quickshell.nix { inherit pkgs quickshell;
|
||||||
|
#nixGLWrap = config.lib.nixGL.wrap;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}//home_attrs;
|
}//home_attrs;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
{ pkgs, quickshell, nixGLWrap, ... }:
|
{ pkgs, quickshell,
|
||||||
|
#nixGLWrap,
|
||||||
|
... }:
|
||||||
let
|
let
|
||||||
qs = nixGLWrap quickshell.packages.x86_64-linux.default;
|
#qs = nixGLWrap quickshell.packages.x86_64-linux.default;
|
||||||
|
qs = quickshell.packages.x86_64-linux.default;
|
||||||
in pkgs.stdenv.mkDerivation {
|
in pkgs.stdenv.mkDerivation {
|
||||||
name = "illogical-impulse-quickshell-wrapper";
|
name = "illogical-impulse-quickshell-wrapper";
|
||||||
meta = with pkgs.lib; {
|
meta = with pkgs.lib; {
|
||||||
description = "Quickshell wrapped with NixGL + bundled Qt deps for home-manager usage";
|
#description = "Quickshell wrapped with NixGL + bundled Qt deps for home-manager usage";
|
||||||
|
description = "Quickshell bundled Qt deps for home-manager usage";
|
||||||
license = licenses.gpl3Only;
|
license = licenses.gpl3Only;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ function install_home-manager(){
|
|||||||
try source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
try source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
command -v $cmd && return
|
command -v $cmd && return
|
||||||
|
|
||||||
x nix-channel --add https://nixos.org/channels/nixos-25.05 nixpkgs-home
|
x nix-channel --add https://nixos.org/channels/nixos-25.11 nixpkgs-home
|
||||||
x nix-channel --add https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz home-manager
|
x nix-channel --add https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz home-manager
|
||||||
x nix-channel --update
|
x nix-channel --update
|
||||||
x env NIX_PATH="nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs-home" nix-shell '<home-manager>' -A install
|
x env NIX_PATH="nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs-home" nix-shell '<home-manager>' -A install
|
||||||
|
|
||||||
@@ -56,6 +56,7 @@ function hm_deps(){
|
|||||||
x home-manager switch --flake .#illogical_impulse \
|
x home-manager switch --flake .#illogical_impulse \
|
||||||
--extra-experimental-features nix-command \
|
--extra-experimental-features nix-command \
|
||||||
--extra-experimental-features flakes
|
--extra-experimental-features flakes
|
||||||
|
x sudo /nix/store/*-non-nixos-gpu/bin/non-nixos-gpu-setup
|
||||||
cd $REPO_ROOT
|
cd $REPO_ROOT
|
||||||
x git rm -f "${SETUP_USERNAME_NIXFILE}"
|
x git rm -f "${SETUP_USERNAME_NIXFILE}"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user