Skip to content

Commit 263b806

Browse files
2025 01 30
1 parent 2792f1b commit 263b806

File tree

5 files changed

+99
-35
lines changed

5 files changed

+99
-35
lines changed

laptops/t/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ else
1616
endif
1717

1818
rebuild:
19-
sudo nix flake update;
2019
sudo nixos-rebuild switch --flake .
2120

21+
update:
22+
sudo nix flake update;
23+
2224
rebuild_old:
2325
# sudo cp ./flake.nix /etc/nixos/
2426
# sudo cp ./flake.lock /etc/nixos/
@@ -35,7 +37,7 @@ rebuild_old:
3537
#sudo nix-channel --update;
3638
sudo nixos-rebuild switch --flake .
3739

38-
update:
40+
update_oldm.:
3941
sudo nix-channel --update
4042
sudo nixos-rebuild switch
4143
#nix-shell -p vim

laptops/t/configuration.nix

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@
137137
# https://discourse.nixos.org/t/nvidia-open-breaks-hardware-acceleration/58770/2
138138
nvidia-vaapi-driver
139139
vaapiVdpau
140+
libvdpau
141+
libvdpau-va-gl
142+
vdpauinfo
143+
libva
144+
libva-utils
140145
];
141146
};
142147

@@ -305,10 +310,11 @@
305310
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
306311
NVD_BACKEND = "direct";
307312
EGL_PLATFORM = "wayland";
313+
# prevents cursor disappear when using Nvidia drivers
308314
WLR_NO_HARDWARE_CURSORS = "1";
309315

310-
#MOZ_ENABLE_WAYLAND = "1";
311-
#XDG_SESSION_TYPE = "wayland";
316+
MOZ_ENABLE_WAYLAND = "1";
317+
XDG_SESSION_TYPE = "wayland";
312318
NIXOS_OZONE_WL = "1";
313319
};
314320

@@ -377,20 +383,20 @@
377383
enableSSHSupport = true;
378384
};
379385

380-
# https://wiki.hyprland.org/Nix/Hyprland-on-NixOS/
381-
programs.hyprland = {
382-
enable = true;
383-
# set the flake package
384-
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
385-
# make sure to also set the portal package, so that they are in sync
386-
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
387-
};
386+
# # https://wiki.hyprland.org/Nix/Hyprland-on-NixOS/
387+
# programs.hyprland = {
388+
# enable = true;
389+
# # set the flake package
390+
# package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
391+
# # make sure to also set the portal package, so that they are in sync
392+
# portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
393+
# };
388394

389-
programs.chromium.enable = true;
390-
# programs.chromium.package = pkgs.google-chrome;
391-
# https://nixos.wiki/wiki/Chromium#Enabling_native_Wayland_support
392-
nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
393-
#programs.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
395+
# programs.chromium.enable = true;
396+
# # programs.chromium.package = pkgs.google-chrome;
397+
# # https://nixos.wiki/wiki/Chromium#Enabling_native_Wayland_support
398+
# nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
399+
# #programs.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
394400

395401
#dD
396402
# programs.firefox.enable = true;

laptops/t/flake.lock

Lines changed: 24 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

laptops/t/flake.nix

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
{
22
description = "t Flake";
33

4+
# https://nix.dev/manual/nix/2.24/command-ref/new-cli/nix3-flake.html#flake-inputs
45
inputs = {
56
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
7+
# https://docs.github.com/en/rest/branches/branches?apiVersion=2022-11-28#get-a-branch
8+
#nixpkgs.url = "github:nixos/nixpkgs/commit/c541a73ec2bc3574f78cdcfaf5230882b55c79a5.tar.gz";
9+
#nixpkgs.url = "github:randomizedcoder/nixpkgs/commit/8f146535307f0168d758fe6fee6f52663cb11695";
10+
nixpkgs-unstable.url = "github:randomizedcoder/nixpkgs/8f146535307f0168d758fe6fee6f52663cb11695";#ipert2_2.2.1
11+
# https://github.com/NixOS/nix/issues/12022
12+
#nix flake lock --override-input nixpkgs /home/eelco/Dev/nixpkgs
13+
#nix flake lock --override-input nixpkgs "/home/das/Downloads/nixpkgs
14+
#nixpkgs.url = "/home/das/Downloads/nixpkgs";
15+
#nixpkgs = "../../../Downloads/nixpkgs/";
616
# https://nixos-and-flakes.thiscute.world/nixos-with-flakes/start-using-home-manager
717
home-manager = {
818
url = "github:nix-community/home-manager/release-24.11";
@@ -20,30 +30,36 @@
2030
};
2131
};
2232

23-
outputs = inputs@{ nixpkgs, home-manager, hyprland, ... }:
33+
#outputs = inputs@{ nixpkgs, home-manager, hyprland, ... }:
34+
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, hyprland, ... }:
2435
let
2536
system = "x86_64-linux";
2637
pkgs = import nixpkgs {
2738
inherit system;
2839
config = { allowUnfree = true; };
2940
};
41+
# https://nixos.wiki/wiki/Flakes#Importing_packages_from_multiple_channels
42+
overlay-unstable = final: prev: {
43+
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
44+
};
3045
lib = nixpkgs.lib;
3146
in {
3247
nixosConfigurations = {
33-
t = lib.nixosSystem {
48+
t = lib.nixosSystem rec {
3449
#system ="x86_64-linux";
3550
inherit system;
36-
specialArgs = { inherit inputs; };
51+
specialArgs = { inherit hyprland; };
3752
modules = [
53+
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
3854
./configuration.nix
55+
hyprland.nixosModules.default
3956
home-manager.nixosModules.home-manager
4057
{
4158
home-manager.useGlobalPkgs = true;
4259
home-manager.useUserPackages = true;
4360
home-manager.users.das = import ./home.nix;
44-
45-
# Optionally, use home-manager.extraSpecialArgs to pass
46-
# arguments to home.nix
61+
home-manager.extraSpecialArgs = specialArgs;
62+
# see also: https://github.com/HeinzDev/Hyprland-dotfiles/blob/main/flake.nix
4763
}
4864
];
4965
};

laptops/t/home.nix

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1-
{ config, pkgs, ... }:
1+
{
2+
hyprland,
3+
config,
4+
pkgs,
5+
...
6+
}:
7+
#{ config, pkgs, ... }:
28
#{ config, inputs, pkgs, ... }:
39

410
# sudo cp ./nixos/modules/* /etc/nixos/
511
# sudo nixos-rebuild switch
612

713
{
8-
home.username = "das";
9-
home.homeDirectory = "/home/das";
14+
imports = [
15+
hyprland.homeManagerModules.default
16+
# other imports to go here
17+
];
18+
19+
home = {
20+
username = "das";
21+
homeDirectory = "/home/das";
22+
};
1023

1124
# https://nix-community.github.io/home-manager/index.xhtml#ch-installation
1225
#home-manager.users.das = { pkgs, ... }: {
@@ -81,7 +94,7 @@
8194
vlan
8295
tcpdump
8396
wireshark
84-
#iperf2
97+
unstable.iperf2
8598
netperf
8699
flent
87100
bpftools
@@ -200,7 +213,14 @@
200213
firefox
201214
# https://nixos.wiki/wiki/Chromium
202215
chromium
203-
google-chrome
216+
#google-chrome
217+
# https://discourse.nixos.org/t/google-chrome-not-working-after-recent-nixos-rebuild/43746
218+
(google-chrome.override {
219+
commandLineArgs = [
220+
"--enable-features=UseOzonePlatform"
221+
"--ozone-platform=wayland"
222+
];
223+
})
204224
# https://nixos.wiki/wiki/Slack
205225
slack
206226
#
@@ -360,6 +380,9 @@
360380
];
361381
};
362382

383+
# another example with dark colors:
384+
# https://github.com/HeinzDev/Hyprland-dotfiles/blob/main/home/home.nix#L70
385+
#
363386
# https://heywoodlh.io/nixos-gnome-settings-and-keyboard-shortcuts
364387
dconf.settings = {
365388
"org/gnome/desktop/wm/preferences" = {

0 commit comments

Comments
 (0)