From 6a367190cc12cdbd73251718a7ad2dc6df3762d5 Mon Sep 17 00:00:00 2001 From: asnev Date: Sat, 11 Jul 2026 18:06:51 +0700 Subject: [PATCH] flake revamp 2 --- flake.lock | 18 +-- flake.nix | 13 +- hosts/phostron/configuration.nix | 24 +--- nixos/configuration.nix | 211 +++++++++++++------------------ nixos/nixpkgs.nix | 8 -- profiles/desktops/kde.nix | 30 ++--- users/coyote/configuration.nix | 21 +-- users/coyote/home.nix | 92 ++++++++------ 8 files changed, 184 insertions(+), 233 deletions(-) delete mode 100644 nixos/nixpkgs.nix diff --git a/flake.lock b/flake.lock index 3116d75..93fccc5 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1783221248, - "narHash": "sha256-ESQnuNHEDChsB4IxoLRhscVahqkDWkTb+qdIz8euYt4=", + "lastModified": 1783740085, + "narHash": "sha256-qajyHfZY29G2oEQk+uHxmsJcRoBUBXP9maTpFlwP/dI=", "owner": "nix-community", "repo": "home-manager", - "rev": "af2beae5f0fae0a4310cc0e6aef2572f56090353", + "rev": "3cd22efe6471dc7365c822bd9ad73a21e55f38fb", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1783389287, - "narHash": "sha256-0xIy4dVLqq47rA+mRy0hXDfjhQd4E5PoIns/RmB7nR4=", + "lastModified": 1783549019, + "narHash": "sha256-0XnckG4ZhBmAsYa9mLuEIFowBG0fDGPLHduQGsbMS4A=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0ad6f47ea4fe188f4bc8f0380f93ae8523337c6c", + "rev": "74cc63f702f7d60a557e152a57b40fb1fd0f72ac", "type": "github" }, "original": { @@ -39,11 +39,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1783224372, - "narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=", + "lastModified": 1783522502, + "narHash": "sha256-iffAls3iaNTyJC2faYcUXSI+Gp02cDjYl+MygxKl2GI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d407951447dcd00442e97087bf374aad70c04cea", + "rev": "0bb7ec54c8483066ec9d7720e780a5caa71f8612", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c46667c..6eac2dc 100644 --- a/flake.nix +++ b/flake.nix @@ -22,13 +22,12 @@ ./hosts/phostron/configuration.nix ./profiles/desktops/kde.nix ./users/coyote/configuration.nix - home-manager.nixosModules.home-manager { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - extraSpecialArgs = {inherit inputs;}; - users.coyote.imports = [./users/coyote/home.nix]; - }; + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = {inherit inputs;}; + home-manager.users.coyote = import ./users/coyote/home.nix; } ]; }; diff --git a/hosts/phostron/configuration.nix b/hosts/phostron/configuration.nix index 0125931..8484fb4 100644 --- a/hosts/phostron/configuration.nix +++ b/hosts/phostron/configuration.nix @@ -4,23 +4,13 @@ system.stateVersion = "26.05"; # I hope you know what you're doing. :) nixpkgs.hostPlatform = "x86_64-linux"; - services.displayManager.sddm.settings = { - Theme = { - Font = "Inter"; - CursorSize = 18; - }; - }; + services.displayManager.sddm.settings.Theme.Font = "Inter"; + services.displayManager.sddm.settings.Theme.CursorSize = 18; - hardware = { - bluetooth = { - enable = true; - powerOnBoot = false; - }; - }; + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = false; - networking = { - hostName = "phostron"; - networkmanager.enable = true; - firewall.enable = true; - }; + networking.hostName = "phostron"; + networking.networkmanager.enable = true; + networking.firewall.enable = true; } diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 8bae027..ecba32a 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -3,19 +3,14 @@ lib, pkgs, inputs, - ...}: { + ... +}: { boot = { - loader.systemd-boot = { - enable = true; - configurationLimit = 10; - efi.canTouchEfiVariables = true; - }; - timeout = 2; - kernelParams = [ - "quiet" - "rd.udev.log_level=3" - "rd.systemd.show_status=auto" - ]; + loader.systemd-boot.enable = true; + loader.systemd-boot.configurationLimit = 10; + loader.efi.canTouchEfiVariables = true; + loader.timeout = 2; + kernelParams = ["quiet" "rd.udev.log_level=3" "rd.systemd.show_status=auto"]; initrd.verbose = false; consoleLogLevel = 3; kernelPackages = pkgs.linuxPackages; @@ -41,125 +36,97 @@ security.rtkit.enable = true; - nix.settings = { - experimental-features = ["nix-command" "flakes"]; - auto-optimise-store = true; - }; + nix.settings.experimental-features = ["nix-command" "flakes"]; + nix.settings.auto-optimise-store = true; - nixpkgs = { - config.allowUnfree = true; - overlays = [ - (final: prev: { - unstable = import inputs.nixpkgs-unstable { - system = prev.stdenv.hostPlatform.system; - config.allowUnfree = true; - }; - }) - ]; - }; + nixpkgs.config.allowUnfree = true; + nixpkgs.overlays = [ + (final: prev: { + unstable = import inputs.nixpkgs-unstable { + system = prev.stdenv.hostPlatform.system; + config.allowUnfree = true; + }; + }) + ]; - environment = { - systemPackages = with pkgs; [ - # Nix - nh - alejandra - # system devel - python3 - gcc - clang - # system utils - firmware-updater - mtr - gnupg - ddate - testdisk - tree - wget - btop - dysk - plocate - traceroute - rlwrap - entr - unzip - ffmpeg - imagemagick - # extra utils - fd - bat - xh - tlrc - dust - hyperfine - ripgrep - fzf - eza - ]; - shellAliases = { - l = "eza --long --all"; - ll = "eza --long"; - ls = "eza --long"; - }; + environment.systemPackages = with pkgs; [ + # Nix + nh + alejandra + comma + # system utils + firmware-updater + mtr + gnupg + ddate + testdisk + tree + wget + btop + dysk + plocate + traceroute + rlwrap + entr + unzip + ffmpeg + imagemagick + # extra utils + fd + bat + xh + tlrc + dust + hyperfine + ripgrep + fzf + eza + ]; + environment.shellAliases = { + l = "eza --long --all"; + ll = "eza --long"; + ls = "eza --long"; }; programs = { fish.enable = true; + + atuin.enable = true; + atuin.settings.sync_address = "https://api.atuin.sh"; + starship.enable = true; - atuin = { - enable = true; - settings.sync_address = "https://api.atuin.sh"; - }; - nix-ld = { - enable = true; - libraries = with pkgs; [ - fuse - e2fsprogs - ]; - }; - tmux = { - enable = true; - clock24 = true; - baseIndex = 1; - shortcut = "a"; - keyMode = "vi"; - terminal = "screen-256color"; - escapeTime = 0; - extraConfig = '' - set -g pane-base-index 1 - set-window-option -g pane-base-index 1 - set-option -g renumber-windows on - set-option -g status-right "\"#W\"" - set -ga terminal-overrides ",*:RGB" - set -g mouse on - set -g set-clipboard on - ''; - }; + starship.transientPrompt.enable = true; + starship.transientPrompt.left = "starship module character"; + + obs-studio.enableVirtualCamera = true; + ssh.startAgent = true; + + nix-ld.enable = true; + nix-ld.libraries = with pkgs; [fuse e2fsprogs]; }; - fonts = { - packages = with pkgs; [ - # GUI fonts - inter - corefonts - vista-fonts - roboto - cantarell-fonts - # fonts for i18n - noto-fonts - noto-fonts-cjk-sans - noto-fonts-cjk-serif - noto-fonts-color-emoji - noto-fonts-monochrome-emoji - unifont - unifont_upper - unifont-csur - # terminal fonts - nerd-fonts.iosevka - ]; - fontconfig = { - antialias = true; - subpixel.rgba = "rgb"; - }; + fonts.packages = with pkgs; [ + # GUI fonts + inter + corefonts + vista-fonts + roboto + cantarell-fonts + # fonts for i18n + noto-fonts + noto-fonts-cjk-sans + noto-fonts-cjk-serif + noto-fonts-color-emoji + noto-fonts-monochrome-emoji + unifont + unifont_upper + unifont-csur + # terminal fonts + nerd-fonts.iosevka + ]; + fonts.fontconfig = { + antialias = true; + subpixel.rgba = "rgb"; }; xdg.portal = { diff --git a/nixos/nixpkgs.nix b/nixos/nixpkgs.nix deleted file mode 100644 index 8308cfe..0000000 --- a/nixos/nixpkgs.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - config, - lib, - pkgs, - inputs, - ... -}: { -} diff --git a/profiles/desktops/kde.nix b/profiles/desktops/kde.nix index e827a7d..66c2d36 100644 --- a/profiles/desktops/kde.nix +++ b/profiles/desktops/kde.nix @@ -1,20 +1,16 @@ {pkgs, ...}: { - services = { - displayManager.sddm.enable = true; - desktopManager.plasma6.enable = true; - }; + services.displayManager.sddm.enable = true; + services.desktopManager.plasma6.enable = true; - environment = { - systemPackages = with pkgs.kdePackages; [ - kate - bluez-qt - kalk - filelight - kamoso - konversation - kmail - ktorrent - ]; - plasma6.excludePackages = with pkgs.kdePackages; [discover]; - }; + environment.systemPackages = with pkgs.kdePackages; [ + kate + bluez-qt + kalk + filelight + kamoso + konversation + kmail + ktorrent + ]; + environment.plasma6.excludePackages = with pkgs.kdePackages; [discover]; } diff --git a/users/coyote/configuration.nix b/users/coyote/configuration.nix index b5a6dae..f19a6b9 100644 --- a/users/coyote/configuration.nix +++ b/users/coyote/configuration.nix @@ -6,15 +6,13 @@ USER_ID = 1000; KEY_FILE = "id_ed25519"; in { - users = { - users.coyote = { - isNormalUser = true; - description = "coyote"; - extraGroups = ["wheel" "networkmanager"]; - uid = USER_ID; - }; - defaultUserShell = pkgs.unstable.fish; + users.users.coyote = { + isNormalUser = true; + description = "coyote"; + extraGroups = ["wheel" "networkmanager"]; + uid = USER_ID; }; + users.defaultUserShell = pkgs.unstable.fish; environment.sessionVariables.SSH_AUTH_SOCK = "/run/user/${builtins.toString USER_ID}/ssh-agent"; @@ -31,11 +29,4 @@ in { RestartSec = 1; }; }; - - programs = { - obs-studio.enableVirtualCamera = true; - ssh.startAgent = true; - starship.transientPrompt.enable = true; - starship.transientPrompt.left = "starship module character"; - }; } diff --git a/users/coyote/home.nix b/users/coyote/home.nix index f48dc4e..a9e6ecb 100644 --- a/users/coyote/home.nix +++ b/users/coyote/home.nix @@ -6,47 +6,63 @@ (name: builtins.match ".*\\.nix" name != null) (builtins.attrNames (builtins.readDir programsDir)) ); - in programsImports; + in + programsImports; - home = { - stateVersion = "26.05"; # I hope you know what you're doing. :) - username = "coyote"; - homeDirectory = "/home/coyote"; - shell.enableShellIntegration = true; - - packages = with pkgs; [ - # programs - tdf - # productivity - libreoffice-fresh - karp - keepassxc - # multimedia - furnace - corrscope - vlc - haruna - subtitlecomposer - kid3 - kdePackages.kdenlive - unstable.audacity - # Internet - ungoogled-chromium - # games - osu-lazer-bin - # emulation - (unstable.bottles.override {removeWarningPopup = true;}) - # lisps - chicken - guile - sbcl - unstable.racket - # devel - unstable.lazygit - ]; - }; + home.stateVersion = "26.05"; # I hope you know what you're doing. :) + home.username = "coyote"; + home.homeDirectory = "/home/coyote"; + home.shell.enableShellIntegration = true; + home.packages = with pkgs; [ + # programs + tdf + # productivity + libreoffice-fresh + karp + keepassxc + # multimedia + furnace + corrscope + vlc + haruna + subtitlecomposer + kid3 + kdePackages.kdenlive + unstable.audacity + # Internet + ungoogled-chromium + # games + osu-lazer-bin + # emulation + (unstable.bottles.override {removeWarningPopup = true;}) + # lisps + chicken + guile + sbcl + unstable.racket + # devel + unstable.lazygit + ]; programs = { + tmux = { + enable = true; + clock24 = true; + baseIndex = 1; + shortcut = "a"; + keyMode = "vi"; + terminal = "screen-256color"; + escapeTime = 0; + extraConfig = '' + set -g pane-base-index 1 + set-window-option -g pane-base-index 1 + set-option -g renumber-windows on + set-option -g status-right "\"#W\"" + set -ga terminal-overrides ",*:RGB" + set -g mouse on + set -g set-clipboard on + ''; + }; git = { enable = true; settings = {