more server configuration
This commit is contained in:
@@ -10,5 +10,6 @@
|
||||
imports = [
|
||||
./../../modules/server
|
||||
./settings.nix
|
||||
./hardware.nix
|
||||
];
|
||||
}
|
||||
|
||||
49
hosts/server/hardware.nix
Normal file
49
hosts/server/hardware.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/c40b3b09-688d-4fe3-96f9-8e3d75b0a7b7";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-uuid/1048d206-0a27-4e4e-b9a4-4f068bab5439";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/357E-BCCD";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/b53ab583-f32e-4144-a2ee-f341e54f8233";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp10s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp11s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -31,12 +31,6 @@
|
||||
];
|
||||
};
|
||||
|
||||
users.users."${username}" = {
|
||||
shell = pkgs.zsh;
|
||||
isNormalUser = true;
|
||||
extraGroup = ["wheel"];
|
||||
initialPassword = "1111";
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
@@ -4,11 +4,14 @@
|
||||
scheme,
|
||||
wallpaper,
|
||||
username,
|
||||
host,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./services.nix
|
||||
../sys/software/nixvim
|
||||
../home/environment/zshell.nix
|
||||
../sys/hardware/bootloader.nix
|
||||
./services.nix
|
||||
./home.nix
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
|
||||
30
modules/server/home.nix
Normal file
30
modules/server/home.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ pkgs, inputs, config, host, self, ... }: {
|
||||
imports = [inputs.home-manager.nixosModules.home-manager];
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = {inherit host self inputs;};
|
||||
users."pagedmov" = {
|
||||
programs.home-manager.enable = true;
|
||||
imports = [
|
||||
../home/environment/zshell.nix
|
||||
../home/environment/starship.nix
|
||||
../home/scripts
|
||||
];
|
||||
home = {
|
||||
username = "pagedmov";
|
||||
homeDirectory = "/home/pagedmov";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
users.users = {
|
||||
pagedmov = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "1234";
|
||||
extraGroups = ["wheel"];
|
||||
};
|
||||
root.initialPassword = "1234";
|
||||
};
|
||||
}
|
||||
@@ -1,8 +1,26 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
extraFigletFonts = pkgs.fetchFromGitHub {
|
||||
owner = "xero";
|
||||
repo = "figlet-fonts";
|
||||
rev = "master";
|
||||
sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY=";
|
||||
};
|
||||
toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: {
|
||||
buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts];
|
||||
|
||||
installPhase = ''
|
||||
make install PREFIX=$out
|
||||
mkdir -p $out/share/figlet
|
||||
cp -r ${extraFigletFonts}/* $out/share/figlet
|
||||
'';
|
||||
});
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
toilet-extrafonts
|
||||
gtrash
|
||||
alsa-utils
|
||||
python3
|
||||
fail2ban
|
||||
inetutils
|
||||
@@ -18,6 +36,7 @@
|
||||
openssl
|
||||
p7zip
|
||||
jq
|
||||
git
|
||||
pamixer
|
||||
parted
|
||||
pkg-config
|
||||
|
||||
Reference in New Issue
Block a user