nixos/flake.nix
alyssadev f92edecbcb init
2025-08-24 23:09:37 +10:00

88 lines
2.9 KiB
Nix

{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, home-manager, ... }: {
nixosConfigurations = {
aly-desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ config, pkgs, ... }: {
system.stateVersion = "25.05";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
git
vim
wget
];
environment.variables.EDITOR = "vim";
security.sudo.wheelNeedsPassword = false;
networking.hostName = "aly-desktop";
networking.networkmanager.enable = true;
services.pulseaudio.enable = false;
services.pipewire = {
enable = true;
pulse.enable = true;
};
time.timeZone = "Australia/Brisbane";
users.users.aly = {
isNormalUser = true;
description = "aly";
initialPassword = "test";
extraGroups = [ "networkmanager" "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGa9sXpYiDXy6L9dQHcKkK45PBgZHo0PCz/ejmvhDW6Z aly@aurora"
];
packages = with pkgs; [
# firefox
# thunderbird
];
};
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
X11Forwarding = true;
PermitRootLogin = "no"; # disable root login
PasswordAuthentication = false; # disable password login
};
openFirewall = true;
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.displayManager.autoLogin.user = "aly";
services.xserver.desktopManager.gnome.enable = true;
})
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.aly = import ./home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
}
({ pkgs, ... }: {
environment.etc."nixos".source = ./.;
})
];
};
};
};
}