mirror of
https://github.com/alyssadev/nixos.git
synced 2025-10-14 04:59:39 +10:00
test
This commit is contained in:
parent
502a68b81e
commit
baafee0a16
7 changed files with 89 additions and 147 deletions
71
flake.nix
71
flake.nix
|
@ -1,6 +1,4 @@
|
||||||
{
|
{
|
||||||
description = "NixOS configuration";
|
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
|
@ -11,77 +9,18 @@
|
||||||
|
|
||||||
outputs = inputs@{ nixpkgs, home-manager, ... }: {
|
outputs = inputs@{ nixpkgs, home-manager, ... }: {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
aly-laptop = nixpkgs.lib.nixosSystem {
|
"aly-laptop" = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hw-aly-laptop.nix
|
./hw/aly-laptop.nix
|
||||||
({ config, pkgs, ... }: {
|
./system/aly-laptop.nix
|
||||||
networking.hostName = "aly-laptop";
|
./system/global.nix
|
||||||
services.logind = {
|
|
||||||
lidSwitch = "suspend";
|
|
||||||
lidSwitchDocked = "ignore";
|
|
||||||
lidSwitchExternalPower = "ignore";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
({ 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; [
|
|
||||||
cargo rustc just git vim wget obs-studio gcc gnumake autoconf automake pkg-config rpi-imager
|
|
||||||
];
|
|
||||||
environment.variables.EDITOR = "vim";
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
services.pulseaudio.enable = false;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
};
|
|
||||||
time.timeZone = "Australia/Brisbane";
|
|
||||||
users.users.aly = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "aly";
|
|
||||||
hashedPassword = "$y$j9T$Q.yFJjo9LMA8o.7Ac5uSr/$Y8pYIPSzCXHSd4nAlUohaaohwpquK6XEIjxFKq3J4s/";
|
|
||||||
openssh.authorizedKeys.keys = import ./authorized_keys.nix;
|
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# 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.xserver.desktopManager.gnome.enable = true;
|
|
||||||
})
|
|
||||||
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.aly = import ./home/aly.nix;
|
||||||
home-manager.users.aly = import ./home.nix;
|
|
||||||
|
|
||||||
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
|
||||||
}
|
}
|
||||||
|
|
||||||
({ pkgs, ... }: {
|
|
||||||
environment.etc."nixos".source = ./.;
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
81
home.nix
81
home.nix
|
@ -1,81 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
home.username = "aly";
|
|
||||||
home.homeDirectory = "/home/aly";
|
|
||||||
xresources.properties = {
|
|
||||||
"Xcursor.size" = 16;
|
|
||||||
"Xft.dpi" = 172;
|
|
||||||
};
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
gnome-tweaks
|
|
||||||
firefox
|
|
||||||
neofetch
|
|
||||||
nnn
|
|
||||||
zip
|
|
||||||
xz
|
|
||||||
unzip
|
|
||||||
p7zip
|
|
||||||
ripgrep
|
|
||||||
jq
|
|
||||||
yq-go
|
|
||||||
mtr
|
|
||||||
iperf3
|
|
||||||
dnsutils
|
|
||||||
ldns
|
|
||||||
aria2
|
|
||||||
socat
|
|
||||||
nmap
|
|
||||||
ipcalc
|
|
||||||
file
|
|
||||||
which
|
|
||||||
tree
|
|
||||||
gnused
|
|
||||||
gnutar
|
|
||||||
gawk
|
|
||||||
zstd
|
|
||||||
gnupg
|
|
||||||
nix-output-monitor
|
|
||||||
|
|
||||||
btop
|
|
||||||
iotop
|
|
||||||
iftop
|
|
||||||
strace
|
|
||||||
ltrace
|
|
||||||
lsof
|
|
||||||
sysstat
|
|
||||||
lm_sensors
|
|
||||||
ethtool
|
|
||||||
pciutils
|
|
||||||
usbutils
|
|
||||||
];
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
userName = "alydev";
|
|
||||||
userEmail = "alyssa.dev.smith@gmail.com";
|
|
||||||
};
|
|
||||||
|
|
||||||
# alacritty - a cross-platform, GPU-accelerated terminal emulator
|
|
||||||
# programs.alacritty = {
|
|
||||||
# enable = true;
|
|
||||||
# # custom settings
|
|
||||||
# settings = {
|
|
||||||
# env.TERM = "xterm-256color";
|
|
||||||
# font = {
|
|
||||||
# size = 12;
|
|
||||||
# draw_bold_text_with_bright_colors = true;
|
|
||||||
# };
|
|
||||||
# scrolling.multiplier = 5;
|
|
||||||
# selection.save_to_clipboard = true;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
programs.bash = {
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
bashrcExtra = ''
|
|
||||||
export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
home.stateVersion = "25.05";
|
|
||||||
}
|
|
31
home/aly.nix
Normal file
31
home/aly.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.username = "aly";
|
||||||
|
home.homeDirectory = "/home/aly";
|
||||||
|
xresources.properties = {
|
||||||
|
"Xcursor.size" = 16;
|
||||||
|
"Xft.dpi" = 172;
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gnome-tweaks firefox obs-studio rpi-imager
|
||||||
|
neofetch nnn zip xz unzip p7zip ripgrep jq yq-go mtr iperf3 dnsutils
|
||||||
|
ldns aria2 socat nmap ipcalc file which tree gnused gnutar gawk zstd
|
||||||
|
gnupg btop iotop iftop strace ltrace lsof sysstat lm_sensors ethtool
|
||||||
|
pciutils usbutils nix-output-monitor
|
||||||
|
];
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "alydev";
|
||||||
|
userEmail = "alyssa.dev.smith@gmail.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.bash = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
bashrcExtra = ''
|
||||||
|
export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
home.stateVersion = "25.05";
|
||||||
|
}
|
8
system/aly-laptop.nix
Normal file
8
system/aly-laptop.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
({ config, pkgs, ... }: {
|
||||||
|
networking.hostName = "aly-laptop";
|
||||||
|
services.logind = {
|
||||||
|
lidSwitch = "suspend";
|
||||||
|
lidSwitchDocked = "ignore";
|
||||||
|
lidSwitchExternalPower = "ignore";
|
||||||
|
};
|
||||||
|
})
|
45
system/global.nix
Normal file
45
system/global.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
({ 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; [
|
||||||
|
cargo rustc just git vim wget gcc gnumake autoconf automake pkg-config
|
||||||
|
];
|
||||||
|
environment.variables.EDITOR = "vim";
|
||||||
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
services.pulseaudio.enable = false;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
pulse.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" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# 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.xserver.desktopManager.gnome.enable = true;
|
||||||
|
})
|
Loading…
Add table
Add a link
Reference in a new issue