mirror of
https://github.com/alyssadev/nixos.git
synced 2025-10-14 04:59:39 +10:00
Init
This commit is contained in:
commit
c897f66375
5 changed files with 250 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
hardware-configuration.nix
|
27
Justfile
Normal file
27
Justfile
Normal file
|
@ -0,0 +1,27 @@
|
|||
up:
|
||||
nix flake update
|
||||
|
||||
deploy:
|
||||
nixos-rebuild switch --flake . --use-remote-sudo
|
||||
|
||||
debug:
|
||||
nixos-rebuild switch --flake . --use-remote-sudo --show-trace --verbose
|
||||
|
||||
# Update specific input
|
||||
# usage: make upp i=home-manager
|
||||
upp:
|
||||
nix flake update $(i)
|
||||
|
||||
history:
|
||||
nix profile history --profile /nix/var/nix/profiles/system
|
||||
|
||||
repl:
|
||||
nix repl -f flake:nixpkgs
|
||||
|
||||
clean:
|
||||
# remove all generations older than 7 days
|
||||
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d
|
||||
|
||||
gc:
|
||||
# garbage collect all unused nix store entries
|
||||
sudo nix-collect-garbage --delete-old
|
49
flake.lock
generated
Normal file
49
flake.lock
generated
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758463745,
|
||||
"narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1758346548,
|
||||
"narHash": "sha256-afXE7AJ7MY6wY1pg/Y6UPHNYPy5GtUKeBkrZZ/gC71E=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b2a3852bd078e68dd2b3dfa8c00c67af1f0a7d20",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
92
flake.nix
Normal file
92
flake.nix
Normal file
|
@ -0,0 +1,92 @@
|
|||
{
|
||||
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-laptop = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hardware-configuration.nix
|
||||
({ config, pkgs, ... }: {
|
||||
networking.hostName = "aly-laptop";
|
||||
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; [
|
||||
just
|
||||
git
|
||||
vim
|
||||
wget
|
||||
obs-studio
|
||||
];
|
||||
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/";
|
||||
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.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 = ./.;
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
81
home.nix
Normal file
81
home.nix
Normal file
|
@ -0,0 +1,81 @@
|
|||
{ 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";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue