refactoring, added intelnuc

This commit is contained in:
Your Name 2024-02-26 03:55:27 +03:00
parent 7174861453
commit 82b202e684
26 changed files with 1421 additions and 1725 deletions

View file

@ -1,342 +0,0 @@
# 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).
{ inputs, unstable, config, pkgs, ... }:
{
nix.settings.experimental-features = [ "flakes" "nix-command" ];
nix.settings.auto-optimise-store = true;
environment.sessionVariables = {
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
NIXOS_OZONE_WL = "1";
};
environment.etc."wireplumber/main.lua.d/99-enable-soft-mixer.lua".text = ''
-- alsa_monitor.rules[1].apply_properties["api.alsa.use-acp"] = true;
'';
programs.hyprland.enable = true;
boot.kernel.sysctl."kernel.sysrq" = 1;
users.users.socks = {
group = "socks";
isSystemUser = true;
};
users.groups.socks = {};
systemd.services.singboxaus = {
enable = true;
description = "avoid censorship";
wantedBy = [ "multi-user.target" ];
serviceConfig = { Restart = "on-failure"; RestartSec = "15"; User = "socks"; Group = "socks"; };
script = "sing-box run -c /etc/sing-box/config.json";
path = with unstable; [ shadowsocks-libev shadowsocks-v2ray-plugin sing-box];
};
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.extraInstallCommands = ''
patch_slim7_ssdt=$(
${pkgs.coreutils}/bin/cp -f ${./slim7-ssdt} /boot/EFI/nixos/slim7-ssdt
for file in /boot/loader/entries/nixos-generation-*.conf; do
${pkgs.gnused}/bin/sed -i '0,/^initrd\s/{s/^initrd\s/initrd \/efi\/nixos\/slim7-ssdt\n&/}' "$file"
done
)
'';
boot.kernelParams = [
"rtc_cmos.use_acpi_alarm=1"
"ideapad_laptop.allow_v4_dytc=1"
"amd_pstate=active"
"initcall_blacklist=acpi_cpufreq_init"
"nowatchdog"
"amd_pstate.shared_mem=1"
];
boot.kernelModules = [ "amd-pstate" "acpi_call" ];
boot.loader.efi.canTouchEfiVariables = true;
powerManagement.enable = true;
services.power-profiles-daemon.enable = false;
#powerManagement.powertop.enable = true;
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "powersave";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 20;
CPU_SCALING_MAX_FREQ_ON_AC = 5500000;
CPU_SCALING_MAX_FREQ_ON_BAT = 1600000;
PLATFORM_PROFILE_ON_AC="balanced";
PLATFORM_PROFILE_ON_BAT="low-power";
#Trubo boost disable
CPU_BOOST_ON_AC=1;
CPU_BOOST_ON_BAT=0;
CPU_HWP_DYN_BOOST_ON_AC=1;
CPU_HWP_DYN_BOOST_ON_BAT=0;
#Optional helps save long term battery health
#START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
#STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
programs.firejail.enable = true;
security.wrappers = {
firejail = {
source = "${pkgs.firejail.out}/bin/firejail";
};
};
programs.command-not-found.enable = false;
programs.fish.enable = true;
programs.fish.promptInit = ''
set TERM "xterm-256color"
set fish_greeting
any-nix-shell fish --info-right | source
'';
users.defaultUserShell = pkgs.fish;
networking.hostName = "dlaptop"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Moscow";
# Select internationalisation properties.
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 the X11 windowing system.
services.xserver.enable = true;
#imports = [
# ./system/greetd.nix
#];
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.displayManager.defaultSession = "gnome";
services.xserver.displayManager.autoLogin = {
enable = true;
user = "delta";
};
services.xserver.desktopManager.gnome.enable = true;
#services.xserver.displayManager.sessionPackages = [ pkgs.gnome.gnome-session.sessions ]; #gnome without deps, remove gnome.enable
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
excludePackages = [ pkgs.xterm ];
};
services.gnome = {
gnome-browser-connector.enable = false;
gnome-initial-setup.enable = false;
gnome-online-accounts.enable = false;
};
#bluetooth
services.blueman.enable = true;
#thunar file manager
services.tumbler.enable = true;
services.gvfs.enable = true;
programs.thunar.enable = true;
programs.xfconf.enable = true;
programs.thunar.plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
#thunar-dropbox-plugin
#thunar-media-tags-plugin
];
services.udev.packages = [ pkgs.gnome.gnome-settings-daemon ];
programs.dconf.enable = true;
environment = {
#systemPackages = [ pkgs.gnome.dconf-editor pkgs.gnome.networkmanager-openconnect ] ++ [
# pkgs.alacritty # pkgs.gnome-console
# #pkgs.firefox # pkgs.gnome.epiphany
#];
gnome.excludePackages = [
#pkgs.gnome-connections
#pkgs.gnome-console
pkgs.gnome-text-editor
pkgs.gnome-tour
#pkgs.gnome.adwaita-icon-theme
pkgs.gnome.epiphany # browser
#pkgs.gnome.evince # pdf + office files
#pkgs.gnome.file-roller #archive explorer
pkgs.gnome.geary
pkgs.gnome.gnome-backgrounds
pkgs.gnome.gnome-calendar
pkgs.gnome.gnome-characters
pkgs.gnome.gnome-clocks
pkgs.gnome.gnome-contacts
pkgs.gnome.gnome-font-viewer
pkgs.gnome.gnome-logs
pkgs.gnome.gnome-maps
pkgs.gnome.gnome-music
#pkgs.gnome.gnome-themes-extra
pkgs.gnome.gnome-weather
#pkgs.gnome.nautilus
pkgs.gnome.simple-scan
pkgs.gnome.sushi
pkgs.gnome.totem
pkgs.gnome.yelp
pkgs.orca
];
};
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
};
spiceUSBRedirection.enable = true;
libvirtd.enable = true;
};
programs.steam.enable = true;
programs.gamemode.enable = true;
services.flatpak.enable = true;
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
wireplumber.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
sound.extraConfig = ''
'';
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.delta = {
isNormalUser = true;
description = "delta";
extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
packages = with pkgs; [
#inputs.firefox.packages.${pkgs.system}.firefox-nightly-
inputs.anyrun.packages.${pkgs.system}.anyrun
];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
linuxKernel.packages.linux_zen.acpi_call
linuxKernel.packages.linux_zen.cpupower
gnomeExtensions.appindicator
gnomeExtensions.activate-window-by-title
gnomeExtensions.unite
gnomeExtensions.tailscale-qs
gnomeExtensions.gsconnect
gnomeExtensions.clipboard-indicator
gnome.gnome-tweaks
mojave-gtk-theme
adw-gtk3
any-nix-shell
openconnect
micro
oath-toolkit
expect
ffmpegthumbnailer
webp-pixbuf-loader
freetype
poppler
f3d
nufraw-thumbnailer
unstable.curl
#firefox_nightly
];
systemd.services.NetworkManager-wait-online.enable = false; # Sometimes it stops the PC from shutdown :/
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# 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.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

67
derivations/spotify.nix Normal file
View file

@ -0,0 +1,67 @@
{ spotify, stdenv, rustPlatform, fetchFromGitHub, xorg, pkgs }:
let
spotify-adblock = rustPlatform.buildRustPackage {
pname = "spotify-adblock";
version = "1.0.3";
src = fetchFromGitHub {
owner = "abba23";
repo = "spotify-adblock";
rev = "5a3281dee9f889afdeea7263558e7a715dcf5aab";
hash = "sha256-UzpHAHpQx2MlmBNKm2turjeVmgp5zXKWm3nZbEo0mYE=";
};
cargoSha256 = "sha256-wPV+ZY34OMbBrjmhvwjljbwmcUiPdWNHFU3ac7aVbIQ=";
patchPhase = ''
substituteInPlace src/lib.rs \
--replace 'config.toml' $out/etc/spotify-adblock/config.toml
'';
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out/etc/spotify-adblock
install -D --mode=644 config.toml $out/etc/spotify-adblock
mkdir -p $out/lib
install -D --mode=644 --strip target/release/libspotifyadblock.so $out/lib
'';
};
spotifywm = stdenv.mkDerivation {
name = "spotifywm";
src = fetchFromGitHub {
owner = "dasj";
repo = "spotifywm";
rev = "8624f539549973c124ed18753881045968881745";
hash = "sha256-AsXqcoqUXUFxTG+G+31lm45gjP6qGohEnUSUtKypew0=";
};
buildInputs = [ xorg.libX11 ];
installPhase = "mv spotifywm.so $out";
};
in spotify.overrideAttrs (old: {
postInstall = (old.postInstall or "") + ''
mkdir spotify-xpui
mv $out/share/spotify/Apps/xpui.spa .
${pkgs.unzip}/bin/unzip -qq xpui.spa -d spotify-xpui/
cd spotify-xpui/
${pkgs.perl}/bin/perl -pi -w -e 's|adsEnabled:!0|adsEnabled:!1|' xpui.js
${pkgs.perl}/bin/perl -pi -w -e 's|allSponsorships||' xpui.js
${pkgs.perl}/bin/perl -pi -w -e 's/(return|.=.=>)"free"===(.+?)(return|.=.=>)"premium"===/$1"premium"===$2$3"free"===/g' xpui.js
${pkgs.perl}/bin/perl -pi -w -e 's/(case .:|async enable\(.\)\{)(this.enabled=.+?\(.{1,3},"audio"\),|return this.enabled=...+?\(.{1,3},"audio"\))((;case 4:)?this.subscription=this.audioApi).+?this.onAdMessage\)/$1$3.cosmosConnector.increaseStreamTime(-100000000000)/' xpui.js
${pkgs.perl}/bin/perl -pi -w -e 's|(Enables quicksilver in-app messaging modal",default:)(!0)|$1false|' xpui.js
${pkgs.perl}/bin/perl -pi -w -e 's/(\.WiPggcPDzbwGxoxwLWFf\s*{)/$1 height: 0;/;' home-hpto.css
${pkgs.zip}/bin/zip -qq -r xpui.spa .
mv xpui.spa $out/share/spotify/Apps/xpui.spa
cd ..
rm xpui.spa
ln -s ${spotify-adblock}/lib/libspotifyadblock.so $libdir
sed -i "s:^Name=Spotify.*:Name=Spotify-adblock:" "$out/share/spotify/spotify.desktop"
wrapProgram $out/bin/spotify \
--set LD_PRELOAD "${spotify-adblock}/lib/libspotifyadblock.so"
'';
})

View file

