From 56bee281143c1bb2e9e186ec46fdb58d20868bb8 Mon Sep 17 00:00:00 2001 From: Ahurac Date: Mon, 30 Sep 2024 16:43:05 +0200 Subject: [PATCH] feat: added conf for `ahrc-pc` --- ahrc-laptop/home.nix | 3 -- ahrc-pc/configuration.nix | 19 ++++++++++++ ahrc-pc/hardware-configuration.nix | 48 ++++++++++++++++++++++++++++++ ahrc-pc/home.nix | 33 ++++++++++++++++++++ common/configuration.nix | 1 + common/home.nix | 18 +++++++++++ 6 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 ahrc-pc/configuration.nix create mode 100644 ahrc-pc/hardware-configuration.nix create mode 100644 ahrc-pc/home.nix diff --git a/ahrc-laptop/home.nix b/ahrc-laptop/home.nix index 396dcb5..d4ad43a 100644 --- a/ahrc-laptop/home.nix +++ b/ahrc-laptop/home.nix @@ -22,10 +22,7 @@ animations = { enabled = false; }; decoration = { - rounding = 10; - active_opacity = 1.0; inactive_opacity = 1.0; - fullscreen_opacity = 1.0; drop_shadow = false; dim_inactive = false; blur.enabled = false; diff --git a/ahrc-pc/configuration.nix b/ahrc-pc/configuration.nix new file mode 100644 index 0000000..6b3c560 --- /dev/null +++ b/ahrc-pc/configuration.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ../common/configuration.nix ./hardware-configuration.nix ]; + + networking.hostName = "ahrc-pc"; + + programs.bash.promptInit = '' + if [ "$(whoami)" = root ]; then + color=35 + else + color=32 + user='\u@' + fi + PS1="\[\033[0m\](\[\033[1;''${color}m\]''${user}\h\[\033[0m\] \[\033[1;34m\]\W\[\033[0m\])\\$ " + ''; + + system.stateVersion = "24.05"; +} diff --git a/ahrc-pc/hardware-configuration.nix b/ahrc-pc/hardware-configuration.nix new file mode 100644 index 0000000..6e8891a --- /dev/null +++ b/ahrc-pc/hardware-configuration.nix @@ -0,0 +1,48 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/6371008b-3551-4dd6-8429-9f1d07275c74"; + fsType = "xfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/7912-C8B9"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + fileSystems."/var" = + { device = "/dev/disk/by-uuid/893e72c7-c904-43ea-b5ee-e1cea18b8268"; + fsType = "ext4"; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/329a472f-945b-49da-b840-bc2fb37d2e03"; + fsType = "btrfs"; + }; + + fileSystems."/mnt/inthdd" = + { device = "/dev/disk/by-uuid/2f7d6ae6-acda-410e-9c02-992eb64a8c7f"; + fsType = "ext4"; + }; + + swapDevices = [ { + device = "/swapfile"; + size = 8 * 1024; + } ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + networking.interfaces.enp42s0.wakeOnLan.enable = true; +} diff --git a/ahrc-pc/home.nix b/ahrc-pc/home.nix new file mode 100644 index 0000000..5f1f09d --- /dev/null +++ b/ahrc-pc/home.nix @@ -0,0 +1,33 @@ +{ config, pkgs, ... }: + +{ + imports = [ ../common/home.nix ]; + + home.stateVersion = "24.05"; + + programs.zsh = { + localVariables = { + PROMPT = '' + ╭─[%F{magenta}%B%n@%m%f%b]──[%F{blue}%B%50<...<%5~%<<%b%f]──[%B%?%b] + ╰─[%B%j%b%# ''; + }; + }; + + wayland.windowManager.hyprland = { + settings = { + "$col_accentdark" = "rgb(9933ff)" + "$col_accentlight" = "rgb(d966ff)" + "$col_inactive" = "rgba(80808080)" + + animations.enabled = true; + decoration = { + inactive_opacity = 0.9; + drop_shadow = true; + dim_inactive = true; + blur.enabled = true; + }; + gestures.workspace_swipe = false; + misc.animate_manual_resizes = true; + }; + }; +} diff --git a/common/configuration.nix b/common/configuration.nix index e5f2e65..2f87d1e 100644 --- a/common/configuration.nix +++ b/common/configuration.nix @@ -36,6 +36,7 @@ ]; services.udisks2.enable = true; + services.libinput.enable = true; programs.hyprland.enable = true; programs.zsh.enable = true; diff --git a/common/home.nix b/common/home.nix index 9d14dec..98edca6 100644 --- a/common/home.nix +++ b/common/home.nix @@ -138,6 +138,7 @@ settings = { monitor = ", highrr, 0x0, 1"; + "$col_urgent" = "rgb(ffd966)"; "$terminal" = "kitty"; "$browser" = "firefox"; "$locker" = "hyprlock"; @@ -157,6 +158,11 @@ focus_preferred_method = 1; movefocus_cycles_fullscreen = false; }; + decoration = { + rounding = 10; + active_opacity = 1.0; + fullscreen_opacity = 1.0; + }; general = { border_size = 2; "col.inactive_border" = "$col_inactive"; @@ -282,6 +288,18 @@ ", XF86MonBrightnessDown, exec, swayosd-client --brightness=lower" ]; }; + + extraConfig = '' + submap = resize + bind = , escape, submap, reset + bind = SUPER Alt_L, R, submap, reset + binde = , A, resizeactive, -25 0 + binde = , Z, resizeactive, 0 -25 + binde = , S, resizeactive, 0 25 + binde = , D, resizeactive, 25 0 + submap = reset + bind = SUPER Alt_L, R, submap, resize + ''; }; programs.hyprlock = {