dotfiles/hosts/generic.nix
2024-02-26 05:19:56 +03:00

55 lines
1.3 KiB
Nix

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