This commit is contained in:
alydev 2025-09-25 04:22:53 +00:00
parent ae314607e0
commit 974b0e57f1
3 changed files with 73 additions and 7 deletions

View file

@ -45,14 +45,9 @@
nur.modules.nixos.default
nix-flatpak.nixosModules.nix-flatpak
nixvim.nixosModules.nixvim
./hw/aly-server.nix
./system/aly-server.nix
# TODO
./system/global.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.aly = import ./home/aly.nix;
}
];
};
};

36
hw/aly-server.nix Normal file
View file

@ -0,0 +1,36 @@
# 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 = [ ];
boot.initrd.availableKernelModules = [ "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/1ede5a16-78e9-4874-b39f-b1d31a021774";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/EF0E-1E4B";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
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.eth0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
virtualisation.hypervGuest.enable = true;
}

35
system/aly-server.nix Normal file
View file

@ -0,0 +1,35 @@
({ config, pkgs, ... }: {
system.stateVersion = "25.05";
virtualisation.hypervGuest.enable = true;
boot.blacklistedKernelModules = [ "hyperv_fb" ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
cargo rustc just git wget gcc gnumake autoconf automake pkg-config cifs-utils
];
programs.nixvim.enable = true;
programs.nixvim.defaultEditor = true;
security.sudo.wheelNeedsPassword = false;
networking.networkmanager.enable = true;
time.timeZone = "Australia/Brisbane";
users.users.aly = {
isNormalUser = true;
description = "aly";
hashedPassword = "$y$j9T$Q.yFJjo9LMA8o.7Ac5uSr/$Y8pYIPSzCXHSd4nAlUohaaohwpquK6XEIjxFKq3J4s/";
openssh.authorizedKeys.keys = import ../data/authorized_keys.nix;
extraGroups = [ "networkmanager" "wheel" ];
};
services.openssh = {
enable = true;
settings = {
X11Forwarding = true;
PermitRootLogin = "no";
PasswordAuthentication = true;
};
openFirewall = true;
};
})