updates and fixes

This commit is contained in:
Daniel Bulant 2024-09-01 15:44:37 +02:00
parent 3719cb9a8a
commit 322016864d
No known key found for this signature in database
6 changed files with 74 additions and 21 deletions

View file

@ -16,6 +16,9 @@
#env = __GLX_VENDOR_LIBRARY_NAME,nvidia #env = __GLX_VENDOR_LIBRARY_NAME,nvidia
#cursor { no_hardware_cursors = true } #cursor { no_hardware_cursors = true }
env = AQ_DRM_DEVICES,/dev/dri/card1
monitor=,preferred,auto,1
source = ~/.config/hypr/monitors.conf source = ~/.config/hypr/monitors.conf
source = ~/.config/hypr/workspaces.conf source = ~/.config/hypr/workspaces.conf

View file

@ -41,6 +41,11 @@ For base setup, only `hyprland`, `rofi`, `waybar` and `swaylock`/`swaylock-effec
## General notes ## General notes
## Setting up
Run `sync-nix.sh`, it will copy configurations and run nixos-rebuild.
If you don't want to build hyprland yourself and instead use cache, comment out programs.hyprland in configuration first, sync, then un-comment it and sync again.
### Lock screen ### Lock screen
Lock screen doesn't show what you type, it just changes it's circle for each character. If you delete all the input, it will show "cleared". Lock screen doesn't show what you type, it just changes it's circle for each character. If you delete all the input, it will show "cleared".

View file

@ -2,27 +2,31 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, ... }: { config, pkgs, hyprland, nixpkgs-unstable, lib, nixos-hardware, zen-browser/*, kwin-effects-forceblur*/, ... }:
let # let
unstable-pkgs = import <nixos-unstable> {}; # unstable-pkgs = nixpkgs-unstable.legacyPackages.x86_64-linux; #import nixpkgs-unstable.nixosModules.readOnlyPkgs {};
in # unstable-pkgs = hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system};
# in
{ {
imports = imports =
[ [
# <nixos-hardware/lenovo/legion/16ach6h/hybrid> # this is borked in latest update for some reason, edid doesn't build # nixos-hardware.lenovo-legion-16ach6h-hybrid # this is borked in latest update for some reason, edid doesn't build
<nixos-hardware/common/cpu/amd> nixos-hardware.nixosModules.common-cpu-amd
<nixos-hardware/common/cpu/amd/pstate.nix> nixos-hardware.nixosModules.common-cpu-amd-pstate
<nixos-hardware/common/cpu/amd/zenpower.nix> nixos-hardware.nixosModules.common-cpu-amd-zenpower
<nixos-hardware/common/gpu/amd> nixos-hardware.nixosModules.common-gpu-amd
<nixos-hardware/common/gpu/nvidia/prime.nix> nixos-hardware.nixosModules.common-gpu-nvidia
<nixos-hardware/common/pc/laptop> nixos-hardware.nixosModules.common-pc-laptop
<nixos-hardware/common/pc/laptop/ssd> nixos-hardware.nixosModules.common-pc-laptop-ssd
./hardware-configuration.nix ./hardware-configuration.nix
<home-manager/nixos>
./cachix.nix ./cachix.nix
]; ];
# Bootloader. nixpkgs.config.permittedInsecurePackages = [
"olm-3.2.16"
];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = [ "ntfs" ]; boot.supportedFilesystems = [ "ntfs" ];
@ -64,7 +68,6 @@ in
layout = "us"; layout = "us";
variant = ""; variant = "";
}; };
#libinput.enable = true;
}; };
services.printing.enable = true; services.printing.enable = true;
@ -76,7 +79,6 @@ in
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
#jack.enable = true;
}; };
security.pam.loginLimits = [{ security.pam.loginLimits = [{
domain = "*"; domain = "*";
@ -100,7 +102,7 @@ in
shell = pkgs.fish; shell = pkgs.fish;
packages = with pkgs; [ packages = with pkgs; [
kdePackages.kate kdePackages.kate
# thunderbird zen-browser.packages."${system}".specific
]; ];
}; };
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
@ -110,8 +112,20 @@ in
environment.sessionVariables.DEFAULT_BROWSER = "firefox"; environment.sessionVariables.DEFAULT_BROWSER = "firefox";
programs.firefox.enable = true; programs.firefox.enable = true;
programs.hyprland.enable = true; nix.settings = {
programs.hyprland.package = unstable-pkgs.hyprland; substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
# Comment out below for the first time to avoid cache miss, if using flake
programs.hyprland = {
enable = true;
package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# package = unstable-pkgs.hyprland;
};
# End comment out
# programs.hyprland.enable = true;
programs.hyprlock.enable = true; programs.hyprlock.enable = true;
services.hypridle.enable = true; services.hypridle.enable = true;
programs.fish.enable = true; programs.fish.enable = true;
@ -139,10 +153,17 @@ in
nixpkgs.config.cudaSupport = true; nixpkgs.config.cudaSupport = true;
# The nvidia fun part # The nvidia fun part
hardware.opengl.enable = true; hardware.opengl = {
enable = true;
# package = unstable-pkgs.mesa.drivers;
# Steam support
driSupport32Bit = true;
# package32 = unstable-pkgs.pkgsi686Linux.mesa.drivers;
};
boot.kernelModules = ["amdgpu"]; boot.kernelModules = ["amdgpu"];
hardware.nvidia = { hardware.nvidia = {
open = false;
modesetting.enable = true; modesetting.enable = true;
powerManagement.enable = true; powerManagement.enable = true;
prime = { prime = {

23
flake.nix Normal file
View file

@ -0,0 +1,23 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
zen-browser.url = "github:MarceColl/zen-browser-flake";
nixos-hardware.url = "github:NixOS/nixos-hardware";
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# kwin-effects-forceblur.url = "https://gist.githubusercontent.com/taj-ny/c1abdde710f33e34dc39dc53a5dc2c09/raw/7078265012c37b6f6bc397e9a7893bc6004e7b6c/kwin-effects-forceblur.nix";
};
outputs = { nixpkgs, ... }@attrs: {
nixosConfigurations.lenovo-nix = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
modules = with attrs; [
home-manager.nixosModules.default
./configuration.nix
];
};
};
}

View file

@ -8,6 +8,7 @@ in
packages = with pkgs; [ packages = with pkgs; [
# acpilight # acpilight
nix-top
grc grc
onefetch onefetch
fira fira

View file

@ -2,4 +2,4 @@ echo "Copying configurations"
cp .config/* ~/.config/ -r cp .config/* ~/.config/ -r
cp .default-python-packages ~ cp .default-python-packages ~
sudo cp *.nix /etc/nixos/ sudo cp *.nix /etc/nixos/
sudo nixos-rebuild switch sudo nixos-rebuild switch --show-trace --recreate-lock-file