This commit is contained in:
Aleksandr Lebedev 2025-01-31 19:11:38 +01:00
parent dba0dd05cf
commit 7dd25a12ab
3 changed files with 284 additions and 285 deletions

View file

@ -132,7 +132,6 @@
kdenlive kdenlive
system-config-printer system-config-printer
libreoffice libreoffice
helvum
killall killall
nix-output-monitor nix-output-monitor
eza eza
@ -258,134 +257,134 @@
security.polkit.enable = true; security.polkit.enable = true;
#programs.thunar = { #programs.thunar = {
# enable = true; # enable = true;
# plugins = with pkgs.xfce; [ # plugins = with pkgs.xfce; [
# thunar-archive-plugin # thunar-archive-plugin
# thunar-volman # thunar-volman
# ]; # ];
# }; # };
#programs.xfconf.enable = true; # so thunar can save config #programs.xfconf.enable = true; # so thunar can save config
#services.gvfs.enable = true; # Mount, trash, and other functionalities #services.gvfs.enable = true; # Mount, trash, and other functionalities
#services.tumbler.enable = true; # Thumbnail support for images #services.tumbler.enable = true; # Thumbnail support for images
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit pkgs;
inherit hwconfig;
inherit first-nixos-install;
inherit inputs;
};
};
stylix = {
enable = true;
image = "${./modules/hyprland/wallpaper.jpg}";
autoEnable = true;
opacity = {
desktop = 0.5;
};
targets = {
gtk.enable = true;
plymouth = {
enable = true; enable = true;
#logo = ./fastfetch/nixos.png; alsa.enable = true;
logoAnimated = false; alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
}; };
};
fonts = { home-manager = {
sizes = { useGlobalPkgs = true;
applications = 14; useUserPackages = true;
desktop = 12; extraSpecialArgs = {
popups = 12; inherit pkgs;
terminal = 16; inherit hwconfig;
inherit first-nixos-install;
inherit inputs;
};
};
stylix = {
enable = true;
image = "${./modules/hyprland/wallpaper.jpg}";
autoEnable = true;
opacity = {
desktop = 0.5;
};
targets = {
gtk.enable = true;
plymouth = {
enable = true;
#logo = ./fastfetch/nixos.png;
logoAnimated = false;
};
};
fonts = {
sizes = {
applications = 14;
desktop = 12;
popups = 12;
terminal = 16;
};
};
polarity = "dark";
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
}; };
};
polarity = "dark";
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
};
programs.bash = { programs.bash = {
shellAliases = { shellAliases = {
ls = "${pkgs.eza}/bin/eza --icons=always"; ls = "${pkgs.eza}/bin/eza --icons=always";
}; };
}; };
#printing #printing
services.printing.enable = true; services.printing.enable = true;
services.avahi = { services.avahi = {
enable = true; enable = true;
nssmdns4 = true; nssmdns4 = true;
openFirewall = true; openFirewall = true;
}; };
#services.flatpak.enable = true; #services.flatpak.enable = true;
#services.flatpak.packages = [ #services.flatpak.packages = [
# "flathub:app/org.kde.dolphin//stable" # "flathub:app/org.kde.dolphin//stable"
# ]; # ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
# programs.mtr.enable = true; # programs.mtr.enable = true;
# programs.gnupg.agent = { # programs.gnupg.agent = {
# enable = true; # enable = true;
# enableSSHSupport = true; # enableSSHSupport = true;
# }; # };
kk.steam.enable = hwconfig.system == "x86_64-linux"; kk.steam.enable = hwconfig.system == "x86_64-linux";
# List services that you want to enable: # List services that you want to enable:
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh = { services.openssh = {
enable = true; enable = true;
# require public key authentication for better security # require public key authentication for better security
settings.PasswordAuthentication = false; settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false; settings.KbdInteractiveAuthentication = false;
settings.PermitRootLogin = "no"; settings.PermitRootLogin = "no";
extraConfig = "HostKey ${config.sops.secrets."ssh_keys/${hwconfig.hostname}".path}"; extraConfig = "HostKey ${config.sops.secrets."ssh_keys/${hwconfig.hostname}".path}";
}; };
# Open ports in the firewall. # Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 22 ]; networking.firewall.allowedTCPPorts = [ 22 ];
networking.firewall.allowedUDPPorts = [ 22 ]; networking.firewall.allowedUDPPorts = [ 22 ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
#networking.firewall.enable = false; #networking.firewall.enable = false;
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave # on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "24.05"; # Did you read the comment?
nix = { nix = {
settings = { settings = {
experimental-features = [ experimental-features = [
"nix-command" "nix-command"
"flakes" "flakes"
]; ];
auto-optimise-store = true; auto-optimise-store = true;
substituters = [ substituters = [
"https://hyprland.cachix.org" "https://hyprland.cachix.org"
"https://nix-gaming.cachix.org" "https://nix-gaming.cachix.org"
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
]; ];
}; };
}; };
} }

View file

@ -16,13 +16,13 @@
swaynotificationcenter swaynotificationcenter
libnotify libnotify
swww swww
#wofi
hyprpicker hyprpicker
networkmanagerapplet networkmanagerapplet
hyprlock hyprlock
wlogout wlogout
hypridle hypridle
pavucontrol qpwgraph
pwvucontrol
brightnessctl brightnessctl
satty satty
grim grim

View file

@ -1,180 +1,180 @@
{ pkgs, lib, hwconfig, ... }: { pkgs, lib, hwconfig, ... }:
let let
battery = (import ./battery-status.nix {inherit pkgs; inherit hwconfig;}); battery = (import ./battery-status.nix {inherit pkgs; inherit hwconfig;});
in in
{ {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
#systemd.enable = true; #systemd.enable = true;
#window#waybar { #window#waybar {
# background: transparent; # background: transparent;
#border-bottom: none; #border-bottom: none;
#} #}
#${builtins.readFile "${pkgs.waybar}/etc/xdg/waybar/style.css"} #${builtins.readFile "${pkgs.waybar}/etc/xdg/waybar/style.css"}
style = '' style = ''
${builtins.readFile ./waybarstyle.css} ${builtins.readFile ./waybarstyle.css}
* { * {
font-size: 15px; font-size: 15px;
} }
'';
settings = [{
height = 36;
layer = "top";
position = "top";
tray = { spacing = 3; };
modules-center = [
#"hyprland/window"
"clock"
];
modules-left = [
"hyprland/workspaces"
# "hyprland/window"
];
modules-right = [
"pulseaudio"
#"network"
#"cpu"
#"memory"
#"temperature"
"hyprland/language"
] ++ lib.optional battery.available "custom/battery"
++ [
"tray"
"custom/notification"
#"custom/disablehypridle"
"custom/power"
];
battery = {
format = " {time} {icon} ";
format-alt = " {capacity}% {icon} ";
format-charging = " {capacity}% ";
format-icons = [ "" "" "" "" "" ];
format-plugged = " {capacity}% ";
states = {
critical = 10;
warning = 20;
};
};
"custom/battery" = {
exec ="${pkgs.writeShellScriptBin "battery-widget" ''
${battery.labelAdaptive}
${battery.labelPercent}
''}/bin/battery-widget";
interval = 20;
tooltip = true;
};
clock = {
format-alt = "{:%d-%m-%Y}";
tooltip-format = "{:%d-%m-%Y | %H:%M}";
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
"hyprland/language" = {
format = " {}";
};
memory = { format = "{}% "; };
network = {
interval = 1;
format-alt = "{ifname}: {ipaddr}/{cidr}";
format-disconnected = "Disconnected ";
format-ethernet = "{ifname}: {ipaddr}/{cidr} up: {bandwidthUpBits} down: {bandwidthDownBits}";
format-linked = "{ifname} (No IP) ";
#format-wifi = "{signalStrength}% ";
format-wifi = "{signalStrength}% ";
tooltip-format = "{essid} ({signalStrength}%) ";
};
pulseaudio = {
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-icons = {
car = "";
default = [ "" "" "" ];
handsfree = "";
headphones = "";
headset = "";
phone = "";
portable = "";
};
format-muted = " {format_source}";
format-source = "{volume}% ";
format-source-muted = "";
on-click = "pavucontrol";
};
"hyprland/submap" = { format = ''<span style="italic">{}</span>''; };
temperature = {
critical-threshold = 80;
format = "{temperatureC}°C {icon}";
format-icons = [ "" "" "" ];
};
"hyprland/workspaces" = {
disable-scroll = true;
all-outputs = true;
warp-on-scroll = true;
format = "{name}{icon}";
format-icons = {
urgent = "";
active = "";
default = "";
};
#persistent-workspaces = {
# "*" = 3;
#};
};
"custom/power" = {
format = " ";
tooltip = false;
#menu = "on-click";
#menu-file = ./power_menu.xml;
#menu-actions = {
# shutdown = "shutdown -h now";
# reboot = "reboot";
# suspend = "systemctl suspend";
# hibernate = "systemctl hibernate";
#};
on-click = "wlogout";
};
"custom/notification" = {
tooltip = false;
format = "{icon}";
format-icons = {
notification = " <span foreground='red'><small><sup></sup></small></span>";
none = " ";
dnd-notification = " <span foreground='red'><small><sup></sup></small></span>";
dnd-none = " ";
};
return-type = "json";
exec-if = "which swaync-client";
exec = "swaync-client -swb";
on-click = "sleep 0.1 && swaync-client -t -sw";
on-click-right = "sleep 0.1 && swaync-client -d -sw";
escape = true;
};
"custom/disablehypridle" = {
exec = ''
if pgrep -x "hypridle" > /dev/null; then
echo "{\"text\": \" \", \"tooltip\": \"Hypridle is running\", \"class\": \"active\"}";
else
echo "{\"text\": \" \", \"tooltip\": \"Hypridle is not running\", \"class\": \"inactive\"}";
fi
''; '';
return-type = "json"; settings = [{
on-click = '' height = 36;
if pgrep -x "hypridle" > /dev/null; then layer = "top";
pkill hypridle position = "top";
else tray = { spacing = 3; };
hypridle & modules-center = [
fi #"hyprland/window"
''; "clock"
}; ];
}]; modules-left = [
"hyprland/workspaces"
# "hyprland/window"
];
modules-right = [
"pulseaudio"
#"network"
#"cpu"
#"memory"
#"temperature"
"hyprland/language"
] ++ lib.optional battery.available "custom/battery"
++ [
"tray"
"custom/notification"
#"custom/disablehypridle"
"custom/power"
];
battery = {
format = " {time} {icon} ";
format-alt = " {capacity}% {icon} ";
format-charging = " {capacity}% ";
format-icons = [ "" "" "" "" "" ];
format-plugged = " {capacity}% ";
states = {
critical = 10;
warning = 20;
};
};
"custom/battery" = {
exec ="${pkgs.writeShellScriptBin "battery-widget" ''
${battery.labelAdaptive}
${battery.labelPercent}
''}/bin/battery-widget";
interval = 20;
tooltip = true;
};
clock = {
format-alt = "{:%d-%m-%Y}";
tooltip-format = "{:%d-%m-%Y | %H:%M}";
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
"hyprland/language" = {
format = " {}";
};
memory = { format = "{}% "; };
network = {
interval = 1;
format-alt = "{ifname}: {ipaddr}/{cidr}";
format-disconnected = "Disconnected ";
format-ethernet = "{ifname}: {ipaddr}/{cidr} up: {bandwidthUpBits} down: {bandwidthDownBits}";
format-linked = "{ifname} (No IP) ";
#format-wifi = "{signalStrength}% ";
format-wifi = "{signalStrength}% ";
tooltip-format = "{essid} ({signalStrength}%) ";
};
pulseaudio = {
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-icons = {
car = "";
default = [ "" "" "" ];
handsfree = "";
headphones = "";
headset = "";
phone = "";
portable = "";
};
format-muted = " {format_source}";
format-source = "{volume}% ";
format-source-muted = "";
on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol";
};
"hyprland/submap" = { format = ''<span style="italic">{}</span>''; };
temperature = {
critical-threshold = 80;
format = "{temperatureC}°C {icon}";
format-icons = [ "" "" "" ];
};
"hyprland/workspaces" = {
disable-scroll = true;
all-outputs = false;
warp-on-scroll = true;
format = "{name}{icon} ";
format-icons = {
urgent = "";
active = "";
default = "";
};
#persistent-workspaces = {
# "*" = 3;
#};
};
"custom/power" = {
format = " ";
tooltip = false;
#menu = "on-click";
#menu-file = ./power_menu.xml;
#menu-actions = {
# shutdown = "shutdown -h now";
# reboot = "reboot";
# suspend = "systemctl suspend";
# hibernate = "systemctl hibernate";
#};
on-click = "wlogout";
};
"custom/notification" = {
tooltip = false;
format = "{icon}";
format-icons = {
notification = " <span foreground='red'><small><sup></sup></small></span>";
none = " ";
dnd-notification = " <span foreground='red'><small><sup></sup></small></span>";
dnd-none = " ";
};
return-type = "json";
exec-if = "which swaync-client";
exec = "swaync-client -swb";
on-click = "sleep 0.1 && swaync-client -t -sw";
on-click-right = "sleep 0.1 && swaync-client -d -sw";
escape = true;
};
"custom/disablehypridle" = {
exec = ''
if pgrep -x "hypridle" > /dev/null; then
echo "{\"text\": \" \", \"tooltip\": \"Hypridle is running\", \"class\": \"active\"}";
else
echo "{\"text\": \" \", \"tooltip\": \"Hypridle is not running\", \"class\": \"inactive\"}";
fi
'';
return-type = "json";
on-click = ''
if pgrep -x "hypridle" > /dev/null; then
pkill hypridle
else
hypridle &
fi
'';
};
}];
}; };
} }