started overhaul
This commit is contained in:
parent
d1fec56ebf
commit
d6bdbe514d
14 changed files with 649 additions and 23 deletions
21
overhaul/modules/common/locale.nix
Normal file
21
overhaul/modules/common/locale.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
cfg = config.horseman.common.locale;
|
||||
in {
|
||||
options = {
|
||||
horseman.common.locale = {
|
||||
enable = mkEnableOption "Dutch locale settings";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
};
|
||||
}
|
||||
45
overhaul/modules/common/nix.nix
Normal file
45
overhaul/modules/common/nix.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
cfg = config.horseman.common.nix;
|
||||
in {
|
||||
options = {
|
||||
horseman.common.nix = {
|
||||
enable = mkEnableOption "Nix settings";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [];
|
||||
|
||||
nix.nixPath = ["/etc/nix/path"];
|
||||
environment.etc =
|
||||
lib.mapAttrs'
|
||||
(name: value: {
|
||||
name = "nix/path/${name}";
|
||||
value.source = value.flake;
|
||||
})
|
||||
config.nix.registry;
|
||||
|
||||
nix.settings.trusted-users = [ "root" "horseman" ];
|
||||
nix.settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
56
overhaul/modules/terminal/zsh.nix
Normal file
56
overhaul/modules/terminal/zsh.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
cfg = config.horseman.base.locale;
|
||||
in {
|
||||
options = {
|
||||
horseman.terminal.zsh = {
|
||||
enable = mkEnableOption "Enable ZSH and all associated plugins";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.lorri.enable = true;
|
||||
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
histSize = 10000;
|
||||
|
||||
shellAliases = {
|
||||
clone-dotfiles = "cp /home/horseman/nix-config/config/dotfiles/.\* /home/horseman/";
|
||||
rebuild = "nix fmt && clone-dotfiles && sudo nixos-rebuild switch --flake";
|
||||
update = "sudo nix flake update && rebuild";
|
||||
compose = "sudo docker compose";
|
||||
wolpc = "wakeonlan D8:5E:D3:A8:B1:0A";
|
||||
capture-config = "nix run github:pjones/plasma-manager > ~/nix-config/home-manager/plasma.nix";
|
||||
reboot-to-windows = "sudo efibootmgr -n 0000";
|
||||
mkdir = "mkdir -p";
|
||||
};
|
||||
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
"zsh-interactive-cd"
|
||||
"python"
|
||||
"git-auto-fetch"
|
||||
"wd"
|
||||
];
|
||||
theme = "jonathan";
|
||||
};
|
||||
|
||||
shellInit = "eval \"$(direnv hook zsh)\"";
|
||||
};
|
||||
};
|
||||
}
|
||||
49
overhaul/modules/users/horseman.nix
Normal file
49
overhaul/modules/users/horseman.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
cfg = config.horseman.users.horseman;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
horseman.users.horseman = {
|
||||
enable = mkEnableOption "User 'horseman'";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.users = {
|
||||
horseman = {
|
||||
initialPassword = "correct horse battery staple";
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCtbmZFvOsukUtqKnRkzLqphpgA0HF/mCcH/6BtPah6G4v6gqu8za58w8/0//aGkurG3sfQ5YhphFMJYm26/QdCUvVYeC92LWC5mjWB/md+BOWCoZYoEL0NHuu5f+7EQcmxLYuIv7mzHB1T+fwgOyuoW6IKLLQcmokx4uyg8apUs0yaRr9rCmoxeYOlZlsE6pKS2E8YUEkCRUZ1PZW6ILHXOOaz3KQ7s429MPvKv+061SlyEZuyinzsS1+4e/j5fCddq9Ac2ar1TiIkFhmtpJfJ2iWzVAvpZ08KV4nHgews07jjuj0/dZufSXbWJI6fQCMRvETeQsDU0RB6AxO//6plSo6svsGa/XhZx55AZAotflc2EzIi5QPWa078xu8IR23/flj52gqCj3O7RxhZib+L4cCdAS8nSZkLw9VV2kROqf4JcRYsinfKetBBPJU3RYKDVq8uF23eliNw+5lYKJu5FzPVFmS/J+vAme/vHkHLNKz5CnZoABjeue4PEnpSyFCJhf4w94lbB9JBaxKuZoXvaPE7bKDTHWbVC9DKWrL+QqNP5tsiV3/jI9gx4ty9OihMv5p46ennD17AbMM6xi/yPjvX6jbDIo+jMswW1ndhH2Ka6PTRpx8G+BWgoEVjCoP/DptloE6B5EfZous8Yd+RBuRiqNk4WUB+6PWVO7ELfQ horseman" # luna
|
||||
"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jZiBuUDOXWpbbk1214iWrymAbpbVmNU68QVEcQkJTnfbRQ/56Nvq80emFgke6p4vcVnR9iVbaZDnOkMVH6HEs0Qc/rC38p9aISAdJvI49GWaz8fs1OgVi7mj9xA0QREc6/oalJ1F3BehPUk8v4uqww3u+I2AdWPp/6HO9zVU2mTrO30a8IbjOqFqMqdV+nYFxNbHIIIZ9acv95FGqIBCG0U9d8XVVFQ+kVWxkXxPk0uynzAsrXyiH3gzxHwy7stCxybZkTpQPjf+vSt4Tz3PRxnyq1OWTUzWmBVe0MCdZX5h/oQp6kI1Ys/t+UrP1G9NEIwGg+/zlpmGiV8Pm10b6gEXgv09BQPFGPsBbl4NRpQQ horseman" # solis
|
||||
];
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"docker"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
# lmao idk if I should remove this but it's funny so imma keep it
|
||||
system.stateVersion = "23.11";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue