disable eww, change wallpaper, add hotkeys
This commit is contained in:
parent
44aa8ae7ec
commit
d10761f8de
21 changed files with 1168 additions and 0 deletions
222
absol/configuration.nix
Executable file
222
absol/configuration.nix
Executable file
|
@ -0,0 +1,222 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# optimize power usage
|
||||
powerManagement.enable = true;
|
||||
|
||||
# optimize storage
|
||||
nix.optimise.automatic = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot";
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
# udev for brillo
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
|
||||
'';
|
||||
|
||||
networking.hostName = "absol";
|
||||
# networking.wireless.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
i18n.supportedLocales = [
|
||||
"en_US.UTF-8/UTF-8"
|
||||
"de_DE.UTF-8/UTF-8"
|
||||
];
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LANG = "en_US.UTF-8";
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
LANGUAGE = "en_US.UTF-8";
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "us";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
#services.avahi = {
|
||||
# enable = true;
|
||||
# nssmdns4 = true;
|
||||
# openFirewall = true;
|
||||
#};
|
||||
services.printing = {
|
||||
enable = true;
|
||||
# drivers = [ pkgs.splix ];
|
||||
};
|
||||
|
||||
# bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
services.blueman.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Define a user account.
|
||||
users.users.leonv = {
|
||||
isNormalUser = true;
|
||||
description = "Leon Vatthauer";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
initialPassword = "leonv"; # just for setup
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile.
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
let
|
||||
catp-gtk = pkgs.catppuccin-gtk.override {
|
||||
accents = [ "flamingo" ]; # You can specify multiple accents here to output multiple themes
|
||||
size = "compact";
|
||||
tweaks = [ "rimless" "black" ]; # You can also specify multiple tweaks here
|
||||
variant = "macchiato";
|
||||
};
|
||||
in [
|
||||
# for connecting to nas
|
||||
nfs-utils
|
||||
|
||||
# some standards for convenience
|
||||
vim
|
||||
parted
|
||||
os-prober
|
||||
qpdfview
|
||||
swww
|
||||
|
||||
# greeter
|
||||
greetd.gtkgreet
|
||||
catp-gtk
|
||||
|
||||
# deps for hyprland / eww
|
||||
socat
|
||||
texliveFull
|
||||
];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
# NFS setup
|
||||
services.rpcbind.enable = true; # needed for NFS
|
||||
systemd.mounts = [{
|
||||
type = "nfs";
|
||||
mountConfig = {
|
||||
Options = "noatime";
|
||||
};
|
||||
what = "192.168.178.20:/volume1/MiniDrive";
|
||||
where = "/MiniDrive";
|
||||
}];
|
||||
|
||||
systemd.automounts = [{
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
automountConfig = {
|
||||
TimeoutIdleSec = "10";
|
||||
};
|
||||
where = "/MiniDrive";
|
||||
}];
|
||||
|
||||
# source zsh
|
||||
programs.zsh.enable = true;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
nix.settings.substituters = [
|
||||
"https://aseipp-nix-cache.global.ssl.fastly.net"
|
||||
];
|
||||
|
||||
# environment variables
|
||||
environment.sessionVariables = {
|
||||
## disable logging when direnv changes
|
||||
DIRENV_LOG_FORMAT = [];
|
||||
# GTK theme (set here for greetd)
|
||||
GTK_THEME = "Catppuccin-Macchiato-Compact-Flamingo-Dark";
|
||||
};
|
||||
|
||||
# fonts
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
((nerdfonts.override { fonts = [ "Hack" "DejaVuSansMono" "DroidSansMono" "Noto" ]; }))
|
||||
mononoki
|
||||
# noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
];
|
||||
enableDefaultPackages = true;
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
monospace = [ "Berkeley Mono Nerd Font" ];
|
||||
sansSerif = [ "NotoSans Nerd Font" ];
|
||||
serif = [ "NotoSans Nerd Font" ];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# enable flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# hyprland
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
# ssh
|
||||
programs.ssh.startAgent = true;
|
||||
programs.ssh.extraConfig = ''
|
||||
AddKeysToAgent yes
|
||||
IdentityFile ~/.ssh/git
|
||||
'';
|
||||
|
||||
programs.steam.enable = true;
|
||||
|
||||
# thunar
|
||||
programs.thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [
|
||||
thunar-archive-plugin
|
||||
thunar-volman
|
||||
];
|
||||
};
|
||||
services.gvfs.enable = true; # Mount, trash, and others
|
||||
services.tumbler.enable = true; # thumbnail support for images
|
||||
}
|
115
absol/eww/config/eww.scss
Normal file
115
absol/eww/config/eww.scss
Normal file
|
@ -0,0 +1,115 @@
|
|||
// catppuccin colors
|
||||
$rosewater: #f4dbd6;
|
||||
$flamingo: #f0c6c6;
|
||||
$pink: #f5bde6;
|
||||
$mauve: #c6a0f6;
|
||||
$red: #ed8796;
|
||||
$maroon: #ee99a0;
|
||||
$peach: #f5a97f;
|
||||
$yellow: #eed49f;
|
||||
$green: #a6da95;
|
||||
$teal: #8bd5ca;
|
||||
$sky: #91d7e3;
|
||||
$sapphire: #7dc4e4;
|
||||
$blue: #8aadf4;
|
||||
$lavender: #b7bdf8;
|
||||
$accent: $flamingo;
|
||||
$text: #cad3f5;
|
||||
$subtext1: #b8c0e0;
|
||||
$subtext0: #a5adcb;
|
||||
$overlay2: #939ab7;
|
||||
$overlay1: #8087a2;
|
||||
$overlay0: #6e738d;
|
||||
$surface2: #5b6078;
|
||||
$surface1: #494d64;
|
||||
$surface0: #363a4f;
|
||||
$base: #24273a;
|
||||
$mantle: #1e2030;
|
||||
$crust: #181926;
|
||||
|
||||
*{
|
||||
all: unset;
|
||||
font-family: "monospace";
|
||||
}
|
||||
|
||||
// .bar {
|
||||
// background-color: $base;
|
||||
// border-radius: 16px;
|
||||
// }
|
||||
|
||||
.container {
|
||||
background-color: $base;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
tooltip.background {
|
||||
background-color: #0f0f17;
|
||||
font-size: 18px;
|
||||
border-radius: 10px;
|
||||
color: #bfc9db;
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 18px;
|
||||
margin: 0px 20px 0px 10px;
|
||||
color: $teal;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.volume_text {
|
||||
font-size: 18px;
|
||||
color: $maroon;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
.network_icon {
|
||||
font-size: 18px;
|
||||
color: $green;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
.bluetooth_icon {
|
||||
font-size: 18px;
|
||||
color: $blue;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
.cpu_text {
|
||||
font-size: 18px;
|
||||
color: $maroon;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
.mem_text {
|
||||
font-size: 18px;
|
||||
color: $yellow;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
.battery_text {
|
||||
font-size: 18px;
|
||||
color: $yellow;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
.workspaces-widget {
|
||||
color: $sky;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.workspaces-widget .empty {
|
||||
color: rgba($sky, 0.3);
|
||||
}
|
||||
|
||||
.title {
|
||||
color: $mauve;
|
||||
font-size: 16px;
|
||||
padding: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
.nixos-icon {
|
||||
font-size: 22px;
|
||||
color: #7CB5DE;
|
||||
margin: 0px 10px 0px 10px;
|
||||
}
|
58
absol/eww/config/eww.yuck
Normal file
58
absol/eww/config/eww.yuck
Normal file
|
@ -0,0 +1,58 @@
|
|||
; inspired by https://github.com/saimoomedits/eww-widgets/tree/main
|
||||
|
||||
(include "./widgets/workspaces/eww.yuck")
|
||||
(include "./widgets/window-title/eww.yuck")
|
||||
(include "./widgets/resources/eww.yuck")
|
||||
|
||||
(defwindow top-bar
|
||||
:monitor 0
|
||||
:geometry (geometry :x "0%"
|
||||
:y "10px"
|
||||
:width "98.8%"
|
||||
:height "30px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
:exclusive true
|
||||
(centerbox
|
||||
:class "bar"
|
||||
(left)
|
||||
; (center)
|
||||
""
|
||||
(right)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget left []
|
||||
(box
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
:class "container"
|
||||
(label :text "" :class "nixos-icon")
|
||||
(workspaces)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget center []
|
||||
(box
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:class "container"
|
||||
:visible {strlength(window) != 0}
|
||||
(windowtitle)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget right []
|
||||
(box
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
:class "container"
|
||||
(volume)
|
||||
(cpu)
|
||||
(mem)
|
||||
(battery)
|
||||
(network)
|
||||
(bluetooth)
|
||||
(datetime)
|
||||
)
|
||||
)
|
104
absol/eww/config/widgets/resources/eww.yuck
Normal file
104
absol/eww/config/widgets/resources/eww.yuck
Normal file
|
@ -0,0 +1,104 @@
|
|||
; for unicode symbols: https://jrgraphix.net/r/Unicode/E000-F8FF
|
||||
|
||||
; VARIABLES
|
||||
|
||||
(defvar GB 1024000000)
|
||||
(defvar MB 1024000)
|
||||
|
||||
; DATE + TIME
|
||||
|
||||
(defpoll time :interval "5s"
|
||||
:initial ""
|
||||
`date +%H:%M`)
|
||||
(defpoll date :interval "60s"
|
||||
:initial ""
|
||||
`date "+%A | %m-%d-%+4Y"`)
|
||||
|
||||
(defwidget datetime []
|
||||
(eventbox
|
||||
:tooltip date
|
||||
(label
|
||||
:class "text time"
|
||||
:text time)
|
||||
))
|
||||
|
||||
; CPU
|
||||
|
||||
(defwidget cpu []
|
||||
(box
|
||||
:active true
|
||||
:tooltip "${round(EWW_CPU.cores[0].freq/1000,2)} GHz"
|
||||
(label
|
||||
:class "cpu_text"
|
||||
:text " ${round(EWW_CPU.avg,0)}%")
|
||||
)
|
||||
)
|
||||
|
||||
; BATTERY
|
||||
(defwidget battery []
|
||||
(box
|
||||
:active true
|
||||
:tooltip "battery"
|
||||
(label
|
||||
:class "battery_text"
|
||||
:text "${EWW_BATTERY.BAT0.capacity}%"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
; MEMORY
|
||||
(defwidget mem []
|
||||
(box
|
||||
:active true
|
||||
:tooltip {EWW_RAM.used_mem / GB < 1 ? "${round(EWW_RAM.used_mem / MB, 1)} M used" : "${round(EWW_RAM.used_mem / GB, 1)} G used"}
|
||||
(label
|
||||
:class "mem_text"
|
||||
:text " ${round(EWW_RAM.used_mem_perc,0)}%")
|
||||
)
|
||||
)
|
||||
|
||||
; TEMP
|
||||
; TODO temperature widget (hover to show all times sorted nicely)
|
||||
;
|
||||
|
||||
; NETWORK
|
||||
|
||||
(defpoll hostname :interval "1m" :initial "" "hostname")
|
||||
(defpoll status-icon :interval "5s" :initial "" "./widgets/resources/network.sh")
|
||||
|
||||
(defwidget network []
|
||||
(eventbox
|
||||
:active true
|
||||
:onclick "/usr/bin/env nm-connection-editor &"
|
||||
:tooltip hostname
|
||||
(label
|
||||
:text status-icon
|
||||
:class "network_icon")))
|
||||
|
||||
; BLUETOOTH
|
||||
(defwidget bluetooth []
|
||||
(eventbox
|
||||
:active true
|
||||
:onclick "blueman-manager &"
|
||||
(label
|
||||
:text ""
|
||||
:class "bluetooth_icon")))
|
||||
|
||||
; VOLUME
|
||||
|
||||
(defpoll volume_percent :interval "0.1s" :initial "40" "amixer sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'")
|
||||
|
||||
(defwidget volume []
|
||||
(eventbox
|
||||
:active true
|
||||
:onclick "/usr/bin/env pavucontrol &"
|
||||
:onscroll "if [ {} = 'up' ]; then wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+; else wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-; fi" ; wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "h"
|
||||
:spacing "3"
|
||||
(label
|
||||
:class "volume_text"
|
||||
:text "${volume_percent <= 33 ? "" : volume_percent <= 66 ? "" : ""} ${volume_percent}%")
|
||||
)))
|
||||
; TODO add mic widget
|
9
absol/eww/config/widgets/resources/network.sh
Executable file
9
absol/eww/config/widgets/resources/network.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
status=$(nmcli g | grep -oE "disconnected")
|
||||
|
||||
if [ $status ] ; then
|
||||
echo "✘"
|
||||
else
|
||||
echo ""
|
||||
fi
|
7
absol/eww/config/widgets/window-title/eww.yuck
Normal file
7
absol/eww/config/widgets/window-title/eww.yuck
Normal file
|
@ -0,0 +1,7 @@
|
|||
(deflisten window :initial "" "sh ./widgets/window-title/get-window-title.sh")
|
||||
(defwidget windowtitle []
|
||||
(box :class "title"
|
||||
(label :text {window == "null" ? "" : window} :class "title"
|
||||
)
|
||||
)
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
hyprctl activewindow -j | jq --raw-output .title
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' '/^activewindow>>/{print $3}'
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
function clamp {
|
||||
min=$1
|
||||
max=$2
|
||||
val=$3
|
||||
python -c "print(max($min, min($val, $max)))"
|
||||
}
|
||||
|
||||
direction=$1
|
||||
current=$2
|
||||
if test "$direction" = "down"
|
||||
then
|
||||
target=$(clamp 1 10 $(($current+1)))
|
||||
echo "jumping to $target"
|
||||
hyprctl dispatch workspace $target
|
||||
elif test "$direction" = "up"
|
||||
then
|
||||
target=$(clamp 1 10 $(($current-1)))
|
||||
echo "jumping to $target"
|
||||
hyprctl dispatch workspace $target
|
||||
fi
|
18
absol/eww/config/widgets/workspaces/eww.yuck
Normal file
18
absol/eww/config/widgets/workspaces/eww.yuck
Normal file
|
@ -0,0 +1,18 @@
|
|||
(deflisten workspaces :initial "[]" "bash ./widgets/workspaces/get-workspaces.sh")
|
||||
(deflisten current_workspace :initial "1" "bash ./widgets/workspaces/get-active-workspace.sh")
|
||||
|
||||
(defwidget workspaces []
|
||||
(eventbox :onscroll "bash ./widgets/workspaces/change-active-workspace.sh {} ${current_workspace}" :class "workspaces-widget"
|
||||
(box :space-evenly true
|
||||
(label :text "${workspaces}${current_workspace}" :visible false)
|
||||
(for workspace in workspaces
|
||||
(eventbox :onclick "hyprctl dispatch workspace ${workspace.id}"
|
||||
(box :width "30" :height "30" :class "workspace-entry ${workspace.id == current_workspace ? "current" : ""} ${workspace.windows > 0 ? "occupied" : "empty"}"
|
||||
(label :text {workspace.id == current_workspace ? "" : workspace.windows > 0 ? "" : ""}
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
6
absol/eww/config/widgets/workspaces/get-active-workspace.sh
Executable file
6
absol/eww/config/widgets/workspaces/get-active-workspace.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
|
||||
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
|
||||
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
|
11
absol/eww/config/widgets/workspaces/get-workspaces.sh
Executable file
11
absol/eww/config/widgets/workspaces/get-workspaces.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
spaces (){
|
||||
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries')
|
||||
seq 1 10 | jq --argjson windows "${WORKSPACE_WINDOWS}" --slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0)})'
|
||||
}
|
||||
|
||||
spaces
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
|
||||
spaces
|
||||
done
|
7
absol/eww/default.nix
Normal file
7
absol/eww/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.eww = {
|
||||
enable = true;
|
||||
configDir = ./config;
|
||||
};
|
||||
}
|
37
absol/hardware-configuration.nix
Normal file
37
absol/hardware-configuration.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/ccdbc5d1-a548-4d3e-ab1e-d0bdd7b9df45";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/F6C7-421D";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [{
|
||||
device = "/swapfile";
|
||||
size = 32 * 1024;
|
||||
}];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
111
absol/hypr/catppuccin-macchiato.rasi
Normal file
111
absol/hypr/catppuccin-macchiato.rasi
Normal file
|
@ -0,0 +1,111 @@
|
|||
* {
|
||||
bg-col: #24273a;
|
||||
bg-col-light: #24273a;
|
||||
border-col: #24273a;
|
||||
selected-col: #24273a;
|
||||
blue: #8aadf4;
|
||||
fg-col: #cad3f5;
|
||||
fg-col2: #ed8796;
|
||||
grey: #6e738d;
|
||||
|
||||
width: 600;
|
||||
font: "JetBrainsMono Nerd Font 14";
|
||||
}
|
||||
|
||||
element-text, element-icon , mode-switcher {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
window {
|
||||
height: 360px;
|
||||
border: 3px;
|
||||
border-color: @border-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [prompt,entry];
|
||||
background-color: @bg-col;
|
||||
border-radius: 5px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
prompt {
|
||||
background-color: @blue;
|
||||
padding: 6px;
|
||||
text-color: @bg-col;
|
||||
border-radius: 3px;
|
||||
margin: 20px 0px 0px 20px;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
}
|
||||
|
||||
entry {
|
||||
padding: 6px;
|
||||
margin: 20px 0px 0px 10px;
|
||||
text-color: @fg-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
listview {
|
||||
border: 0px 0px 0px;
|
||||
padding: 6px 0px 0px;
|
||||
margin: 10px 0px 0px 20px;
|
||||
columns: 2;
|
||||
lines: 5;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 5px;
|
||||
background-color: @bg-col;
|
||||
text-color: @fg-col ;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 25px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @selected-col ;
|
||||
text-color: @fg-col2 ;
|
||||
}
|
||||
|
||||
mode-switcher {
|
||||
spacing: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 10px;
|
||||
background-color: @bg-col-light;
|
||||
text-color: @grey;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
|
||||
button selected {
|
||||
background-color: @bg-col;
|
||||
text-color: @blue;
|
||||
}
|
||||
|
||||
message {
|
||||
background-color: @bg-col-light;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
textbox {
|
||||
padding: 6px;
|
||||
margin: 20px 0px 0px 20px;
|
||||
text-color: @blue;
|
||||
background-color: @bg-col-light;
|
||||
}
|
271
absol/hypr/hyprland.nix
Normal file
271
absol/hypr/hyprland.nix
Normal file
|
@ -0,0 +1,271 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# hyprland setup
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
settings = {
|
||||
env = [
|
||||
"HYPRCURSOR_THEME,Bibata-Original-Classic"
|
||||
"HYPRCURSOR_SIZE,48"
|
||||
"XCURSOR_THEME,Catppuccin-Macchiato-Red"
|
||||
"XCURSOR_SIZE,48"
|
||||
];
|
||||
workspace = [
|
||||
"1, monitor:HDMI-A-1, default:true, persistent:true"
|
||||
"2, monitor:DP-1 , default:true, persistent:true"
|
||||
"special:scratchpad, on-created-empty:foot"
|
||||
];
|
||||
monitor = [
|
||||
"eDP-1, 2880x1800@120, 0x0, 2"
|
||||
];
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
kb_variant = "us";
|
||||
follow_mouse = 1;
|
||||
};
|
||||
"$mod" = "SUPER";
|
||||
"$modd" = "SUPER_SHIFT";
|
||||
general = {
|
||||
gaps_in = 8;
|
||||
gaps_out = 15;
|
||||
border_size = 3;
|
||||
|
||||
resize_on_border = true;
|
||||
layout = "dwindle";
|
||||
|
||||
"col.active_border" = "rgba(cba6f7ff) rgba(89b4faff) rgba(94e2d5ff) 10deg";
|
||||
"col.inactive_border" = "0xff45475a";
|
||||
"col.nogroup_border" = "0xff89dceb";
|
||||
"col.nogroup_border_active" = "0xfff9e2af";
|
||||
};
|
||||
decoration = {
|
||||
blur = {
|
||||
new_optimizations = true;
|
||||
size = 1;
|
||||
passes = 1;
|
||||
};
|
||||
drop_shadow = true;
|
||||
shadow_range = 100;
|
||||
shadow_render_power = 5;
|
||||
"col.shadow" = "0x33000000";
|
||||
"col.shadow_inactive" = "0x22000000";
|
||||
rounding = 15;
|
||||
};
|
||||
animations = {
|
||||
enabled = 1;
|
||||
bezier = "overshot,0.13,0.99,0.29,1.1";
|
||||
animation = [
|
||||
"windows,1,4,overshot,slide"
|
||||
"border,1,10,default"
|
||||
"fade,1,10,default"
|
||||
"workspaces,1,6,overshot,slidevert"
|
||||
];
|
||||
};
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
bind = [
|
||||
# opening programs
|
||||
"$mod, Return, exec, foot"
|
||||
"$mod, D, exec, wofi"
|
||||
"$mod, M, exit, "
|
||||
"$mod, Q, killactive, "
|
||||
|
||||
# moving around
|
||||
"$mod, left , movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, down , movefocus, d"
|
||||
"$mod, up , movefocus, u"
|
||||
|
||||
# moving windows
|
||||
"$modd, left , movewindow, l"
|
||||
"$modd, right, movewindow, r"
|
||||
"$modd, down , movewindow, d"
|
||||
"$modd, up , movewindow, u"
|
||||
|
||||
# workspaces
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$modd, 1, movetoworkspacesilent, 1"
|
||||
"$modd, 2, movetoworkspacesilent, 2"
|
||||
"$modd, 3, movetoworkspacesilent, 3"
|
||||
"$modd, 4, movetoworkspacesilent, 4"
|
||||
"$modd, 5, movetoworkspacesilent, 5"
|
||||
"$modd, 6, movetoworkspacesilent, 6"
|
||||
|
||||
# fullscreen
|
||||
"$mod, F11, fullscreen, 0"
|
||||
# "$mod, m, fullscreen, 1" # maximize
|
||||
|
||||
# floating
|
||||
"$mod, F, togglefloating, active"
|
||||
|
||||
# screenshot
|
||||
", Print, exec, grimblast copysave area $HOME\"/screenshots/\"$(date +'%F-%T.png');"
|
||||
|
||||
# scratchpad
|
||||
"$mod, C, togglespecialworkspace, scratchpad"
|
||||
];
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
];
|
||||
bindle = [
|
||||
# volume
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-"
|
||||
", XF86AudioMute, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0%"
|
||||
# screen brightness
|
||||
", XF86MonBrightnessUp, exec, brillo -q -A 5"
|
||||
", XF86MonBrightnessDown, exec, brillo -q -U 5"
|
||||
];
|
||||
exec-once = [
|
||||
"bash ~/Git/nixos/absol/hypr/start.sh"
|
||||
"hyprctl setcursor Bibata-Original-Classic 48"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# tell electron to use wayland
|
||||
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# terminal
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
font = "monospace:size=12";
|
||||
dpi-aware = "yes";
|
||||
};
|
||||
colors = {
|
||||
foreground = "cad3f5";
|
||||
background = "24273a";
|
||||
regular0 = "494d64";
|
||||
regular1 = "ed8796";
|
||||
regular3 = "eed49f";
|
||||
regular4 = "8aadf4";
|
||||
regular5 = "f5bde6";
|
||||
regular6 = "8bd5ca";
|
||||
regular7 = "b8c0e0";
|
||||
bright0 = "5b6078";
|
||||
bright1 = "ed8796";
|
||||
bright3 = "eed49f";
|
||||
bright4 = "8aadf4";
|
||||
bright5 = "f5bde6";
|
||||
bright6 = "8bd5ca";
|
||||
bright7 = "a5adcb";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
settings = {
|
||||
width = 600;
|
||||
height = 365;
|
||||
location = "center";
|
||||
show = "drun";
|
||||
prompt = "Search...";
|
||||
filter_rate = 100;
|
||||
allow_markup = true;
|
||||
no_actions = true;
|
||||
halign = "fill";
|
||||
orientation = "vertical";
|
||||
content_halign = "fill";
|
||||
insensitive = true;
|
||||
allow_images = true;
|
||||
image_size = 40;
|
||||
gtk_dark = true;
|
||||
layer = "overlay";
|
||||
};
|
||||
style = ''
|
||||
window {
|
||||
margin: 0px;
|
||||
border: 2px solid #b59dc3;
|
||||
background-color: #282a36;
|
||||
border-radius: 18px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#input {
|
||||
margin: 5px;
|
||||
border: none;
|
||||
color: #f8f8f2;
|
||||
border-radius: 15px;
|
||||
background-color: #44475a;
|
||||
}
|
||||
|
||||
#inner-box {
|
||||
margin: 5px;
|
||||
border: none;
|
||||
border-radius: 15px;
|
||||
background-color: #282a36;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
margin: 5px;
|
||||
border: none;
|
||||
border-radius: 15px;
|
||||
background-color: #282a36;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin: 0px;
|
||||
border-radius: 15px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#text {
|
||||
border-radius: 15px;
|
||||
margin: 5px;
|
||||
border: none;
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
#entry.activatable #text {
|
||||
color: #282a36;
|
||||
}
|
||||
|
||||
#entry > * {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
border-radius: 15px;
|
||||
background-color: #44475a;
|
||||
}
|
||||
|
||||
#entry:selected #text {
|
||||
border-radius: 15px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
services.mako = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
background-color=#24273a
|
||||
text-color=#cad3f5
|
||||
border-color=#8aadf4
|
||||
progress-color=over #363a4f
|
||||
sort=-time
|
||||
layer=overlay
|
||||
width=300
|
||||
height=110
|
||||
border-size=2
|
||||
border-radius=15
|
||||
max-icon-size=64
|
||||
default-timeout=5000
|
||||
ignore-timeout=1
|
||||
|
||||
[urgency=high]
|
||||
border-color=#f5a97f
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
4
absol/hypr/hyprpaper.conf
Normal file
4
absol/hypr/hyprpaper.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
preload = ~/Git/nixos/absol/hypr/wallpaper.jpg
|
||||
|
||||
#set the default wallpaper(s) seen on inital workspace(s) --depending on the number of monitors used
|
||||
wallpaper = monitor1,~/Git/nixos/absol/hypr/wallpaper.jpg
|
13
absol/hypr/start.sh
Executable file
13
absol/hypr/start.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# init nmapplet
|
||||
# TODO add back once eww supports tray
|
||||
# nm-applet --indicator &
|
||||
swww init
|
||||
swww img /home/leonv/Git/nixos/absol/hypr/wallpaper.jpg
|
||||
|
||||
eww daemon
|
||||
eww open top-bar
|
||||
|
||||
# notification
|
||||
mako
|
BIN
absol/hypr/wallpaper.jpg
Normal file
BIN
absol/hypr/wallpaper.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 194 KiB |
BIN
absol/hypr/wallpaper_old.jpg
Normal file
BIN
absol/hypr/wallpaper_old.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 84 KiB |
137
absol/leonv.nix
Executable file
137
absol/leonv.nix
Executable file
|
@ -0,0 +1,137 @@
|
|||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./../common
|
||||
./hypr/hyprland.nix
|
||||
# ./eww
|
||||
];
|
||||
/* The home.stateVersion option does not have a default and must be set */
|
||||
home.stateVersion = "24.05";
|
||||
home.username = "leonv";
|
||||
home.homeDirectory = "/home/leonv";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
brillo
|
||||
# theme for gtk applications
|
||||
orchis-theme
|
||||
|
||||
# stuff
|
||||
jq
|
||||
vlc
|
||||
openvpn
|
||||
signal-desktop
|
||||
webcord
|
||||
firefox-wayland
|
||||
ungoogled-chromium
|
||||
thunderbird
|
||||
gimp
|
||||
qpdfview
|
||||
wget
|
||||
fontforge
|
||||
gparted
|
||||
eza
|
||||
ripgrep
|
||||
fd
|
||||
zoom-us
|
||||
obsidian
|
||||
zotero
|
||||
|
||||
# development
|
||||
gnumake
|
||||
ghostscript
|
||||
jdk11
|
||||
coq
|
||||
gcc
|
||||
ghc
|
||||
cabal-install
|
||||
haskell-language-server
|
||||
python3
|
||||
python3Packages.pygments
|
||||
nodejs_20
|
||||
unifont
|
||||
anki
|
||||
pandoc
|
||||
|
||||
# hyprland
|
||||
kitty
|
||||
#networkmanagerapplet
|
||||
mako
|
||||
libnotify
|
||||
pavucontrol
|
||||
hyprpaper
|
||||
qimgv
|
||||
playerctl
|
||||
hyprpicker
|
||||
wev
|
||||
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
|
||||
bluez
|
||||
htop
|
||||
archiver
|
||||
#gnome.file-roller
|
||||
zip
|
||||
unzip
|
||||
emacs
|
||||
shellcheck
|
||||
|
||||
# yubikey
|
||||
yubico-pam
|
||||
yubikey-manager
|
||||
|
||||
# agda
|
||||
(agda.withPackages [
|
||||
agdaPackages.standard-library
|
||||
agdaPackages.agda-categories
|
||||
])
|
||||
|
||||
lean4
|
||||
|
||||
# for emacs
|
||||
texlab
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
clean = "sudo nix-env --delete-generations old --profile /nix/var/nix/profiles/system && sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch && sudo nix-store --gc";
|
||||
ls = "eza";
|
||||
ll = "eza -l";
|
||||
l = "eza -lah";
|
||||
code = "codium";
|
||||
alg = "code ~/Git/algprog/tex";
|
||||
nixos = "code ~/Git/nixos";
|
||||
};
|
||||
initExtra = ''
|
||||
function rebuild () {
|
||||
sudo nixos-rebuild switch --flake /home/leonv/Git/nixos
|
||||
sudo cp -r /home/leonv/Git/nixos /etc/
|
||||
}
|
||||
'';
|
||||
oh-my-zsh.enable = true;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Catppuccin-Macchiato-Compact-Flamingo-Dark";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
accents = [ "flamingo" ];
|
||||
size = "compact";
|
||||
tweaks = [ "rimless" "black" ];
|
||||
variant = "macchiato";
|
||||
};
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Dracula";
|
||||
package = pkgs.dracula-icon-theme;
|
||||
};
|
||||
font = {
|
||||
name = "NotoSans Nerd Font";
|
||||
};
|
||||
};
|
||||
home.sessionVariables.GTK_THEME = "Catppuccin-Macchiato-Compact-Flamingo-Dark";
|
||||
home.sessionPath = [ "$HOME/.config/emacs/bin" ];
|
||||
|
||||
services.mpris-proxy.enable = true;
|
||||
}
|
14
flake.nix
14
flake.nix
|
@ -44,6 +44,20 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
absol = unstable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./absol/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.leonv = import ./absol/leonv.nix;
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
}
|
||||
];
|
||||
};
|
||||
iso = unstable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
|
|
Loading…
Reference in a new issue