fix desktop graphics drivers and other things idk
This commit is contained in:
@ -27,13 +27,10 @@
|
|||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager). services.libinput.enable = true;
|
|
||||||
|
|
||||||
users.users.tom = {
|
users.users.tom = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
initialPassword = "password";
|
initialPassword = "password";
|
||||||
# packages = with pkgs; [];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
@ -44,6 +41,8 @@
|
|||||||
pigz
|
pigz
|
||||||
htop
|
htop
|
||||||
gnumake
|
gnumake
|
||||||
|
git
|
||||||
|
neofetch
|
||||||
];
|
];
|
||||||
|
|
||||||
#Open ports in the firewall.
|
#Open ports in the firewall.
|
||||||
|
@ -1,24 +1,10 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
INTEGRATED="eDP-1"
|
if [ -f $HOME/.config/bspwm/host.sh ];then /bin/sh $HOME/.config/bspwm/host.sh;fi
|
||||||
HDMI="HDMI-1"
|
if [ -f $HOME/.config/bspwm/screenlayout.sh ];then /bin/sh $HOME/.config/bspwm/screenlayout.sh ;fi
|
||||||
pgrep -x sxhkd > /dev/null || sxhkd &
|
|
||||||
killall polybar
|
pgrep sxhkd > /dev/null || sxhkd &
|
||||||
if xrandr | grep "$HDMI connected" && cat /proc/acpi/button/lid/LID/state | grep "closed"; then
|
pgrep polybar >/dev/null || polybar -q main -c "$HOME/.config/polybar/config.ini"&
|
||||||
bash ~/.screenlayout/b.sh
|
|
||||||
bspc monitor $HDMI -d 1 2 3 4 5
|
|
||||||
bspc monitor $INTEGRATED -r
|
|
||||||
elif xrandr | grep "$HDMI connected";then
|
|
||||||
bash ~/.screenlayout/a.sh
|
|
||||||
bspc monitor $INTEGRATED -d 1 2 3 4
|
|
||||||
bspc monitor $HDMI -d A B
|
|
||||||
else
|
|
||||||
bspc monitor -d 1 2 3 4 5
|
|
||||||
xrandr -r 60
|
|
||||||
fi
|
|
||||||
bspc desktop 1 -f
|
|
||||||
(polybar -q main -c "$HOME/.config/polybar/config.ini")&
|
|
||||||
#(pulseaudio -D; polybar -q main -c "$HOME/.config/polybar/config.ini")&
|
|
||||||
|
|
||||||
bspc config border_width 2
|
bspc config border_width 2
|
||||||
bspc config window_gap 10
|
bspc config window_gap 10
|
||||||
@ -27,13 +13,9 @@ bspc config split_ratio 0.52
|
|||||||
bspc config borderless_monocle true
|
bspc config borderless_monocle true
|
||||||
bspc config gapless_monocle true
|
bspc config gapless_monocle true
|
||||||
|
|
||||||
pgrep -x alacritty > /dev/null || alacritty &
|
pgrep alacritty > /dev/null || alacritty &
|
||||||
|
pgrep picom > /dev/null || picom &
|
||||||
#autostart appps
|
pgrep dunst >/dev/null || dunst &
|
||||||
picom &
|
|
||||||
nitrogen --restore &
|
|
||||||
dunst &
|
|
||||||
numlockx on &
|
numlockx on &
|
||||||
setxkbmap fr us&
|
setxkbmap fr us&
|
||||||
killall activate-linux
|
nitrogen --restore &
|
||||||
(sleep 1;activate-linux -c 1-1-1-0.7 -V 50 -H 70 -d)&
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.5 MiB |
@ -1,12 +0,0 @@
|
|||||||
[geometry]
|
|
||||||
posx=0
|
|
||||||
posy=32
|
|
||||||
sizex=450
|
|
||||||
sizey=500
|
|
||||||
|
|
||||||
[nitrogen]
|
|
||||||
view=icon
|
|
||||||
recurse=true
|
|
||||||
sort=alpha
|
|
||||||
icon_caps=false
|
|
||||||
dirs=/home/tom/.config/nitrogen;
|
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
6
flake.lock
generated
6
flake.lock
generated
@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729171802,
|
"lastModified": 1729258007,
|
||||||
"narHash": "sha256-Eip3uI+XeyAfBoQXpkm/F7eG3M7AgvzSyhyJdzxVt74=",
|
"narHash": "sha256-48B9JVEhQ4zHxE0ak50QDnkC6C+R74Bm/md397tXhXM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "9c1a1c7df49a9b28539ccb509b36d0b81e41391c",
|
"rev": "cb93ab1c990c5719ec199e8c397e688de06cb46d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2024/10/17 18:15:24 by tomoron #+# #+# #
|
# Created: 2024/10/17 18:15:24 by tomoron #+# #+# #
|
||||||
# Updated: 2024/10/17 21:53:46 by tomoron ### ########.fr #
|
# Updated: 2024/10/18 00:42:34 by tomoron ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
@ -100,7 +100,7 @@
|
|||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./home.nix
|
./home.nix
|
||||||
./homes/laptop.nix
|
./homes/laptop/home.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
desktop = home-manager.lib.homeManagerConfiguration {
|
desktop = home-manager.lib.homeManagerConfiguration {
|
||||||
@ -111,7 +111,7 @@
|
|||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./home.nix
|
./home.nix
|
||||||
# ./homes/desktop.nix
|
./homes/desktop/home.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
5
home.nix
5
home.nix
@ -6,7 +6,7 @@
|
|||||||
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2024/10/17 18:15:38 by tomoron #+# #+# #
|
# Created: 2024/10/17 18:15:38 by tomoron #+# #+# #
|
||||||
# Updated: 2024/10/17 18:41:29 by tomoron ### ########.fr #
|
# Updated: 2024/10/18 01:47:08 by tomoron ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
@ -35,13 +35,14 @@
|
|||||||
activate-linux
|
activate-linux
|
||||||
bspwm
|
bspwm
|
||||||
dunst
|
dunst
|
||||||
|
numlockx
|
||||||
];
|
];
|
||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/bspwm/bspwmrc".source = lib.mkDefault dotfiles/config/bspwm/bspwmrc;
|
".config/bspwm/bspwmrc".source = lib.mkDefault dotfiles/config/bspwm/bspwmrc;
|
||||||
".config/sxhkd".source = lib.mkDefault dotfiles/config/sxhkd;
|
".config/sxhkd".source = lib.mkDefault dotfiles/config/sxhkd;
|
||||||
".config/polybar".source = dotfiles/config/polybar;
|
".config/polybar".source = dotfiles/config/polybar;
|
||||||
".config/nitrogen".source = lib.mkDefault dotfiles/config/nitrogen;
|
".config/nitrogen/wallpaper.png".source = lib.mkDefault dotfiles/config/nitrogen/wallpaper.png;
|
||||||
".config/nvim/init.vim".source = dotfiles/config/nvim/init.vim;
|
".config/nvim/init.vim".source = dotfiles/config/nvim/init.vim;
|
||||||
".config/nvim/plugin/stdheader.vim".source = dotfiles/config/nvim/plugin/stdheader.vim;
|
".config/nvim/plugin/stdheader.vim".source = dotfiles/config/nvim/plugin/stdheader.vim;
|
||||||
".local/share/nvim/site/autoload/plug.vim".source = dotfiles/local/share/nvim/site/autoload/plug.vim;
|
".local/share/nvim/site/autoload/plug.vim".source = dotfiles/local/share/nvim/site/autoload/plug.vim;
|
||||||
|
1
homes/desktop/bspwm/host.sh
Normal file
1
homes/desktop/bspwm/host.sh
Normal file
@ -0,0 +1 @@
|
|||||||
|
pgrep activate-linux >/dev/null || (sleep 2;activate-linux -c 1-1-1-0.7 -V 50 -H 50 -d)&
|
3
homes/desktop/bspwm/screenlayout.sh
Executable file
3
homes/desktop/bspwm/screenlayout.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
echo "AAAAAAAAAAAAAAAAAAAAAAAA"
|
||||||
|
xrandr --output DP-0 --mode 1280x1024 --pos 5120x56 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output HDMI-0 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --output DP-1-1 --mode 1280x1024 --pos 3840x56 --rotate normal --output HDMI-1-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1-2 --off --output HDMI-1-2 --off
|
8
homes/desktop/home.nix
Normal file
8
homes/desktop/home.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./nitrogen.nix ];
|
||||||
|
home.file = {
|
||||||
|
".config/bspwm/screenlayout.sh".source = ./bspwm/screenlayout.sh;
|
||||||
|
};
|
||||||
|
}
|
28
homes/desktop/nitrogen.nix
Normal file
28
homes/desktop/nitrogen.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ config, lib, pkgs, homeDir, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
background = "${homeDir}/.config/nitrogen/wallpaper.png";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.file.".config/nitrogen/bg-saved.cfg".text = ''
|
||||||
|
[xin_0]
|
||||||
|
file=${background}
|
||||||
|
mode=5
|
||||||
|
bgcolor=#000000
|
||||||
|
|
||||||
|
[xin_1]
|
||||||
|
file=${background}
|
||||||
|
mode=5
|
||||||
|
bgcolor=#000000
|
||||||
|
|
||||||
|
[xin_2]
|
||||||
|
file=${background}
|
||||||
|
mode=5
|
||||||
|
bgcolor=#000000
|
||||||
|
|
||||||
|
[xin_3]
|
||||||
|
file=${background}
|
||||||
|
mode=5
|
||||||
|
bgcolor=#000000
|
||||||
|
'';
|
||||||
|
}
|
@ -1,7 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ modules/game.nix ];
|
|
||||||
|
|
||||||
programs.alacritty.settings.font.size = 8;
|
|
||||||
}
|
|
15
homes/laptop/bspwm/host.sh
Normal file
15
homes/laptop/bspwm/host.sh
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
INTEGRATED="eDP-1"
|
||||||
|
HDMI="HDMI-1"
|
||||||
|
if xrandr | grep "$HDMI connected" && cat /proc/acpi/button/lid/LID/state | grep "closed"; then
|
||||||
|
bash ~/.screenlayout/b.sh
|
||||||
|
bspc monitor $HDMI -d 1 2 3 4 5
|
||||||
|
bspc monitor $INTEGRATED -r
|
||||||
|
elif xrandr | grep "$HDMI connected";then
|
||||||
|
bash ~/.screenlayout/a.sh
|
||||||
|
bspc monitor $INTEGRATED -d 1 2 3 4
|
||||||
|
bspc monitor $HDMI -d A B
|
||||||
|
else
|
||||||
|
bspc monitor -d 1 2 3 4 5
|
||||||
|
xrandr -r 60
|
||||||
|
fi
|
||||||
|
pgrep activate-linux >/dev/null || (sleep 2;activate-linux -c 1-1-1-0.7 -V 50 -H 70 -d)&
|
15
homes/laptop/home.nix
Normal file
15
homes/laptop/home.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../modules/game.nix
|
||||||
|
./bspwm.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.alacritty.settings.font.size = 8;
|
||||||
|
|
||||||
|
home.file = {
|
||||||
|
".config/bspwm/host.sh".source = ./bspwm/host.sh;
|
||||||
|
".config/bspwm/screenlayout.sh".source = ./bspwm/host.sh;
|
||||||
|
}
|
||||||
|
}
|
@ -14,13 +14,22 @@
|
|||||||
|
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "modesetting" "intel"];
|
# services.xserver.videoDrivers = [ "intel"];
|
||||||
|
|
||||||
|
boot.kernelModules = [ "kvm-intel" "nvidia" ];
|
||||||
|
hardware.graphics.extraPackages = with pkgs; [libGL linuxPackages.nvidia_x11.out];
|
||||||
|
|
||||||
|
|
||||||
hardware.graphics.extraPackages = [ pkgs.mesa.drivers ];
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
open = true;
|
open = true;
|
||||||
|
|
||||||
prime.nvidiaBusId = "PCI:1:0:0";
|
prime.nvidiaBusId = "PCI:1:0:0";
|
||||||
prime.intelBusId = "PCI:0:2:0";
|
prime.intelBusId = "PCI:0:2:0";
|
||||||
|
prime.sync.enable = true;
|
||||||
|
|
||||||
|
modesetting.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user