Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions laptops/t/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ else
endif

rebuild:
sudo nix flake update;
sudo nixos-rebuild switch --flake .

update:
sudo nix flake update;

rebuild_old:
# sudo cp ./flake.nix /etc/nixos/
# sudo cp ./flake.lock /etc/nixos/
Expand All @@ -35,7 +37,7 @@ rebuild_old:
#sudo nix-channel --update;
sudo nixos-rebuild switch --flake .

update:
update_oldm.:
sudo nix-channel --update
sudo nixos-rebuild switch
#nix-shell -p vim
Expand Down
36 changes: 21 additions & 15 deletions laptops/t/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@
# https://discourse.nixos.org/t/nvidia-open-breaks-hardware-acceleration/58770/2
nvidia-vaapi-driver
vaapiVdpau
libvdpau
libvdpau-va-gl
vdpauinfo
libva
libva-utils
];
};

Expand Down Expand Up @@ -305,10 +310,11 @@
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
NVD_BACKEND = "direct";
EGL_PLATFORM = "wayland";
# prevents cursor disappear when using Nvidia drivers
WLR_NO_HARDWARE_CURSORS = "1";

#MOZ_ENABLE_WAYLAND = "1";
#XDG_SESSION_TYPE = "wayland";
MOZ_ENABLE_WAYLAND = "1";
XDG_SESSION_TYPE = "wayland";
NIXOS_OZONE_WL = "1";
};

Expand Down Expand Up @@ -377,20 +383,20 @@
enableSSHSupport = true;
};

# https://wiki.hyprland.org/Nix/Hyprland-on-NixOS/
programs.hyprland = {
enable = true;
# set the flake package
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# make sure to also set the portal package, so that they are in sync
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
# # https://wiki.hyprland.org/Nix/Hyprland-on-NixOS/
# programs.hyprland = {
# enable = true;
# # set the flake package
# package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# # make sure to also set the portal package, so that they are in sync
# portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
# };

programs.chromium.enable = true;
# programs.chromium.package = pkgs.google-chrome;
# https://nixos.wiki/wiki/Chromium#Enabling_native_Wayland_support
nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
#programs.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
# programs.chromium.enable = true;
# # programs.chromium.package = pkgs.google-chrome;
# # https://nixos.wiki/wiki/Chromium#Enabling_native_Wayland_support
# nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
# #programs.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";

#dD
# programs.firefox.enable = true;
Expand Down
31 changes: 24 additions & 7 deletions laptops/t/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 22 additions & 6 deletions laptops/t/flake.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
description = "t Flake";

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

outputs = inputs@{ nixpkgs, home-manager, hyprland, ... }:
#outputs = inputs@{ nixpkgs, home-manager, hyprland, ... }:
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, hyprland, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
# https://nixos.wiki/wiki/Flakes#Importing_packages_from_multiple_channels
overlay-unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
};
lib = nixpkgs.lib;
in {
nixosConfigurations = {
t = lib.nixosSystem {
t = lib.nixosSystem rec {
#system ="x86_64-linux";
inherit system;
specialArgs = { inherit inputs; };
specialArgs = { inherit hyprland; };
modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./configuration.nix
hyprland.nixosModules.default
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.das = import ./home.nix;

# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
home-manager.extraSpecialArgs = specialArgs;
# see also: https://github.com/HeinzDev/Hyprland-dotfiles/blob/main/flake.nix
}
];
};
Expand Down
33 changes: 28 additions & 5 deletions laptops/t/home.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
{ config, pkgs, ... }:
{
hyprland,
config,
pkgs,
...
}:
#{ config, pkgs, ... }:
#{ config, inputs, pkgs, ... }:

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

{
home.username = "das";
home.homeDirectory = "/home/das";
imports = [
hyprland.homeManagerModules.default
# other imports to go here
];

home = {
username = "das";
homeDirectory = "/home/das";
};

# https://nix-community.github.io/home-manager/index.xhtml#ch-installation
#home-manager.users.das = { pkgs, ... }: {
Expand Down Expand Up @@ -81,7 +94,7 @@
vlan
tcpdump
wireshark
#iperf2
unstable.iperf2
netperf
flent
bpftools
Expand Down Expand Up @@ -200,7 +213,14 @@
firefox
# https://nixos.wiki/wiki/Chromium
chromium
google-chrome
#google-chrome
# https://discourse.nixos.org/t/google-chrome-not-working-after-recent-nixos-rebuild/43746
(google-chrome.override {
commandLineArgs = [
"--enable-features=UseOzonePlatform"
"--ozone-platform=wayland"
];
})
# https://nixos.wiki/wiki/Slack
slack
#
Expand Down Expand Up @@ -360,6 +380,9 @@
];
};

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