diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bc654ed --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +HOST ?= $(file < /etc/nixosFlakeName) +THREADS ?= $(shell nproc) +FLAKE ?= /home/tom/home +MODE = switch + +all: os home + +update: + cd $(FLAKE);nix flake update + $(MAKE) all + +os: + sudo nixos-rebuild $(MODE) --cores $(THREADS) -j $(THREADS) --flake $(FLAKE)#$(HOST) +home : + home-manager $(MODE) --cores $(THREADS) -j $(THREADS) --flake $(FLAKE)#$(HOST) diff --git a/configuration.nix b/configuration.nix index 1870bdb..b56d43f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,7 +1,7 @@ # Edit this configuration file to define what should be installed on your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ config, lib, inputs, pkgs, ... }: +{ config, lib, inputs, pkgs, flakeName, ... }: { # imports = []; @@ -46,6 +46,9 @@ killall vim pciutils + pigz + htop + gnumake ]; #Open ports in the firewall. @@ -56,4 +59,6 @@ system.stateVersion = "24.05"; # Did you read the comment? + environment.etc.nixosFlakeName.text = "${flakeName}"; + } diff --git a/dotfiles/config/polybar/config-small.ini b/dotfiles/config/polybar/config-small.ini index 0a95e22..208c71b 100644 --- a/dotfiles/config/polybar/config-small.ini +++ b/dotfiles/config/polybar/config-small.ini @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2024/08/28 20:38:59 by tomoron #+# #+# # -# Updated: 2024/09/30 16:01:08 by tomoron ### ########.fr # +# Updated: 2024/10/16 22:18:29 by tomoron ### ########.fr # # # # **************************************************************************** # @@ -144,7 +144,7 @@ font-2 = "Iosevka Nerd Font:style=Bold:pixelsize=15;4" modules-left = workspaces space mpris modules-center = -modules-right = fans dgpu memory sep filesystem sep cpu sep temperature sep pulseaudio sep battery sep network sep date +modules-right = fans dgpu memory sep filesystem sep cpu sep temperature sep polybar sep battery sep network sep date ;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ diff --git a/dotfiles/config/polybar/config.ini b/dotfiles/config/polybar/config.ini index 3b07957..3013692 100644 --- a/dotfiles/config/polybar/config.ini +++ b/dotfiles/config/polybar/config.ini @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2024/08/28 20:38:59 by tomoron #+# #+# # -# Updated: 2024/09/28 02:47:34 by tomoron ### ########.fr # +# Updated: 2024/10/16 22:02:20 by tomoron ### ########.fr # # # # **************************************************************************** # diff --git a/dotfiles/config/polybar/modules.ini b/dotfiles/config/polybar/modules.ini index f935f8a..4f51e55 100644 --- a/dotfiles/config/polybar/modules.ini +++ b/dotfiles/config/polybar/modules.ini @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2024/08/28 20:38:49 by tomoron #+# #+# # -# Updated: 2024/09/30 16:01:01 by tomoron ### ########.fr # +# Updated: 2024/10/16 22:55:55 by tomoron ### ########.fr # # # # **************************************************************************** # @@ -385,7 +385,7 @@ label = " %percentage_used%%" ; If you use both a wired and a wireless network, just add 2 module definitions. For example [module/network] type = internal/network -interface = wlan0 +interface = wlp2s0 ; Seconds to sleep between updates ; Default: 1 @@ -498,7 +498,7 @@ thermal-zone = 0 ; to find path to desired file ; Default reverts to thermal zone setting ;;hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input -hwmon-path = /sys/devices/virtual/thermal/thermal_zone0/hwmon1/temp1_input +hwmon-path = /sys/devices/virtual/thermal/thermal_zone0/temp ; Threshold temperature to display warning label (in degrees celsius) ; Default: 80 diff --git a/flake.lock b/flake.lock index a5780eb..d147eee 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1728306985, - "narHash": "sha256-l/KpcWTv2SjxCnqFs5GYhvjeVYd40WQV4/F2+w9btd4=", + "lastModified": 1729165983, + "narHash": "sha256-gtcodl79t5ZbbX4TSx4RNyggasEvLdVnc/IM+RyxqJw=", "owner": "nix-community", "repo": "home-manager", - "rev": "3ac39b2a8b7cbfc0f96628d8a84867c885bc988b", + "rev": "78a7a070bbcc3b37cc36080c2a3514207d427b3b", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1728018373, - "narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", + "lastModified": 1728888510, + "narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bc947f541ae55e999ffdb4013441347d83b00feb", + "rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f018f8f..c9d9fc3 100644 --- a/flake.nix +++ b/flake.nix @@ -19,14 +19,14 @@ #NIXOS CONFIG nixosConfigurations = { default = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; + specialArgs = {inherit inputs; flakeName="default";}; modules = [ ./hardware-configuration.nix ./configuration.nix ]; }; vbox = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; + specialArgs = {inherit inputs;flakeName="vbox";}; modules = [ ./hardware-configuration.nix ./configuration.nix @@ -34,7 +34,7 @@ ]; }; laptop = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; + specialArgs = {inherit inputs;flakeName="laptop";}; modules = [ ./hardware-configuration.nix ./configuration.nix @@ -75,6 +75,17 @@ ./home.nix ./homes/ft/ft.nix ]; + }; + laptop = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + extraSpecialArgs = { + username = "${username}"; + homeDir = "${homeDir}"; + }; + modules = [ + ./home.nix + ./homes/laptop/laptop.nix + ]; }; }; }; diff --git a/home.nix b/home.nix index 7c93d82..40227ca 100644 --- a/home.nix +++ b/home.nix @@ -8,8 +8,8 @@ # The home.packages option allows you to install Nix packages into your # environment. - home.packages = with pkgs;[ - polybar + home.packages = with pkgs;[ + polybarFull sxhkd alacritty nitrogen @@ -28,7 +28,7 @@ ".config/sxhkd".source = lib.mkDefault dotfiles/config/sxhkd; ".config/polybar".source = dotfiles/config/polybar; ".config/nitrogen".source = lib.mkDefault dotfiles/config/nitrogen; - ".config/alacritty".source = dotfiles/config/alacritty; + ".config/alacritty".source = lib.mkDefault dotfiles/config/alacritty; ".config/nvim/init.vim".source = dotfiles/config/nvim/init.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; @@ -36,6 +36,12 @@ ".vimrc".source = dotfiles/vimrc; ".bashrc".source = dotfiles/bashrc; + ".local/share/rofi/themes".source = "${builtins.fetchGit { + url = "https://github.com/newmanls/rofi-themes-collection"; + rev = "c8239a45edced3502894e1716a8b661fdea8f1c9"; + ref = "master"; + }}/themes"; + # ".gradle/gradle.properties".text = '' # org.gradle.daemon.idletimeout=3600000 diff --git a/homes/laptop/dotfiles/config/alacritty/alacritty.toml b/homes/laptop/dotfiles/config/alacritty/alacritty.toml new file mode 100644 index 0000000..ac99060 --- /dev/null +++ b/homes/laptop/dotfiles/config/alacritty/alacritty.toml @@ -0,0 +1,8 @@ +[window] +opacity = 0.90 + +[env] +XTERM = "xterm-256color" + +[font] +size = 8 diff --git a/homes/laptop/laptop.nix b/homes/laptop/laptop.nix new file mode 100644 index 0000000..b5a4332 --- /dev/null +++ b/homes/laptop/laptop.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs, ... }: + +{ + home.packages = with pkgs;[ heroic ]; + services.picom.package = pkgs.picom-pijulius; + home.file = { + ".config/alacritty".source = dotfiles/config/alacritty; + }; +} diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 8c47f7e..b6d7ad0 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -11,9 +11,9 @@ tlp ]; - hardware.opengl = { + hardware.graphics = { enable = true; - driSupport32Bit = true; + enable32Bit = true; }; services.xserver.videoDrivers = ["nvidia"]; @@ -22,4 +22,6 @@ enable = true; enableOffloadCmd = true; }; + programs.steam.enable=true; + programs.steam.protontricks.enable=true; }