unliterated my config
This commit is contained in:
parent
02f76a734e
commit
1f978da586
16 changed files with 566 additions and 2495 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
.directory
|
.directory
|
||||||
*.swp
|
*.swp
|
||||||
result
|
result
|
||||||
result/
|
result-*
|
||||||
|
|
|
||||||
2
LICENSE
2
LICENSE
|
|
@ -1,4 +1,3 @@
|
||||||
# LICENSE
|
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2026 asnev
|
Copyright (c) 2026 asnev
|
||||||
|
|
@ -20,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
|
||||||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -23,11 +23,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1788405554,
|
"lastModified": 1788584326,
|
||||||
"narHash": "sha256-r2f1oUwixlgq9zOdYLqJLfS/lWBT60/IITjhTKI59JU=",
|
"narHash": "sha256-Fd3OB8J9JhgliQwOKcqx4M672CInxi1I5VnwsaXeSQo=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a5cc6f2c37bf518436dc8d1c288ccd0c43c2f4c4",
|
"rev": "6713828a351efa628b025a1adf7f43cbf8597513",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
440
flake.nix
440
flake.nix
|
|
@ -1,4 +1,3 @@
|
||||||
# flake.nix
|
|
||||||
{
|
{
|
||||||
description = "asnev's NixOS configuration";
|
description = "asnev's NixOS configuration";
|
||||||
|
|
||||||
|
|
@ -22,446 +21,13 @@
|
||||||
home-manager,
|
home-manager,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# flake-modules
|
|
||||||
nixosConfigurations.phostron = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.phostron = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs;};
|
||||||
modules = [
|
modules = [
|
||||||
# phostron-configuration
|
./hosts/phostron
|
||||||
# nixos-configuration
|
./modules/users/coyote
|
||||||
({ config, lib, pkgs, inputs, ... }: {
|
./modules/users/coyote/home-manager-module.nix
|
||||||
# nixos-configuration-contents
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
|
||||||
nix.settings.auto-optimise-store = true;
|
|
||||||
nix.package = pkgs.lixPackageSets.stable.lix;
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
unstable = import inputs.nixpkgs-unstable {
|
|
||||||
system = prev.stdenv.hostPlatform.system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
(final: prev: {
|
|
||||||
inherit (prev.lixPackageSets.stable)
|
|
||||||
nixpkgs-review
|
|
||||||
nix-eval-jobs
|
|
||||||
nix-fast-build
|
|
||||||
colmena;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
boot = {
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
time.timeZone = "Asia/Jakarta";
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
|
||||||
services = {
|
|
||||||
fwupd.enable = true;
|
|
||||||
xserver.xkb.layout = "us";
|
|
||||||
locate.enable = true;
|
|
||||||
printing.enable = true;
|
|
||||||
openssh.enable = false;
|
|
||||||
pulseaudio.enable = false;
|
|
||||||
|
|
||||||
pipewire.enable = true;
|
|
||||||
pipewire.alsa.enable = true;
|
|
||||||
pipewire.alsa.support32Bit = true;
|
|
||||||
pipewire.pulse.enable = true;
|
|
||||||
};
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
security.sudo.enable = false;
|
|
||||||
|
|
||||||
security.doas.enable = true;
|
|
||||||
security.doas.extraRules = [{
|
|
||||||
groups = ["wheel"];
|
|
||||||
keepEnv = true;
|
|
||||||
persist = true;
|
|
||||||
}];
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nh alejandra literate git
|
|
||||||
# system utils
|
|
||||||
firmware-updater mtr gnupg ddate testdisk tree wget btop plocate traceroute
|
|
||||||
rlwrap entr unzip ffmpeg imagemagick gnome-disk-utility
|
|
||||||
# extra (oxidised) utils
|
|
||||||
fd bat xh tlrc dysk dust hyperfine ripgrep fzf eza
|
|
||||||
];
|
|
||||||
environment.shellAliases = {
|
|
||||||
sudo = "doas";
|
|
||||||
l = "eza --grid --all";
|
|
||||||
ll = "eza --long --all";
|
|
||||||
ls = "eza --long";
|
|
||||||
".." = "cd ..";
|
|
||||||
"..." = "cd ../..";
|
|
||||||
cat = "bat"; # this line is really funny to me
|
|
||||||
};
|
|
||||||
environment.sessionVariables.XDG_DATA_DIRS = [
|
|
||||||
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
|
||||||
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
|
||||||
];
|
|
||||||
programs = {
|
|
||||||
# nixos-configuration-programs-contents
|
|
||||||
fish.enable = true;
|
|
||||||
|
|
||||||
atuin.enable = true;
|
|
||||||
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";
|
|
||||||
advice.defaultBranchName = false;
|
|
||||||
gpg.format = "ssh";
|
|
||||||
commit.gpgSign = true;
|
|
||||||
url."https://github.com/".insteadOf = ["github:"];
|
|
||||||
};
|
|
||||||
|
|
||||||
steam.enable = true;
|
|
||||||
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
|
|
||||||
];
|
|
||||||
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];
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
# kde-plasma-configuration
|
|
||||||
({pkgs, ...}: {
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
environment.systemPackages = with pkgs.kdePackages; [
|
|
||||||
kate elisa bluez-qt kalk filelight kamoso konversation kmail ktorrent
|
|
||||||
kclock
|
|
||||||
];
|
|
||||||
environment.plasma6.excludePackages = [pkgs.kdePackages.discover];
|
|
||||||
})
|
|
||||||
|
|
||||||
({ config, lib, pkgs, modulesPath, ... }: {
|
|
||||||
# phostron-hardware-configuration-contents
|
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
|
||||||
boot.initrd.kernelModules = [];
|
|
||||||
boot.kernelModules = ["kvm-amd"];
|
|
||||||
boot.extraModulePackages = [];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/24fb172c-c29f-40c3-ae4d-ff652358563a";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/DFC9-994A";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = ["fmask=0077" "dmask=0077"];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [{device = "/dev/disk/by-uuid/91d96247-85c3-4e0a-93a2-5632b96179b6";}];
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
|
|
||||||
# phostron-configuration-contents
|
|
||||||
system.stateVersion = "26.05"; # I didn't read the comment. :)
|
|
||||||
|
|
||||||
networking.hostName = "phostron";
|
|
||||||
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];
|
|
||||||
services.displayManager.sddm.settings.Theme.Font = "Inter";
|
|
||||||
services.displayManager.sddm.settings.Theme.CursorSize = 18;
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
# coyote-configuration
|
|
||||||
({ pkgs, config, ... }: let
|
|
||||||
# coyote-configuration-variables
|
|
||||||
USER_ID = 1000;
|
|
||||||
KEY_FILE = "id_ed25519";
|
|
||||||
|
|
||||||
in {
|
|
||||||
# coyote-configuration-contents
|
|
||||||
users.users.coyote = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "coyote";
|
|
||||||
extraGroups = ["wheel" "networkmanager" "lp" "scanner"];
|
|
||||||
uid = USER_ID;
|
|
||||||
};
|
|
||||||
users.defaultUserShell = pkgs.unstable.fish;
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
})
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.extraSpecialArgs = {inherit inputs;};
|
|
||||||
home-manager.users.coyote.imports = [
|
|
||||||
({ pkgs, config, lib, inputs, ... }: {
|
|
||||||
# coyote-home-manager-configuration
|
|
||||||
# coyote-home-manager-configuration-contents
|
|
||||||
home.stateVersion = "26.05"; # Nope, didn't read the comment either.
|
|
||||||
home.username = "coyote";
|
|
||||||
home.homeDirectory = "/home/coyote";
|
|
||||||
home.shell.enableShellIntegration = true;
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# TUI
|
|
||||||
tdf neocities
|
|
||||||
# productivity
|
|
||||||
libreoffice-fresh karp keepassxc pdfarranger thunderbird
|
|
||||||
# multimedia
|
|
||||||
furnace corrscope vlc haruna subtitlecomposer kid3 kdePackages.kdenlive
|
|
||||||
unstable.audacity lmms-full calf vital
|
|
||||||
# Internet
|
|
||||||
ungoogled-chromium
|
|
||||||
# games
|
|
||||||
osu-lazer-bin pcsx2 flycast hail
|
|
||||||
# emulation
|
|
||||||
(unstable.bottles.override {removeWarningPopup = true;})
|
|
||||||
# devel
|
|
||||||
unstable.racket unstable.lazygit mitscheme
|
|
||||||
];
|
|
||||||
home.file = let
|
|
||||||
mkVimAfterFtplugin = content: langs:
|
|
||||||
builtins.listToAttrs (map (lang: {
|
|
||||||
name = ".vim/after/ftplugin/${lang}.vim";
|
|
||||||
value = {text = content;};
|
|
||||||
})
|
|
||||||
langs);
|
|
||||||
tab2Vim = ''
|
|
||||||
setlocal expandtab
|
|
||||||
setlocal tabstop=2
|
|
||||||
setlocal shiftwidth=2
|
|
||||||
setlocal softtabstop=2
|
|
||||||
'';
|
|
||||||
tab4Vim = ''
|
|
||||||
setlocal expandtab
|
|
||||||
setlocal tabstop=4
|
|
||||||
setlocal shiftwidth=4
|
|
||||||
setlocal softtabstop=4
|
|
||||||
'';
|
|
||||||
tabsVim = ''
|
|
||||||
setlocal noexpandtab
|
|
||||||
setlocal tabstop=4
|
|
||||||
setlocal shiftwidth=4
|
|
||||||
setlocal softtabstop=0
|
|
||||||
'';
|
|
||||||
lispVim = ''
|
|
||||||
setlocal expandtab
|
|
||||||
setlocal tabstop=2
|
|
||||||
setlocal shiftwidth=2
|
|
||||||
setlocal softtabstop=2
|
|
||||||
|
|
||||||
setlocal lisp
|
|
||||||
setlocal autoindent
|
|
||||||
setlocal showmatch
|
|
||||||
|
|
||||||
setlocal lispwords+=defun,defmacro,defvar,defparameter,defmethod,define-syntax,lambda,let,let*,letre,flet,labels,progn,when,unless,if,cond
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
lib.mkMerge [
|
|
||||||
(mkVimAfterFtplugin tab2Vim ["javascript" "typescript" "html" "css" "json" "nix" "vim"])
|
|
||||||
(mkVimAfterFtplugin tab4Vim ["python" "rust" "java" "lua" "c" "cpp" "h" "hpp"])
|
|
||||||
(mkVimAfterFtplugin tabsVim ["go" "make"])
|
|
||||||
(mkVimAfterFtplugin lispVim ["lisp" "scheme" "clojure" "racket"])
|
|
||||||
];
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
# coyote-home-manager-programs
|
|
||||||
# coyote-home-manager-programs-general
|
|
||||||
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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
librewolf.enable = true;
|
|
||||||
librewolf.languagePacks = ["en-GB"];
|
|
||||||
librewolf.settings = {
|
|
||||||
"privacy.resistFingerprinting" = false;
|
|
||||||
"librewolf.webgl.prompt" = false;
|
|
||||||
"identity.fxaccounts.enabled" = true;
|
|
||||||
"middlemouse.paste" = false;
|
|
||||||
"general.autoScroll" = true;
|
|
||||||
"browser.discovery.containers.enabled" = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
yt-dlp.enable = true;
|
|
||||||
yt-dlp.package = pkgs.unstable.yt-dlp;
|
|
||||||
|
|
||||||
starship.package = pkgs.unstable.starship;
|
|
||||||
|
|
||||||
obs-studio.enable = true;
|
|
||||||
obs-studio.plugins = with pkgs.obs-studio-plugins; [
|
|
||||||
input-overlay droidcam-obs wlrobs
|
|
||||||
];
|
|
||||||
|
|
||||||
# coyote-home-manager-programs-vim
|
|
||||||
vim.enable = true;
|
|
||||||
vim.packageConfigurable = pkgs.unstable.vim-full;
|
|
||||||
vim.defaultEditor = true;
|
|
||||||
vim.plugins = let
|
|
||||||
literate-vim = pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "literate.vim";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "zyedidia";
|
|
||||||
repo = "literate.vim";
|
|
||||||
rev = "4ffd45cb1657b67f4ed0eb639478a69209ec1f94";
|
|
||||||
sha256 = "sha256-X5iJyjeLBkKh4tUoDG8VDO6DwYVOI9DpRqpic8NinwA=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
with pkgs.unstable.vimPlugins; [
|
|
||||||
gruvbox rainbow literate-vim undotree
|
|
||||||
];
|
|
||||||
vim.extraConfig = ''
|
|
||||||
set nocompatible
|
|
||||||
set encoding=utf-8
|
|
||||||
set backspace=indent,eol,start
|
|
||||||
set clipboard=unnamedplus
|
|
||||||
set mouse=a
|
|
||||||
set history=1000
|
|
||||||
set updatetime=300
|
|
||||||
|
|
||||||
syntax on
|
|
||||||
set ruler
|
|
||||||
set showcmd
|
|
||||||
set showmode
|
|
||||||
set laststatus=1
|
|
||||||
set wildmenu
|
|
||||||
set wildmode=longest,list,full
|
|
||||||
set ttyfast
|
|
||||||
set lazyredraw
|
|
||||||
|
|
||||||
filetype plugin indent on
|
|
||||||
set autoindent
|
|
||||||
set smartindent
|
|
||||||
set expandtab
|
|
||||||
set smarttab
|
|
||||||
set tabstop=4
|
|
||||||
set shiftwidth=4
|
|
||||||
set softtabstop=4
|
|
||||||
|
|
||||||
set hlsearch
|
|
||||||
set incsearch
|
|
||||||
set ignorecase
|
|
||||||
set smartcase
|
|
||||||
inoremap <C-l> λ
|
|
||||||
set termguicolors
|
|
||||||
set background=dark
|
|
||||||
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
|
|
||||||
'';
|
|
||||||
|
|
||||||
# coyote-home-manager-programs-fastfetch
|
|
||||||
fastfetch.enable = true;
|
|
||||||
fastfetch.settings = {
|
|
||||||
"$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
|
||||||
logo.type = "small";
|
|
||||||
logo.padding.top = 4;
|
|
||||||
logo.padding.left = 3;
|
|
||||||
logo.padding.right = 4;
|
|
||||||
display.separator = " ";
|
|
||||||
modules = [
|
|
||||||
{key = "╭─────────╮"; type = "custom";}
|
|
||||||
{key = "│ {#31}user {#keys}│"; type = "title"; format = "{user-name}";}
|
|
||||||
{key = "│ {#32}host {#keys}│"; type = "title"; format = "{host-name}";}
|
|
||||||
{key = "│ {#33}uptime {#keys}│"; type = "uptime";}
|
|
||||||
{key = "│ {#34}distro {#keys}│"; type = "os";}
|
|
||||||
{key = "│ {#35}kernel {#keys}│"; type = "kernel";}
|
|
||||||
{key = "│ {#36}desktop {#keys}│"; type = "de";}
|
|
||||||
{key = "│ {#31}term {#keys}│"; type = "terminal";}
|
|
||||||
{key = "│ {#32}shell {#keys}│"; type = "shell";}
|
|
||||||
{key = "│ {#33}cpu {#keys}│"; type = "cpu"; showPeCoreCount = true;}
|
|
||||||
{key = "│ {#34}disk {#keys}│"; type = "disk"; folders = "/";}
|
|
||||||
{key = "│ {#35}memory {#keys}│"; type = "memory";}
|
|
||||||
{key = "│ {#36}network {#keys}│"; type = "localip"; format = "{ipv4} ({ifname})";}
|
|
||||||
{key = "├─────────┤"; type = "custom";}
|
|
||||||
{key = "│ {#39}colors {#keys}│"; type = "colors"; symbol = "circle";}
|
|
||||||
{key = "╰─────────╯"; type = "custom";}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
176
home/coyote/default.nix
Normal file
176
home/coyote/default.nix
Normal file
|
|
@ -0,0 +1,176 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./vim.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.stateVersion = "26.05"; # Nope, didn't read the comment either.
|
||||||
|
home.username = "coyote";
|
||||||
|
home.homeDirectory = "/home/coyote";
|
||||||
|
home.shell.enableShellIntegration = true;
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# TUI
|
||||||
|
tdf
|
||||||
|
neocities
|
||||||
|
# productivity
|
||||||
|
libreoffice-fresh
|
||||||
|
karp
|
||||||
|
keepassxc
|
||||||
|
pdfarranger
|
||||||
|
thunderbird
|
||||||
|
# multimedia
|
||||||
|
furnace
|
||||||
|
corrscope
|
||||||
|
vlc
|
||||||
|
haruna
|
||||||
|
subtitlecomposer
|
||||||
|
kid3
|
||||||
|
kdePackages.kdenlive
|
||||||
|
unstable.audacity
|
||||||
|
lmms-full
|
||||||
|
calf
|
||||||
|
vital
|
||||||
|
# Internet
|
||||||
|
ungoogled-chromium
|
||||||
|
# games
|
||||||
|
osu-lazer-bin
|
||||||
|
pcsx2
|
||||||
|
# emulation
|
||||||
|
(unstable.bottles.override {removeWarningPopup = true;})
|
||||||
|
# devel
|
||||||
|
unstable.racket
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
librewolf.enable = true;
|
||||||
|
librewolf.languagePacks = ["en-GB"];
|
||||||
|
librewolf.settings = {
|
||||||
|
"privacy.resistFingerprinting" = false;
|
||||||
|
"librewolf.webgl.prompt" = false;
|
||||||
|
"identity.fxaccounts.enabled" = true;
|
||||||
|
"middlemouse.paste" = false;
|
||||||
|
"general.autoScroll" = true;
|
||||||
|
"browser.discovery.containers.enabled" = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
yt-dlp.enable = true;
|
||||||
|
yt-dlp.package = pkgs.unstable.yt-dlp;
|
||||||
|
|
||||||
|
starship.package = pkgs.unstable.starship;
|
||||||
|
|
||||||
|
obs-studio.enable = true;
|
||||||
|
obs-studio.plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
input-overlay
|
||||||
|
droidcam-obs
|
||||||
|
wlrobs
|
||||||
|
];
|
||||||
|
|
||||||
|
fastfetch.enable = true;
|
||||||
|
fastfetch.settings = {
|
||||||
|
"$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
||||||
|
logo.type = "small";
|
||||||
|
logo.padding.top = 4;
|
||||||
|
logo.padding.left = 3;
|
||||||
|
logo.padding.right = 4;
|
||||||
|
display.separator = " ";
|
||||||
|
modules = [
|
||||||
|
{
|
||||||
|
key = "╭─────────╮";
|
||||||
|
type = "custom";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#31}user {#keys}│";
|
||||||
|
type = "title";
|
||||||
|
format = "{user-name}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#32}host {#keys}│";
|
||||||
|
type = "title";
|
||||||
|
format = "{host-name}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#33}uptime {#keys}│";
|
||||||
|
type = "uptime";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#34}distro {#keys}│";
|
||||||
|
type = "os";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#35}kernel {#keys}│";
|
||||||
|
type = "kernel";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#36}desktop {#keys}│";
|
||||||
|
type = "de";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#31}term {#keys}│";
|
||||||
|
type = "terminal";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#32}shell {#keys}│";
|
||||||
|
type = "shell";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#33}cpu {#keys}│";
|
||||||
|
type = "cpu";
|
||||||
|
showPeCoreCount = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#34}disk {#keys}│";
|
||||||
|
type = "disk";
|
||||||
|
folders = "/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#35}memory {#keys}│";
|
||||||
|
type = "memory";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#36}network {#keys}│";
|
||||||
|
type = "localip";
|
||||||
|
format = "{ipv4} ({ifname})";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "├─────────┤";
|
||||||
|
type = "custom";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "│ {#39}colors {#keys}│";
|
||||||
|
type = "colors";
|
||||||
|
symbol = "circle";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "╰─────────╯";
|
||||||
|
type = "custom";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
70
home/coyote/vim.nix
Normal file
70
home/coyote/vim.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.vim = {
|
||||||
|
enable = true;
|
||||||
|
packageConfigurable = pkgs.unstable.vim-full;
|
||||||
|
defaultEditor = true;
|
||||||
|
|
||||||
|
plugins = with pkgs.unstable.vimPlugins; [
|
||||||
|
gruvbox
|
||||||
|
rainbow
|
||||||
|
undotree
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
set nocompatible
|
||||||
|
set encoding=utf-8
|
||||||
|
set backspace=indent,eol,start
|
||||||
|
set clipboard=unnamedplus
|
||||||
|
set mouse=a
|
||||||
|
set history=1000
|
||||||
|
set updatetime=300
|
||||||
|
|
||||||
|
syntax on
|
||||||
|
set ruler
|
||||||
|
set showcmd
|
||||||
|
set showmode
|
||||||
|
set laststatus=1
|
||||||
|
set wildmenu
|
||||||
|
set wildmode=longest,list,full
|
||||||
|
set ttyfast
|
||||||
|
set lazyredraw
|
||||||
|
|
||||||
|
filetype plugin indent on
|
||||||
|
set autoindent
|
||||||
|
set smartindent
|
||||||
|
set expandtab
|
||||||
|
set smarttab
|
||||||
|
set tabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set softtabstop=4
|
||||||
|
|
||||||
|
set hlsearch
|
||||||
|
set incsearch
|
||||||
|
set ignorecase
|
||||||
|
set smartcase
|
||||||
|
|
||||||
|
inoremap <C-l> λ
|
||||||
|
|
||||||
|
set termguicolors
|
||||||
|
set background=dark
|
||||||
|
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
|
||||||
|
|
||||||
|
augroup coyote_filetype_settings
|
||||||
|
autocmd!
|
||||||
|
autocmd FileType javascript,typescript,html,css,json,nix,vim
|
||||||
|
\ setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
|
||||||
|
autocmd FileType python,rust,java,lua,c,cpp,h,hpp
|
||||||
|
\ setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
autocmd FileType go,make
|
||||||
|
\ setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=0
|
||||||
|
autocmd FileType lisp,scheme,clojure,racket
|
||||||
|
\ 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
|
||||||
|
augroup END
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
23
hosts/phostron/configuration.nix
Normal file
23
hosts/phostron/configuration.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
system.stateVersion = "26.05"; # I didn't read the comment.
|
||||||
|
|
||||||
|
networking.hostName = "phostron";
|
||||||
|
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];
|
||||||
|
|
||||||
|
# SDDM look, specific to this machine
|
||||||
|
services.displayManager.sddm.settings.Theme.Font = "Inter";
|
||||||
|
services.displayManager.sddm.settings.Theme.CursorSize = 18;
|
||||||
|
}
|
||||||
8
hosts/phostron/default.nix
Normal file
8
hosts/phostron/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
../../modules/common.nix
|
||||||
|
../../modules/desktop/kde-plasma.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./configuration.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
30
hosts/phostron/hardware-configuration.nix
Normal file
30
hosts/phostron/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||||
|
boot.initrd.kernelModules = [];
|
||||||
|
boot.kernelModules = ["kvm-amd"];
|
||||||
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/24fb172c-c29f-40c3-ae4d-ff652358563a";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/DFC9-994A";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = ["fmask=0077" "dmask=0077"];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [{device = "/dev/disk/by-uuid/91d96247-85c3-4e0a-93a2-5632b96179b6";}];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
193
modules/common.nix
Normal file
193
modules/common.nix
Normal file
|
|
@ -0,0 +1,193 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# use flakes and Lix instead of the default Nix implementation
|
||||||
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
nix.settings.auto-optimise-store = true;
|
||||||
|
nix.package = pkgs.lixPackageSets.stable.lix;
|
||||||
|
|
||||||
|
# global nixpkgs-unstable overlay, so unstable packages are available to
|
||||||
|
# Home Manager userspaces too, plus a couple of Lix-related package pins
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
system = prev.stdenv.hostPlatform.system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(final: prev: {
|
||||||
|
inherit
|
||||||
|
(prev.lixPackageSets.stable)
|
||||||
|
nixpkgs-review
|
||||||
|
nix-eval-jobs
|
||||||
|
nix-fast-build
|
||||||
|
colmena
|
||||||
|
;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
time.timeZone = "Asia/Jakarta";
|
||||||
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
|
|
||||||
|
services = {
|
||||||
|
fwupd.enable = true;
|
||||||
|
xserver.xkb.layout = "us";
|
||||||
|
locate.enable = true;
|
||||||
|
printing.enable = true;
|
||||||
|
openssh.enable = false;
|
||||||
|
pulseaudio.enable = false;
|
||||||
|
|
||||||
|
pipewire.enable = true;
|
||||||
|
pipewire.alsa.enable = true;
|
||||||
|
pipewire.alsa.support32Bit = true;
|
||||||
|
pipewire.pulse.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
security.sudo.enable = false;
|
||||||
|
|
||||||
|
security.doas.enable = true;
|
||||||
|
security.doas.extraRules = [
|
||||||
|
{
|
||||||
|
groups = ["wheel"];
|
||||||
|
keepEnv = true;
|
||||||
|
persist = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nh
|
||||||
|
alejandra
|
||||||
|
git
|
||||||
|
# system utils
|
||||||
|
firmware-updater
|
||||||
|
mtr
|
||||||
|
gnupg
|
||||||
|
ddate
|
||||||
|
testdisk
|
||||||
|
tree
|
||||||
|
wget
|
||||||
|
btop
|
||||||
|
plocate
|
||||||
|
traceroute
|
||||||
|
rlwrap
|
||||||
|
entr
|
||||||
|
unzip
|
||||||
|
ffmpeg
|
||||||
|
imagemagick
|
||||||
|
gnome-disk-utility
|
||||||
|
# extra (oxidised) utils
|
||||||
|
fd
|
||||||
|
bat
|
||||||
|
xh
|
||||||
|
tlrc
|
||||||
|
dysk
|
||||||
|
dust
|
||||||
|
hyperfine
|
||||||
|
ripgrep
|
||||||
|
fzf
|
||||||
|
eza
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.shellAliases = {
|
||||||
|
sudo = "doas";
|
||||||
|
l = "eza --grid --all";
|
||||||
|
ll = "eza --long --all";
|
||||||
|
ls = "eza --long";
|
||||||
|
".." = "cd ..";
|
||||||
|
"..." = "cd ../..";
|
||||||
|
cat = "bat";
|
||||||
|
};
|
||||||
|
|
||||||
|
# fixes Librewolf not rendering text in its UI (as of 2026-07-30)
|
||||||
|
environment.sessionVariables.XDG_DATA_DIRS = [
|
||||||
|
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
||||||
|
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
fish.enable = true;
|
||||||
|
|
||||||
|
atuin.enable = true;
|
||||||
|
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";
|
||||||
|
advice.defaultBranchName = false;
|
||||||
|
gpg.format = "ssh";
|
||||||
|
commit.gpgSign = true;
|
||||||
|
url."https://github.com/".insteadOf = ["github:"];
|
||||||
|
};
|
||||||
|
|
||||||
|
steam.enable = true;
|
||||||
|
|
||||||
|
# one-off options that would live in the Home Manager section if the
|
||||||
|
# relevant modules existed there
|
||||||
|
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
|
||||||
|
];
|
||||||
|
|
||||||
|
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];
|
||||||
|
}
|
||||||
18
modules/desktop/kde-plasma.nix
Normal file
18
modules/desktop/kde-plasma.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
services.displayManager.sddm.enable = true;
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
environment.systemPackages = with pkgs.kdePackages; [
|
||||||
|
kate
|
||||||
|
elisa
|
||||||
|
bluez-qt
|
||||||
|
kalk
|
||||||
|
filelight
|
||||||
|
kamoso
|
||||||
|
konversation
|
||||||
|
kmail
|
||||||
|
ktorrent
|
||||||
|
kclock
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.plasma6.excludePackages = [pkgs.kdePackages.discover];
|
||||||
|
}
|
||||||
33
modules/users/coyote/default.nix
Normal file
33
modules/users/coyote/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
USER_ID = 1000;
|
||||||
|
KEY_FILE = "id_ed25519";
|
||||||
|
in {
|
||||||
|
users.users.coyote = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "coyote";
|
||||||
|
extraGroups = ["wheel" "networkmanager" "lp" "scanner"];
|
||||||
|
uid = USER_ID;
|
||||||
|
};
|
||||||
|
users.defaultUserShell = pkgs.unstable.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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
modules/users/coyote/home-manager-module.nix
Normal file
8
modules/users/coyote/home-manager-module.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||||
|
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = {inherit inputs;};
|
||||||
|
home-manager.users.coyote.imports = [../../../home/coyote];
|
||||||
|
}
|
||||||
1193
nixos.html
1193
nixos.html
File diff suppressed because it is too large
Load diff
858
nixos.lit
858
nixos.lit
|
|
@ -1,858 +0,0 @@
|
||||||
@code_type nix .nix
|
|
||||||
@comment_type # %s
|
|
||||||
@overwrite_css style.css
|
|
||||||
|
|
||||||
@title asnev's NixOS configuration
|
|
||||||
|
|
||||||
@s introduction
|
|
||||||
|
|
||||||
welcome! this page is the literate configuration for my NixOS setup. here,
|
|
||||||
declarations are set to configure my (currently) only host system, `phostron`,
|
|
||||||
a ThinkPad L14 Gen 1, to use flakes, Home Manager, a global nixpkgs-unstable
|
|
||||||
overlay, alongside general NixOS configurations tailored to my hardware and
|
|
||||||
user environment preferences.<br><br>
|
|
||||||
|
|
||||||
being a literate configuration file, this means that both the HTML page you're
|
|
||||||
reading right now, and the Nix flake file that get parsed when building the
|
|
||||||
system, are compiled from the *same* exact source file. that's literate
|
|
||||||
programming in a nutshell--programming with a documentation-first paradigm.
|
|
||||||
though of course, the details don't stop there. the rabbit hole can get really,
|
|
||||||
*really* deep; just ask your favourite search engine for all the
|
|
||||||
*breathtakingly comprehensive* NixOS configs (literate or otherwise) that are
|
|
||||||
out there!<br><br>
|
|
||||||
|
|
||||||
you can get the source code at my repo [here](https://git.gay/asnev/nixos).
|
|
||||||
|
|
||||||
> the latest version of this document is [hosted on my
|
|
||||||
> Neocities](https://asnev.neocities.org/nixos.html).
|
|
||||||
|
|
||||||
<br><hr>
|
|
||||||
|
|
||||||
@s limitations
|
|
||||||
|
|
||||||
this is a simple configuration. i don't have immediate plans in declaratively
|
|
||||||
configuring absolutely *everything* there is on my system. as someone who still
|
|
||||||
has many things to learn about Nix(OS), my current rationale is to configure
|
|
||||||
everything that's comfortably sensible. additional options and/or verbosity can
|
|
||||||
be added later as my configuration grows in the future (or not). following the
|
|
||||||
'simple' nature of my configuration, Home Manager is notably installed as a
|
|
||||||
NixOS module instead of being standalone. while doing so does make rebuilding
|
|
||||||
the user environment a bit annoying, personally, i don't mind it that
|
|
||||||
much.<br><br>
|
|
||||||
|
|
||||||
this is also a simple configuration, in the way of the literate programming
|
|
||||||
tools used, which is [Literate](https://github.com/zyedidia/Literate). while it
|
|
||||||
does offer a very approachable format based on Markdown, it's a bit lacking in
|
|
||||||
that it can't provide syntax highlighting in multiple different languages
|
|
||||||
(you'll see the mixed-up colours later, sorry), and it can't export source code
|
|
||||||
files into files which live within subdirectories. i've resorted to let
|
|
||||||
*everything* reside within one `flake.nix` file which, while it does make users
|
|
||||||
who wish to navigate through the unwoven (without comments) configuration
|
|
||||||
expressions quite... annoying, at least everything is organised when viewed
|
|
||||||
through the literate source code.<br><br>
|
|
||||||
|
|
||||||
eventually, when i can build up the courage... i'd like to begin my 'journey'
|
|
||||||
with Emacs and utilise Org-mode and Org-babel, a much, *much* more flexible
|
|
||||||
literate programming environment.<br>
|
|
||||||
|
|
||||||
<sub>emphasis on 'eventually'...</sub><br><br>
|
|
||||||
|
|
||||||
i don't expect anyone reading this to be wishing to use *my* specific
|
|
||||||
configuration for their setup, so i'll skip over instructions for installing
|
|
||||||
the operating system and let the following configurations assume that a fresh,
|
|
||||||
flake-enabled NixOS system is present and ready to go.
|
|
||||||
|
|
||||||
<br><hr>
|
|
||||||
|
|
||||||
@s flake structure
|
|
||||||
|
|
||||||
we'll outline a basic flake for the system(s)...
|
|
||||||
|
|
||||||
--- flake.nix
|
|
||||||
{
|
|
||||||
description = "asnev's NixOS configuration";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs = {
|
|
||||||
url = "github:nixos/nixpkgs/nixos-26.05";
|
|
||||||
};
|
|
||||||
nixpkgs-unstable = {
|
|
||||||
url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
};
|
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager/release-26.05";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = inputs @ {
|
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
nixpkgs-unstable,
|
|
||||||
home-manager,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
@{flake-modules}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
---
|
|
||||||
|
|
||||||
...and configure the modules. declared below are separate modules for the host,
|
|
||||||
user, and user environment managed by Home Manager. everything lives within the
|
|
||||||
one NixOS module, so it is structured thusly:
|
|
||||||
|
|
||||||
--- flake-modules
|
|
||||||
nixosConfigurations.phostron = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = {inherit inputs;};
|
|
||||||
modules = [
|
|
||||||
@{phostron-configuration}
|
|
||||||
@{coyote-configuration}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
---
|
|
||||||
|
|
||||||
TODO: consider adding a shell environment module?
|
|
||||||
|
|
||||||
<br><hr>
|
|
||||||
|
|
||||||
@s global NixOS options
|
|
||||||
|
|
||||||
before getting into the host-specific configurations, here we set options that
|
|
||||||
get applied to *all* NixOS systems, regardless of machine. we'll start by
|
|
||||||
declaring the initial attribute set arguments, which will soon be a familiar
|
|
||||||
pattern here...
|
|
||||||
|
|
||||||
--- nixos-configuration
|
|
||||||
({ config, lib, pkgs, inputs, ... }: {
|
|
||||||
@{nixos-configuration-contents}
|
|
||||||
})
|
|
||||||
---
|
|
||||||
|
|
||||||
...then we set Nix-related declarations since we'd like to declare the system
|
|
||||||
to use flakes, and, to utilise [Lix](https://lix.systems),
|
|
||||||
|
|
||||||
--- nixos-configuration-contents
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
|
||||||
nix.settings.auto-optimise-store = true;
|
|
||||||
nix.package = pkgs.lixPackageSets.stable.lix;
|
|
||||||
---
|
|
||||||
|
|
||||||
but also have an overlay of `nixpkgs-unstable` to be available globally. this
|
|
||||||
is so that i can have unstable packages installed in userspaces managed via
|
|
||||||
Home Manager. plus, some additional tweaks for Lix.
|
|
||||||
|
|
||||||
--- nixos-configuration-contents +=
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
unstable = import inputs.nixpkgs-unstable {
|
|
||||||
system = prev.stdenv.hostPlatform.system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
(final: prev: {
|
|
||||||
inherit (prev.lixPackageSets.stable)
|
|
||||||
nixpkgs-review
|
|
||||||
nix-eval-jobs
|
|
||||||
nix-fast-build
|
|
||||||
colmena;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
---
|
|
||||||
|
|
||||||
getting into the rest of the options, let's configure the way the system should
|
|
||||||
boot. i like to have absolutely nothing being displayed as my computer turns
|
|
||||||
on.
|
|
||||||
|
|
||||||
--- nixos-configuration-contents +=
|
|
||||||
boot = {
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
---
|
|
||||||
|
|
||||||
next, some basic locale settings.
|
|
||||||
|
|
||||||
--- nixos-configuration-contents +=
|
|
||||||
time.timeZone = "Asia/Jakarta";
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
|
||||||
---
|
|
||||||
|
|
||||||
service options. note the options for PipeWire here.
|
|
||||||
|
|
||||||
--- nixos-configuration-contents +=
|
|
||||||
services = {
|
|
||||||
fwupd.enable = true;
|
|
||||||
xserver.xkb.layout = "us";
|
|
||||||
locate.enable = true;
|
|
||||||
printing.enable = true;
|
|
||||||
openssh.enable = false;
|
|
||||||
pulseaudio.enable = false;
|
|
||||||
|
|
||||||
pipewire.enable = true;
|
|
||||||
pipewire.alsa.enable = true;
|
|
||||||
pipewire.alsa.support32Bit = true;
|
|
||||||
pipewire.pulse.enable = true;
|
|
||||||
};
|
|
||||||
---
|
|
||||||
|
|
||||||
basic security options and `doas` configuration.
|
|
||||||
|
|
||||||
--- nixos-configuration-contents +=
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
security.sudo.enable = false;
|
|
||||||
|
|
||||||
security.doas.enable = true;
|
|
||||||
security.doas.extraRules = [{
|
|
||||||
groups = ["wheel"];
|
|
||||||
keepEnv = true;
|
|
||||||
persist = true;
|
|
||||||
}];
|
|
||||||
---
|
|
||||||
|
|
||||||
and now we get into the fun (translation: less boring) stuff with system
|
|
||||||
packages!
|
|
||||||
|
|
||||||
--- nixos-configuration-contents +=
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nh alejandra literate git
|
|
||||||
# system utils
|
|
||||||
firmware-updater mtr gnupg ddate testdisk tree wget btop plocate traceroute
|
|
||||||
rlwrap entr unzip ffmpeg imagemagick gnome-disk-utility
|
|
||||||
# extra (oxidised) utils
|
|
||||||
fd bat xh tlrc dysk dust hyperfine ripgrep fzf eza
|
|
||||||
];
|
|
||||||
---
|
|
||||||
|
|
||||||
if the list seems a bit sparse for desktop applications, that's intentional. i
|
|
||||||
prefer to keep those within userspace via Home Manager, which will be
|
|
||||||
explored later below.<br><br>
|
|
||||||
|
|
||||||
let's set a few useful shell aliases, notably substituting `ls` for `eza` for a
|
|
||||||
prettier directory output. (TODO: consider figuring how to switch to `uutils`
|
|
||||||
globally maybe?)
|
|
||||||
|
|
||||||
--- nixos-configuration-contents +=
|
|
||||||
environment.shellAliases = {
|
|
||||||
sudo = "doas";
|
|
||||||
l = "eza --grid --all";
|
|
||||||
ll = "eza --long --all";
|
|
||||||
ls = "eza --long";
|
|
||||||
".." = "cd ..";
|
|
||||||
"..." = "cd ../..";
|
|
||||||
cat = "bat"; # this line is really funny to me
|
|
||||||
};
|
|
||||||
---
|
|
||||||
|
|
||||||
quick fix for Librewolf not rendering text in its UI (as of 2026-07-30).
|
|
||||||
|
|
||||||
--- nixos-configuration-contents +=
|
|
||||||
environment.sessionVariables.XDG_DATA_DIRS = [
|
|
||||||
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
|
||||||
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
|
||||||
];
|
|
||||||
---
|
|
||||||
|
|
||||||
here's the start of options for programmes...
|
|
||||||
|
|
||||||
--- nixos-configuration-contents +=
|
|
||||||
programs = {
|
|
||||||
@{nixos-configuration-programs-contents}
|
|
||||||
};
|
|
||||||
---
|
|
||||||
|
|
||||||
nothing much here, starting with a few options to prettify the terminal a bit.
|
|
||||||
|
|
||||||
> "zsh is bash with plugins; fish is zsh with plugins"
|
|
||||||
> --[0atman](https://youtu.be/rWMQ-g2QDsI?t=117)
|
|
||||||
|
|
||||||
yes, the lambda (λ) as a terminal prompt character absolutely counts towards
|
|
||||||
style points.
|
|
||||||
|
|
||||||
--- nixos-configuration-programs-contents
|
|
||||||
fish.enable = true;
|
|
||||||
|
|
||||||
atuin.enable = true;
|
|
||||||
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";
|
|
||||||
advice.defaultBranchName = false;
|
|
||||||
gpg.format = "ssh";
|
|
||||||
commit.gpgSign = true;
|
|
||||||
url."https://github.com/".insteadOf = ["github:"];
|
|
||||||
};
|
|
||||||
|
|
||||||
steam.enable = true;
|
|
||||||
---
|
|
||||||
|
|
||||||
a few one-off options here. these settings would be in the Home Manager section
|
|
||||||
if they existed there, but they don't, so, oh well.
|
|
||||||
|
|
||||||
--- nixos-configuration-programs-contents +=
|
|
||||||
obs-studio.enableVirtualCamera = true;
|
|
||||||
ssh.startAgent = true;
|
|
||||||
---
|
|
||||||
|
|
||||||
`nix-ld` is important for running generic binaries and AppImages. ironically,
|
|
||||||
i have yet felt the need to utilise software outside of the `nixpkgs`
|
|
||||||
repository, hence the sparse `libraries` pkgs list, lol.
|
|
||||||
|
|
||||||
--- nixos-configuration-programs-contents +=
|
|
||||||
nix-ld.enable = true;
|
|
||||||
nix-ld.libraries = with pkgs; [fuse e2fsprogs];
|
|
||||||
---
|
|
||||||
|
|
||||||
fonts! because typography (and internationalisation) matters.
|
|
||||||
|
|
||||||
--- nixos-configuration-contents +=
|
|
||||||
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
|
|
||||||
];
|
|
||||||
---
|
|
||||||
|
|
||||||
some font settings.
|
|
||||||
|
|
||||||
--- nixos-configuration-contents +=
|
|
||||||
fonts.fontconfig.antialias = true;
|
|
||||||
fonts.fontconfig.subpixel.rgba = "rgb";
|
|
||||||
---
|
|
||||||
|
|
||||||
finally, XDG portal settings... which i'll admit i don't quite understand but
|
|
||||||
they're here so here they are.
|
|
||||||
|
|
||||||
--- nixos-configuration-contents +=
|
|
||||||
xdg.portal.enable = true;
|
|
||||||
xdg.portal.config.common.default = ["gtk"];
|
|
||||||
xdg.portal.extraPortals = with pkgs; [xdg-desktop-portal-wlr];
|
|
||||||
---
|
|
||||||
|
|
||||||
we're finished with the global config, let's move into the per-machine options.
|
|
||||||
|
|
||||||
<br><hr>
|
|
||||||
|
|
||||||
@s host configuration: phostron
|
|
||||||
|
|
||||||
we make sure that we load in the global options we've set, alongside a choice
|
|
||||||
of one's preferred graphical interface.
|
|
||||||
|
|
||||||
--- phostron-configuration
|
|
||||||
@{nixos-configuration}
|
|
||||||
@{kde-plasma-configuration}
|
|
||||||
---
|
|
||||||
|
|
||||||
then we may start with configuring the machine specifically. with the NixOS
|
|
||||||
installer's automatically generated `hardware-configuration.nix` file, our job
|
|
||||||
is basically half done here.
|
|
||||||
|
|
||||||
--- phostron-configuration +=
|
|
||||||
({ config, lib, pkgs, modulesPath, ... }: {
|
|
||||||
@{phostron-hardware-configuration-contents}
|
|
||||||
@{phostron-configuration-contents}
|
|
||||||
})
|
|
||||||
---
|
|
||||||
|
|
||||||
i'll copy over said file verbatim (excluding the pre-generated comment blurb at
|
|
||||||
the beginning of the file).
|
|
||||||
|
|
||||||
--- phostron-hardware-configuration-contents
|
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
|
||||||
boot.initrd.kernelModules = [];
|
|
||||||
boot.kernelModules = ["kvm-amd"];
|
|
||||||
boot.extraModulePackages = [];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/24fb172c-c29f-40c3-ae4d-ff652358563a";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/DFC9-994A";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = ["fmask=0077" "dmask=0077"];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [{device = "/dev/disk/by-uuid/91d96247-85c3-4e0a-93a2-5632b96179b6";}];
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
---
|
|
||||||
|
|
||||||
with that done, we can move on to the less scary stuff.
|
|
||||||
|
|
||||||
--- phostron-configuration-contents
|
|
||||||
system.stateVersion = "26.05"; # I didn't read the comment. :)
|
|
||||||
|
|
||||||
networking.hostName = "phostron";
|
|
||||||
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];
|
|
||||||
---
|
|
||||||
|
|
||||||
<br><hr>
|
|
||||||
|
|
||||||
@s desktop configuration: KDE Plasma
|
|
||||||
|
|
||||||
let's bring ourselves to the 90s with a proper graphical user interface! and
|
|
||||||
have some additional apps to boot.
|
|
||||||
|
|
||||||
--- kde-plasma-configuration
|
|
||||||
({pkgs, ...}: {
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
environment.systemPackages = with pkgs.kdePackages; [
|
|
||||||
kate elisa bluez-qt kalk filelight kamoso konversation kmail ktorrent
|
|
||||||
kclock
|
|
||||||
];
|
|
||||||
---
|
|
||||||
|
|
||||||
> "Discover? Where we're going... we don't need Discover."
|
|
||||||
|
|
||||||
--- kde-plasma-configuration +=
|
|
||||||
environment.plasma6.excludePackages = [pkgs.kdePackages.discover];
|
|
||||||
})
|
|
||||||
---
|
|
||||||
|
|
||||||
i've set some additional options in how i'd like SDDM to look for `phostron`
|
|
||||||
specifically.
|
|
||||||
|
|
||||||
--- phostron-configuration-contents +=
|
|
||||||
services.displayManager.sddm.settings.Theme.Font = "Inter";
|
|
||||||
services.displayManager.sddm.settings.Theme.CursorSize = 18;
|
|
||||||
---
|
|
||||||
|
|
||||||
(TODO: consider adding the `plasma-manager` flake module in the future?)
|
|
||||||
|
|
||||||
<br><hr>
|
|
||||||
|
|
||||||
@s user configuration: coyote
|
|
||||||
|
|
||||||
that's me. `:3c`<br><br>
|
|
||||||
|
|
||||||
not just NixOS options, but also any other modules loaded into the system via
|
|
||||||
the flake, like Home Manager, as seen later.
|
|
||||||
|
|
||||||
--- coyote-configuration
|
|
||||||
({ pkgs, config, ... }: let
|
|
||||||
@{coyote-configuration-variables}
|
|
||||||
in {
|
|
||||||
@{coyote-configuration-contents}
|
|
||||||
})
|
|
||||||
---
|
|
||||||
|
|
||||||
let's get the user-specific NixOS options out of the way. basic user management
|
|
||||||
stuff and setting the default shell of choice.
|
|
||||||
|
|
||||||
--- coyote-configuration-variables
|
|
||||||
USER_ID = 1000;
|
|
||||||
---
|
|
||||||
|
|
||||||
--- coyote-configuration-contents
|
|
||||||
users.users.coyote = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "coyote";
|
|
||||||
extraGroups = ["wheel" "networkmanager" "lp" "scanner"];
|
|
||||||
uid = USER_ID;
|
|
||||||
};
|
|
||||||
users.defaultUserShell = pkgs.unstable.fish;
|
|
||||||
---
|
|
||||||
|
|
||||||
for me, i have a little daemon blurb to get SSH for Git working... properly? i
|
|
||||||
can't remember--i think i stole this from GitHub somewhere...<br><br>
|
|
||||||
|
|
||||||
there's another variable we need to set before getting there though.
|
|
||||||
|
|
||||||
--- coyote-configuration-variables +=
|
|
||||||
KEY_FILE = "id_ed25519";
|
|
||||||
---
|
|
||||||
|
|
||||||
--- coyote-configuration-contents +=
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
---
|
|
||||||
|
|
||||||
<br><hr>
|
|
||||||
|
|
||||||
@s Home Manager configuration: coyote
|
|
||||||
|
|
||||||
let's get into the *fun* fun stuff, [yaeh](https://youtu.be/SacogDL_4JU).<br><br>
|
|
||||||
|
|
||||||
not forgetting to set the flake module for it first though. as mentioned in the
|
|
||||||
beginning, my preference is to have it loaded as a NixOS module.
|
|
||||||
|
|
||||||
--- coyote-configuration +=
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.extraSpecialArgs = {inherit inputs;};
|
|
||||||
home-manager.users.coyote.imports = [
|
|
||||||
({ pkgs, config, lib, inputs, ... }: {
|
|
||||||
@{coyote-home-manager-configuration}
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
||||||
---
|
|
||||||
|
|
||||||
the basic contents structure is as follows. a separate section for programmes
|
|
||||||
should make it easier for including more software configurations in the future.
|
|
||||||
|
|
||||||
--- coyote-home-manager-configuration
|
|
||||||
@{coyote-home-manager-configuration-contents}
|
|
||||||
programs = {
|
|
||||||
@{coyote-home-manager-programs}
|
|
||||||
};
|
|
||||||
---
|
|
||||||
|
|
||||||
standard configuration stuff.
|
|
||||||
|
|
||||||
--- coyote-home-manager-configuration-contents
|
|
||||||
home.stateVersion = "26.05"; # Nope, didn't read the comment either.
|
|
||||||
home.username = "coyote";
|
|
||||||
home.homeDirectory = "/home/coyote";
|
|
||||||
home.shell.enableShellIntegration = true;
|
|
||||||
---
|
|
||||||
|
|
||||||
now we get to configure the user packages! there's... not a lot of them.
|
|
||||||
|
|
||||||
--- coyote-home-manager-configuration-contents +=
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# TUI
|
|
||||||
tdf neocities
|
|
||||||
# productivity
|
|
||||||
libreoffice-fresh karp keepassxc pdfarranger thunderbird
|
|
||||||
# multimedia
|
|
||||||
furnace corrscope vlc haruna subtitlecomposer kid3 kdePackages.kdenlive
|
|
||||||
unstable.audacity lmms-full calf vital
|
|
||||||
# Internet
|
|
||||||
ungoogled-chromium
|
|
||||||
# games
|
|
||||||
osu-lazer-bin pcsx2 flycast hail
|
|
||||||
# emulation
|
|
||||||
(unstable.bottles.override {removeWarningPopup = true;})
|
|
||||||
# devel
|
|
||||||
unstable.racket unstable.lazygit mitscheme
|
|
||||||
];
|
|
||||||
---
|
|
||||||
|
|
||||||
next is (arguably) the more fun way to install and configure programmes, via
|
|
||||||
programme options. not every programme will get a dedicated section. for the
|
|
||||||
ones that are too short to consider notable, i'll have them clumped with a
|
|
||||||
bunch of others.
|
|
||||||
|
|
||||||
--- coyote-home-manager-programs
|
|
||||||
@{coyote-home-manager-programs-general}
|
|
||||||
@{coyote-home-manager-programs-vim}
|
|
||||||
@{coyote-home-manager-programs-fastfetch}
|
|
||||||
---
|
|
||||||
|
|
||||||
these don't need much explanation. (TODO: could try declaratively setting
|
|
||||||
LibreWolf profiles.)
|
|
||||||
|
|
||||||
--- coyote-home-manager-programs-general
|
|
||||||
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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
librewolf.enable = true;
|
|
||||||
librewolf.languagePacks = ["en-GB"];
|
|
||||||
librewolf.settings = {
|
|
||||||
"privacy.resistFingerprinting" = false;
|
|
||||||
"librewolf.webgl.prompt" = false;
|
|
||||||
"identity.fxaccounts.enabled" = true;
|
|
||||||
"middlemouse.paste" = false;
|
|
||||||
"general.autoScroll" = true;
|
|
||||||
"browser.discovery.containers.enabled" = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
yt-dlp.enable = true;
|
|
||||||
yt-dlp.package = pkgs.unstable.yt-dlp;
|
|
||||||
|
|
||||||
starship.package = pkgs.unstable.starship;
|
|
||||||
|
|
||||||
obs-studio.enable = true;
|
|
||||||
obs-studio.plugins = with pkgs.obs-studio-plugins; [
|
|
||||||
input-overlay droidcam-obs wlrobs
|
|
||||||
];
|
|
||||||
---
|
|
||||||
|
|
||||||
and here... lies my dreaded Vim configuration...
|
|
||||||
|
|
||||||
--- coyote-home-manager-programs-vim
|
|
||||||
vim.enable = true;
|
|
||||||
vim.packageConfigurable = pkgs.unstable.vim-full;
|
|
||||||
vim.defaultEditor = true;
|
|
||||||
vim.plugins = let
|
|
||||||
literate-vim = pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "literate.vim";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "zyedidia";
|
|
||||||
repo = "literate.vim";
|
|
||||||
rev = "4ffd45cb1657b67f4ed0eb639478a69209ec1f94";
|
|
||||||
sha256 = "sha256-X5iJyjeLBkKh4tUoDG8VDO6DwYVOI9DpRqpic8NinwA=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
with pkgs.unstable.vimPlugins; [
|
|
||||||
gruvbox rainbow literate-vim undotree
|
|
||||||
];
|
|
||||||
---
|
|
||||||
|
|
||||||
`.vimrc` moment...<br><br>
|
|
||||||
|
|
||||||
there's really not much, starting with bog-standard Vimscript for sensible
|
|
||||||
options,
|
|
||||||
|
|
||||||
--- coyote-home-manager-programs-vim +=
|
|
||||||
vim.extraConfig = ''
|
|
||||||
set nocompatible
|
|
||||||
set encoding=utf-8
|
|
||||||
set backspace=indent,eol,start
|
|
||||||
set clipboard=unnamedplus
|
|
||||||
set mouse=a
|
|
||||||
set history=1000
|
|
||||||
set updatetime=300
|
|
||||||
|
|
||||||
syntax on
|
|
||||||
set ruler
|
|
||||||
set showcmd
|
|
||||||
set showmode
|
|
||||||
set laststatus=1
|
|
||||||
set wildmenu
|
|
||||||
set wildmode=longest,list,full
|
|
||||||
set ttyfast
|
|
||||||
set lazyredraw
|
|
||||||
|
|
||||||
filetype plugin indent on
|
|
||||||
set autoindent
|
|
||||||
set smartindent
|
|
||||||
set expandtab
|
|
||||||
set smarttab
|
|
||||||
set tabstop=4
|
|
||||||
set shiftwidth=4
|
|
||||||
set softtabstop=4
|
|
||||||
|
|
||||||
set hlsearch
|
|
||||||
set incsearch
|
|
||||||
set ignorecase
|
|
||||||
set smartcase
|
|
||||||
---
|
|
||||||
|
|
||||||
and you gotta map a keybind to output lambda to live out that Lisp/Scheme vibe
|
|
||||||
😎 (i barely can even code in them)
|
|
||||||
|
|
||||||
--- coyote-home-manager-programs-vim +=
|
|
||||||
inoremap <C-l> λ
|
|
||||||
---
|
|
||||||
|
|
||||||
i love Gruvbox... <sub>(hi Vimjoyer)</sub>
|
|
||||||
|
|
||||||
--- coyote-home-manager-programs-vim +=
|
|
||||||
set termguicolors
|
|
||||||
set background=dark
|
|
||||||
colorscheme gruvbox
|
|
||||||
let g:terminal_ansi_colors = ['#282828', '#cc241d', '#98971a', '#d79921', '#458588', '#b16286', '#689d6a', '#a89984', '#928374', '#fb4934', '#b8bb26', '#fabd2f', '#83a598', '#d3869b', '#8ec07c', '#ebdbb2']
|
|
||||||
---
|
|
||||||
|
|
||||||
finally, plugin configs! there's only one...
|
|
||||||
|
|
||||||
--- coyote-home-manager-programs-vim +=
|
|
||||||
let g:rainbow_active = 1
|
|
||||||
'';
|
|
||||||
---
|
|
||||||
|
|
||||||
this part is kinda... bodgy, but, it's the only way i've found to consistently
|
|
||||||
configure per-language settings in Vim, thru Home Manager's `home.file.<...>`
|
|
||||||
dotfiles generation into `~/.vim/after/ftplugin/`.<br><br>
|
|
||||||
|
|
||||||
TODO: find a more efficient way of doing this, for sure.<br><br>
|
|
||||||
|
|
||||||
we'll set a little function to automate that for us.
|
|
||||||
|
|
||||||
--- coyote-home-manager-configuration-contents +=
|
|
||||||
home.file = let
|
|
||||||
mkVimAfterFtplugin = content: langs:
|
|
||||||
builtins.listToAttrs (map (lang: {
|
|
||||||
name = ".vim/after/ftplugin/${lang}.vim";
|
|
||||||
value = {text = content;};
|
|
||||||
})
|
|
||||||
langs);
|
|
||||||
---
|
|
||||||
|
|
||||||
next are the actual per-language configurations for Vim.
|
|
||||||
|
|
||||||
--- coyote-home-manager-configuration-contents +=
|
|
||||||
tab2Vim = ''
|
|
||||||
setlocal expandtab
|
|
||||||
setlocal tabstop=2
|
|
||||||
setlocal shiftwidth=2
|
|
||||||
setlocal softtabstop=2
|
|
||||||
'';
|
|
||||||
tab4Vim = ''
|
|
||||||
setlocal expandtab
|
|
||||||
setlocal tabstop=4
|
|
||||||
setlocal shiftwidth=4
|
|
||||||
setlocal softtabstop=4
|
|
||||||
'';
|
|
||||||
tabsVim = ''
|
|
||||||
setlocal noexpandtab
|
|
||||||
setlocal tabstop=4
|
|
||||||
setlocal shiftwidth=4
|
|
||||||
setlocal softtabstop=0
|
|
||||||
'';
|
|
||||||
lispVim = ''
|
|
||||||
setlocal expandtab
|
|
||||||
setlocal tabstop=2
|
|
||||||
setlocal shiftwidth=2
|
|
||||||
setlocal softtabstop=2
|
|
||||||
|
|
||||||
setlocal lisp
|
|
||||||
setlocal autoindent
|
|
||||||
setlocal showmatch
|
|
||||||
|
|
||||||
setlocal lispwords+=defun,defmacro,defvar,defparameter,defmethod,define-syntax,lambda,let,let*,letre,flet,labels,progn,when,unless,if,cond
|
|
||||||
'';
|
|
||||||
---
|
|
||||||
|
|
||||||
now all we have to do is set the languages to their designated configs and all
|
|
||||||
the `.vim` files get generated automatically!
|
|
||||||
|
|
||||||
--- coyote-home-manager-configuration-contents +=
|
|
||||||
in
|
|
||||||
lib.mkMerge [
|
|
||||||
(mkVimAfterFtplugin tab2Vim ["javascript" "typescript" "html" "css" "json" "nix" "vim"])
|
|
||||||
(mkVimAfterFtplugin tab4Vim ["python" "rust" "java" "lua" "c" "cpp" "h" "hpp"])
|
|
||||||
(mkVimAfterFtplugin tabsVim ["go" "make"])
|
|
||||||
(mkVimAfterFtplugin lispVim ["lisp" "scheme" "clojure" "racket"])
|
|
||||||
];
|
|
||||||
---
|
|
||||||
|
|
||||||
moving to a little Fastfetch configuring just for pretty. mine is taken from
|
|
||||||
one of the preset settings but with a minified distro logo.
|
|
||||||
|
|
||||||
--- coyote-home-manager-programs-fastfetch
|
|
||||||
fastfetch.enable = true;
|
|
||||||
fastfetch.settings = {
|
|
||||||
"$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
|
||||||
logo.type = "small";
|
|
||||||
logo.padding.top = 4;
|
|
||||||
logo.padding.left = 3;
|
|
||||||
logo.padding.right = 4;
|
|
||||||
display.separator = " ";
|
|
||||||
modules = [
|
|
||||||
{key = "╭─────────╮"; type = "custom";}
|
|
||||||
{key = "│ {#31}user {#keys}│"; type = "title"; format = "{user-name}";}
|
|
||||||
{key = "│ {#32}host {#keys}│"; type = "title"; format = "{host-name}";}
|
|
||||||
{key = "│ {#33}uptime {#keys}│"; type = "uptime";}
|
|
||||||
{key = "│ {#34}distro {#keys}│"; type = "os";}
|
|
||||||
{key = "│ {#35}kernel {#keys}│"; type = "kernel";}
|
|
||||||
{key = "│ {#36}desktop {#keys}│"; type = "de";}
|
|
||||||
{key = "│ {#31}term {#keys}│"; type = "terminal";}
|
|
||||||
{key = "│ {#32}shell {#keys}│"; type = "shell";}
|
|
||||||
{key = "│ {#33}cpu {#keys}│"; type = "cpu"; showPeCoreCount = true;}
|
|
||||||
{key = "│ {#34}disk {#keys}│"; type = "disk"; folders = "/";}
|
|
||||||
{key = "│ {#35}memory {#keys}│"; type = "memory";}
|
|
||||||
{key = "│ {#36}network {#keys}│"; type = "localip"; format = "{ipv4} ({ifname})";}
|
|
||||||
{key = "├─────────┤"; type = "custom";}
|
|
||||||
{key = "│ {#39}colors {#keys}│"; type = "colors"; symbol = "circle";}
|
|
||||||
{key = "╰─────────╯"; type = "custom";}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
---
|
|
||||||
|
|
||||||
<br><hr>
|
|
||||||
|
|
||||||
@s licence
|
|
||||||
|
|
||||||
this configuration is provided under the MIT licence, a copy of which can be
|
|
||||||
read below.
|
|
||||||
|
|
||||||
--- "LICENSE"
|
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2026 asnev
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
---
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
body{min-width:200px;max-width:780px;margin:0 auto;padding:30px;font-family:Inter,Arial,sans-serif;font-size:1em}pre,code,.codeblock_name{font-family:Iosevka,Consolas,monospace}pre{-moz-tab-size:4;-o-tab-size:4;tab-size:4}pre.prettyprint{color:#ab9bab;font-size:10pt;line-height:1.5;padding:10px;border-radius:10px;white-space:pre-wrap}.prettyprint{background:#1d1f21!important;font-family:Iosevka,Consolas,monospace!important;border:0!important}pre code{padding:0!important;background:transparent!important;border:0!important}.pln{color:#c5c8c6}.str{color:#918b3b}.kwd{color:#7b59c0}.com{color:#9e8f9e}.typ,.fun{color:#516aec}.lit,.atn,.dec{color:#a65926}.clo,.opn,.pun{color:#1b181b}.tag,.var{color:#ca402b}.atv{color:#159393}ol.linenums{margin:0;color:#969896}li.L0,li.L1,li.L2,li.L3,li.L4,li.L5,li.L6,li.L7,li.L8,li.L9{padding-left:1em;background-color:#1d1f21;list-style-type:decimal}.math{font-size:10pt;text-indent:0}.chapter-nav{font-size:10pt}.codeblock{page-break-inside:avoid;padding-bottom:15px}.codeblock_name{margin-top:1.25em;display:block}.codeblock_name,.seealso{font-size:8pt!important}h4{padding-right:1.25em}h4.noheading{margin-bottom:0}p:not(.notp){margin:0;text-indent:0!important}code{font-size:1em;padding:2px 4px;background:#f7f3f7;border:1px solid #d8cad8;border-radius:4px}blockquote{font-style:italic;border-left:4px solid #969896;background:#f7f3f7;padding:10px 20px;margin:15px 0}.two-col{list-style-type:none}.two-col li:before{content:collapse;content:'-';padding:5px;margin-right:5px;color:orange;background-color:#fff;display:inline-block}a:link,a:visited{color:#00f}a:link{text-decoration:none}a:link:not(.lit):hover{color:#00f;text-decoration:underline}a:link:active{color:red}p:not(.seealso) a::after{content:" (" attr(href) ")";font-size:0.7em}@media screen{.str{color:#b5bd68}.kwd{color:#b294bb}.com{color:#969896}.typ,.fun{color:#81a2be}.lit,.atn,.dec{color:#de935f}.pun,.opn,.clo{color:#c5c8c6}.tag,.var{color:#c66}.atv{color:#8abeb7}}@media print{body{font-size:10pt}pre.prettyprint{font-size:8pt}.seealso{font-size:9pt}.codeblock_name,.math{font-size:8pt}}
|
|
||||||
Reference in a new issue