From 3050a5bd9832e835afad4fb3fd1ce2a50d76139c Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 24 Jan 2024 04:02:43 +0000 Subject: [PATCH] update config --- config/hypr/hyprpaper.conf | 14 +++++------ configuration.nix | 34 ++++++++++++++++++++------ hosts/lappy/hardware-configuration.nix | 2 +- users/nyadmin/home.nix | 30 +++++++++++++++++++++++ users/stitchynyan/home.nix | 33 ++++++++++++++++++++++++- 5 files changed, 96 insertions(+), 17 deletions(-) create mode 100644 users/nyadmin/home.nix diff --git a/config/hypr/hyprpaper.conf b/config/hypr/hyprpaper.conf index 9c9d36d..6d6fa69 100644 --- a/config/hypr/hyprpaper.conf +++ b/config/hypr/hyprpaper.conf @@ -1,10 +1,10 @@ - -preload = ~/.config/hypr/wallpapers/wallpaper2.png +preload = ~/.config/wallpapers/wallpaper2.png -wallpaper = eDP-1,~/.config/hypr/wallpapers/wallpaper2.png -wallpaper = DP-1,~/.config/hypr/wallpapers/wallpaper2.png -wallpaper = DP-2,~/.config/hypr/wallpapers/wallpaper2.png -wallpaper = DP-3,~/.config/hypr/wallpapers/wallpaper2.png -wallpaper = DP-4,~/.config/hypr/wallpapers/wallpaper2.png +wallpaper = eDP-1,~/.config/wallpapers/wallpaper2.png +wallpaper = DP-1,~/.config/wallpapers/wallpaper2.png +wallpaper = DP-2,~/.config/wallpapers/wallpaper2.png +wallpaper = DP-3,~/.config/wallpapers/wallpaper2.png +wallpaper = DP-4,~/.config/wallpapers/wallpaper2.png +splash=false ipc = off diff --git a/configuration.nix b/configuration.nix index e71161c..a3f923a 100644 --- a/configuration.nix +++ b/configuration.nix @@ -14,7 +14,7 @@ # Use the systemd-boot EFI boot loader. boot.kernelPackages = pkgs.linuxPackages_zen; boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = false; + boot.loader.efi.canTouchEfiVariables = true; nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -26,6 +26,12 @@ services.printing.enable = true; + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + # Swaylock allow to unlock security.pam.services.swaylock = {}; security.sudo.wheelNeedsPassword=false; @@ -73,13 +79,25 @@ ]; users.mutableUsers = false; - users.users.stitchynyan = { - isNormalUser = true; - shell = pkgs.zsh; - home = "/home/stitchynyan"; - description = "Personal user"; - extraGroups = [ "wheel" "networkmanager" "kvm" "libvirt" "audio" ]; - initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; + users.users = { + stitchynyan = { + isNormalUser = true; + shell = pkgs.zsh; + home = "/home/stitchynyan"; + description = "Personal user"; + extraGroups = [ "wheel" "networkmanager" "kvm" "libvirt" "audio" ]; + initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; + }; + nyadmin = { + isNormalUser = true; + shell = pkgs.zsh; + home = "/home/nyadmin"; + description = "Administrator~"; + extraGroups = [ "wheel" "kvm" "libvirt" ]; + initialHashedPassword = "$y$j9T$XguIcj/AVXsWW/MxSYAGh0$TivGAa0z8KNCli2mKTd24vtqimpadNzqMFwfbeh0p30"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOVgHcJ9C8TD515x+KqFKNYUa6IZML6LU3FWovmDIvyZ" ] + }; }; networking.firewall = { diff --git a/hosts/lappy/hardware-configuration.nix b/hosts/lappy/hardware-configuration.nix index 52e290e..ea2f74b 100644 --- a/hosts/lappy/hardware-configuration.nix +++ b/hosts/lappy/hardware-configuration.nix @@ -27,6 +27,6 @@ swapDevices = [ ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; + powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/users/nyadmin/home.nix b/users/nyadmin/home.nix new file mode 100644 index 0000000..6f5e5a6 --- /dev/null +++ b/users/nyadmin/home.nix @@ -0,0 +1,30 @@ + + +{ config, + nixosConfig, + pkgs, + inputs, + home-manager, + ... }: + +{ + + imports = [ + #inputs.nix-index-db.hmModules.nix-index + ]; + + # systemd.user.services.mailsync = { + + #} + + home.packages = with pkgs; [ + ]; + #programs.hyprland.enable = true; + # hyprland.homeManagerModules.default + #wayland.windowManager.hyprland.enable = true; + + + # Read the Docs before change + #home.stateVersion = "23.05"; + #home.homeDirectory = "/home/stitchynyan"; +} diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index bbe427e..8184a5b 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -25,7 +25,6 @@ neomutt dunst mutt-wizard - cyrus-sasl-xoauth2 pass isync msmtp @@ -44,6 +43,7 @@ swaylock-effects qt5ct qt6ct + mpv ]; #programs.hyprland.enable = true; # hyprland.homeManagerModules.default @@ -56,6 +56,37 @@ }; }; + systemd.user.services = { + mailsync = { + Unit = { + Description = "Syncs email"; + After = [ "network-online.target" ]; + }; + Service = { + Type = "oneshot"; + ExecStart = "${pkgs.mutt-wizard}/bin/mailsync"; + Environment = [ + "SASL_PATH=/run/current-system/sw/lib/sasl2" + "LOGNAME=stitchynyan" + "USER=stitchynyan" ]; + }; + Install.WantedBy = [ "default.target" ]; + }; + }; + + systemd.user.timers = { + mailsync = { + Unit.Description = "Syncs emai"; + Timer = { + OnBootSec = "1min"; + OnUnitActiveSec = "10min"; + }; + Install.WantedBy = [ "timers.target" ]; + }; + }; + + + # Read the Docs before change home.stateVersion = "23.05"; home.homeDirectory = "/home/stitchynyan";