Archived
Watch
1
0
Fork
You've already forked nixos
0

semi-major-ish cleanup throughout tree

This commit is contained in:
asnev 2026-10-12 14:03:35 +07:00
commit 25af328bfa
Signed by: asnev
SSH key fingerprint: SHA256:8hagYq9hDUuS5clQ78FKhIoQDvg5crdkYMHX+3g7wB4
9 changed files with 170 additions and 107 deletions

34
flake.lock generated
View file

@ -1,5 +1,23 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -55,10 +73,26 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View file

@ -12,6 +12,9 @@
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs = inputs @ {
@ -19,14 +22,19 @@
nixpkgs,
nixpkgs-unstable,
home-manager,
flake-utils,
...
}: {
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter = pkgs.alejandra;
})
// {
nixosConfigurations.phostron = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/phostron
./modules/users/coyote
./modules/users/coyote/home-manager-module.nix
];
};
};

View file

@ -1,10 +1,4 @@
{
pkgs,
config,
lib,
inputs,
...
}: {
{pkgs, ...}: {
imports = [
./vim.nix
];
@ -45,14 +39,58 @@
];
programs = {
home-manager.enable = true;
ssh = {
enable = true;
enableDefaultConfig = false;
settings."*" = {
ForwardAgent = false;
AddKeysToAgent = "yes"; # no passphrase, silent auto-add
Compression = false;
ServerAliveInterval = 0;
ServerAliveCountMax = 3;
HashKnownHosts = false;
UserKnownHostsFile = "~/.ssh/known_hosts";
ControlMaster = "no";
ControlPath = "~/.ssh/master-%r@%n:%p";
ControlPersist = "no";
};
};
git = {
enable = true;
userName = "asnev";
userEmail = "notasnev@proton.me";
signing = {
key = "/home/coyote/.ssh/id_ed25519.pub";
format = "ssh";
};
includes = [
{
condition = "gitdir:/home/coyote/NixOS/";
contents.core.sshCommand = "ssh -i /home/coyote/.ssh/id_ed25519";
}
];
};
fish.enable = true;
fish.shellAbbrs = {
l = "eza --grid --all";
ll = "eza --long --all";
ls = "eza";
".." = "cd ..";
"..." = "cd ../..";
};
tmux = {
enable = true;
clock24 = true;
baseIndex = 1;
shortcut = "a";
keyMode = "vi";
terminal = "screen-256color";
escapeTime = 0;
terminal = "tmux-256color";
escapeTime = 10;
extraConfig = ''
set -g pane-base-index 1
set-window-option -g pane-base-index 1
@ -67,13 +105,28 @@
yt-dlp.enable = true;
yt-dlp.package = pkgs.unstable.yt-dlp;
starship.package = pkgs.unstable.starship;
starship = {
enable = true;
package = pkgs.unstable.starship;
enableTransience = true;
settings = {
"$schema" = "https://starship.rs/config-schema.json";
git_status = {
ahead = ">";
behind = "<";
diverged = "<>";
renamed = "r";
deleted = "d";
};
character.success_symbol = "[λ](bold green)";
character.error_symbol = "[λ](bold red)";
};
};
obs-studio.enable = true;
obs-studio.plugins = with pkgs.obs-studio-plugins; [
input-overlay
droidcam-obs
wlrobs
];
fastfetch.enable = true;

View file

@ -4,11 +4,7 @@
packageConfigurable = pkgs.unstable.vim-full;
defaultEditor = true;
plugins = with pkgs.unstable.vimPlugins; [
gruvbox
rainbow
undotree
];
plugins = with pkgs.unstable.vimPlugins; [gruvbox vim-nix undotree];
extraConfig = ''
set nocompatible
@ -21,6 +17,9 @@
syntax on
set ruler
set number
set relativenumber
set cursorline
set showcmd
set showmode
set laststatus=1
@ -31,7 +30,6 @@
filetype plugin indent on
set autoindent
set smartindent
set expandtab
set smarttab
set tabstop=4
@ -50,20 +48,21 @@
colorscheme gruvbox
let g:terminal_ansi_colors = ['#282828', '#cc241d', '#98971a', '#d79921', '#458588', '#b16286', '#689d6a', '#a89984', '#928374', '#fb4934', '#b8bb26', '#fabd2f', '#83a598', '#d3869b', '#8ec07c', '#ebdbb2']
let g:rainbow_active = 1
set showmatch
set lispwords+=defun,defmacro,defvar,defparameter,defmethod,define-syntax,lambda,let,let*,letrec,flet,labels,progn,when,unless,if,cond
augroup coyote_filetype_settings
autocmd!
autocmd FileType javascript,typescript,html,css,json,nix,vim
autocmd FileType javascript,javascriptreact,typescript,typescriptreact,html,css,scss,json,jsonc,vue,svelte,yaml,toml,markdown,nix,vim,ruby,eruby,dart,haskell,elm
\ setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
autocmd FileType python,rust,java,lua,c,cpp,h,hpp
autocmd FileType python,rust,java,lua,c,cpp,cs,php,kotlin,swift,scala,perl
\ setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4
autocmd FileType go,make
autocmd FileType go,gomod,make
\ setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=0
autocmd FileType lisp,scheme,clojure,racket
autocmd FileType lisp,scheme,clojure,racket,fennel
\ setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
\ lisp autoindent showmatch
\ lispwords+=defun,defmacro,defvar,defparameter,defmethod,define-syntax,lambda,let,let*,letre,flet,labels,progn,when,unless,if,cond
\ lisp autoindent
augroup END
'';
};

View file

@ -10,14 +10,21 @@
networking.networkmanager.enable = true;
networking.firewall.enable = true;
services.printing.enable = true;
services.printing.drivers = [pkgs.epson-escpr];
hardware.bluetooth.enable = true;
hardware.sane.enable = true;
hardware.sane.extraBackends = [pkgs.epsonscan2];
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
hardware.enableRedistributableFirmware = true;
services.fstrim.enable = true;
zramSwap.enable = true;
# SDDM look, specific to this machine
# NOTE: Wayland for SDDM intentionally left disabled (experimental)
services.displayManager.sddm.settings.Theme.Font = "Inter";
services.displayManager.sddm.settings.Theme.CursorSize = 18;
}

View file

@ -2,6 +2,8 @@
imports = [
../../modules/common.nix
../../modules/desktop/kde-plasma.nix
../../modules/users/coyote
../../modules/users/coyote/home-manager-module.nix
./hardware-configuration.nix
./configuration.nix
];

View file

@ -7,7 +7,11 @@
}: {
nix.settings.experimental-features = ["nix-command" "flakes"];
nix.settings.auto-optimise-store = true;
nix.package = pkgs.lixPackageSets.stable.lix;
nix.gc.automatic = true;
nix.gc.dates = "weekly";
nix.gc.options = "--delete-older-than 14d";
nix.optimise.automatic = true;
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
@ -17,15 +21,6 @@
config.allowUnfree = true;
};
})
(final: prev: {
inherit
(prev.lixPackageSets.stable)
nixpkgs-review
nix-eval-jobs
nix-fast-build
colmena
;
})
];
boot = {
@ -33,10 +28,7 @@
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;
kernelPackages = pkgs.linuxPackages_latest;
};
time.timeZone = "Asia/Jakarta";
@ -48,7 +40,6 @@
locate.enable = true;
printing.enable = true;
openssh.enable = false;
pulseaudio.enable = false;
pipewire.enable = true;
pipewire.alsa.enable = true;
@ -102,16 +93,6 @@
eza
];
environment.shellAliases = {
sudo = "doas";
l = "eza --grid --all";
ll = "eza --long --all";
ls = "eza --long";
".." = "cd ..";
"..." = "cd ../..";
cat = "bat";
};
programs = {
fish.enable = true;
@ -119,22 +100,6 @@
atuin.settings.sync_address = "https://api.atuin.sh";
atuin.settings.enter_accept = true;
starship.enable = true;
starship.transientPrompt.enable = true;
starship.transientPrompt.left = "starship module character";
starship.settings = {
"$schema" = "https://starship.rs/config-schema.json";
git_status = {
ahead = ">";
behind = "<";
diverged = "<>";
renamed = "r";
deleted = "d";
};
character.success_symbol = "[λ](bold green)";
character.error_symbol = "[λ](bold red)";
};
git.enable = true;
git.config = {
init.defaultBranch = "main";
@ -147,17 +112,26 @@
# one-off options that would live in the Home Manager section if the
# relevant modules existed there
obs-studio.enableVirtualCamera = true;
# NOTE: services.openssh.enable = false above only disables the SSH *server*
# This still starts the ssh-agent user service (SSH_AUTH_SOCK=%t/ssh-agent)
ssh.startAgent = true;
nix-ld.enable = true;
nix-ld.libraries = with pkgs; [fuse e2fsprogs];
nix-ld.libraries = with pkgs; [
fuse
e2fsprogs
stdenv.cc.cc
zlib
alsa-lib
expat
];
};
fonts.packages = with pkgs; [
# GUI fonts
inter
corefonts
vista-fonts
roboto
cantarell-fonts
# fonts for i18n
@ -175,8 +149,9 @@
fonts.fontconfig.antialias = true;
fonts.fontconfig.subpixel.rgba = "rgb";
xdg.portal.enable = true;
xdg.portal.config.common.default = ["gtk"];
xdg.portal.extraPortals = with pkgs; [xdg-desktop-portal-wlr];
fonts.fontconfig.hinting.enable = true;
fonts.fontconfig.defaultFonts = {
sansSerif = ["Inter"];
monospace = ["Iosevka Nerd Font"];
};
}

View file

@ -1,33 +1,17 @@
{
pkgs,
config,
...
}: let
USER_ID = 1000;
KEY_FILE = "id_ed25519";
in {
{pkgs, ...}: {
# Password set imperatively via `passwd`
# so `mutableUsers = false` doesn't accidentally lock out SDDM/TTY
users.mutableUsers = true;
users.users.coyote = {
isNormalUser = true;
description = "coyote";
extraGroups = ["wheel" "networkmanager" "lp" "scanner"];
uid = USER_ID;
extraGroups = ["wheel" "networkmanager" "lp" "scanner" "video" "render" "input" "audio" "kvm"];
uid = 1000;
};
users.defaultUserShell = pkgs.unstable.fish;
users.defaultUserShell = pkgs.fish;
# daemon blurb to get SSH for Git working
environment.sessionVariables.SSH_AUTH_SOCK = "/run/user/${builtins.toString USER_ID}/ssh-agent";
systemd.user.services.ssh-add-key = {
wantedBy = ["default.target"];
after = ["ssh-agent.service"];
serviceConfig = {
Type = "oneshot";
ExecStartPre = "${pkgs.coreutils-full}/bin/sleep 1";
ExecStart = [
"${pkgs.openssh}/bin/ssh-add ${config.users.users.coyote.home}/.ssh/${KEY_FILE}"
];
Restart = "on-failure";
RestartSec = 1;
};
environment.sessionVariables = {
NH_FLAKE = "/home/coyote/NixOS";
};
}

View file

@ -3,6 +3,7 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.extraSpecialArgs = {inherit inputs;};
home-manager.users.coyote.imports = [../../../home/coyote];
}