Merge branch 'laptop'
This commit is contained in:
commit
484a8df77b
14 changed files with 550 additions and 22 deletions
|
|
@ -1,19 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
home-manager = builtins.fetchTarball {
|
||||
url = "https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz";
|
||||
sha256 = "1kk5qzfb87mkgy6vzm7x8z8akxr3k8k7839yjdy48z034pvidhsr";
|
||||
sha256 = "1y919cqrlmq0k44rgnacaq4zq37jj4rdh6f2swp6y2jiz28xb0iq";
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
(import "${home-manager}/nixos")
|
||||
|
||||
../modules/wm/hyprland.nix
|
||||
# ../modules/wm/river.nix
|
||||
../modules/wm/crywl.nix
|
||||
|
||||
../modules/steam.nix
|
||||
../modules/obsidian.nix
|
||||
|
||||
|
|
@ -116,6 +121,12 @@ in {
|
|||
);
|
||||
};
|
||||
|
||||
dbus = {
|
||||
# NOTE: programs.uwsm.enable sets implementation to dbus-broker,
|
||||
# NOTE: however this seems to break dbus
|
||||
implementation = lib.mkForce "dbus";
|
||||
};
|
||||
|
||||
# Multimedia Framework
|
||||
# With backwards compatability for alsa/pulseaudio/jack
|
||||
pipewire = {
|
||||
|
|
@ -180,7 +191,7 @@ in {
|
|||
|
||||
home-manager = {
|
||||
users.me = import ../../homes/me;
|
||||
#extraSpecialArgs = {inherit inputs pkgs;};
|
||||
extraSpecialArgs = {inherit inputs pkgs pkgs-unstable;};
|
||||
sharedModules = [
|
||||
inputs.ags.homeManagerModules.default
|
||||
];
|
||||
|
|
@ -198,6 +209,7 @@ in {
|
|||
# ---- SYSTEM PACKAGES -----
|
||||
environment.systemPackages = with pkgs; [
|
||||
# User Environment
|
||||
# crywl
|
||||
swww
|
||||
helvum
|
||||
easyeffects
|
||||
|
|
@ -214,18 +226,19 @@ in {
|
|||
|
||||
# Shell
|
||||
bash
|
||||
zsh
|
||||
fish
|
||||
shellcheck
|
||||
grc # colorise command outputs
|
||||
|
||||
# Systems Emulation
|
||||
qemu # Fellice Bellard's Quick Emulator
|
||||
# Make
|
||||
# GNU Utils
|
||||
gnumake
|
||||
binutils
|
||||
# C Family
|
||||
gcc
|
||||
clang
|
||||
clang-tools
|
||||
# Rust
|
||||
cargo
|
||||
rustc
|
||||
|
|
@ -303,13 +316,13 @@ in {
|
|||
];
|
||||
|
||||
programs = {
|
||||
hyprland = {
|
||||
crywl = {
|
||||
enable = true;
|
||||
withUWSM = true; # Universal Wayland Session Manager
|
||||
xwayland.enable = true;
|
||||
xwayland.enable = false;
|
||||
defaultSession = false;
|
||||
useUnmodifiedDWL = false;
|
||||
};
|
||||
|
||||
zsh.enable = true;
|
||||
fish.enable = true;
|
||||
|
||||
nix-ld.enable = true;
|
||||
|
|
@ -318,6 +331,7 @@ in {
|
|||
# cause it isn't POSIX compliant, so instead Bash is my login and
|
||||
# will just exec fish (^-^)
|
||||
bash = {
|
||||
blesh.enable = false; # ble.sh replacement for GNU readline
|
||||
completion.enable = true;
|
||||
|
||||
interactiveShellInit = ''
|
||||
|
|
@ -375,10 +389,26 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
documentation = {
|
||||
enable = true;
|
||||
doc.enable = true; # install /share/doc packages
|
||||
man.enable = true; # install manpages
|
||||
info.enable = true; # install GNU info
|
||||
dev.enable = true; # install docs intended for developers
|
||||
nixos = {
|
||||
enable = true; # install NixOS documentation (ie man -k nix, & nixos-help)
|
||||
options.splitBuild = true;
|
||||
# includeAllModules = true;
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
hardware = {
|
||||
graphics.enable = true;
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# opengl = {
|
||||
# enable = true;
|
||||
|
|
|
|||
116
hosts/modules/wm/crywl.nix
Normal file
116
hosts/modules/wm/crywl.nix
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.programs.crywl;
|
||||
in {
|
||||
options.programs.crywl = with lib; {
|
||||
enable = mkEnableOption "CryWL";
|
||||
xwayland.enable = mkEnableOption "XWayland";
|
||||
defaultSession = mkEnableOption "CryWL as the default login session";
|
||||
|
||||
# currently DWL 0.7 (also beware I'll barely ever update the original DWL refs)
|
||||
useUnmodifiedDWL = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Whether to use unmodified DWL source code (latest stable release)";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (let
|
||||
xwaylandEnabled = cfg.xwayland.enable;
|
||||
defaultSession = cfg.defaultSession;
|
||||
useUnmodifiedDWL = cfg.useUnmodifiedDWL;
|
||||
in {
|
||||
services.displayManager = {
|
||||
sessionPackages = [
|
||||
pkgs.crywl
|
||||
];
|
||||
|
||||
defaultSession = lib.mkIf defaultSession "crywl";
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.crywl
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
crywl = super.dwl.overrideAttrs (oldAttrs: rec {
|
||||
pname = "crywl";
|
||||
version = "0.1-unstable";
|
||||
|
||||
src = let
|
||||
dwl_0_70 = {
|
||||
rev = "74e45c4014ae7048ecbb76eb6f54034b8b479480";
|
||||
hash = "sha256-7SoCITrbMrlfL4Z4hVyPpjB9RrrjLXHP9C5t1DVXBBA=";
|
||||
};
|
||||
crywl_unstable = {
|
||||
rev = "dc1260d3cfd14e8e5b243ec1d3d56e4b08c8c517";
|
||||
hash = "sha256-61R+xBYMzeEn93gLofcj8Y3VbJqW6g7GzCTujpAco90=";
|
||||
};
|
||||
in
|
||||
pkgs.fetchFromGitea ({
|
||||
domain = "forge.imbored.dev";
|
||||
owner = "emileclarkb";
|
||||
repo = pname;
|
||||
}
|
||||
// (
|
||||
if useUnmodifiedDWL
|
||||
then dwl_0_70
|
||||
else crywl_unstable
|
||||
));
|
||||
|
||||
buildInputs = with pkgs;
|
||||
[
|
||||
libinput
|
||||
xorg.libxcb
|
||||
libxkbcommon
|
||||
pixman
|
||||
wayland
|
||||
wayland-protocols
|
||||
wlroots_0_19
|
||||
]
|
||||
++ lib.optionals xwaylandEnabled [
|
||||
xorg.libX11
|
||||
xorg.xcbutilwm
|
||||
xwayland
|
||||
];
|
||||
|
||||
makeFlags =
|
||||
[
|
||||
"PKG_CONFIG=${pkgs.stdenv.cc.targetPrefix}pkg-config"
|
||||
"WAYLAND_SCANNER=wayland-scanner"
|
||||
"PREFIX=$(out)"
|
||||
"MANDIR=$(man)/share/man"
|
||||
]
|
||||
++ lib.optionals xwaylandEnabled [
|
||||
''XWAYLAND="-DXWAYLAND"''
|
||||
''XLIBS="xcb xcb-icccm.pc"''
|
||||
];
|
||||
|
||||
# Ensure `crywl.desktop` entry is registered
|
||||
passthru = {
|
||||
providedSessions = [pname];
|
||||
|
||||
tests.version = pkgs.testers.testVersion {
|
||||
package = oldAttrs.finalPackage;
|
||||
# `dwl -v` emits its version string to stderr and returns 1
|
||||
command = "crywl -v 2>&1; return 0";
|
||||
};
|
||||
};
|
||||
meta = {
|
||||
homepage = "https://forge.imbored.dev/emileclarkb/crywl";
|
||||
description = "Personal fork of DWL";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = [lib.maintainers.emileclarkb];
|
||||
inherit (pkgs.wayland.meta) platforms;
|
||||
mainProgram = "crywl";
|
||||
};
|
||||
});
|
||||
})
|
||||
];
|
||||
});
|
||||
}
|
||||
9
hosts/modules/wm/hyprland.nix
Normal file
9
hosts/modules/wm/hyprland.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{...}: {
|
||||
programs = {
|
||||
hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true; # Universal Wayland Session Manager
|
||||
xwayland.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
5
hosts/modules/wm/river.nix
Normal file
5
hosts/modules/wm/river.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{...}: {
|
||||
programs = {
|
||||
river.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -14,6 +14,8 @@ in {
|
|||
./hardware-configuration.nix
|
||||
(import "${home-manager}/nixos")
|
||||
|
||||
../modules/wm/hyprland.nix
|
||||
|
||||
../modules/steam.nix
|
||||
../modules/obsidian.nix
|
||||
|
||||
|
|
@ -110,7 +112,7 @@ in {
|
|||
defaultSession =
|
||||
"hyprland"
|
||||
+ (
|
||||
if config.programs.hyprland.withUWSM == true
|
||||
if config.programs.hyprland.withUWSM
|
||||
then "-uwsm"
|
||||
else null
|
||||
);
|
||||
|
|
@ -223,19 +225,21 @@ in {
|
|||
|
||||
# Shell
|
||||
bash
|
||||
zsh
|
||||
fish
|
||||
shellcheck
|
||||
grc # colorise command outputs
|
||||
|
||||
# Systems Programming & Compilation
|
||||
qemu # Fellice Bellard's Quick Emulator
|
||||
# GNU Utils
|
||||
gnumake
|
||||
binutils
|
||||
strace
|
||||
ltrace
|
||||
# C Family
|
||||
gcc
|
||||
clang
|
||||
clang-tools
|
||||
# Rust
|
||||
cargo
|
||||
rustc
|
||||
|
|
@ -328,12 +332,6 @@ in {
|
|||
#};
|
||||
|
||||
programs = {
|
||||
hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true; # Universal Wayland Session Manager
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
zsh.enable = true;
|
||||
fish.enable = true;
|
||||
|
||||
|
|
@ -419,10 +417,26 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
documentation = {
|
||||
enable = true;
|
||||
doc.enable = true; # install /share/doc packages
|
||||
man.enable = true; # install manpages
|
||||
info.enable = true; # install GNU info
|
||||
dev.enable = true; # install docs intended for developers
|
||||
nixos = {
|
||||
enable = true; # install NixOS documentation (ie man -k nix, & nixos-help)
|
||||
options.splitBuild = true;
|
||||
# includeAllModules = true;
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
hardware = {
|
||||
graphics.enable = true;
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# opengl = {
|
||||
# enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue