seprate hosts in submodules and started adding desktop pc configuration

This commit is contained in:
2024-10-17 18:23:05 +02:00
parent af79ebb579
commit 2d3d965304
10 changed files with 78 additions and 18 deletions

View File

@ -4,7 +4,7 @@
{ config, lib, inputs, pkgs, flakeName, ... }: { config, lib, inputs, pkgs, flakeName, ... }:
{ {
# imports = []; imports = [./hardware-configuration.nix];
nix.settings.experimental-features = ["nix-command" "flakes"]; nix.settings.experimental-features = ["nix-command" "flakes"];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

View File

@ -1,3 +1,15 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# flake.nix :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/10/17 18:15:24 by tomoron #+# #+# #
# Updated: 2024/10/17 18:15:26 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{ {
description = "Nixos and home-manager config flake"; description = "Nixos and home-manager config flake";
@ -21,26 +33,30 @@
default = nixpkgs.lib.nixosSystem { default = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs; flakeName="default";}; specialArgs = {inherit inputs; flakeName="default";};
modules = [ modules = [
./hardware-configuration.nix
./configuration.nix ./configuration.nix
]; ];
}; };
vbox = nixpkgs.lib.nixosSystem { vbox = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;flakeName="vbox";}; specialArgs = {inherit inputs;flakeName="vbox";};
modules = [ modules = [
./hardware-configuration.nix
./configuration.nix ./configuration.nix
./hosts/vbox/configuration.nix ./hosts/vbox.nix
]; ];
}; };
laptop = nixpkgs.lib.nixosSystem { laptop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;flakeName="laptop";}; specialArgs = {inherit inputs;flakeName="laptop";};
modules = [ modules = [
./hardware-configuration.nix
./configuration.nix ./configuration.nix
./hosts/laptop/configuration.nix ./hosts/laptop.nix
nixos-hardware.nixosModules.asus-zephyrus-ga401 nixos-hardware.nixosModules.asus-zephyrus-ga401
]; ];
};
desktop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;flakeName="laptop";};
modules = [
./configuration.nix
./hosts/desktop.nix
];
}; };
}; };

View File

@ -1,3 +1,15 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# home.nix :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/10/17 18:15:38 by tomoron #+# #+# #
# Updated: 2024/10/17 18:15:39 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{ config, lib, pkgs, username,homeDir, ... }: { config, lib, pkgs, username,homeDir, ... }:
{ {
@ -61,6 +73,7 @@
services.picom = { services.picom = {
enable = true; enable = true;
package = pkgs.picom-pijulius;
backend = lib.mkDefault "glx"; backend = lib.mkDefault "glx";
vSync = true; vSync = true;
settings = { settings = {

View File

@ -1,8 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home.packages = with pkgs;[ heroic ]; imports = [ ../modules/game.nix ];
services.picom.package = pkgs.picom-pijulius;
home.file = { home.file = {
".config/alacritty".source = dotfiles/config/alacritty; ".config/alacritty".source = dotfiles/config/alacritty;
}; };

6
homes/modules/game.nix Normal file
View File

@ -0,0 +1,6 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs;[ heroic ];
}

11
hosts/desktop.nix Normal file
View File

@ -0,0 +1,11 @@
{ config, lib, inputs, pkgs, ... }:
{
imports = [
modules/game.nix
modules/nvidia.nix
];
networking.hostName = "nixos-fixe";
}

View File

@ -1,7 +1,10 @@
{ config, lib, inputs, pkgs, ... }: { config, lib, inputs, pkgs, ... }:
{ {
imports = [
modules/game.nix
modules/nvidia.nix
];
networking.hostName = "patate-douce"; networking.hostName = "patate-douce";
networking.wireless.enable = true; networking.wireless.enable = true;
networking.networkmanager.enable = false; networking.networkmanager.enable = false;
@ -11,17 +14,12 @@
tlp tlp
]; ];
hardware.graphics = {
enable = true;
enable32Bit = true;
};
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.prime.offload = { hardware.nvidia.prime.offload = {
enable = true; enable = true;
enableOffloadCmd = true; enableOffloadCmd = true;
}; };
programs.steam.enable=true;
programs.steam.protontricks.enable=true; services.libinput.enable = true;
services.libinput.touchpad.clickMethod = "clickfinger";
services.libinput.touchpad.tapping = false;
} }

6
hosts/modules/game.nix Normal file
View File

@ -0,0 +1,6 @@
{ config, lib, inputs, pkgs, ... }:
{
programs.steam.enable=true;
programs.steam.protontricks.enable=true;
}

11
hosts/modules/nvidia.nix Normal file
View File

@ -0,0 +1,11 @@
{ config, lib, inputs, pkgs, ... }:
{
hardware.graphics = {
enable = true;
enable32Bit = true;
};
services.xserver.videoDrivers = ["nvidia"];
}