added font config
This commit is contained in:
parent
2178b7e2d9
commit
8252fc9f31
10 changed files with 3805 additions and 13 deletions
|
@ -15,6 +15,8 @@
|
||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware.pulseaudio.support32Bit = true;
|
||||||
|
|
||||||
# Load nvidia driver
|
# Load nvidia driver
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, nixos-hardware, niri, ... }@inputs:
|
outputs = { nixpkgs, home-manager, nixos-hardware, ... }:
|
||||||
let
|
let
|
||||||
x86 = "x86_64-linux";
|
x86 = "x86_64-linux";
|
||||||
common = ./modules/system;
|
common = ./modules/system;
|
||||||
|
@ -30,7 +30,6 @@
|
||||||
desktop = nixpkgs.lib.nixosSystem {
|
desktop = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit x86;
|
inherit x86;
|
||||||
inputs = inputs;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
|
@ -50,7 +49,6 @@
|
||||||
surface = nixpkgs.lib.nixosSystem {
|
surface = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit x86;
|
inherit x86;
|
||||||
inputs = inputs;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home.packages = with pkgs; [discord];
|
home.packages = with pkgs; [armcord];
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,6 @@
|
||||||
steam
|
steam
|
||||||
prismlauncher-qt5
|
prismlauncher-qt5
|
||||||
lutris
|
lutris
|
||||||
|
winePackages.stagingFull
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
{ inputs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
niri = inputs.niri.packages.x86_64-linux.default;
|
niri = pkgs.callPackage ./niri {};
|
||||||
in{
|
niriSession = pkgs.writeShellScriptBin "niri-session" ./niri/niri-session;
|
||||||
environment.systemPackages = [ niri ];
|
niriService = ./niri/service.nix;
|
||||||
/*
|
in {
|
||||||
services.xserver.displayManager.sessionPackages = [
|
imports = [
|
||||||
niri
|
niriService
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = [ niri niriSession];
|
||||||
|
services.xserver.displayManager.sessionPackages = [
|
||||||
|
niriSession
|
||||||
];
|
];
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
3671
modules/niri/niri/Cargo.lock
generated
Normal file
3671
modules/niri/niri/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
42
modules/niri/niri/default.nix
Normal file
42
modules/niri/niri/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
pkgs.rustPlatform.buildRustPackage {
|
||||||
|
pname = "niri";
|
||||||
|
version = "unstable-2023-11-21";
|
||||||
|
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "YaLTeR";
|
||||||
|
repo = "niri";
|
||||||
|
rev = "19cafffe0f3f1eefc6984dc446134b0fd93d1e28";
|
||||||
|
hash = "sha256-mDeJh3N6Zt3FNpyFmRkY8zOLIBad3CoV45WjB+RUkhA=";
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoLock = {
|
||||||
|
lockFile = ./Cargo.lock;
|
||||||
|
outputHashes = {
|
||||||
|
"smithay-0.3.0" = "sha256-1BEJEdmGCt6jtPEcBt4R1d/LdKWLLJYJpcOn4SbvkRk=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
pkg-config
|
||||||
|
rustPlatform.bindgenHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
libxkbcommon
|
||||||
|
pipewire
|
||||||
|
seatd
|
||||||
|
udev
|
||||||
|
wayland
|
||||||
|
libinput
|
||||||
|
mesa
|
||||||
|
libglvnd
|
||||||
|
];
|
||||||
|
|
||||||
|
RUSTFLAGS = map (a: "-C link-arg=${a}") [
|
||||||
|
"-Wl,--push-state,--no-as-needed"
|
||||||
|
"-lEGL"
|
||||||
|
"-lwayland-client"
|
||||||
|
"-Wl,--pop-state"
|
||||||
|
];
|
||||||
|
}
|
44
modules/niri/niri/niri-session
Executable file
44
modules/niri/niri/niri-session
Executable file
|
@ -0,0 +1,44 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -n "$SHELL" ] &&
|
||||||
|
grep -q "$SHELL" /etc/shells &&
|
||||||
|
! (echo "$SHELL" | grep -q "false") &&
|
||||||
|
! (echo "$SHELL" | grep -q "nologin"); then
|
||||||
|
if [ "$1" != '-l' ]; then
|
||||||
|
exec bash -c "exec -l '$SHELL' -c '$0 -l $*'"
|
||||||
|
else
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make sure there's no already running session.
|
||||||
|
if systemctl --user -q is-active niri.service; then
|
||||||
|
echo 'A niri session is already running.'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Reset failed state of all user units.
|
||||||
|
systemctl --user reset-failed
|
||||||
|
|
||||||
|
# Set the current desktop for xdg-desktop-portal.
|
||||||
|
export XDG_CURRENT_DESKTOP=niri
|
||||||
|
|
||||||
|
# Ensure the session type is set to Wayland for xdg-autostart apps.
|
||||||
|
export XDG_SESSION_TYPE=wayland
|
||||||
|
|
||||||
|
# Import the login manager environment.
|
||||||
|
systemctl --user import-environment
|
||||||
|
|
||||||
|
# DBus activation environment is independent from systemd. While most of
|
||||||
|
# dbus-activated services are already using `SystemdService` directive, some
|
||||||
|
# still don't and thus we should set the dbus environment with a separate
|
||||||
|
# command.
|
||||||
|
if hash dbus-update-activation-environment 2>/dev/null; then
|
||||||
|
dbus-update-activation-environment --all
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Start niri and wait for it to terminate.
|
||||||
|
systemctl --user --wait start niri.service
|
||||||
|
|
||||||
|
# Unset environment that we've set.
|
||||||
|
systemctl --user unset-environment WAYLAND_DISPLAY XDG_SESSION_TYPE XDG_CURRENT_DESKTOP
|
16
modules/niri/niri/service.nix
Normal file
16
modules/niri/niri/service.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{ ... }: {
|
||||||
|
systemd.services.niri = {
|
||||||
|
enable = true;
|
||||||
|
description = "A scrollable-tiling wayland compositor";
|
||||||
|
|
||||||
|
bindsTo = [ "graphical-session.target" ];
|
||||||
|
before = [ "graphical-session.target" "xdg-desktop-autostart.target" ];
|
||||||
|
after = [ "graphical-session-pre.target" ];
|
||||||
|
wants = [ "graphical-session-pre.target" "xdg-desktop-autostart.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "notify";
|
||||||
|
ExecStart = "/usr/bin/env niri";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
../niri
|
|
||||||
../gnome
|
../gnome
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -75,4 +74,19 @@
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# Configure fonts
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
alegreya
|
||||||
|
alegreya-sans
|
||||||
|
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts.fontconfig = {
|
||||||
|
defaultFonts = {
|
||||||
|
serif = [ "Alegreya" ];
|
||||||
|
sansSerif = [ "Alegreya Sans" ];
|
||||||
|
monospace = [ "Fira Code Nerd Font" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue