From 4d57da3cf77e303daba5cafdcc41c1e32a6b56e8 Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Sun, 16 Jul 2023 19:00:44 +0300 Subject: [PATCH] Update configs --- README.md | 2 +- common/base.nix | 6 +++- common/graphical.nix | 46 +++++++++++++++++++++++++++---- common/laptop.nix | 6 ++++ common/user.nix | 3 +- machines/stella/configuration.nix | 7 ----- machines/stella/hardware.nix | 6 ++++ 7 files changed, 60 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 007be93..42910f7 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ - do something with dotfiles installation from [ivabus/dotfiles](https://github.com/ivabus/dotfiles) - install nixos on more machines - write proper readme -- switch to swaywm \ No newline at end of file +- fix gtk theming issues \ No newline at end of file diff --git a/common/base.nix b/common/base.nix index 45adc9d..743bef1 100644 --- a/common/base.nix +++ b/common/base.nix @@ -8,12 +8,16 @@ experimental-features = nix-command flakes ''; }; - + environment.systemPackages = with pkgs; [ neovim wget git curl + usbutils + usbmuxd + pciutils + coreutils-full ]; networking.networkmanager.enable = true; diff --git a/common/graphical.nix b/common/graphical.nix index 349767c..909ca80 100644 --- a/common/graphical.nix +++ b/common/graphical.nix @@ -4,12 +4,48 @@ environment.systemPackages = with pkgs; [ firefox alacritty + pavucontrol + mpv + glib + ffmpeg + cinnamon.mint-y-icons ]; + services.fwupd.enable = true; + services.greetd = { + enable = true; + settings = { + default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway"; + user = "greeter"; + }; + }; + }; + programs.sway = { + enable = true; + extraPackages = with pkgs; [ + waybar + grim + slurp + wf-recorder + sway-launcher-desktop + swaybg + swayidle + swaylock + poweralertd + kanshi + catppuccin-cursors + libsForQt5.qt5ct + mako + pulseaudio + brightnessctl + ]; + wrapperFeatures.gtk = true; + }; - services.xserver.enable = true; - services.xserver.displayManager.sddm.enable = true; - services.xserver.desktopManager.plasma5.enable = true; - + xdg.portal = { + enable = true; + wlr.enable = true; + }; services.pipewire = { enable = true; alsa.enable = true; @@ -17,7 +53,7 @@ }; services.dbus.enable = true; - + fonts.fonts = with pkgs; [ noto-fonts noto-fonts-cjk diff --git a/common/laptop.nix b/common/laptop.nix index 1d8e827..f8ca64f 100644 --- a/common/laptop.nix +++ b/common/laptop.nix @@ -1,5 +1,11 @@ { config, pkgs, ... }: { + environment.systemPackages = with pkgs; [ + powertop + ]; + services.tlp.enable = true; + services.upower.enable = true; + networking.wireless.iwd.enable = true; } \ No newline at end of file diff --git a/common/user.nix b/common/user.nix index 5a0a843..e6a95b9 100644 --- a/common/user.nix +++ b/common/user.nix @@ -9,6 +9,7 @@ cargo rustc neofetch + gitFull ]; shell = pkgs.zsh; }; @@ -22,7 +23,5 @@ programs.git = { enable = true; - userName = "Ivan Bushchik"; - userEmail = "ivabus@ivabus.dev"; }; } \ No newline at end of file diff --git a/machines/stella/configuration.nix b/machines/stella/configuration.nix index 075aac2..5dfed17 100644 --- a/machines/stella/configuration.nix +++ b/machines/stella/configuration.nix @@ -2,13 +2,6 @@ { config, pkgs, ... }: { - nix = { - package = pkgs.nixUnstable; - extraOptions = '' - experimental-features = nix-command flakes - ''; - }; - boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/machines/stella/hardware.nix b/machines/stella/hardware.nix index 5a6649d..93a7e30 100644 --- a/machines/stella/hardware.nix +++ b/machines/stella/hardware.nix @@ -27,4 +27,10 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + services.tlp.settings = { + START_CHARGE_THRESH_BAT0 = 40; + STOP_CHARGE_THRESH_BAT0 = 80; + }; + powerManagement.enable = true; + powerManagement.cpuFreqGovernor = "powersave"; }