@ -21,39 +21,6 @@
"type": "github"
}
},
"attic": {
"inputs": {
"crane": [
"chaotic",
"crane"
],
"flake-compat": [
"chaotic",
"flake-compat"
],
"flake-utils": [
"chaotic",
"flake-utils"
],
"nixpkgs": [
"chaotic",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1707922053,
"narHash": "sha256-wSZjK+rOXn+UQiP1NbdNn5/UW6UcBxjvlqr2wh++MbM=",
"rev": "6eabc3f02fae3683bffab483e614bebfcd476b21",
"revCount": 193,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/zhaofengli/attic/0.1.193%2Brev-6eabc3f02fae3683bffab483e614bebfcd476b21/018da817-367d-75ac-bd41-470d92844bf2/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/zhaofengli/attic/0.1.%2A.tar.gz"
}
},
"cachix": {
"locked": {
"lastModified": 1635350005,
@ -70,151 +37,14 @@
"type": "github"
}
},
"chaotic": {
"inputs": {
"attic": "attic",
"compare-to": "compare-to",
"conduit": "conduit",
"crane": "crane",
"fenix": "fenix",
"flake-compat": "flake-compat",
"flake-schemas": "flake-schemas",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"jovian": "jovian",
"jujutsu": "jujutsu",
"niri": "niri",
"nix-filter": "nix-filter",
"nixpkgs": [
"nixpkgs-unstable"
],
"systems": "systems",
"yafas": "yafas"
},
"locked": {
"lastModified": 1708450303,
"narHash": "sha256-DPfm8RAdeu0W0t5brQx6oEFDoVHAn62GbLF1PAqFXyA=",
"owner": "chaotic-cx",
"repo": "nyx",
"rev": "bcc38cf311e845079573850249306490e07e6c2a",
"type": "github"
},
"original": {
"owner": "chaotic-cx",
"ref": "nyxpkgs-unstable",
"repo": "nyx",
"type": "github"
}
},
"compare-to": {
"locked": {
"lastModified": 1695341185,
"narHash": "sha256-htO6DSbWyCgaDkxi7foPjXwJFPzGjVt3RRUbPSpNtZY=",
"rev": "98b8e330823a3570d328720f87a1153f8a7f2224",
"revCount": 2,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/chaotic-cx/nix-empty-flake/0.1.2%2Brev-98b8e330823a3570d328720f87a1153f8a7f2224/018aba35-d228-7fa9-b205-7616c89ef4e0/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/chaotic-cx/nix-empty-flake/%3D0.1.2.tar.gz"
}
},
"conduit": {
"inputs": {
"attic": [
"chaotic",
"attic"
],
"crane": [
"chaotic",
"crane"
],
"fenix": [
"chaotic",
"fenix"
],
"flake-compat": [
"chaotic",
"flake-compat"
],
"flake-utils": [
"chaotic",
"flake-utils"
],
"nix-filter": [
"chaotic",
"nix-filter"
],
"nixpkgs": [
"chaotic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1708220210,
"narHash": "sha256-qsiApRdQEk9Sd3u/iiFt7idUEdsccHc3TcxmsHy3CJ4=",
"owner": "famedly",
"repo": "conduit",
"rev": "be1e2e93073d88ef1972a3c99014a7d14d731b85",
"type": "gitlab"
},
"original": {
"owner": "famedly",
"ref": "next",
"repo": "conduit",
"type": "gitlab"
}
},
"crane": {
"inputs": {
"nixpkgs": [
"chaotic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1706473297,
"narHash": "sha256-FbxuYIrHaXpsYCLtI1gCNJhd+qvERjPibXL3ctmVaCs=",
"rev": "fe812ef0dad5bb93a56c599d318be176d080281d",
"revCount": 493,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/ipetkov/crane/0.16.1/018d51be-1c17-765e-babc-c9e3bc8a5a14/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/ipetkov/crane/%2A.tar.gz"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
"chaotic",
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1706768574,
"narHash": "sha256-4o6TMpzBHO659EiJTzd/EGQGUDdbgwKwhqf3u6b23U8=",
"rev": "668102037129923cd0fc239d864fce71eabdc6a3",
"revCount": 1762,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/nix-community/fenix/0.1.1762%2Brev-668102037129923cd0fc239d864fce71eabdc6a3/018d63bb-6455-7a2f-98c6-74a36b8216a4/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/nix-community/fenix/0.1.%2A.tar.gz"
}
},
"firefox": {
"inputs": {
"cachix": "cachix",
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat",
"lib-aggregate": "lib-aggregate",
"mozilla": "mozilla",
"nixpkgs": [
"nixpkgs-unstable"
"nixpkgs"
]
},
"locked": {
@ -232,21 +62,6 @@
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/%2A.tar.gz"
}
},
"flake-compat_2": {
"locked": {
"lastModified": 1688025799,
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
@ -282,38 +97,22 @@
"type": "github"
}
},
"flake-schemas": {
"locked": {
"lastModified": 1693491534,
"narHash": "sha256-ifw8Td8kD08J8DxFbYjeIx5naHcDLz7s2IFP3X42I/U=",
"rev": "c702cbb663d6d70bbb716584a2ee3aeb35017279",
"revCount": 21,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.1/018a4c59-80e1-708a-bb4d-854930c20f72/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.1.tar.gz"
}
},
"flake-utils": {
"inputs": {
"systems": [
"chaotic",
"systems"
]
"systems": "systems"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"revCount": 90,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/numtide/flake-utils/0.1.90%2Brev-1ef2e671c3b0c19053962c07dbda38332dcebf26/018d0c5a-ac7d-77f2-bef1-1527903ad3cc/source.tar.gz"
"type": "github"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/numtide/flake-utils/0.1.%2A.tar.gz"
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
@ -335,26 +134,6 @@
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"chaotic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1702537497,
"narHash": "sha256-br4Z7OFEHWN8oOnKf40BoS6QFt1EyVLqwaVGBG7/DT8=",
"rev": "7a88cdedbda35f808ed2f329a7a811e0511870f9",
"revCount": 3192,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/nix-community/home-manager/0.1.3192%2Brev-7a88cdedbda35f808ed2f329a7a811e0511870f9/018c6725-7e9b-7e8e-bb57-f493c0e4f7dc/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/nix-community/home-manager/0.1.%2A.tar.gz"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
@ -375,57 +154,9 @@
"type": "github"
}
},
"jovian": {
"inputs": {
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"chaotic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1708148641,
"narHash": "sha256-UliMMpx84PPA+0mcyBj2yuKNawOX7L4u/wO8j9QGHVk=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "f318a856ff3177fdea6044d6c77dd49992330a31",
"type": "github"
},
"original": {
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"type": "github"
}
},
"jujutsu": {
"inputs": {
"flake-utils": [
"chaotic",
"flake-utils"
],
"nixpkgs": [
"chaotic",
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1708414713,
"narHash": "sha256-r13AUTu7e0zYRc46NppEJLTUj71Z3obOwrixlqp8JI4=",
"owner": "martinvonz",
"repo": "jj",
"rev": "106483ad6a9d58768124079d0c4142d27fc4e92d",
"type": "github"
},
"original": {
"owner": "martinvonz",
"repo": "jj",
"type": "github"
}
},
"lib-aggregate": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils",
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
@ -442,19 +173,6 @@
"type": "github"
}
},
"more-waita": {
"flake": false,
"locked": {
"lastModified": 1706758996,
"narHash": "sha256-+xvRSsGc7ERFxiTj1HT7G29OCQkR0nUZ6+WN03D3AEQ=",
"type": "tarball",
"url": "https://github.com/somepaulo/MoreWaita/archive/refs/heads/main.zip"
},
"original": {
"type": "tarball",
"url": "https://github.com/somepaulo/MoreWaita/archive/refs/heads/main.zip"
}
},
"mozilla": {
"flake": false,
"locked": {
@ -471,81 +189,6 @@
"type": "github"
}
},
"niri": {
"inputs": {
"crane": [
"chaotic",
"crane"
],
"fenix": [
"chaotic",
"fenix"
],
"flake-utils": [
"chaotic",
"flake-utils"
],
"nix-filter": [
"chaotic",
"nix-filter"
],
"nixpkgs": [
"chaotic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1708418992,
"narHash": "sha256-BHF67chY8L1Os7/sJeEPQVl0yFJgmtJZRqppEnfuRTw=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "c4c07841d7c9f7b86e0142c795282cdf3ef53213",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nix-filter": {
"locked": {
"lastModified": 1705332318,
"narHash": "sha256-kcw1yFeJe9N4PjQji9ZeX47jg0p9A0DuU4djKvg1a7I=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "3449dc925982ad46246cfc36469baf66e1b64f17",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nix-filter",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"chaotic",
"jovian",
"nixpkgs"
]
},
"locked": {
"lastModified": 1690328911,
"narHash": "sha256-fxtExYk+aGf2YbjeWQ8JY9/n9dwuEt+ma1eUFzF8Jeo=",
"owner": "zhaofengli",
"repo": "nix-github-actions",
"rev": "96df4a39c52f53cb7098b923224d8ce941b64747",
"type": "github"
},
"original": {
"owner": "zhaofengli",
"ref": "matrix-name",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1708161998,
@ -577,22 +220,6 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1702780907,
"narHash": "sha256-blbrBBXjjZt6OKTcYX1jpe9SRof2P9ZYWPzq22tzXAA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1e2e384c5b7c50dbf8e9c441a9e58d85f408b01f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1708118438,
@ -612,70 +239,25 @@
"root": {
"inputs": {
"anyrun": "anyrun",
"chaotic": "chaotic",
"firefox": "firefox",
"home-manager": "home-manager_2",
"more-waita": "more-waita",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1706735270,
"narHash": "sha256-IJk+UitcJsxzMQWm9pa1ZbJBriQ4ginXOlPyVq+Cu40=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "42cb1a2bd79af321b0cc503d2960b73f34e2f92b",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"chaotic",
"jujutsu",
"flake-utils"
],
"nixpkgs": [
"chaotic",
"jujutsu",
"nixpkgs"
]
},
"locked": {
"lastModified": 1707444620,
"narHash": "sha256-P8kRkiJLFttN+hbAOlm11wPxUrQZqKle+QtVCqFiGXY=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "78503e9199010a4df714f29a4f9c00eb2ccae071",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
"nixpkgs-unstable": "nixpkgs-unstable",
"telegram-desktop-patched": "telegram-desktop-patched"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"repo": "default",
"type": "github"
}
},
@ -694,28 +276,25 @@
"type": "github"
}
},
"yafas": {
"telegram-desktop-patched": {
"inputs": {
"flake-schemas": [
"chaotic",
"flake-schemas"
],
"systems": [
"chaotic",
"systems"
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1695926485,
"narHash": "sha256-wNFFnItckgSs8XeYhhv8vlJs2WF09fSQaWgw4xkDqHQ=",
"rev": "7772afd6686458ca0ddbc599a52cf5d337367653",
"revCount": 4,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/UbiqueLambda/yafas/0.1.4%2Brev-7772afd6686458ca0ddbc599a52cf5d337367653/018add18-ebb4-72c6-93fe-d1d8da361703/source.tar.gz"
"lastModified": 1708601917,
"narHash": "sha256-/0lrYeCKr+0tn0/+pQAuoobmsU/mWg//MaY4AJ585Qk=",
"owner": "shwewo",
"repo": "telegram-desktop-patched",
"rev": "95297c39ed904987aad5592fba8fe45eeb0ef85a",
"type": "github"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/UbiqueLambda/yafas/0.1.%2A.tar.gz"
"owner": "shwewo",
"repo": "telegram-desktop-patched",
"type": "github"
}
}
},

View file

@ -5,39 +5,48 @@
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
firefox.url = "github:nix-community/flake-firefox-nightly";
firefox.inputs.nixpkgs.follows = "nixpkgs-unstable";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
chaotic.inputs.nixpkgs.follows = "nixpkgs-unstable";
more-waita = {
url = "https://github.com/somepaulo/MoreWaita/archive/refs/heads/main.zip";
flake = false;
};
firefox.inputs.nixpkgs.follows = "nixpkgs";
anyrun.url = "github:Kirottu/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs-unstable";
telegram-desktop-patched.url = "github:shwewo/telegram-desktop-patched";
telegram-desktop-patched.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs @ { nixpkgs, nixpkgs-unstable, home-manager, firefox, anyrun, chaotic, ... }: {
outputs = inputs @ { nixpkgs, nixpkgs-unstable, home-manager, firefox, anyrun, ... }: {
nixosConfigurations.dlaptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
unstable = import nixpkgs-unstable { system = "x86_64-linux"; config = { allowUnfree = true; }; };
unstable = import nixpkgs-unstable {
system = "x86_64-linux";
config = { allowUnfree = true; };
};
};
modules = [
./configuration.nix
./hardware-configuration.nix
./hosts/generic.nix
./hosts/dlaptop/configuration.nix
./hosts/dlaptop/hardware-configuration.nix
home-manager.nixosModules.home-manager
chaotic.nixosModules.default
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.delta = import ./home.nix;
home-manager.users.delta = import ./home/home.nix;
home-manager.extraSpecialArgs = {
inherit inputs;
unstable = import nixpkgs-unstable { system = "x86_64-linux"; config = { allowUnfree = true; }; };
unstable = import nixpkgs-unstable {
system = "x86_64-linux";
config = { allowUnfree = true; };
};
};
}
];
};
nixosConfigurations.intelnuc = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/intelnuc/configuration.nix
./hosts/intelnuc/hardware-configuration.nix
];
};
};
}

175
home.nix
View file

@ -1,175 +0,0 @@
{ unstable, inputs, home, config, lib, pkgs, specialArgs, ... }:
{
home.username = "delta";
home.stateVersion = "23.11";
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 16;
};
imports = [
#hyprland.homeManagerModules.default
#./environment
./programs
#./scripts
#./themes
./theme.nix
];
services.blueman-applet.enable = true;
programs.tmux.enable = true;
programs.vscode = {
enable = true;
package = unstable.vscodium;
};
home.packages = (with pkgs; [
git
firefox
rustdesk
wl-clipboard
wl-clipboard-x11
(callPackage ./audiorelay.nix {})
(callPackage ./spotify.nix {})
(telegram-desktop.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or []) ++ [
(fetchpatch {
url = "https://raw.githubusercontent.com/Layerex/telegram-desktop-patches/master/0001-Disable-sponsored-messages.patch";
hash = "sha256-o2Wxyag6hpEDgGm8FU4vs6aCpL9aekazKiNeZPLI9po=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/Layerex/telegram-desktop-patches/master/0002-Disable-saving-restrictions.patch";
hash = "sha256-sQsyXlvhXSvouPgzYSiRB8ieICo3GDXWH5MaZtBjtqw=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/Layerex/telegram-desktop-patches/master/0003-Disable-invite-peeking-restrictions.patch";
hash = "sha256-8mJD6LOjz11yfAdY4QPK/AUz9o5W3XdupXxy7kRrbC8=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/Layerex/telegram-desktop-patches/master/0004-Disable-accounts-limit.patch";
hash = "sha256-PZWCFdGE/TTJ1auG1JXNpnTUko2rCWla6dYKaQNzreg=";
})
];
}))
#discord
]) ++ (with unstable; [
xfce.thunar
btop
htop
chromium
foot
kitty
alacritty
dig
nwg-displays
nwg-drawer
imagemagick
fastfetch
hyfetch
pavucontrol
wget
wlogout
# ]);
# ]) ++ (with pkgs.gnome; [
# gnome-terminal
# nautilus
# zenity
# gnome-tweaks
# eog
# gedit
]);
dconf.settings = {
"org/gnome/mutter" = {
experimental-features = [ "scale-monitor-framebuffer" ];
};
};
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
obs-pipewire-audio-capture
];
};
programs.mpv = {
enable = true;
config = {
hwdec = "auto";
slang = "en,eng";
alang = "en,eng";
subs-fallback = "default";
subs-with-matching-audio = "yes";
save-position-on-quit = "yes";
};
scripts = with pkgs; [
mpvScripts.autoload
mpvScripts.cutter
];
scriptOpts = {
autoload = {
disabled = "no";
images = "no";
videos = "yes";
audio = "yes";
additional_image_exts = "list,of,ext";
additional_video_exts = "list,of,ext";
additional_audio_exts = "list,of,ext";
ignore_hidden = "yes";
};
};
};
gtk = {
enable = true;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
};
programs.fish = {
enable = true;
shellAliases = {
rebuild = "sudo nixos-rebuild switch --flake ~/Documents/dotfiles/";
rollback = "sudo nixos-rebuild switch --rollback --flake ~/Documents/dotfiles/";
run = "~/.local/share/run";
};
shellInit = ''
any-nix-shell fish --info-right | source
'';
};
# wayland.windowManager.hyprland = {
# enable = true;
# #plugins =
#
# };
xdg.dataFile."run" = {
enable = true;
executable = true;
text = ''
#!/bin/sh
if [[ $# -eq 0 ]]; then
echo "Error: Missing argument."
else
nix run nixpkgs#"$1" -- "''\${@:2}"
fi
'';
};
}

165
home/home.nix Normal file
View file

@ -0,0 +1,165 @@
{ unstable, inputs, home, config, lib, pkgs, specialArgs, ... }:
{
home.username = "delta";
home.stateVersion = "23.11";
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 16;
};
imports = [ ./programs ./theme.nix ];
services.blueman-applet.enable = true;
services.network-manager-applet.enable = true;
programs.tmux.enable = true;
programs.vscode = {
enable = true;
package = unstable.vscodium;
extensions = with pkgs.vscode-extensions; [
bbenoist.nix
brettm12345.nixfmt-vscode
];
};
xdg.desktopEntries = {
maestral = {
name = "Maestral";
icon = "maestral";
exec =
''sh -c "QT_QPA_PLATFORM=xcb ${pkgs.maestral-gui}/bin/maestral_qt"'';
type = "Application";
};
};
home.packages = (with pkgs; [
git
rustdesk
chromium
wl-clipboard
wl-clipboard-x11
(callPackage ../derivations/audiorelay.nix { })
(callPackage ../derivations/spotify.nix { })
xorg.xwininfo
]) ++ (with unstable; [
xfce.thunar
nixfmt
btop
htop
foot
kitty
keepassxc
alacritty
dig
nwg-displays
nwg-drawer
imagemagick
fastfetch
hyfetch
pavucontrol
wget
wlogout
swaylock
swayidle
nom
vesktop
]) ++ ([
inputs.firefox.packages.${pkgs.system}.firefox-nightly-bin
inputs.telegram-desktop-patched.packages.${pkgs.system}.default
]);
dconf = {
enable = true;
settings = {
"org/gnome/mutter" = {
experimental-features = [ "scale-monitor-framebuffer" ];
};
"org/gnome/settings-daemon/plugins/power".sleep-inactive-battery-timeout =
300;
};
};
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [ obs-pipewire-audio-capture ];
};
programs.mpv = {
enable = true;
config = {
hwdec = "auto";
slang = "en,eng";
alang = "en,eng";
subs-fallback = "default";
subs-with-matching-audio = "yes";
save-position-on-quit = "yes";
};
scripts = with pkgs; [ mpvScripts.autoload mpvScripts.cutter ];
scriptOpts = {
autoload = {
disabled = "no";
images = "no";
videos = "yes";
audio = "yes";
additional_image_exts = "list,of,ext";
additional_video_exts = "list,of,ext";
additional_audio_exts = "list,of,ext";
ignore_hidden = "yes";
};
};
};
gtk = {
enable = true;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
};
programs.fish = {
enable = true;
shellAliases = {
rebuild = "nh os switch";
rollback = "sudo nixos-rebuild switch --rollback --flake ~/Documents/dotfiles/";
shell = "~/.local/share/shell";
};
shellInit = ''
any-nix-shell fish --info-right | source
'';
};
xdg.dataFile."run" = {
enable = true;
executable = true;
text = ''
#!/bin/sh
if [[ $# -eq 0 ]]; then
echo "Error: Missing argument."
else
nix run nixpkgs#"$1" -- "''${@:2}"
fi
'';
};
xdg.dataFile."shell" = {
enable = true;
executable = true;
text = ''
#!/bin/sh
if [[ $# -eq 0 ]]; then
echo "Error: Missing argument."
else
nix shell nixpkgs#"$1" -- "''${@:2}"
fi
'';
};
}

View file

@ -0,0 +1,121 @@
{
pkgs,
inputs,
config,
...
}: {
imports = [
inputs.anyrun.homeManagerModules.default
];
programs.anyrun = {
enable = true;
config = {
plugins = with inputs.anyrun.packages.${pkgs.system}; [
#inputs.anyrun-nixos-options.packages.${pkgs.system}.default
applications
rink
#shell
symbols
#translate
];
width.fraction = 0.3;
y.absolute = 15;
hidePluginInfo = true;
closeOnClick = true;
};
extraCss = ''
@define-color bg-col rgba(30, 30, 46, 0.7);
@define-color bg-col-light rgba(150, 220, 235, 0.7);
@define-color border-col rgba(30, 30, 46, 0.7);
@define-color selected-col rgba(150, 205, 251, 0.7);
@define-color fg-col #D9E0EE;
@define-color fg-col2 #F28FAD;
* {
transition: 200ms ease;
font-family: "Iosevka Nerd Font";
font-size: 1.3rem;
}
#window {
background: transparent;
}
#plugin,
#main {
border: 3px solid @border-col;
color: @fg-col;
background-color: @bg-col;
}
/* anyrun's input window - Text */
#entry {
color: @fg-col;
background-color: @bg-col;
}
/* anyrun's ouput matches entries - Base */
#match {
color: @fg-col;
background: @bg-col;
}
/* anyrun's selected entry - Red */
#match:selected {
color: @fg-col2;
background: @selected-col;
}
#match {
padding: 3px;
border-radius: 3px;
}
#entry, #plugin:hover {
border-radius: 3px;
}
box#main {
background: rgba(30, 30, 46, 0.7);
border: 1px solid @border-col;
border-radius: 3px;
padding: 5px;
}
'';
extraConfigFiles."applications.ron".text = ''
Config(
desktop_actions: false,
max_entries: 5,
terminal: Some("footclient"),
)
'';
extraConfigFiles."dictonary.ron".text = ''
Config(
prefix: ";",
max_entries: 5,
)
'';
extraConfigFiles."randr.ron".text = ''
Config(
prefix: ":dp",
max_entries: 5,
)
'';
extraConfigFiles."translate.ron".text = ''
Config(
prefix: ":",
language_delimiter: ">",
max_entries: 3,
)
'';
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./hypr
./anyrun
];
}

