mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
hetzner_benchmark: include more personal configurations
This commit is contained in:
parent
8f2ed1b1e4
commit
10d4376834
5 changed files with 202 additions and 18 deletions
|
|
@ -3,37 +3,114 @@ let
|
||||||
sources = import ../../npins;
|
sources = import ../../npins;
|
||||||
|
|
||||||
hostname = "hetzner_benchmark";
|
hostname = "hetzner_benchmark";
|
||||||
|
username = "leana";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib.modules) mkAliasOptionModule;
|
||||||
in
|
in
|
||||||
{ lib, ... }:
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
#
|
||||||
|
# Shorthands
|
||||||
|
#
|
||||||
|
(mkAliasOptionModule [ "me" ] [ "users" "users" username ])
|
||||||
|
(mkAliasOptionModule [ "hm" ] [ "home-manager" "users" username ])
|
||||||
|
|
||||||
#
|
#
|
||||||
# hostname
|
# hostname
|
||||||
#
|
#
|
||||||
{ _module.args = { inherit hostname; }; }
|
{ _module.args = { inherit hostname; }; }
|
||||||
|
|
||||||
{ system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision; }
|
#
|
||||||
|
# nixpkgs
|
||||||
|
#
|
||||||
|
{
|
||||||
|
nixpkgs = {
|
||||||
|
overlays = map import [
|
||||||
|
../packages/overlay.nix
|
||||||
|
|
||||||
./hetzner_benchmark/hardware-configuration.nix
|
# use lix everywhere and wrap it with nom
|
||||||
|
../overlays/lix.nix
|
||||||
|
../overlays/nix-monitored.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Set NIX_PATH and flake registry at the same time
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/254405
|
||||||
|
flake.source = sources.nixpkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.package = pkgs.nix-monitored;
|
||||||
|
|
||||||
|
system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision;
|
||||||
|
}
|
||||||
|
|
||||||
|
./hetzner_benchmark/nixos/hardware-configuration.nix
|
||||||
|
./hetzner_benchmark/nixos/misc.nix
|
||||||
|
|
||||||
|
../nixosModules/common/fish.nix
|
||||||
|
../nixosModules/common/disable-command-not-found.nix
|
||||||
|
../nixosModules/common/network.nix
|
||||||
|
../nixosModules/common/sudo-conf.nix
|
||||||
|
../nixosModules/common/system-nixconf.nix
|
||||||
|
|
||||||
|
../nixosModules/extra/leana.nix
|
||||||
|
|
||||||
|
#
|
||||||
|
# Extern modules
|
||||||
|
#
|
||||||
(sources.disko + "/module.nix")
|
(sources.disko + "/module.nix")
|
||||||
../disko/hetzner_benchmark/ext4.nix
|
../disko/hetzner_benchmark/ext4.nix
|
||||||
|
|
||||||
../nixosModules/common/system-nixconf.nix
|
#
|
||||||
../nixosModules/extra/leana.nix
|
# home-manager
|
||||||
|
#
|
||||||
# TODO: install my user configuration
|
(sources.home-manager + "/nixos")
|
||||||
];
|
{
|
||||||
|
home-manager = {
|
||||||
boot.loader.grub.enable = true;
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
services.openssh.enable = true;
|
sharedModules = [ { home.stateVersion = lib.mkDefault config.system.stateVersion; } ];
|
||||||
|
|
||||||
users.users = {
|
|
||||||
"root".openssh.authorizedKeys.keys = import ../identities.nix ++ [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFza3UN1gWQqh//FkJBzmssQ4lxHdllQGfqPHzG4LQI8 benchmark-machine"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "25.05";
|
hm.imports = [
|
||||||
|
#
|
||||||
|
# hostname
|
||||||
|
#
|
||||||
|
{ _module.args = { inherit hostname; }; }
|
||||||
|
|
||||||
|
#
|
||||||
|
# home modules
|
||||||
|
#
|
||||||
|
./hetzner_benchmark/home/programs.nix
|
||||||
|
./hetzner_benchmark/home/dev.nix
|
||||||
|
|
||||||
|
../homeModules/common/btop
|
||||||
|
../homeModules/common/fish
|
||||||
|
../homeModules/common/starship
|
||||||
|
../homeModules/common/fzf.nix
|
||||||
|
../homeModules/common/tmux
|
||||||
|
../homeModules/common/vim
|
||||||
|
../homeModules/common/direnv.nix
|
||||||
|
../homeModules/common/git.nix
|
||||||
|
../homeModules/common/gpg.nix
|
||||||
|
../homeModules/common/leana.nix
|
||||||
|
../homeModules/common/locale.nix
|
||||||
|
../homeModules/common/packages.nix
|
||||||
|
../homeModules/common/tealdeer.nix
|
||||||
|
|
||||||
|
../homeModules/extra/tmux-fish-integration.nix
|
||||||
|
|
||||||
|
#
|
||||||
|
# Extern modules
|
||||||
|
#
|
||||||
|
(sources.agenix + "/modules/age-home.nix")
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
29
nix/configurations/hetzner_benchmark/home/dev.nix
Normal file
29
nix/configurations/hetzner_benchmark/home/dev.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
pkgs.nil # nix
|
||||||
|
pkgs.pyright # python
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
signing.signByDefault = false; # no need to setup the key
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.gpg.enable = true;
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
extra-substituters = [
|
||||||
|
"https://ghc-nix.cachix.org"
|
||||||
|
"https://haskell-language-server.cachix.org"
|
||||||
|
"https://cache.iog.io"
|
||||||
|
];
|
||||||
|
extra-trusted-public-keys = [
|
||||||
|
"ghc-nix.cachix.org-1:ziC/I4BPqeA4VbtOFpFpu6D1t6ymFvRWke/lc2+qjcg="
|
||||||
|
"haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8="
|
||||||
|
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
65
nix/configurations/hetzner_benchmark/home/programs.nix
Normal file
65
nix/configurations/hetzner_benchmark/home/programs.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
# TODO: remove some packages for this machine
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.sessionVariables =
|
||||||
|
let
|
||||||
|
fishCfg = config.programs.fish;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package);
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
pkgs.nmap
|
||||||
|
pkgs.stow
|
||||||
|
pkgs.zip
|
||||||
|
pkgs.unzip
|
||||||
|
pkgs.gnutar
|
||||||
|
pkgs.p7zip
|
||||||
|
pkgs.bc
|
||||||
|
pkgs.dig
|
||||||
|
pkgs.hutils
|
||||||
|
pkgs.miniserve
|
||||||
|
# pkgs.agenix
|
||||||
|
pkgs.nix-which
|
||||||
|
|
||||||
|
# pretty tui tools
|
||||||
|
pkgs.du-dust
|
||||||
|
pkgs.tokei
|
||||||
|
pkgs.hyperfine
|
||||||
|
pkgs.watchexec
|
||||||
|
pkgs.onefetch
|
||||||
|
pkgs.just
|
||||||
|
|
||||||
|
# nix tools
|
||||||
|
pkgs.alejandra
|
||||||
|
pkgs.nurl
|
||||||
|
pkgs.npins
|
||||||
|
pkgs.nix-tree
|
||||||
|
pkgs.nh
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
};
|
||||||
|
lazygit.enable = true;
|
||||||
|
fish.enable = true;
|
||||||
|
starship.enable = true;
|
||||||
|
tmux.enable = true;
|
||||||
|
direnv.enable = true;
|
||||||
|
ripgrep.enable = true;
|
||||||
|
|
||||||
|
btop.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
gpg-agent.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
13
nix/configurations/hetzner_benchmark/nixos/misc.nix
Normal file
13
nix/configurations/hetzner_benchmark/nixos/misc.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
users.users = {
|
||||||
|
"root".openssh.authorizedKeys.keys = import ../../../identities.nix ++ [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFza3UN1gWQqh//FkJBzmssQ4lxHdllQGfqPHzG4LQI8 benchmark-machine"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue