добавил приколов, поменял структуру

This commit is contained in:
andrei
2026-05-12 20:24:34 +07:00
parent 186d0929a5
commit 84b1ed2677
20 changed files with 1391 additions and 1179 deletions
-4
View File
@@ -1,4 +0,0 @@
{ inputs, ...}: {
imports = [ inputs.flake-parts.flakeModules.modules ];
systems = [ "x86_64-linux" ];
}
-20
View File
@@ -1,20 +0,0 @@
{ inputs, self, ... }:{
flake.nixosModules.home-manager = {
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs self; };
backupCommand = "rm";
# пользователь хоме манагера
users.${self.user} = {
home.stateVersion = "26.05";
programs.home-manager.enable = true;
};
};
};
}
+76 -87
View File
@@ -1,105 +1,94 @@
# сам конфиг ---------------------------------------------------------------------------------
{ self, ... }:
{flake.nixosModules.nixxx = { pkgs, ... }: {
{
flake.nixosModules.nixxx =
{ pkgs, ... }:
{
# пользовательский аккаунт
users.users.${self.user} = {
# группы пользователя
extraGroups = [ "wheel" ];
isNormalUser = true;
# пользовательский аккаунт
users.users.${self.user} = {
# группы пользователя
extraGroups = [ "wheel" ];
isNormalUser = true;
# личные пакеты пользователя
packages = with pkgs; [
tree
];
};
# личные пакеты пользователя
packages = with pkgs; [
tree
];
};
# подключение модулей
imports = [
# железо
self.nixosModules.nixxxHardware
# разрешить несвободное ПО
nixpkgs.config.allowUnfree = true;
# тут простые программки
self.nixosModules.base
# тут програмки описанные через flakes
self.nixosModules.fastfetch
self.nixosModules.home-manager
#self.nixosModules.vscode
# hostname
networking.hostName = "${self.hostname}";
# тут графические окружения
self.nixosModules.niri
self.nixosModules.xfcerdp
];
# timezone
time.timeZone = "Asia/Krasnoyarsk";
# разрешить несвободное ПО
nixpkgs.config.allowUnfree = true;
# языки
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "ru_RU.UTF-8";
LC_IDENTIFICATION = "ru_RU.UTF-8";
LC_MEASUREMENT = "ru_RU.UTF-8";
LC_MONETARY = "ru_RU.UTF-8";
LC_NAME = "ru_RU.UTF-8";
LC_NUMERIC = "ru_RU.UTF-8";
LC_PAPER = "ru_RU.UTF-8";
LC_TELEPHONE = "ru_RU.UTF-8";
LC_TIME = "ru_RU.UTF-8";
};
# hostname
networking.hostName = "nixos";
# загрузчик
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
# timezone
time.timeZone = "Asia/Krasnoyarsk";
# системные хуйнюшки ---------------------------------------------------------------------------------
# Enable flakes.
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# языки
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "ru_RU.UTF-8";
LC_IDENTIFICATION = "ru_RU.UTF-8";
LC_MEASUREMENT = "ru_RU.UTF-8";
LC_MONETARY = "ru_RU.UTF-8";
LC_NAME = "ru_RU.UTF-8";
LC_NUMERIC = "ru_RU.UTF-8";
LC_PAPER = "ru_RU.UTF-8";
LC_TELEPHONE = "ru_RU.UTF-8";
LC_TIME = "ru_RU.UTF-8";
};
# Enable store optimization on every rebuild.
nix.settings.auto-optimise-store = true;
# загрузчик
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
# Enable automatic garbace collection.
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
# системные хуйнюшки ---------------------------------------------------------------------------------
# Enable flakes.
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
# Enable store optimization on every rebuild.
nix.settings.auto-optimise-store = true;
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable automatic garbace collection.
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
# Enable bluetooth.
hardware.bluetooth.enable = true;
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
# Enable sound.
services.pipewire = {
enable = true;
pulse.enable = true;
};
# Enable CUPS to print documents.
services.printing.enable = true;
# для ноутбуков
# Enable TLP.
/*
services.tlp = {
enable = true;
settings = {
# Improve performance on battery.
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_performance";
PLATFORM_PROFILE_ON_BAT = "performance";
};
};
*/
# Enable bluetooth.
hardware.bluetooth.enable = true;
# Enable sound.
services.pipewire = {
enable = true;
pulse.enable = true;
};
# для ноутбуков
# Enable TLP.
/*services.tlp = {
enable = true;
settings = {
# Improve performance on battery.
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_performance";
PLATFORM_PROFILE_ON_BAT = "performance";
system.stateVersion = "25.11"; # Did you read the comment?
};
};*/
system.stateVersion = "25.11"; # Did you read the comment?
};}
}
+6 -2
View File
@@ -2,6 +2,10 @@
{ inputs, self, ... }:
{
flake.nixosConfigurations.nixos = inputs.nixpkgs.lib.nixosSystem {
modules = [ self.nixosModules.nixxx ];
modules = [
self.nixosModules.nixxx # sys config
self.nixosModules.nixxxHardware # hardware
self.nixosModules.connect_programs # programs
];
};
}
}
+37 -25
View File
@@ -1,33 +1,45 @@
/*
системные настройки через команду надо взять конфиг
*/
/*
системные настройки через команду надо взять конфиг
*/
# nixos-generate-config --show-hardware-config
{ self, ... }:
{ ... }:
{
flake.nixosModules.nixxxHardware = { config, lib, pkgs, modulesPath, ... }: {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
flake.nixosModules.nixxxHardware =
{ lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
# какие модули ядра будут загружены
boot.initrd.availableKernelModules = [ "ata_piix" "mptspi" "uhci_hcd" "ehci_pci" "ahci" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
# какие модули ядра будут загружены
boot.initrd.availableKernelModules = [
"ata_piix"
"mptspi"
"uhci_hcd"
"ehci_pci"
"ahci"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
# модули для вмваре
services.xserver.videoDrivers = [ "vmware" ];
virtualisation.vmware.guest.enable = true;
hardware.graphics.enable = true;
# модули для вмваре
services.xserver.videoDrivers = [ "vmware" ];
virtualisation.vmware.guest.enable = true;
hardware.graphics.enable = true;
# диски
fileSystems."/" = {
device = "/dev/disk/by-uuid/d0270880-39ef-4ae8-8701-87606a0d4578";
fsType = "ext4";
# диски
fileSystems."/" = {
device = "/dev/disk/by-uuid/d0270880-39ef-4ae8-8701-87606a0d4578";
fsType = "ext4";
};
swapDevices = [
{ device = "/dev/disk/by-uuid/b5ad4e1d-8495-4ebc-be6b-b8be539d0ac1"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
};
swapDevices = [
{ device = "/dev/disk/by-uuid/b5ad4e1d-8495-4ebc-be6b-b8be539d0ac1"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
};
}
-36
View File
@@ -1,36 +0,0 @@
{ self, ... }:
{flake.nixosModules.base = { pkgs, ... }: {
imports = [
# простые конфиги для программ тут
self.nixosModules.kitty
self.nixosModules.git
self.nixosModules.bash
self.nixosModules.vscode
self.nixosModules.firefox
];
# программы для всей системы
environment.systemPackages = with pkgs; [
gnome-clocks
kdePackages.okular
kdePackages.partitionmanager
telegram-desktop
vesktop
mc
btop
htop
yandex-music
vmware-workstation
];
# шрифты
fonts.packages = with pkgs; [
ibm-plex
nerd-fonts.jetbrains-mono
];
};
flake = {
user = "andrei";
};
}
+44
View File
@@ -0,0 +1,44 @@
{ self, ... }:
{
flake.nixosModules.connect_programs =
{ pkgs, ... }:
{
imports = [
# конфиги для программ тут
self.nixosModules.kitty
self.nixosModules.git
self.nixosModules.bash
self.nixosModules.vscode
self.nixosModules.firefox
self.nixosModules.fastfetch
self.nixosModules.starship
self.nixosModules.home-manager # хуй знает где этот модуль
# тут графические окружения
self.nixosModules.niri
self.nixosModules.xfcerdp
];
# программы для всей системы
environment.systemPackages = with pkgs; [
gnome-clocks
kdePackages.okular
kdePackages.partitionmanager
telegram-desktop
vesktop
mc
btop
htop
yandex-music
vmware-workstation
(callPackage ../../pkgs/assistant.nix { }) # ассистент
];
# шрифты
fonts.packages = with pkgs; [
ibm-plex
nerd-fonts.jetbrains-mono
];
};
}
+31 -20
View File
@@ -1,26 +1,37 @@
{ self, pkgs, ... }: {
flake.nixosModules.firefox = { pkgs, ... }: {
home-manager.users.${self.user} = {
programs.firefox = {
enable = true;
profiles.${self.user} = {
isDefault = true;
# Настройки (about:config)
settings = {
"browser.startup.homepage" = "https://google.com";
"browser.search.region" = "RU";
"intl.accept_languages" = "ru-ru,ru,en-us,en";
{ self, ... }:
{
flake.nixosModules.firefox =
{ ... }:
{
home-manager.users.${self.user} = {
programs.firefox = {
enable = true;
profiles.${self.user} = {
isDefault = true;
# Настройки (about:config)
settings = {
"browser.startup.homepage" = "https://google.com";
"browser.search.region" = "RU";
"intl.accept_languages" = "ru-ru,ru,en-us,en";
};
};
policies.ExtensionSettings = {
"446900e4-71c2-419f-a6a7-df9c091e268b" = {
# Bitwarden
installation_mode = "force_installed";
install_url = "https://mozilla.org";
};
"{d7740338-7013-41f2-959c-687f3b890947}" = {
# Vimium
installation_mode = "force_installed";
install_url = "https://mozilla.org";
};
};
# Расширения
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
bitwarden
vimium
];
};
};
};
};
}
+13 -10
View File
@@ -1,16 +1,19 @@
# настройки гита
{ self, ... }: {
{ self, ... }:
{
flake.nixosModules.git = {
home-manager.users.${self.user}.imports = [{
programs.git = {
enable = true;
settings = {
user = {
name = "andre";
email = "vaylinnnn6@gmail.com";
home-manager.users.${self.user}.imports = [
{
programs.git = {
enable = true;
settings = {
user = {
name = "${self.user}";
email = "${self.mail}";
};
};
};
};
}];
}
];
};
}
+25 -31
View File
@@ -1,36 +1,30 @@
{ self, ... }:
{
flake.nixosModules.kitty = { config, lib, ... }: {
options = {
kitty.wal = {
enable = lib.mkOption {
default = false;
type = lib.types.bool;
};
flake.nixosModules.kitty =
{ ... }:
{
config = {
home-manager.users.${self.user}.imports = [
{
programs.kitty = {
enable = true;
font = {
name = "${self.font.mono}";
size = 13;
};
settings = {
confirm_os_window_close = 0;
remember_window_size = "no";
};
extraConfig = ''
include ~/.cache/wal/colors-kitty.conf
background_opacity 0.8
'';
};
}
];
};
};
config = {
home-manager.users.${self.user}.imports = [
{
programs.kitty = {
enable = true;
font = {
name = "${self.font.mono}";
size = 13;
};
settings = {
confirm_os_window_close = 0;
remember_window_size = "no";
};
extraConfig = lib.mkIf config.kitty.wal.enable ''
include ~/.cache/wal/colors-kitty.conf
background_opacity 0.8
'';
themeFile = lib.mkIf (!config.kitty.wal.enable) "Catppuccin-Mocha";
};
}
];
};
};
}
+74 -72
View File
@@ -1,87 +1,89 @@
{ self, ... }: {
flake.nixosModules.matugen = { pkgs, lib, ... }:
{
imports = [
self.nixosModules.bash
];
home-manager.users.${self.user}.imports = [
{
home.packages = with pkgs; [
matugen
kdePackages.breeze
kdePackages.qt6ct
killall
libsForQt5.qt5ct
{ self, ... }:
{
flake.nixosModules.matugen =
{ pkgs, lib, ... }:
{
imports = [
self.nixosModules.bash
];
xdg.configFile = {
"matugen/config.toml" = {
text = /* toml */ ''
[config]
[templates.gtk3]
input_path = '${builtins.toString ./templates/gtk-colors.css}'
output_path = '~/.config/gtk-3.0/colors.css'
home-manager.users.${self.user}.imports = [
{
home.packages = with pkgs; [
matugen
kdePackages.breeze
kdePackages.qt6ct
killall
libsForQt5.qt5ct
];
[templates.gtk4]
input_path = '${builtins.toString ./templates/gtk-colors.css}'
output_path = '~/.config/gtk-4.0/colors.css'
xdg.configFile = {
"matugen/config.toml" = {
text = /* toml */ ''
[config]
[templates.gtk3]
input_path = '${toString ./templates/gtk-colors.css}'
output_path = '~/.config/gtk-3.0/colors.css'
[templates.color-scheme]
input_path = '${builtins.toString ./templates/Matugen.colors}'
output_path = '~/.local/share/color-schemes/Matugen.colors'
[templates.gtk4]
input_path = '${toString ./templates/gtk-colors.css}'
output_path = '~/.config/gtk-4.0/colors.css'
[templates.qt5ct]
input_path = '${builtins.toString ./templates/qtct-colors.conf}'
output_path = '~/.config/qt5ct/colors/matugen.conf'
[templates.color-scheme]
input_path = '${toString ./templates/Matugen.colors}'
output_path = '~/.local/share/color-schemes/Matugen.colors'
[templates.qt6ct]
input_path = '${builtins.toString ./templates/qtct-colors.conf}'
output_path = '~/.config/qt6ct/colors/matugen.conf'
[templates.qt5ct]
input_path = '${toString ./templates/qtct-colors.conf}'
output_path = '~/.config/qt5ct/colors/matugen.conf'
[templates.niri]
input_path = '${builtins.toString ./templates/niri-colors.kdl}'
output_path = '~/.config/niri/colors.kdl'
[templates.qt6ct]
input_path = '${toString ./templates/qtct-colors.conf}'
output_path = '~/.config/qt6ct/colors/matugen.conf'
[templates.waybar]
input_path = '${builtins.toString ./templates/colors.css}'
output_path = '~/.config/waybar/colors.css'
'';
};
[templates.niri]
input_path = '${toString ./templates/niri-colors.kdl}'
output_path = '~/.config/niri/colors.kdl'
"kdeglobals" = {
text = ''
[UiSettings]
ColorScheme=Matugen
'';
};
};
[templates.waybar]
input_path = '${toString ./templates/colors.css}'
output_path = '~/.config/waybar/colors.css'
'';
};
qt = {
enable = true;
platformTheme.name = lib.mkForce "qt6ct";
qt5ctSettings = {
Appearance = {
color_scheme_path = "/home/${self.user}/.config/qt5ct/colors/matugen.conf";
custom_palette = true;
"kdeglobals" = {
text = ''
[UiSettings]
ColorScheme=Matugen
'';
};
};
};
qt6ctSettings = {
Appearance = {
color_scheme_path = "/home/${self.user}/.config/qt5ct/colors/matugen.conf";
custom_palette = true;
qt = {
enable = true;
platformTheme.name = lib.mkForce "qt6ct";
qt5ctSettings = {
Appearance = {
color_scheme_path = "/home/${self.user}/.config/qt5ct/colors/matugen.conf";
custom_palette = true;
};
};
qt6ctSettings = {
Appearance = {
color_scheme_path = "/home/${self.user}/.config/qt5ct/colors/matugen.conf";
custom_palette = true;
};
};
};
};
};
gtk = {
enable = true;
gtk4.extraCss = "@import 'colors.css';";
gtk3.extraCss = "@import 'colors.css';";
};
}
];
};
gtk = {
enable = true;
gtk4.extraCss = "@import 'colors.css';";
gtk3.extraCss = "@import 'colors.css';";
};
}
];
};
}
+119
View File
@@ -0,0 +1,119 @@
{ self, lib, ... }:
{
flake.nixosModules.starship = {
home-manager.users.${self.user}.imports = [
{
programs = {
starship = {
enable = true;
enableBashIntegration = true;
settings = lib.mkDefault {
format = lib.concatStrings [
"$username"
"$hostname"
"$directory"
"$git_branch"
"$git_state"
"$git_status"
"$cmd_duration"
"$line_break"
"$shlvl"
"$nix_shell"
"$python"
"$character"
];
shlvl = {
disabled = false;
threshold = 3;
symbol = "";
style = "bright-red bold";
};
username = {
disabled = false;
show_always = true;
style_user = "bright-white bold";
style_root = "bright-red bold";
format = "[$user]($style)";
};
hostname = {
ssh_only = false;
style = "bright-green bold"; # Можно выбрать любой цвет
format = "[@$hostname]($style) "; # Пробел в конце, чтобы не слипалось с директорией
};
directory = {
style = "blue";
truncation_length = 0;
truncate_to_repo = false;
format = "[$path]($style)[$read_only]($read_only_style) "; # Убираем "at" или "in" перед путем
};
character = {
success_symbol = "[](purple)";
error_symbol = "[](red)";
vimcmd_symbol = "[](green)";
};
git_branch = {
# Скобки стоят снаружи стилевой разметки, так они точно отобразятся
format = "($symbol$branch )";
style = "bright-black";
symbol = "branch:"; # Выносим текст "branch:" в символ, чтобы было чище
};
git_status = {
# Убедитесь, что формат включает нужные переменные
format = "([$all_status$ahead_behind]($style) )";
style = "bold red";
# Вместо пробелов ставим понятные символы
conflicted = "="; # Конфликты
ahead = ""; # Ветка впереди удаленной
behind = ""; # Ветка отстает
diverged = ""; # Расхождение веток
untracked = "?"; # Новые файлы (не в индексе)
modified = "!"; # Измененные файлы
staged = "+"; # Файлы в индексе (готовы к коммиту)
renamed = "»"; # Переименованные
deleted = ""; # Удаленные
stashed = ""; # Спрятанные изменения (stash)
};
git_state = {
format = "([$state( $progress_current/$progress_total)]($style)) ";
style = "bold yellow";
};
cmd_duration = {
format = "took [ $duration]($style) ";
style = "yellow";
};
python = {
# Добавляем символ змеи и версию Python
symbol = "🐍 ";
#format = "via [$symbol$virtualenv]($style) ";
style = "bold yellow"; # Желтый — классический цвет Python
# Если хотите видеть и версию интерпретатора (например, 3.11)
format = "via [$symbol$virtualenv]($style) [($version)]($style) ";
};
nix_shell = {
symbol = " ";
format = "via [$symbol$name]($style) ";
style = "bold blue";
};
};
};
};
}
];
};
}
+39 -36
View File
@@ -1,46 +1,49 @@
{ self, pkgs, ... }:
{ self, ... }:
{
flake.nixosModules.vscode = { pkgs, ... }: {
home-manager.users.${self.user} = {
programs.vscode = {
enable = true;
package = pkgs.vscode;
flake.nixosModules.vscode =
{ pkgs, ... }:
{
home-manager.users.${self.user} = {
programs.vscode = {
enable = true;
package = pkgs.vscode;
profiles.default = {
# расширения
extensions = with pkgs.vscode-extensions; [
bbenoist.nix # Подсветка Nix
jnoortheen.nix-ide # LSP для Nix
christian-kohler.path-intellisenseв
oracle.sql-developer # sql
ms-python.python
];
profiles.default = {
# расширения
extensions = with pkgs.vscode-extensions; [
bbenoist.nix # Подсветка Nix
jnoortheen.nix-ide # LSP для Nix
christian-kohler.path-intellisense
ms-python.python
];
# настройки
userSettings = {
"editor.fontSize" = 14;
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'monospace'";
"workbench.colorTheme" = "Gruvbox Dark Hard";
"editor.formatOnSave" = true;
"window.titleBarStyle" = "custom";
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${pkgs.nixd}/bin/nixd";
"nix.serverSettings" = {
"nixd" = {
"formatting" = { "command" = [ "${pkgs.nixfmt-rfc-style}/bin/nixfmt" ]; };
# настройки
userSettings = {
"editor.fontSize" = 14;
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'monospace'";
"workbench.colorTheme" = "Gruvbox Dark Hard";
"editor.formatOnSave" = true;
"window.titleBarStyle" = "custom";
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${pkgs.nixd}/bin/nixd";
"nix.serverSettings" = {
"nixd" = {
"formatting" = {
"command" = [ "${pkgs.nixfmt-rfc-style}/bin/nixfmt" ];
};
};
};
};
};
# бинды
keybindings = [
{
key = "ctrl+s";
command = "workbench.action.files.save";
}
];
# бинды
keybindings = [
{
key = "ctrl+s";
command = "workbench.action.files.save";
}
];
};
};
};
};
};
}
+1 -1
View File
@@ -55,7 +55,7 @@ input {
// автофокус при наведении мышки
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
focus-follows-mouse max-scroll-amount="95%"
focus-follows-mouse max-scroll-amount="90%"
}
//###########################
+132 -130
View File
@@ -1,145 +1,147 @@
{ self, ... }:
{flake.nixosModules.niri = { pkgs, lib, config, ... }: {
imports = [
# управляет цветвми под обои
self.nixosModules.matugen
# панельки и тд
self.nixosModules.noctalia
];
{
flake.nixosModules.niri =
{
pkgs,
...
}:
{
imports = [
# управляет цветами под обои
self.nixosModules.matugen
# панельки и тд
self.nixosModules.noctalia
];
# включить програмки для этой сессии
kitty.wal.enable = true;
programs.niri.enable = true;
programs.niri.enable = true;
# логин-менеджер
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
};
# автомонтирование флешек
services.udisks2.enable = true;
# корзина и тд для проводника
services.gvfs.enable = true;
# пакеты для нири
environment.systemPackages = with pkgs; [
brightnessctl
eog
gnome-themes-extra
kdePackages.breeze
kdePackages.breeze-icons
kdePackages.dolphin
kdePackages.kcalc
mpv
nautilus
pywal
wl-clipboard
xwayland-satellite
];
home-manager.users.${self.user} = { config, ... }: {
# лаунчер приложений
programs.rofi = {
enable = true;
font = "${self.font.mono} 18";
extraConfig = {
kb-row-up = "Up";
kb-row-down = "Down";
kb-accept-entry = "Control+m,Return,KP_Enter";
kb-remove-to-eol = "Control+Shift+e";
kb-mode-next = "Shift+Right,Control+Tab,Control+l";
kb-mode-previous = "Shift+Left,Control+Shift+Tab,Control+h";
kb-mode-complete = "";
kb-remove-char-back = "BackSpace";
# логин-менеджер
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
};
theme = "~/.cache/wal/colors-rofi-dark.rasi";
};
# всплывающее окно аутентификации
services.polkit-gnome.enable = true;
systemd.user.services.polkit-gnome = {
Service = {
Restart = "on-failure";
RestartSec = 1;
};
Unit = {
StartLimitIntervalSec = 30;
StartLimitBurst = 10;
};
};
# автомонтирование флешек
services.udisks2.enable = true;
# корзина и тд для проводника
services.gvfs.enable = true;
# привязка конфига нири
xdg.configFile."niri/config.kdl".source = ./config.kdl;
# пакеты для нири
environment.systemPackages = with pkgs; [
brightnessctl
eog
gnome-themes-extra
kdePackages.breeze
kdePackages.breeze-icons
kdePackages.dolphin
kdePackages.kcalc
mpv
nautilus
pywal
wl-clipboard
xwayland-satellite
];
# Write custom config file.
#xdg.configFile."niri/config-nix.kdl".text = /* kdl */ ''
# window-rule {
# geometry-corner-radius ${self.border.main}
# }
#'';
home-manager.users.${self.user} =
{ ... }:
{
# приложения по умолчанию
xdg.mimeApps = {
enable = true;
defaultApplications = let
imageViewer = "org.gnome.eog.desktop";
documentViewer = "org.kde.okular.desktop";
videoViewer = "mpv.desktop";
in {
"image/png" = imageViewer;
"image/jpg" = imageViewer;
"image/jpeg" = imageViewer;
"document/pdf" = documentViewer;
"video/mp4" = videoViewer;
"video/webm" = videoViewer;
};
};
# лаунчер приложений
programs.rofi = {
enable = true;
font = "${self.font.mono} 18";
extraConfig = {
kb-row-up = "Up";
kb-row-down = "Down";
kb-accept-entry = "Control+m,Return,KP_Enter";
kb-remove-to-eol = "Control+Shift+e";
kb-mode-next = "Shift+Right,Control+Tab,Control+l";
kb-mode-previous = "Shift+Left,Control+Shift+Tab,Control+h";
kb-mode-complete = "";
kb-remove-char-back = "BackSpace";
};
theme = "~/.cache/wal/colors-rofi-dark.rasi";
};
# Set cursor theme.
home.file.".icons/default".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic";
# всплывающее окно аутентификации
services.polkit-gnome.enable = true;
systemd.user.services.polkit-gnome = {
Service = {
Restart = "on-failure";
RestartSec = 1;
};
Unit = {
StartLimitIntervalSec = 30;
StartLimitBurst = 10;
};
};
# Set dark theme for GTK programs.
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
# привязка конфига нири
xdg.configFile."niri/config.kdl".source = ./config.kdl;
# Set GTK theme.
gtk = {
enable = true;
gtk4.theme = null;
theme = {
name = "adw-gtk3-dark";
package = pkgs.adw-gtk3;
};
cursorTheme = {
name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors;
size = 20;
};
font = {
name = "${self.font.mono}";
size = 13;
};
};
# приложения по умолчанию
xdg.mimeApps = {
enable = true;
defaultApplications =
let
imageViewer = "org.gnome.eog.desktop";
documentViewer = "org.kde.okular.desktop";
videoViewer = "mpv.desktop";
in
{
"image/png" = imageViewer;
"image/jpg" = imageViewer;
"image/jpeg" = imageViewer;
"document/pdf" = documentViewer;
"video/mp4" = videoViewer;
"video/webm" = videoViewer;
};
};
# Make QT follow GTK theme.
qt = {
enable = true;
platformTheme.name = "gtk3";
# Set cursor theme.
home.file.".icons/default".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic";
qt5ctSettings = {
Fonts = {
fixed = "\"${self.font.mono},13\"";
general = "\"${self.font.mono},13\"";
# Set dark theme for GTK programs.
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
# Set GTK theme.
gtk = {
enable = true;
gtk4.theme = null;
theme = {
name = "adw-gtk3-dark";
package = pkgs.adw-gtk3;
};
cursorTheme = {
name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors;
size = 20;
};
font = {
name = "${self.font.mono}";
size = 13;
};
};
# Make QT follow GTK theme.
qt = {
enable = true;
platformTheme.name = "gtk3";
qt5ctSettings = {
Fonts = {
fixed = "\"${self.font.mono},13\"";
general = "\"${self.font.mono},13\"";
};
};
qt6ctSettings = {
Fonts = {
fixed = "\"${self.font.mono},13\"";
general = "\"${self.font.mono},13\"";
};
};
};
};
};
qt6ctSettings = {
Fonts = {
fixed = "\"${self.font.mono},13\"";
general = "\"${self.font.mono},13\"";
};
};
};
};
};}
}
File diff suppressed because it is too large Load Diff
-20
View File
@@ -1,20 +0,0 @@
{ self, ... }:
let
wallpaper = "/home/${self.user}/Pictures/romashki.jpg";
font = {
mono = "JetBrainsMonoNerdFontMono";
propo = "JetBrainsMonoNerdFontPropo";
};
border = {
main = "12";
small = "8";
};
in {
flake = {
inherit font;
inherit wallpaper;
inherit border;
};
}
+48
View File
@@ -0,0 +1,48 @@
{ inputs, self, ... }:
let
wallpaper = "/home/${self.user}/Pictures/romashki.jpg";
font = {
mono = "JetBrainsMonoNerdFontMono";
propo = "JetBrainsMonoNerdFontPropo";
};
border = {
main = "12";
small = "8";
};
in
{
# тут переменные
flake = {
inherit font;
inherit wallpaper;
inherit border;
user = "andrei";
mail = "vaylinnnn6@gmail.com";
hostname = "nixos";
};
imports = [ inputs.flake-parts.flakeModules.modules ];
systems = [ "x86_64-linux" ];
flake.nixosModules.home-manager = {
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs self; };
backupCommand = "rm";
# пользователь хоме манагера
users.${self.user} = {
home.stateVersion = "26.05";
programs.home-manager.enable = true;
};
};
};
}
Binary file not shown.
+59
View File
@@ -0,0 +1,59 @@
{ pkgs }:
pkgs.stdenv.mkDerivation {
pname = "assistant";
version = "1.0";
src = ./assistant.deb;
nativeBuildInputs = [
pkgs.dpkg
pkgs.autoPatchelfHook
];
buildInputs = with pkgs; [
glibc
gcc.cc.lib
libz
libx11
libXext
libXrender
libXtst
libXi
libXfixes
libXft
glib
pango
cairo
atk
gdk-pixbuf
gtk2
dbus
fontconfig
freetype
nss
nspr
alsa-lib
# НОВЫЕ ЗАВИСИМОСТИ ИЗ ЛОГА:
pipewire # для libpipewire-0.3.so.0
libpulseaudio # для libpulse.so.0 и libpulse-simple.so.0
sqlite # на всякий случай, был в логах
];
unpackPhase = "dpkg-deb -x $src .";
installPhase = ''
mkdir -p $out
if [ -d "usr" ]; then
cp -r usr/* $out/
else
cp -r * $out/
fi
# Создаем бинарник в системном пути
mkdir -p $out/bin
if [ -f "$out/opt/assistant/bin/assistant" ]; then
ln -s $out/opt/assistant/bin/assistant $out/bin/assistant
fi
'';
}