View file

@ -0,0 +1,499 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [ waybar swww ];
#test later systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
#nvidiaPatches = true;
extraConfig = ''
# Setup monitors
# Setup monitors
# See https://wiki.hyprland.org/Configuring/Monitors/
#monitor=,preferred,auto,1.066667
#monitor=,preferred,90,1.066667
monitor=eDP-1,preferred,auto,1.5
#monitor=eDP-1,preferred,auto,1.066667
#source = ~/.config/hypr/monitors.conf
#source = ~/.config/hypr/workspaces.conf
# Dual monitor example on G15 Strix
# eDP-1 is the built in monitor while DP-1 is external
# Both monitors here are at 1440 and 165Hz
# DP-1 is on the left and eDP-1 is on the right
#monitor=DP-1,2560x1440@165,0x0,1
#monitor=eDP-1,2560x1440@165,2560x0,1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
exec-once = ~/.config/hypr/xdg-ausl-hyprland
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = swww init
exec-once = sh -c "sleep 1 && swww clear"
#exec-once = swww img Downloads/PC\ Wallpapers/gifpixel/rooftop.gif
#exec-once = mpvpaper '*' -o "video-scale-y=1.1 --gpu-context=wayland --vo=gpu --hwdec=vaapi-copy" videowork/bgloop.webm
exec = gtk-launch maestral
exec-once = waybar
#exec-once = ags
#exec = /usr/bin/hyprland-per-window-layout
exec-once = blueman-applet
exec-once = nm-applet --indicator
exec-once = wl-paste --watch cliphist store
#exec = ~/.config/HyprV/hyprv_util setbg
exec-once = pypr
exec-once = foot -s
exec-once = thunar --daemon
exec-once = swayidle -d
exec-once = hyprctl setcursor Bibata-Modern-Classic 16
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
env = NIX_REMOTE,daemon
exec-once = export XDG_DATA_DIRS=$HOME/.nix-profile/share:$XDG_DATA_DIRS
#env = QT_QPA_PLATFORMTHEME,qt5ct
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_QPA_PLATFORM,wayland;xcb
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
#env = GTK_THEME,Catppuccin-Macchiato-Rosewater-dark:dark
#env = GTK_THEME,Catppuccin-Macchiato-Rosewater-dark:light
env = GDK_BACKEND,wayland,x11
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us,ru
kb_variant =
kb_model =
kb_options=grp:caps_toggle
kb_rules =
follow_mouse = 1
mouse_refocus = false
touchpad {
natural_scroll = no
#disable_while_typing = false
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 0
gaps_out = 0
border_size = 1
no_border_on_floating = true
cursor_inactive_timeout = 3
#no_cursor_warps = true
#col.active_border = rgba(7287fdee) rgba(179299ee) 45deg
col.active_border = rgba(7287fdee)
#col.active_border=rgb(cdd6f4)
col.inactive_border = rgba(595959aa)
layout = dwindle
#layout = master
}
Binds {
scroll_event_delay = 0
workspace_back_and_forth = true
workspace_center_on = 1
}
XWayland {
force_zero_scaling = true
}
misc {
disable_hyprland_logo = yes
focus_on_activate = yes
#key_press_enables_dpms = true
# Whether Hyprland should focus an app that requests to be focused
focus_on_activate = true
#config autoreload
#disable_autoreload = true
#no_vfr = false
#render_ahead_of_time = yes
new_window_takes_over_fullscreen = 2
no_direct_scanout = false
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 5
blur {
enabled = true
size = 7
passes = 4
new_optimizations = true
}
blurls = lockscreen
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.10, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier, slide
animation = windowsOut, 1, 7, myBezier, slide
animation = border, 1, 10, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
#force_split = 2
permanent_direction_override = true
smart_split = false
no_gaps_when_only = 1
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = false
no_gaps_when_only = 1
allow_small_split = true
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
#workspace_swipe_direction_lock = off
workspace_swipe = true
workspace_swipe_fingers = 3
workspace_swipe_cancel_ratio = 0.15
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device:epic mouse V1 {
sensitivity = -0.5
}
# Example windowrule v1
#windowrule = float, ^(kitty)$
windowrule = float,^(pavucontrol)$
windowrule = float,^(blueman-manager)$
windowrule = float,^(nm-connection-editor)$
#windowrule = float,^(chromium)$
windowrule = float,^(thunar)$
windowrule = float, title:^(btop)$
windowrule = float, title:^(update-sys)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# rules below would make the specific app transparent
windowrulev2 = opacity 0.8 0.8,class:^(kitty)$
windowrulev2 = animation popin,class:^(kitty)$,title:^(update-sys)$
windowrulev2 = animation popin,class:^(thunar)$
#windowrulev2 = opacity 0.8 0.8,class:^(thunar)$
#windowrulev2 = opacity 0.8 0.8,class:^(VSCodium)$
#windowrulev2 = animation popin,class:^(chromium)$
windowrulev2 = move cursor -3% -105%,class:^(wofi)$
windowrulev2 = noanim,class:^(wofi)$
windowrulev2 = opacity 0.8 0.6,class:^(wofi)$
#sway-launcher
windowrulev2 = float,class:^(kitty)$,title:^(sway-launcher-desktop)$
windowrulev2 = noanim,class:^(kitty)$,title:^(sway-launcher-desktop)$
windowrulev2 = stayfocused,class:^(kitty)$,title:^(sway-launcher-desktop)$
#windowrulev2 = float,class:^(wezterm)$,title:^(sway-launcher-desktop)$
#windowrulev2 = noanim,class:^(wezterm)$,title:^(sway-launcher-desktop)$
#windowrulev2 = stayfocused,class:^(wezterm)$,title:^(sway-launcher-desktop)$
windowrulev2 = float,class:^(swlauncher)$
windowrulev2 = noanim,class:^(swlauncher)$
windowrulev2 = stayfocused,class:^(swlauncher)$
windowrulev2 = center,class:^(swlauncher)$
windowrulev2 = size 28% 50%,class:^(swlauncher)$
windowrulev2 = float,class:^(clipmanager)$
windowrulev2 = noanim,class:^(clipmanager)$
windowrulev2 = stayfocused,class:^(clipmanager)$
windowrulev2 = center,class:^(clipmanager)$
windowrulev2 = size 60% 45%,class:^(clipmanager)$
#foot clipboard-manager
windowrulev2 = float,title:^(clipboard_manager)$
windowrulev2 = noanim,title:^(clipboard_manager)$
windowrulev2 = stayfocused,title:^(clipboard_manager)$
windowrulev2 = center,title:^(clipboard_manager)$
windowrulev2 = size 45% 45%,title:^(clipboard_manager)$
#foot applauncher app_launcher
windowrulev2 = float,title:^(app_launcher)$
windowrulev2 = noanim,title:^(app_launcher)$
windowrulev2 = stayfocused,title:^(app_launcher)$
windowrulev2 = center,title:^(app_launcher)$
windowrulev2 = size 28% 50%,title:^(app_launcher)$
#foot emoji_manager
windowrulev2 = float,title:^(emoji_manager)$
windowrulev2 = noanim,title:^(emoji_manager)$
windowrulev2 = stayfocused,title:^(emoji_manager)$
windowrulev2 = center,title:^(emoji_manager)$
windowrulev2 = size 35% 50%,title:^(emoji_manager)$
windowrulev2 = noanim,class:^(__screenshoter)$
windowrulev2 = float,class:^(__screenshoter)$
#steam
windowrulev2 = stayfocused, title:^()$,class:^(steam)$
windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$
windowrulev2 = noblur, class:^(steam)$
windowrulev2 = noshadow, class:^(steam)$
windowrule = noblur,^(firefox)$ # disables blur for firefox
#layerrules
#layerrule = noanim, swaync-notification-window
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
bind = $mainMod, G, exec, /home/delta/.config/hypr/changeLayout.sh
#master layout
bind = $mainMod, I, layoutmsg, addmaster
bind = $mainMod SHIFT, I, layoutmsg, removemaster
bind = $mainMod, U, layoutmsg, orientationleft
bind = $mainMod SHIFT, U, layoutmsg, orientationright
bind = $mainMod, Y, layoutmsg, orientationcenter
bind = $mainMod, O, layoutmsg, swapwithmaster
#dwindle layout
bind = $mainMod, I, layoutmsg, preselect d
bind = $mainMod, O, layoutmsg, preselect n
bind = $mainMod, U, togglesplit
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
#bind = $mainMod, Q, exec, kitty #open the terminal
bind = $mainMod, RETURN, exec, footclient #open the terminal
bind = $mainMod SHIFT, RETURN, exec, alacritty #open the terminal
bind = $mainMod, Q, exec, wezterm #open the terminal
#bind = $mainMod, Q, exec, alacritty #open the terminal
bind = $mainMod SHIFT, Q, exec, alacritty #open the terminal
bind = $mainMod CONTROL, Q, exec, wezterm start #--always-new-process #open the terminal
bind = $mainMod, F1, exec, ~/.config/hypr/gamemode.sh
env = HYPRGAPSMODE
bind = $mainMod, F2, exec, ~/.config/hypr/gapsmode.sh
bind = $mainMod, B, exec, swaync-client --toggle-panel # notify center
bind = ALT, B, exec, swaync-client --close-latest # close lathest notify
bind = $mainMod, F4, killactive, # close the active window
bind = $mainMod, TAB, killactive, # close the active window
bind = $mainMod SHIFT, TAB, killactive, # close the active window
bind = $mainMod, Escape, exec, /home/delta/scripts/swaylock # Lock the screen
bind = $mainMod, M, exec, wlogout --protocol layer-shell # show the logout window
bind = $mainMod SHIFT, M, exit, # Exit Hyprland all together no (force quit Hyprland)
bind = $mainMod, E, exec, thunar # Show the graphical file browser
bind = $mainMod, V, togglefloating, # Allow a window to float
#bind = $mainMod, SPACE, exec, wofi # Show the graphical app launcher
#bind = $mainMod, SPACE, exec, kitty /usr/bin/
her-desktop # Show the graphical app launcher
#bind = $mainMod, SPACE, exec, alacritty --class=swlauncher -e /usr/bin/sway-launcher-desktop #& hyprctl switchxkblayout at-translated-set-2-keyboard 0# Show the graphical app launcher
#bind = $mainMod, SPACE, exec, footclient --title=app_launcher sh -c "TERMINAL=footclient sway-launcher-desktop" & hyprctl switchxkblayout at-translated-set-2-keyboard 0# Show the graphical app launcher
bind = $mainMod, SPACE, exec, anyrun & hyprctl switchxkblayout at-translated-set-2-keyboard 0# Show the graphical app launcher
bind = $mainMod SHIFT, SPACE, exec, footclient --title=app_launcher sh -c "TERMINAL=footclient sway-launcher-desktop" & hyprctl switchxkblayout at-translated-set-2-keyboard 0# Show the graphical app launcher
#bind = $mainMod CONTROL, SPACE, swapactiveworkspaces # Swaps the active workspaces between two monitors
bind = ALT, SPACE, exec, pypr shift_monitors +1 # K R A S I V O
bind = $mainMod, P, pseudo, # dwindle
#bind = $mainMod, J, togglesplit, # dwindle
#bind = $mainMod, S, exec, grim -g "$(slurp)" - | tee >(swappy -f -) | wl-copy # take a screenshot
bind = $mainMod, S, exec, hyprshot -m region --clipboard-only -s # take a screenshot
bind = $mainMod, Print, exec, /home/delta/scripts/screenshoter.sh # take a screenshot
bind = ,Print , exec, wl-paste | swappy -f - # take a screenshot
#bind = $mainMod, S, exec, /home/delta/screenshoter.sh # take a screenshot
#bind = $mainMod, S, exec, hyprshot -m output -s -c --clipboard-only # take a screenshot
#bind = ALT, V, exec, cliphist list | wofi -dmenu | cliphist decode | wl-copy # open clipboard manager
#bind = ALT, V, exec, cliphist list | /home/delta/scripts/fzfmenu | cliphist decode | wl-copy # open clipboard manager
bind = ALT, V, exec, cliphist list | /home/delta/scripts/fzfmenuft | cliphist decode | wl-copy && wtype -M ctrl v -m ctrl # open clipboard manager
bind = $mainMod, R, exec, footclient --title=emoji_manager sh -c "~/scripts/shmoji/shmoji fzf | wl-copy" & hyprctl switchxkblayout at-translated-set-2-keyboard 0
#bind = $mainMod, T, exec, ~/.config/HyprV/hyprv_util vswitch # switch HyprV version
bind = $mainMod, X, togglesplit, # dwindle
bind = $mainMod, C, fullscreen, 1 # fs
bind = $mainMod SHIFT, C, fullscreen, 0 # fs
bind = $mainMod, F, fakefullscreen # fs
bind = $mainMod CONTROL, C, fakefullscreen # fs
#bind = $mainMod, Z, maximize, # fs
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
bind = $mainMod, H, movefocus, l
bind = $mainMod, J, movefocus, d
bind = $mainMod, K, movefocus, u
bind = $mainMod, L, movefocus, r
#bind = $mainMod, shift H, movefocus, l
bind = $mainMod SHIFT, J, workspace, e-1
bind = $mainMod SHIFT, K, workspace, e+1
#bind = $mainMod, L, movefocus, r
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Move active window silently to a workspace with mainMod + CONTROL + [0-9]
bind = $mainMod CONTROL, 1, movetoworkspacesilent, 1
bind = $mainMod CONTROL, 2, movetoworkspacesilent, 2
bind = $mainMod CONTROL, 3, movetoworkspacesilent, 3
bind = $mainMod CONTROL, 4, movetoworkspacesilent, 4
bind = $mainMod CONTROL, 5, movetoworkspacesilent, 5
bind = $mainMod CONTROL, 6, movetoworkspacesilent, 6
bind = $mainMod CONTROL, 7, movetoworkspacesilent, 7
bind = $mainMod CONTROL, 8, movetoworkspacesilent, 8
bind = $mainMod CONTROL, 9, movetoworkspacesilent, 9
bind = $mainMod CONTROL, 0, movetoworkspacesilent, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
bind = $mainMod, bracketright, workspace, e+1
bind = $mainMod, bracketleft, workspace, e-1
# Scroll through windows workspaces with mainMod + scroll
bind = $mainMod SHIFT, mouse_down, cyclenext
bind = $mainMod SHIFT, mouse_up, cyclenext, prev
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
#Move/resize windows with arrowkeys
binde = $mainMod CTRL, right, resizeactive, 10 0
binde = $mainMod CTRL, left, resizeactive, -10 0
binde = $mainMod CTRL, up, resizeactive, 0 -10
binde = $mainMod CTRL, down, resizeactive, 0 10
#Move windows between grid with hjkl
bind = $mainMod CTRL, h, movewindow, l
bind = $mainMod CTRL, j, movewindow, d
bind = $mainMod CTRL, k, movewindow, u
bind = $mainMod CTRL, l, movewindow, r
# Move grid window between grid with arrows
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
#bind = $mainMod SHIFT, H, swapwindow, left
#bind = $mainMod SHIFT, J, swapwindow, down
#bind = $mainMod SHIFT, K, swapwindow, up
#bind = $mainMod SHIFT, L, swapwindow, right
# Move floating window wsad-like (change to vim keybinds later)
binde = $mainMod SHIFT CTRL, H, moveactive, -30 0
binde = $mainMod SHIFT CTRL, J, moveactive, 0 30
binde = $mainMod SHIFT CTRL, K, moveactive, 0 -30
binde = $mainMod SHIFT CTRL, L, moveactive, 30 0
# Move grid window between grid
#bind = $mainMod SHIFT, A, movewindow, l
#bind = $mainMod SHIFT, D, movewindow, r
#bind = $mainMod SHIFT, W, movewindow, u
#bind = $mainMod SHIFT, S, movewindow, d
#bind = $mainMod SHIFT, H, movewindow, l
#bind = $mainMod SHIFT, J, movewindow, d
#bind = $mainMod SHIFT, K, movewindow, u
#bind = $mainMod SHIFT, L, movewindow, r
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
source = ~/.config/hypr/media-binds.conf
source = ~/.config/hypr/env_var.conf
'';
};
home.file.".config/hypr/colors".text = ''
$background = rgba(1d192bee)
$foreground = rgba(c3dde7ee)
$color0 = rgba(1d192bee)
$color1 = rgba(465EA7ee)
$color2 = rgba(5A89B6ee)
$color3 = rgba(6296CAee)
$color4 = rgba(73B3D4ee)
$color5 = rgba(7BC7DDee)
$color6 = rgba(9CB4E3ee)
$color7 = rgba(c3dde7ee)
$color8 = rgba(889aa1ee)
$color9 = rgba(465EA7ee)
$color10 = rgba(5A89B6ee)
$color11 = rgba(6296CAee)
$color12 = rgba(73B3D4ee)
$color13 = rgba(7BC7DDee)
$color14 = rgba(9CB4E3ee)
$color15 = rgba(c3dde7ee)
'';
}

View file

@ -0,0 +1,25 @@
{ config, pkgs, ... }:
{
home = {
sessionVariables = {
#EDITOR = "lvim";
#BROWSER = "librewolf";
#TERMINAL = "kitty";
#GBM_BACKEND= "nvidia-drm";
#__GLX_VENDOR_LIBRARY_NAME= "nvidia";
#LIBVA_DRIVER_NAME= "nvidia"; # hardware acceleration
__GL_VRR_ALLOWED = "1";
#WLR_NO_HARDWARE_CURSORS = "1";
#WLR_RENDERER_ALLOW_SOFTWARE = "1";
CLUTTER_BACKEND = "wayland";
WLR_RENDERER = "vulkan";
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
MOZ_USE_XINPUT2 = "1";
};
};
}

66
theme.nix → home/theme.nix Executable file → Normal file
View file

@ -1,38 +1,30 @@
{ pkgs, inputs, ... }:
{ pkgs, lib, inputs, unstable, ... }:
let
moreWaita = pkgs.stdenv.mkDerivation {
name = "MoreWaita";
src = inputs.more-waita;
installPhase = ''
mkdir -p $out/share/icons
mv * $out/share/icons
'';
};
gtk-theme = "adw-gtk3-dark";
nerdfonts = (pkgs.nerdfonts.override { fonts = [
#"Ubuntu"
#"UbuntuMono"
#"CascadiaCode"
#"FantasqueSansMono"
#"FiraCode"
#"Mononoki"
"Iosevka"
]; });
nerdfonts = (pkgs.nerdfonts.override {
fonts = [
#"Ubuntu"
#"UbuntuMono"
#"CascadiaCode"
#"FantasqueSansMono"
#"FiraCode"
#"Mononoki"
"Iosevka"
];
});
#cursor-theme = "Qogir";
#cursor-package = pkgs.qogir-icon-theme;
in
{
in {
home = {
packages = with pkgs; [
font-awesome
papirus-icon-theme
qogir-icon-theme
#qogir-icon-theme
whitesur-icon-theme
colloid-icon-theme
adw-gtk3
nerdfonts
moreWaita
];
#sessionVariables.XCURSOR_THEME = cursor-theme;
#pointerCursor = {
@ -59,21 +51,37 @@ in
}
'';
};
".local/share/icons/MoreWaita" = {
source = "${moreWaita}/share/icons";
};
};
};
fonts.fontconfig.enable = true;
gtk = {
enable = true;
font.name = "Iosevka Malie";
theme.name = "Adwaita-dark";
#font.name = "Iosevka Malie";
#theme.name = gtk-theme;
#cursorTheme = {
# name = cursor-theme;
# package = cursor-package;
#};
iconTheme.name = "Papirus-Dark";
theme = {
name = "Catppuccin-Mocha-Compact-Lavender-Dark";
package = unstable.catppuccin-gtk.override {
accents = [
"lavender"
]; # You can specify multiple accents here to output multiple themes
size = "compact";
tweaks =
[ "rimless" "black" ]; # You can also specify multiple tweaks here
variant = "mocha";
};
};
iconTheme = {
name = "Papirus-Dark";
package = lib.mkForce unstable.papirus-icon-theme;
};
gtk3.extraCss = ''
headerbar, .titlebar,
.csd:not(.popup):not(tooltip):not(messagedialog) decoration{

View file

@ -0,0 +1,255 @@
# 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).
{ inputs, unstable, config, pkgs, ... }:
{
time.timeZone = "Europe/Moscow";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_TIME = "ru_RU.UTF-8";
};
nixpkgs.overlays = [
(final: prev: {
gnome = prev.gnome.overrideScope' (gnomeFinal: gnomePrev: {
mutter = gnomePrev.mutter.overrideAttrs (old: {
src = pkgs.fetchgit {
url = "https://gitlab.gnome.org/vanvugt/mutter.git";
# GNOME 45: triple-buffering-v4-45
rev = "0b896518b2028d9c4d6ea44806d093fd33793689";
sha256 = "sha256-mzNy5GPlB2qkI2KEAErJQzO//uo8yO0kPQUwvGDwR4w=";
};
});
});
})
];
environment.sessionVariables = {
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_QPA_PLATFORM = "wayland";
NIXOS_OZONE_WL = "1";
FLAKE = "/home/delta/Documents/dotfiles";
};
networking = {
hostName = "dlaptop";
networkmanager.enable = true;
firewall = {
enable = false;
};
};
security = {
sudo.wheelNeedsPassword = false;
wrappers = {
firejail = {
source = "${pkgs.firejail.out}/bin/firejail";
};
};
pam.loginLimits = [{
domain = "@users";
item = "rtprio";
type = "-";
value = 1;
}];
pam.services.swaylock = { };
rtkit.enable = true;
};
powerManagement.enable = true;
services.power-profiles-daemon.enable = false;
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "powersave";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
#CPU_MAX_PERF_ON_BAT = 20;
CPU_SCALING_MAX_FREQ_ON_AC = 6600000;
CPU_SCALING_MAX_FREQ_ON_BAT = 1600000;
PLATFORM_PROFILE_ON_AC = "balanced";
PLATFORM_PROFILE_ON_BAT = "low-power";
#Trubo boost disable
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 1;
CPU_HWP_DYN_BOOST_ON_AC = 1;
CPU_HWP_DYN_BOOST_ON_BAT = 1;
#Optional helps save long term battery health
#START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
#STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
services.xserver = {
enable = true;
videoDrivers = [ "modesetting" ];
displayManager = {
gdm.enable = true;
autoLogin = {
enable = false;
user = "delta";
};
};
desktopManager.gnome.enable = true;
layout = "us";
xkbVariant = "";
excludePackages = [ pkgs.xterm ];
};
services.gnome = {
gnome-browser-connector.enable = false;
gnome-initial-setup.enable = false;
gnome-online-accounts.enable = false;
};
services.flatpak.enable = true;
services.printing.enable = true;
services.pipewire = {
enable = true;
wireplumber.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
sound = {
enable = true;
extraConfig = "\n";
};
hardware.pulseaudio.enable = false;
services.blueman.enable = true;
services.tumbler.enable = true;
services.gvfs.enable = true;
services.udev.packages = [ pkgs.gnome.gnome-settings-daemon ];
programs.thunar.enable = true;
programs.firejail.enable = true;
programs.hyprland.enable = true;
programs.xfconf.enable = true;
programs.dconf.enable = true;
programs.virt-manager.enable = true;
programs.steam.enable = true;
programs.gamemode.enable = true;
programs.thunar.plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
environment = {
gnome.excludePackages = [
#pkgs.gnome-connections
#pkgs.gnome-console
pkgs.gnome-text-editor
pkgs.gnome-tour
#pkgs.gnome.adwaita-icon-theme
pkgs.gnome.epiphany # browser
#pkgs.gnome.evince # pdf + office files
#pkgs.gnome.file-roller #archive explorer
pkgs.gnome.geary
pkgs.gnome.gnome-backgrounds
pkgs.gnome.gnome-calendar
pkgs.gnome.gnome-characters
pkgs.gnome.gnome-clocks
pkgs.gnome.gnome-contacts
pkgs.gnome.gnome-font-viewer
pkgs.gnome.gnome-logs
pkgs.gnome.gnome-maps
pkgs.gnome.gnome-music
#pkgs.gnome.gnome-themes-extra
pkgs.gnome.gnome-weather
#pkgs.gnome.nautilus
pkgs.gnome.simple-scan
pkgs.gnome.sushi
pkgs.gnome.totem
pkgs.gnome.yelp
pkgs.orca
];
};
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
};
spiceUSBRedirection.enable = true;
libvirtd.enable = true;
};
environment.systemPackages = with pkgs; [
gnomeExtensions.appindicator
gnomeExtensions.activate-window-by-title
gnomeExtensions.unite
gnomeExtensions.tailscale-qs
gnomeExtensions.gsconnect
gnomeExtensions.clipboard-indicator
gnomeExtensions.tiling-assistant
#gnomeExtensions.wintile-windows-10-window-tiling-for-gnome
gnomeExtensions.advanced-alttab-window-switcher
gnome.gnome-tweaks
mojave-gtk-theme
adw-gtk3
any-nix-shell
openconnect
micro
oath-toolkit
expect
ffmpegthumbnailer
webp-pixbuf-loader
freetype
poppler
f3d
nufraw-thumbnailer
unstable.curl
#firefox_nightly
#inputs.anyrun.packages.${pkgs.system}.anyrun
];
users.users.socks = {
group = "socks";
isSystemUser = true;
};
users.groups.socks = { };
systemd.services.singboxaus = {
enable = true;
description = "avoid censorship";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Restart = "on-failure";
RestartSec = "15";
User = "socks";
Group = "socks";
};
script = "sing-box run -c /etc/sing-box/config.json";
path = with unstable; [
shadowsocks-libev
shadowsocks-v2ray-plugin
sing-box
];
};
systemd.services.NetworkManager-wait-online.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# 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.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

View file

@ -0,0 +1,80 @@
# 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.
{ unstable, config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
hardware.firmware = [
(pkgs.runCommandNoCC "subwoofer" { } ''
mkdir -p $out/lib/firmware/
cp ${../../firmware/TAS2XXX38BB.bin} $out/lib/firmware/TAS2XXX38BB.bin
cp ${../../firmware/TIAS2781RCA4.bin} $out/lib/firmware/TIAS2781RCA4.bin
'')
];
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.extraInstallCommands = ''
patch_slim7_ssdt=$(
${pkgs.coreutils}/bin/cp -f ${
../../firmware/slim7-ssdt
} /boot/EFI/nixos/slim7-ssdt
for file in /boot/loader/entries/nixos-generation-*.conf; do
${pkgs.gnused}/bin/sed -i '0,/^initrd\s/{s/^initrd\s/initrd \/efi\/nixos\/slim7-ssdt\n&/}' "$file"
done
)
'';
boot.kernelParams = [
"rtc_cmos.use_acpi_alarm=1"
"ideapad_laptop.allow_v4_dytc=1"
"amd_pstate=active"
"initcall_blacklist=acpi_cpufreq_init"
"nowatchdog"
"amd_pstate.shared_mem=1"
];
boot.kernelModules = [ "amd-pstate" "acpi_call" "amdgpu" "kvm-amd" ];
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelPackages = unstable.linuxPackages_zen;
boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call cpupower ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/6b2d5c46-92de-42d0-a272-16b7ef7f30af";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-db81e97a-eb4b-43c5-b128-ef838495fc9a".device =
"/dev/disk/by-uuid/db81e97a-eb4b-43c5-b128-ef838495fc9a";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/6770-34DC";
fsType = "vfat";
};
swapDevices = [{
device = "/var/lib/swapfile";
size = 32 * 1024;
}];
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl amdvlk ];
extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
};
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

49
hosts/generic.nix Normal file
View file

@ -0,0 +1,49 @@
{ inputs, config, pkgs, ... }:
let
run = pkgs.writeScriptBin "run" ''
#!/usr/bin/env bash
if [[ $# -eq 0 ]]; then
echo "Error: Missing argument"
else
NIXPKGS_ALLOW_UNFREE=1 nix run --impure nixpkgs#"$1" -- "''${@:2}"
fi
'';
in {
users.users.delta = {
isNormalUser = true;
description = "delta";
extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGGL2UD0frl9F2OPBiPlSQqxDsuACbAVgwH24F0KT14L"
];
};
nix = {
settings = {
experimental-features = [ "flakes" "nix-command" ];
auto-optimise-store = true;
substituters = [ "https://shwewo.cachix.org" ];
trusted-public-keys = [ "shwewo.cachix.org-1:84cIX7ETlqQwAWHBnd51cD4BeUVXCyGbFdtp+vLxKOo=" ];
};
};
nixpkgs.config.allowUnfree = true;
boot.kernel.sysctl."kernel.sysrq" = 1;
environment.systemPackages = with pkgs; [
run
git
micro
nano
nh
];
programs.command-not-found.enable = false;
programs.fish.enable = true;
programs.fish.promptInit = ''
set TERM "xterm-256color"
set fish_greeting
any-nix-shell fish --info-right | source
'';
users.defaultUserShell = pkgs.fish;
}

View file

@ -0,0 +1,51 @@
{ config, pkgs, ... }:
{
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
boot.kernel.sysctl."net.core.rmem_max" = 2500000; #for quic
time.timeZone = "Europe/Moscow";
i18n.defaultLocale = "en_US.UTF-8";
users.users.intelnuc = {
isNormalUser = true;
description = "intelnuc";
extraGroups = [ "networkmanager" "wheel" "docker"];
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
git
vim
wget
htop
zenith
pkgs.xorg.xauth
docker docker-compose traefik
lazydocker
];
networking = {
firewall.enable = false;
hostName = "intelnuc";
networkmanager.enable = true;
};
systemd.services.NetworkManager-wait-online.enable = false;
services.openssh.enable = true;
services.tailscale.enable = true;
services.adguardhome.enable = true;
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
};
};
system.stateVersion = "22.11";
}

View file

@ -1,50 +1,34 @@
# 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.
{ unstable, config, lib, pkgs, modulesPath, ... }:
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
hardware.firmware = [
(pkgs.runCommandNoCC "subwoofer" { } ''
mkdir -p $out/lib/firmware/
cp ${./TAS2XXX38BB.bin} $out/lib/firmware/TAS2XXX38BB.bin
cp ${./TIAS2781RCA4.bin} $out/lib/firmware/TIAS2781RCA4.bin
'')
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [ "ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "xhci_pci" "ums_realtek" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.kernelPackages = unstable.linuxPackages_zen;
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/6b2d5c46-92de-42d0-a272-16b7ef7f30af";
{ device = "/dev/disk/by-uuid/3aa4a379-e341-4100-8f79-516b386b74c5";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-db81e97a-eb4b-43c5-b128-ef838495fc9a".device = "/dev/disk/by-uuid/db81e97a-eb4b-43c5-b128-ef838495fc9a";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6770-34DC";
fsType = "vfat";
};
swapDevices = [ {
device = "/var/lib/swapfile";
size = 32*1024;
} ];
swapDevices =
[ { device = "/dev/disk/by-uuid/3ab7f83d-71ac-4317-ade1-70e83e3e243f"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,34 +0,0 @@
programs.anyrun = {
enable = true;
config = {
plugins = [
# An array of all the plugins you want, which either can be paths to the .so files, or their packages
#inputs.anyrun.packages.${pkgs.system}.applications
#./some_plugin.so
"${inputs.anyrun.packages.${pkgs.system}.anyrun-with-all-plugins}/lib/kidex"
];
width = { fraction = 0.3; };
position = "top";
verticalOffset = { absolute = 0; };
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = false;
closeOnClick = false;
showResultsImmediately = false;
maxEntries = null;
};
#extraCss = ''
# .some_class {
# background: red;
# }
#'';
extraConfigFiles."some-plugin.ron".text = ''
Config(
// for any other plugin
// this file will be put in ~/.config/anyrun/some-plugin.ron
// refer to docs of xdg.configFile for available options
)
'';
};

View file

@ -1,12 +0,0 @@
{
imports = [
#./alacritty
#./dunst
./hypr
#./kitty
#./rofi
#./waybar
#./zsh
./anyrun
];
}

View file

@ -1,506 +0,0 @@
{ config, lib, pkgs, ... }:
{
imports = [
./hyprland-environment.nix
];
home.packages = with pkgs; [
waybar
swww
];
#test later systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
#nvidiaPatches = true;
extraConfig = ''
# Setup monitors
# Setup monitors
# See https://wiki.hyprland.org/Configuring/Monitors/
#monitor=,preferred,auto,1.066667
#monitor=,preferred,90,1.066667
monitor=eDP-1,preferred,auto,1.5
#monitor=eDP-1,preferred,auto,1.066667
#source = ~/.config/hypr/monitors.conf
#source = ~/.config/hypr/workspaces.conf
# Dual monitor example on G15 Strix
# eDP-1 is the built in monitor while DP-1 is external
# Both monitors here are at 1440 and 165Hz
# DP-1 is on the left and eDP-1 is on the right
#monitor=DP-1,2560x1440@165,0x0,1
#monitor=eDP-1,2560x1440@165,2560x0,1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
exec-once = ~/.config/hypr/xdg-ausl-hyprland
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = swww init
exec-once = sh -c "sleep 1 && swww clear"
#exec-once = swww img Downloads/PC\ Wallpapers/gifpixel/rooftop.gif
#exec-once = mpvpaper '*' -o "video-scale-y=1.1 --gpu-context=wayland --vo=gpu --hwdec=vaapi-copy" videowork/bgloop.webm
exec-once = waybar
#exec-once = ags
#exec = /usr/bin/hyprland-per-window-layout
exec-once = blueman-applet
exec-once = nm-applet --indicator
exec-once = wl-paste --watch cliphist store
#exec = ~/.config/HyprV/hyprv_util setbg
exec-once = pypr
exec-once = foot -s
exec-once = thunar --daemon
exec-once = swayidle -d
exec-once = hyprctl setcursor Bibata-Modern-Classic 16
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
env = NIX_REMOTE,daemon
exec-once = export XDG_DATA_DIRS=$HOME/.nix-profile/share:$XDG_DATA_DIRS
#env = QT_QPA_PLATFORMTHEME,qt5ct
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_QPA_PLATFORM,wayland;xcb
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
#env = GTK_THEME,Catppuccin-Macchiato-Rosewater-dark:dark
#env = GTK_THEME,Catppuccin-Macchiato-Rosewater-dark:light
env = GDK_BACKEND,wayland,x11
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us,ru
kb_variant =
kb_model =
kb_options=grp:caps_toggle
kb_rules =
follow_mouse = 1
mouse_refocus = false
touchpad {
natural_scroll = no
#disable_while_typing = false
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 0
gaps_out = 0
border_size = 1
no_border_on_floating = true
cursor_inactive_timeout = 3
#no_cursor_warps = true
#col.active_border = rgba(7287fdee) rgba(179299ee) 45deg
col.active_border = rgba(7287fdee)
#col.active_border=rgb(cdd6f4)
col.inactive_border = rgba(595959aa)
layout = dwindle
#layout = master
}
Binds {
scroll_event_delay = 0
workspace_back_and_forth = true
workspace_center_on = 1
}
XWayland {
force_zero_scaling = true
}
misc {
disable_hyprland_logo = yes
focus_on_activate = yes
#key_press_enables_dpms = true
# Whether Hyprland should focus an app that requests to be focused
focus_on_activate = true
#config autoreload
#disable_autoreload = true
#no_vfr = false
#render_ahead_of_time = yes
new_window_takes_over_fullscreen = 2
no_direct_scanout = false
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 5
blur {
enabled = true
size = 7
passes = 4
new_optimizations = true
}
blurls = lockscreen
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.10, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier, slide
animation = windowsOut, 1, 7, myBezier, slide
animation = border, 1, 10, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
#force_split = 2
permanent_direction_override = true
smart_split = false
no_gaps_when_only = 1
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = false
no_gaps_when_only = 1
allow_small_split = true
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
#workspace_swipe_direction_lock = off
workspace_swipe = true
workspace_swipe_fingers = 3
workspace_swipe_cancel_ratio = 0.15
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device:epic mouse V1 {
sensitivity = -0.5
}
# Example windowrule v1
#windowrule = float, ^(kitty)$
windowrule = float,^(pavucontrol)$
windowrule = float,^(blueman-manager)$
windowrule = float,^(nm-connection-editor)$
#windowrule = float,^(chromium)$
windowrule = float,^(thunar)$
windowrule = float, title:^(btop)$
windowrule = float, title:^(update-sys)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# rules below would make the specific app transparent
windowrulev2 = opacity 0.8 0.8,class:^(kitty)$
windowrulev2 = animation popin,class:^(kitty)$,title:^(update-sys)$
windowrulev2 = animation popin,class:^(thunar)$
#windowrulev2 = opacity 0.8 0.8,class:^(thunar)$
#windowrulev2 = opacity 0.8 0.8,class:^(VSCodium)$
#windowrulev2 = animation popin,class:^(chromium)$
windowrulev2 = move cursor -3% -105%,class:^(wofi)$
windowrulev2 = noanim,class:^(wofi)$
windowrulev2 = opacity 0.8 0.6,class:^(wofi)$
#sway-launcher
windowrulev2 = float,class:^(kitty)$,title:^(sway-launcher-desktop)$
windowrulev2 = noanim,class:^(kitty)$,title:^(sway-launcher-desktop)$
windowrulev2 = stayfocused,class:^(kitty)$,title:^(sway-launcher-desktop)$
#windowrulev2 = float,class:^(wezterm)$,title:^(sway-launcher-desktop)$
#windowrulev2 = noanim,class:^(wezterm)$,title:^(sway-launcher-desktop)$
#windowrulev2 = stayfocused,class:^(wezterm)$,title:^(sway-launcher-desktop)$
windowrulev2 = float,class:^(swlauncher)$
windowrulev2 = noanim,class:^(swlauncher)$
windowrulev2 = stayfocused,class:^(swlauncher)$
windowrulev2 = center,class:^(swlauncher)$
windowrulev2 = size 28% 50%,class:^(swlauncher)$
windowrulev2 = float,class:^(clipmanager)$
windowrulev2 = noanim,class:^(clipmanager)$
windowrulev2 = stayfocused,class:^(clipmanager)$
windowrulev2 = center,class:^(clipmanager)$
windowrulev2 = size 60% 45%,class:^(clipmanager)$
#foot clipboard-manager
windowrulev2 = float,title:^(clipboard_manager)$
windowrulev2 = noanim,title:^(clipboard_manager)$
windowrulev2 = stayfocused,title:^(clipboard_manager)$
windowrulev2 = center,title:^(clipboard_manager)$
windowrulev2 = size 45% 45%,title:^(clipboard_manager)$
#foot applauncher app_launcher
windowrulev2 = float,title:^(app_launcher)$
windowrulev2 = noanim,title:^(app_launcher)$
windowrulev2 = stayfocused,title:^(app_launcher)$
windowrulev2 = center,title:^(app_launcher)$
windowrulev2 = size 28% 50%,title:^(app_launcher)$
#foot emoji_manager
windowrulev2 = float,title:^(emoji_manager)$
windowrulev2 = noanim,title:^(emoji_manager)$
windowrulev2 = stayfocused,title:^(emoji_manager)$
windowrulev2 = center,title:^(emoji_manager)$
windowrulev2 = size 35% 50%,title:^(emoji_manager)$
windowrulev2 = noanim,class:^(__screenshoter)$
windowrulev2 = float,class:^(__screenshoter)$
#steam
windowrulev2 = stayfocused, title:^()$,class:^(steam)$
windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$
windowrulev2 = noblur, class:^(steam)$
windowrulev2 = noshadow, class:^(steam)$
windowrule = noblur,^(firefox)$ # disables blur for firefox
#layerrules
#layerrule = noanim, swaync-notification-window
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
bind = $mainMod, G, exec, /home/delta/.config/hypr/changeLayout.sh
#master layout
bind = $mainMod, I, layoutmsg, addmaster
bind = $mainMod SHIFT, I, layoutmsg, removemaster
bind = $mainMod, U, layoutmsg, orientationleft
bind = $mainMod SHIFT, U, layoutmsg, orientationright
bind = $mainMod, Y, layoutmsg, orientationcenter
bind = $mainMod, O, layoutmsg, swapwithmaster
#dwindle layout
bind = $mainMod, I, layoutmsg, preselect d
bind = $mainMod, O, layoutmsg, preselect n
bind = $mainMod, U, togglesplit
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
#bind = $mainMod, Q, exec, kitty #open the terminal
bind = $mainMod, RETURN, exec, footclient #open the terminal
bind = $mainMod SHIFT, RETURN, exec, alacritty #open the terminal
bind = $mainMod, Q, exec, wezterm #open the terminal
#bind = $mainMod, Q, exec, alacritty #open the terminal
bind = $mainMod SHIFT, Q, exec, alacritty #open the terminal
bind = $mainMod CONTROL, Q, exec, wezterm start #--always-new-process #open the terminal
bind = $mainMod, F1, exec, ~/.config/hypr/gamemode.sh
env = HYPRGAPSMODE
bind = $mainMod, F2, exec, ~/.config/hypr/gapsmode.sh
bind = $mainMod, B, exec, swaync-client --toggle-panel # notify center
bind = ALT, B, exec, swaync-client --close-latest # close lathest notify
bind = $mainMod, F4, killactive, # close the active window
bind = $mainMod, TAB, killactive, # close the active window
bind = $mainMod SHIFT, TAB, killactive, # close the active window
bind = $mainMod, Escape, exec, /home/delta/scripts/swaylock # Lock the screen
bind = $mainMod, M, exec, wlogout --protocol layer-shell # show the logout window
bind = $mainMod SHIFT, M, exit, # Exit Hyprland all together no (force quit Hyprland)
bind = $mainMod, E, exec, thunar # Show the graphical file browser
bind = $mainMod, V, togglefloating, # Allow a window to float
#bind = $mainMod, SPACE, exec, wofi # Show the graphical app launcher
#bind = $mainMod, SPACE, exec, kitty /usr/bin/
her-desktop # Show the graphical app launcher
#bind = $mainMod, SPACE, exec, alacritty --class=swlauncher -e /usr/bin/sway-launcher-desktop #& hyprctl switchxkblayout at-translated-set-2-keyboard 0# Show the graphical app launcher
#bind = $mainMod, SPACE, exec, footclient --title=app_launcher sh -c "TERMINAL=footclient sway-launcher-desktop" & hyprctl switchxkblayout at-translated-set-2-keyboard 0# Show the graphical app launcher
bind = $mainMod, SPACE, exec, anyrun & hyprctl switchxkblayout at-translated-set-2-keyboard 0# Show the graphical app launcher
bind = $mainMod SHIFT, SPACE, exec, footclient --title=app_launcher sh -c "TERMINAL=footclient sway-launcher-desktop" & hyprctl switchxkblayout at-translated-set-2-keyboard 0# Show the graphical app launcher
#bind = $mainMod CONTROL, SPACE, swapactiveworkspaces # Swaps the active workspaces between two monitors
bind = ALT, SPACE, exec, pypr shift_monitors +1 # K R A S I V O
bind = $mainMod, P, pseudo, # dwindle
#bind = $mainMod, J, togglesplit, # dwindle
#bind = $mainMod, S, exec, grim -g "$(slurp)" - | tee >(swappy -f -) | wl-copy # take a screenshot
bind = $mainMod, S, exec, hyprshot -m region --clipboard-only -s # take a screenshot
bind = $mainMod, Print, exec, /home/delta/scripts/screenshoter.sh # take a screenshot
bind = ,Print , exec, wl-paste | swappy -f - # take a screenshot
#bind = $mainMod, S, exec, /home/delta/screenshoter.sh # take a screenshot
#bind = $mainMod, S, exec, hyprshot -m output -s -c --clipboard-only # take a screenshot
#bind = ALT, V, exec, cliphist list | wofi -dmenu | cliphist decode | wl-copy # open clipboard manager
#bind = ALT, V, exec, cliphist list | /home/delta/scripts/fzfmenu | cliphist decode | wl-copy # open clipboard manager
bind = ALT, V, exec, cliphist list | /home/delta/scripts/fzfmenuft | cliphist decode | wl-copy && wtype -M ctrl v -m ctrl # open clipboard manager
bind = $mainMod, R, exec, footclient --title=emoji_manager sh -c "~/scripts/shmoji/shmoji fzf | wl-copy" & hyprctl switchxkblayout at-translated-set-2-keyboard 0
#bind = $mainMod, T, exec, ~/.config/HyprV/hyprv_util vswitch # switch HyprV version
bind = $mainMod, X, togglesplit, # dwindle
bind = $mainMod, C, fullscreen, 1 # fs
bind = $mainMod SHIFT, C, fullscreen, 0 # fs
bind = $mainMod, F, fakefullscreen # fs
bind = $mainMod CONTROL, C, fakefullscreen # fs
#bind = $mainMod, Z, maximize, # fs
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
bind = $mainMod, H, movefocus, l
bind = $mainMod, J, movefocus, d
bind = $mainMod, K, movefocus, u
bind = $mainMod, L, movefocus, r
#bind = $mainMod, shift H, movefocus, l
bind = $mainMod SHIFT, J, workspace, e-1
bind = $mainMod SHIFT, K, workspace, e+1
#bind = $mainMod, L, movefocus, r
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Move active window silently to a workspace with mainMod + CONTROL + [0-9]
bind = $mainMod CONTROL, 1, movetoworkspacesilent, 1
bind = $mainMod CONTROL, 2, movetoworkspacesilent, 2
bind = $mainMod CONTROL, 3, movetoworkspacesilent, 3
bind = $mainMod CONTROL, 4, movetoworkspacesilent, 4
bind = $mainMod CONTROL, 5, movetoworkspacesilent, 5
bind = $mainMod CONTROL, 6, movetoworkspacesilent, 6
bind = $mainMod CONTROL, 7, movetoworkspacesilent, 7
bind = $mainMod CONTROL, 8, movetoworkspacesilent, 8
bind = $mainMod CONTROL, 9, movetoworkspacesilent, 9
bind = $mainMod CONTROL, 0, movetoworkspacesilent, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
bind = $mainMod, bracketright, workspace, e+1
bind = $mainMod, bracketleft, workspace, e-1
# Scroll through windows workspaces with mainMod + scroll
bind = $mainMod SHIFT, mouse_down, cyclenext
bind = $mainMod SHIFT, mouse_up, cyclenext, prev
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
#Move/resize windows with arrowkeys
binde = $mainMod CTRL, right, resizeactive, 10 0
binde = $mainMod CTRL, left, resizeactive, -10 0
binde = $mainMod CTRL, up, resizeactive, 0 -10
binde = $mainMod CTRL, down, resizeactive, 0 10
#Move windows between grid with hjkl
bind = $mainMod CTRL, h, movewindow, l
bind = $mainMod CTRL, j, movewindow, d
bind = $mainMod CTRL, k, movewindow, u
bind = $mainMod CTRL, l, movewindow, r
# Move grid window between grid with arrows
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
#bind = $mainMod SHIFT, H, swapwindow, left
#bind = $mainMod SHIFT, J, swapwindow, down
#bind = $mainMod SHIFT, K, swapwindow, up
#bind = $mainMod SHIFT, L, swapwindow, right
# Move floating window wsad-like (change to vim keybinds later)
binde = $mainMod SHIFT CTRL, H, moveactive, -30 0
binde = $mainMod SHIFT CTRL, J, moveactive, 0 30
binde = $mainMod SHIFT CTRL, K, moveactive, 0 -30
binde = $mainMod SHIFT CTRL, L, moveactive, 30 0
# Move grid window between grid
#bind = $mainMod SHIFT, A, movewindow, l
#bind = $mainMod SHIFT, D, movewindow, r
#bind = $mainMod SHIFT, W, movewindow, u
#bind = $mainMod SHIFT, S, movewindow, d
#bind = $mainMod SHIFT, H, movewindow, l
#bind = $mainMod SHIFT, J, movewindow, d
#bind = $mainMod SHIFT, K, movewindow, u
#bind = $mainMod SHIFT, L, movewindow, r
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
source = ~/.config/hypr/media-binds.conf
source = ~/.config/hypr/env_var.conf
'';
};
home.file.".config/hypr/colors".text = ''
$background = rgba(1d192bee)
$foreground = rgba(c3dde7ee)
$color0 = rgba(1d192bee)
$color1 = rgba(465EA7ee)
$color2 = rgba(5A89B6ee)
$color3 = rgba(6296CAee)
$color4 = rgba(73B3D4ee)
$color5 = rgba(7BC7DDee)
$color6 = rgba(9CB4E3ee)
$color7 = rgba(c3dde7ee)
$color8 = rgba(889aa1ee)
$color9 = rgba(465EA7ee)
$color10 = rgba(5A89B6ee)
$color11 = rgba(6296CAee)
$color12 = rgba(73B3D4ee)
$color13 = rgba(7BC7DDee)
$color14 = rgba(9CB4E3ee)
$color15 = rgba(c3dde7ee)
'';
}

View file

@ -1,25 +0,0 @@
{ config, pkgs, ... }:
{
home = {
sessionVariables = {
#EDITOR = "lvim";
#BROWSER = "librewolf";
#TERMINAL = "kitty";
#GBM_BACKEND= "nvidia-drm";
#__GLX_VENDOR_LIBRARY_NAME= "nvidia";
#LIBVA_DRIVER_NAME= "nvidia"; # hardware acceleration
__GL_VRR_ALLOWED="1";
#WLR_NO_HARDWARE_CURSORS = "1";
#WLR_RENDERER_ALLOW_SOFTWARE = "1";
CLUTTER_BACKEND = "wayland";
WLR_RENDERER = "vulkan";
#XDG_CURRENT_DESKTOP = "Hyprland";
#XDG_SESSION_DESKTOP = "Hyprland";
#XDG_SESSION_TYPE = "wayland";
MOZ_USE_XINPUT2 = "1";
};
};
}

View file

@ -1,78 +0,0 @@
{
spotify,
stdenv,
rustPlatform,
fetchFromGitHub,
xorg,
pkgs
}: let
spotify-adblock = rustPlatform.buildRustPackage {
pname = "spotify-adblock";
version = "1.0.3";
src = fetchFromGitHub {
owner = "abba23";
repo = "spotify-adblock";
rev = "5a3281dee9f889afdeea7263558e7a715dcf5aab";
hash = "sha256-UzpHAHpQx2MlmBNKm2turjeVmgp5zXKWm3nZbEo0mYE=";
};
cargoSha256 = "sha256-wPV+ZY34OMbBrjmhvwjljbwmcUiPdWNHFU3ac7aVbIQ=";
patchPhase = ''
substituteInPlace src/lib.rs \
--replace 'config.toml' $out/etc/spotify-adblock/config.toml
'';
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out/etc/spotify-adblock
install -D --mode=644 config.toml $out/etc/spotify-adblock
mkdir -p $out/lib
install -D --mode=644 --strip target/release/libspotifyadblock.so $out/lib
'';
};
spotifywm = stdenv.mkDerivation {
name = "spotifywm";
src = fetchFromGitHub {
owner = "dasj";
repo = "spotifywm";
rev = "8624f539549973c124ed18753881045968881745";
hash = "sha256-AsXqcoqUXUFxTG+G+31lm45gjP6qGohEnUSUtKypew0=";
};
buildInputs = [xorg.libX11];
installPhase = "mv spotifywm.so $out";
};
in
spotify.overrideAttrs (
old: {
postInstall =
(old.postInstall or "")
+ ''
mkdir spotify-xpui
mv $out/share/spotify/Apps/xpui.spa .
${pkgs.unzip}/bin/unzip -qq xpui.spa -d spotify-xpui/
cd spotify-xpui/
${pkgs.perl}/bin/perl -pi -w -e 's|adsEnabled:!0|adsEnabled:!1|' xpui.js
${pkgs.perl}/bin/perl -pi -w -e 's|allSponsorships||' xpui.js
${pkgs.perl}/bin/perl -pi -w -e 's/(return|.=.=>)"free"===(.+?)(return|.=.=>)"premium"===/$1"premium"===$2$3"free"===/g' xpui.js
${pkgs.perl}/bin/perl -pi -w -e 's/(case .:|async enable\(.\)\{)(this.enabled=.+?\(.{1,3},"audio"\),|return this.enabled=...+?\(.{1,3},"audio"\))((;case 4:)?this.subscription=this.audioApi).+?this.onAdMessage\)/$1$3.cosmosConnector.increaseStreamTime(-100000000000)/' xpui.js
${pkgs.perl}/bin/perl -pi -w -e 's|(Enables quicksilver in-app messaging modal",default:)(!0)|$1false|' xpui.js
${pkgs.perl}/bin/perl -pi -w -e 's/(\.WiPggcPDzbwGxoxwLWFf\s*{)/$1 height: 0;/;' home-hpto.css
${pkgs.zip}/bin/zip -qq -r xpui.spa .
mv xpui.spa $out/share/spotify/Apps/xpui.spa
cd ..
rm xpui.spa
ln -s ${spotify-adblock}/lib/libspotifyadblock.so $libdir
sed -i "s:^Name=Spotify.*:Name=Spotify-adblock:" "$out/share/spotify/spotify.desktop"
wrapProgram $out/bin/spotify \
--set LD_PRELOAD "${spotify-adblock}/lib/libspotifyadblock.so"
'';
}
)

View file

@ -1,30 +0,0 @@
{ pkgs, inputs, ... }:
let
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
in
{
services.greetd = {
enable = true;
};
environment.etc."greetd/environments".text = ''
Hyprland
fish
bash
'';
# this is a life saver.
# literally no documentation about this anywhere.
# might be good to write about this...
# https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal"; # Without this errors will spam on screen
# Without these bootlogs will spam on screen
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
}