Update flake.nix

This commit is contained in:
Aaron Honeycutt 2024-01-09 14:27:27 +00:00
parent 9b0634ec43
commit 74f2df5968

117
flake.nix
View file

@ -2,75 +2,88 @@
description = "Generic System Flake file"; description = "Generic System Flake file";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.11"; nixpkgs.url = "github:NixOS/nixpkgs/release-23.11";
}; };
outputs = { self, nixpkgs, ... }@inputs: { outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations = { nixosConfigurations = {
"nixos" = nixpkgs.lib.nixosSystem { "nixos" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
# Import the configuration.nix we used before, so that the old configuration file can still take effect. # Import the configuration.nix we used before, so that the old configuration file can still take effect.
# Note: /etc/nixos/configuration.nix itself is also a Nix Module, so you can import it directly here # Note: /etc/nixos/configuration.nix itself is also a Nix Module, so you can import it directly here
# ./configuration.nix #./configuration.nix
./hardware-configuration.nix ./hardware-configuration.nix
({config, pkgs, ...}: { ({config, pkgs, ...}: {
nix = { nix = {
settings.auto-optimise-store = true; settings.auto-optimise-store = true;
settings.experimental-features = [ "nix-command" "flakes" ]; settings.experimental-features = [ "nix-command" "flakes" ];
gc = { gc = {
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
options = "--delete-older-than 30d"; options = "--delete-older-than 30d";
}; };
}; };
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
loader = { loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
systemd-boot.consoleMode = "0"; systemd-boot.consoleMode = "0";
}; };
}; };
networking = { networking = {
hostName = "nixos"; hostName = "nixos";
networkmanager.enable = true;
};
}; users.users.aaronh = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ]; # Enable sudo for the user.
hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx.";
packages = with pkgs; [
cargo
git
git-lfs
];
};
users.users.aaronh = { environment.systemPackages = with pkgs; [
isNormalUser = true; git
extraGroups = [ "wheel" "networkmanager" ]; # Enable sudo for the user. git-lfs
hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; neofetch
packages = with pkgs; [ tree
cargo wget
git ];
git-lfs
];
};
environment.systemPackages = with pkgs; [ # Enable/Disable hardware
git ## Turn off PulseAudio
git-lfs hardware.pulseaudio.enable = false;
neofetch
tree
wget
];
services.openssh = { # Enable Pipewire
enable = true; security.rtkit.enable = true;
settings.PermitRootLogin = "no"; services.pipewire = {
}; enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
system = { services.openssh = {
stateVersion = "23.11"; enable = true;
autoUpgrade.enable = true; settings.PermitRootLogin = "no";
}; };
system = {
stateVersion = "23.11";
autoUpgrade.enable = true;
};
}) })
]; ];
}; };