diff --git a/configuration.nix b/configuration.nix index b56d43f..76e6ef9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,7 +4,7 @@ { config, lib, inputs, pkgs, flakeName, ... }: { - # imports = []; + imports = [./hardware-configuration.nix]; nix.settings.experimental-features = ["nix-command" "flakes"]; nixpkgs.config.allowUnfree = true; diff --git a/flake.nix b/flake.nix index c9d9fc3..b1139f1 100644 --- a/flake.nix +++ b/flake.nix @@ -1,3 +1,15 @@ +# **************************************************************************** # +# # +# ::: :::::::: # +# flake.nix :+: :+: :+: # +# +:+ +:+ +:+ # +# By: tomoron +#+ +:+ +#+ # +# +#+#+#+#+#+ +#+ # +# 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"; @@ -21,26 +33,30 @@ default = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs; flakeName="default";}; modules = [ - ./hardware-configuration.nix ./configuration.nix ]; }; vbox = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;flakeName="vbox";}; modules = [ - ./hardware-configuration.nix ./configuration.nix - ./hosts/vbox/configuration.nix + ./hosts/vbox.nix ]; }; laptop = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;flakeName="laptop";}; modules = [ - ./hardware-configuration.nix ./configuration.nix - ./hosts/laptop/configuration.nix + ./hosts/laptop.nix nixos-hardware.nixosModules.asus-zephyrus-ga401 ]; + }; + desktop = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;flakeName="laptop";}; + modules = [ + ./configuration.nix + ./hosts/desktop.nix + ]; }; }; diff --git a/home.nix b/home.nix index 40227ca..257dd7a 100644 --- a/home.nix +++ b/home.nix @@ -1,3 +1,15 @@ +# **************************************************************************** # +# # +# ::: :::::::: # +# home.nix :+: :+: :+: # +# +:+ +:+ +:+ # +# By: tomoron +#+ +:+ +#+ # +# +#+#+#+#+#+ +#+ # +# Created: 2024/10/17 18:15:38 by tomoron #+# #+# # +# Updated: 2024/10/17 18:15:39 by tomoron ### ########.fr # +# # +# **************************************************************************** # + { config, lib, pkgs, username,homeDir, ... }: { @@ -61,6 +73,7 @@ services.picom = { enable = true; + package = pkgs.picom-pijulius; backend = lib.mkDefault "glx"; vSync = true; settings = { diff --git a/homes/laptop/laptop.nix b/homes/laptop/laptop.nix index b5a4332..40e4f26 100644 --- a/homes/laptop/laptop.nix +++ b/homes/laptop/laptop.nix @@ -1,8 +1,7 @@ { config, lib, pkgs, ... }: { - home.packages = with pkgs;[ heroic ]; - services.picom.package = pkgs.picom-pijulius; + imports = [ ../modules/game.nix ]; home.file = { ".config/alacritty".source = dotfiles/config/alacritty; }; diff --git a/homes/modules/game.nix b/homes/modules/game.nix new file mode 100644 index 0000000..d4cdb30 --- /dev/null +++ b/homes/modules/game.nix @@ -0,0 +1,6 @@ + +{ config, lib, pkgs, ... }: + +{ + home.packages = with pkgs;[ heroic ]; +} diff --git a/hosts/desktop.nix b/hosts/desktop.nix new file mode 100644 index 0000000..7ef2bca --- /dev/null +++ b/hosts/desktop.nix @@ -0,0 +1,11 @@ + +{ config, lib, inputs, pkgs, ... }: + +{ + imports = [ + modules/game.nix + modules/nvidia.nix + ]; + + networking.hostName = "nixos-fixe"; +} diff --git a/hosts/laptop/configuration.nix b/hosts/laptop.nix similarity index 61% rename from hosts/laptop/configuration.nix rename to hosts/laptop.nix index b6d7ad0..ac75efc 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop.nix @@ -1,7 +1,10 @@ - { config, lib, inputs, pkgs, ... }: { + imports = [ + modules/game.nix + modules/nvidia.nix + ]; networking.hostName = "patate-douce"; networking.wireless.enable = true; networking.networkmanager.enable = false; @@ -11,17 +14,12 @@ tlp ]; - hardware.graphics = { - enable = true; - enable32Bit = true; - }; - - services.xserver.videoDrivers = ["nvidia"]; - hardware.nvidia.prime.offload = { enable = 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; } diff --git a/hosts/modules/game.nix b/hosts/modules/game.nix new file mode 100644 index 0000000..94c8692 --- /dev/null +++ b/hosts/modules/game.nix @@ -0,0 +1,6 @@ +{ config, lib, inputs, pkgs, ... }: + +{ + programs.steam.enable=true; + programs.steam.protontricks.enable=true; +} diff --git a/hosts/modules/nvidia.nix b/hosts/modules/nvidia.nix new file mode 100644 index 0000000..02a603c --- /dev/null +++ b/hosts/modules/nvidia.nix @@ -0,0 +1,11 @@ + +{ config, lib, inputs, pkgs, ... }: + +{ + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + + services.xserver.videoDrivers = ["nvidia"]; +} diff --git a/hosts/vbox/configuration.nix b/hosts/vbox.nix similarity index 100% rename from hosts/vbox/configuration.nix rename to hosts/vbox.nix