added a new host machine

This commit is contained in:
2023-12-22 03:57:26 +05:30
parent a75d7948d5
commit 183d306979
4 changed files with 200 additions and 0 deletions

View File

@ -0,0 +1,80 @@
{ config, outputs, lib, pkgs, inputs, username, ... }:
{
imports = [
./hardware-configuration.nix
];
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
outputs.overlays.nur
];
config = {
allowUnfree = true;
joypixels.acceptLicense = true;
};
};
nix = {
settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
};
};
boot = {
kernelPackages = pkgs.linuxPackages_zen;
initrd.systemd.enable = true;
loader = {
grub.device = "/dev/sda";
timeout = 1;
};
};
networking = {
hostName = "controller";
};
security = {
sudo.wheelNeedsPassword = false;
};
programs = {
zsh.enable = true;
nix-ld.enable = true;
dconf.enable = true;
};
services = {
openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
};
};
};
users = {
defaultUserShell = pkgs.zsh;
users.${username} = {
initialPassword = "${username}";
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" "storage" ];
openssh.authorizedKeys.keys = [
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D 0xtux@pm.me''
];
};
};
environment.systemPackages = with pkgs;[
];
fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" "JetBrainsMono" ]; }) ];
system.stateVersion = "23.11";
}

View File

@ -0,0 +1,39 @@
# 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 + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/b5a9a9f6-be72-4520-b2ac-439d0479a34b";
fsType = "ext4";
};
fileSystems."/efi" =
{
device = "systemd-1";
fsType = "autofs";
};
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.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}