mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
restructure folder organisation
This commit is contained in:
parent
599d55fa6a
commit
9cf7be677d
72 changed files with 95 additions and 98 deletions
43
machines/core/core.nix
Normal file
43
machines/core/core.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
# Packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
bandwhich
|
||||
bind # dig
|
||||
borgbackup
|
||||
cryptsetup
|
||||
file
|
||||
fzf
|
||||
gettext
|
||||
git
|
||||
gitAndTools.delta
|
||||
gnufdisk
|
||||
gptfdisk
|
||||
htop
|
||||
jq
|
||||
killall
|
||||
lsof
|
||||
mosh
|
||||
multipath-tools #-> kpartx
|
||||
mtr
|
||||
nix-index
|
||||
nmap
|
||||
nmon
|
||||
pciutils
|
||||
pv
|
||||
reptyr
|
||||
rsync
|
||||
screen
|
||||
stress-ng
|
||||
usbutils
|
||||
tmux
|
||||
vim
|
||||
wget
|
||||
whois
|
||||
zip
|
||||
unzip
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
services.timesyncd.enable = true;
|
||||
}
|
6
machines/core/default.nix
Normal file
6
machines/core/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
[
|
||||
./core.nix
|
||||
./modules.nix
|
||||
./network.nix
|
||||
./users.nix
|
||||
]
|
29
machines/core/modules.nix
Normal file
29
machines/core/modules.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable all firmware modules, so that bluetooth and wifi modules can load
|
||||
# https://github.com/NixOS/nixpkgs/issues/85377#issuecomment-616424682
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.enableAllFirmware = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
boot.initrd = {
|
||||
availableKernelModules = [
|
||||
"ahci"
|
||||
"e1000e"
|
||||
"ehci_pci"
|
||||
"nvme"
|
||||
"sd_mod"
|
||||
"uas"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"xhci_pci"
|
||||
];
|
||||
|
||||
kernelModules = [
|
||||
"dm-snapshot"
|
||||
"e1000e"
|
||||
"nvme"
|
||||
];
|
||||
};
|
||||
}
|
15
machines/core/network.nix
Normal file
15
machines/core/network.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
|
||||
unmanaged = [
|
||||
"interface-name:br-*" # Ignore docker compose network bridges
|
||||
"interface-name:docker?" # Ignore docker default bridge
|
||||
"interface-name:veth*" # Ignore docker compose network devices
|
||||
"interface-name:virbr?" # Ignore libvirt default bridge
|
||||
];
|
||||
};
|
||||
|
||||
}
|
28
machines/core/users.nix
Normal file
28
machines/core/users.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
sops.secrets."users/felix/password".neededForUsers = true;
|
||||
sops.secrets."users/felix/password" = { };
|
||||
|
||||
users.users.felix = {
|
||||
isNormalUser = true;
|
||||
home = "/home/felix";
|
||||
group = "felix";
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"adbusers"
|
||||
"audio"
|
||||
"dialout"
|
||||
"docker"
|
||||
"input"
|
||||
"libvirtd"
|
||||
"networkmanager"
|
||||
"video"
|
||||
];
|
||||
passwordFile = config.sops.secrets."users/felix/password".path;
|
||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOFx6OLwL9MbkD3mnMsv+xrzZHN/rwCTgVs758SCLG0h felix@thinkman" ];
|
||||
};
|
||||
|
||||
users.groups.felix = {
|
||||
gid = 1000;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue