aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspl3g <spleefer6@yandex.ru>2025-10-27 23:45:05 +0300
committerspl3g <spleefer6@yandex.ru>2025-10-27 23:50:34 +0300
commit45da62a634546a7359b9654a1e01be3bd067189a (patch)
tree30a8a5fa9ebae46dda2ccf0f03df8975bc45ca52
parent3ac3426144afa5eff1bb2551e27026c1cd0f2ca4 (diff)
chore: formatting
-rw-r--r--home-manager/general.nix66
-rw-r--r--home-manager/homeModules/emacs/default.nix47
-rw-r--r--home-manager/homeModules/fish.nix29
-rw-r--r--home-manager/homeModules/rofi.nix51
-rw-r--r--nixos/general.nix40
-rw-r--r--nixos/laptop/hardware-configuration.nix32
-rw-r--r--shell.nix5
7 files changed, 153 insertions, 117 deletions
diff --git a/home-manager/general.nix b/home-manager/general.nix
index 9aa3427..e3c1412 100644
--- a/home-manager/general.nix
+++ b/home-manager/general.nix
@@ -1,42 +1,49 @@
-{ pkgs, inputs, outputs, config, lib, ... }:
-let
+{
+ pkgs,
+ inputs,
+ outputs,
+ config,
+ lib,
+ ...
+}: let
username = "jerpo";
homeDirectory = "/home/${username}";
configHome = "${homeDirectory}/.config";
cliPkgs = with pkgs; [
fd
- jq
- zip
- tldr
+ jq
+ zip
wget
btop
- unzip
+ unzip
p7zip
- ffmpeg
- ripgrep
- xdragon
- steam-run
- python311
- xdg-utils
- pkg-config
- ghostscript
- adwaita-icon-theme
- pokemon-colorscripts
- nix-prefetch-scripts
+ ffmpeg
+ flatpak
+ ripgrep
+ xdragon
+ tealdeer
+ steam-run
+ python311
+ xdg-utils
+ pkg-config
+ ghostscript
+ adwaita-icon-theme
+ pokemon-colorscripts
+ nix-prefetch-scripts
];
nogamesPkgs = with pkgs; [
vkd3d
steam
- bottles
- gamemode
+ bottles
open-sans
+ osu-lazer-bin
];
baconPkgs = with pkgs; [
vesktop
telegram-desktop
- libreoffice-fresh
+ libreoffice-fresh
transmission_4-gtk
];
@@ -44,8 +51,7 @@ let
kubectl
kubernetes-helm
];
-in
-{
+in {
imports = [
./homeModules
];
@@ -54,7 +60,7 @@ in
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
- outputs.overlays.unstable-packages
+ outputs.overlays.truly-unstable-packages
];
config = {
allowUnfree = true;
@@ -62,7 +68,6 @@ in
};
};
-
home = {
inherit username homeDirectory;
stateVersion = "23.05";
@@ -79,23 +84,28 @@ in
lib.meta = {
configPath = "${config.home.homeDirectory}/nixfiles/";
- mkMutableSymlink = path: config.lib.file.mkOutOfStoreSymlink
+ mkMutableSymlink = path:
+ config.lib.file.mkOutOfStoreSymlink
(config.lib.meta.configPath + lib.strings.removePrefix (toString inputs.self) (toString path));
};
# from homeModules
stylixConfig.enable = true;
stylixConfig.theme = "everforest";
-
+
emacs.enable = true;
+ emacs.package = pkgs.emacs30;
alacritty.enable = true;
fish.enable = true;
- firefox.enable = true;
zen-browser.enable = true;
- nvf.enable = true;
tmux.enable = true;
+ programs.nix-index-database.comma.enable = true;
+ programs.nix-index = {
+ enable = true;
+ };
+
programs.home-manager.enable = true;
}
diff --git a/home-manager/homeModules/emacs/default.nix b/home-manager/homeModules/emacs/default.nix
index b108bab..7a8b66f 100644
--- a/home-manager/homeModules/emacs/default.nix
+++ b/home-manager/homeModules/emacs/default.nix
@@ -1,4 +1,9 @@
-{ pkgs, config, lib, ... }:
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}:
let
mkMutableSymlink = config.lib.meta.mkMutableSymlink;
@@ -10,28 +15,32 @@ in
};
config = lib.mkIf config.emacs.enable {
home.sessionVariables.EDITOR = "emacsclient -a emacs";
- home.packages = with pkgs; with python311Packages; [
- # required dependencies
- ripgrep
- fd
- tree-sitter
- emacs-all-the-icons-fonts
- libappindicator
- poppler_utils
- nixd
- nixpkgs-fmt
- sqlite
- ];
-
+ home.packages =
+ with pkgs;
+ with python311Packages;
+ [
+ # required dependencies
+ ripgrep
+ fd
+ tree-sitter
+ emacs-all-the-icons-fonts
+ libappindicator
+ poppler_utils
+ nixd
+ alejandra
+ sqlite
+ ];
+
programs.emacs = {
enable = true;
package = config.emacs.package;
- extraPackages = epkgs: with epkgs; [
- treesit-grammars.with-all-grammars
- mu4e
- ];
+ extraPackages =
+ epkgs: with epkgs; [
+ treesit-grammars.with-all-grammars
+ mu4e
+ ];
};
-
+
xdg.configFile = {
"emacs/early-init.el".source = mkMutableSymlink ./early-init.el;
"emacs/init.el".source = mkMutableSymlink ./init.el;
diff --git a/home-manager/homeModules/fish.nix b/home-manager/homeModules/fish.nix
index 7591383..b539e84 100644
--- a/home-manager/homeModules/fish.nix
+++ b/home-manager/homeModules/fish.nix
@@ -1,6 +1,9 @@
-{ pkgs, config, lib, ... }:
-
{
+ pkgs,
+ config,
+ lib,
+ ...
+}: {
options = {
fish.enable = lib.mkEnableOption "enable fish";
};
@@ -9,18 +12,26 @@
enable = true;
nix-direnv.enable = true;
};
-
+
+ programs.nix-index.enableFishIntegration = true;
+
programs.fish = {
enable = true;
plugins = [
- { name = "pure"; src = pkgs.fishPlugins.pure.src; }
- { name = "autopair"; src = pkgs.fishPlugins.autopair.src; }
+ {
+ name = "pure";
+ src = pkgs.fishPlugins.pure.src;
+ }
+ {
+ name = "autopair";
+ src = pkgs.fishPlugins.autopair.src;
+ }
];
interactiveShellInit = ''
- set fish_greeting
- pokemon-colorscripts -r --no-title
- '';
-
+ set fish_greeting
+ pokemon-colorscripts -r --no-title
+ '';
+
shellAliases = {
ls = "ls --hyperlink=auto --color=auto";
};
diff --git a/home-manager/homeModules/rofi.nix b/home-manager/homeModules/rofi.nix
index 3d93f53..48434ec 100644
--- a/home-manager/homeModules/rofi.nix
+++ b/home-manager/homeModules/rofi.nix
@@ -1,37 +1,39 @@
-{ pkgs, config, lib, ... }:
-
{
+ pkgs,
+ config,
+ lib,
+ ...
+}: {
options = {
rofi.enable = lib.mkEnableOption "enable rofi";
- rofi.package = lib.mkPackageOption pkgs "rofi package" { default = [ "rofi-wayland" ]; };
+ rofi.package = lib.mkPackageOption pkgs "rofi package" {default = ["rofi"];};
};
-
+
config = lib.mkIf config.rofi.enable {
programs.rofi = {
enable = true;
package = config.rofi.package;
- theme =
- with config.lib.stylix.colors.withHashtag;
+ theme = with config.lib.stylix.colors.withHashtag;
builtins.toFile "theme.rasi" ''
- * {
- font: "FiraCode Nerd Font Medium 12";
-
- bg0: ${base01};
- bg1: ${base02};
- fg0: ${base04};
-
- accent-color: ${base03};
- urgent-color: #ffffff;
-
- background-color: transparent;
- text-color: @fg0;
-
- margin: 0;
- padding: 0;
- spacing: 0;
- }
+ * {
+ font: "FiraCode Nerd Font Medium 12";
+
+ bg0: ${base01};
+ bg1: ${base02};
+ fg0: ${base04};
+
+ accent-color: ${base03};
+ urgent-color: #ffffff;
+
+ background-color: transparent;
+ text-color: @fg0;
+
+ margin: 0;
+ padding: 0;
+ spacing: 0;
+ }
- ${builtins.readFile ./attachments/rofi-theme.rasi}'';
+ ${builtins.readFile ./attachments/rofi-theme.rasi}'';
cycle = true;
plugins = with pkgs; [
rofi-emoji
@@ -44,4 +46,3 @@
};
};
}
-
diff --git a/nixos/general.nix b/nixos/general.nix
index 2162cda..cc400d2 100644
--- a/nixos/general.nix
+++ b/nixos/general.nix
@@ -1,15 +1,20 @@
-{ inputs, outputs, lib, config, pkgs, ... }:
-
{
+ inputs,
+ outputs,
+ lib,
+ config,
+ pkgs,
+ ...
+}: {
imports = [
./nixosModules
];
-
+
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
- outputs.overlays.unstable-packages
+ outputs.overlays.truly-unstable-packages
];
config = {
allowUnfree = true;
@@ -19,7 +24,7 @@
nix = {
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
- registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
+ registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
@@ -36,7 +41,7 @@
# Deduplicate and optimize nix store
auto-optimise-store = true;
- trusted-users = [ "root" "@wheel" ];
+ trusted-users = ["root" "@wheel"];
};
};
@@ -47,7 +52,7 @@
ly.enable = true;
stylixConfig.enable = true;
kanata.enable = true;
-
+
networking = {
networkmanager = {
enable = true;
@@ -56,7 +61,6 @@
hosts = {
"127.0.0.1" = ["v2raya.local"];
};
-
};
virtualisation.containers.enable = true;
@@ -70,15 +74,15 @@
services.postgresql = {
enable = true;
};
-
+
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
-
+
security.rtkit.enable = true;
security.polkit.enable = true;
-
+
services.pipewire = {
enable = true;
audio.enable = true;
@@ -91,10 +95,12 @@
programs.gamemode = {
enable = true;
settings = {
- gpu.amd_performance_level = "high";
+ gpu.apply_gpu_optimizations = "accept-responsibility";
};
};
-
+
+ services.udev.packages = with pkgs; [platformio-core.udev];
+
environment.systemPackages = with pkgs; [
neovim
git
@@ -131,10 +137,10 @@
# the reason there's Noto Color Emoji everywhere is to override DejaVu's
# B&W emojis that would sometimes show instead of some Color emojis
fontconfig.defaultFonts = {
- serif = [ "Noto Serif" "Noto Color Emoji" ];
- sansSerif = [ "Noto Sans" "Noto Color Emoji" ];
- monospace = [ "Sauce Code Pro Nerd Font" ];
- emoji = [ "Noto Color Emoji" ];
+ serif = ["Noto Serif" "Noto Color Emoji"];
+ sansSerif = ["Noto Sans" "Noto Color Emoji"];
+ monospace = ["Sauce Code Pro Nerd Font"];
+ emoji = ["Noto Color Emoji"];
};
};
diff --git a/nixos/laptop/hardware-configuration.nix b/nixos/laptop/hardware-configuration.nix
index f8d847d..e63527d 100644
--- a/nixos/laptop/hardware-configuration.nix
+++ b/nixos/laptop/hardware-configuration.nix
@@ -1,18 +1,23 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
-{ config, lib, pkgs, modulesPath, ... }:
-
{
- imports =
- [ (modulesPath + "/installer/scan/not-detected.nix")
- ];
+ config,
+ lib,
+ pkgs,
+ modulesPath,
+ ...
+}: {
+ imports = [
+ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
- boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" "sdhci_pci" ];
- boot.initrd.kernelModules = [ ];
- boot.kernelModules = [ "kvm-amd" ];
- boot.kernelParams = [ "amdgpu.sg_display=0" ];
- boot.extraModulePackages = [ ];
+ boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" "sdhci_pci"];
+ boot.initrd.kernelModules = [];
+ boot.kernelModules = ["kvm-amd"];
+ # boot.kernelParams = ["amdgpu.sg_display=0" "amdgpu.dcdebugmask=0x10"];
+ boot.kernelParams = [];
+ boot.extraModulePackages = [];
# 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
@@ -25,16 +30,11 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
- # hardware.amdgpu.amdvlk = {
- # enable = true;
- # support32Bit.enable = true;
- # };
-
hardware.graphics = {
enable = true;
enable32Bit = true;
};
+ hardware.amdgpu.initrd.enable = true;
- services.xserver.videoDrivers = [ "modesetting" ];
hardware.bluetooth.enable = true;
}
diff --git a/shell.nix b/shell.nix
index c1395d5..7c86085 100644
--- a/shell.nix
+++ b/shell.nix
@@ -1,10 +1,9 @@
# Shell for bootstrapping flake-enabled nix and home-manager
# You can enter it through 'nix develop' or (legacy) 'nix-shell'
-
-{ pkgs ? (import ./nixpkgs.nix) { } }: {
+{pkgs ? (import ./nixpkgs.nix) {}}: {
default = pkgs.mkShell {
# Enable experimental features without having to specify the argument
NIX_CONFIG = "experimental-features = nix-command flakes";
- nativeBuildInputs = with pkgs; [ nix home-manager git neovim sops ];
+ nativeBuildInputs = with pkgs; [nix home-manager git neovim sops ssh-to-age];
};
}