2023-06-06 15:01:28 +00:00
|
|
|
# This is your system's configuration file.
|
|
|
|
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
|
|
|
# https://github.com/Misterio77/nix-starter-configs
|
|
|
|
|
|
|
|
{ inputs, lib, config, pkgs, ... }: {
|
|
|
|
# You can import other NixOS modules here
|
|
|
|
imports = [
|
|
|
|
# If you want to use modules from other flakes (such as nixos-hardware):
|
2023-06-10 08:59:31 +00:00
|
|
|
inputs.hardware.nixosModules.common-cpu-amd
|
2023-06-06 15:30:46 +00:00
|
|
|
# inputs.hardware.nixosModules.common-gpu-nvidia
|
2023-06-06 15:01:28 +00:00
|
|
|
|
|
|
|
# You can also split up your configuration and import pieces of it here:
|
|
|
|
# ./users.nix
|
|
|
|
./network.nix
|
2023-06-13 14:12:09 +00:00
|
|
|
|
2023-06-18 14:32:51 +00:00
|
|
|
../../roles/desktop.nix
|
|
|
|
../../roles/base.nix
|
2023-06-13 14:12:09 +00:00
|
|
|
../../modules/nvidia.nix
|
2023-06-06 15:01:28 +00:00
|
|
|
|
|
|
|
# Import home-manager's NixOS module
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
|
|
|
|
|
|
|
# Import your generated (nixos-generate-config) hardware configuration
|
|
|
|
./hardware-configuration.nix
|
|
|
|
];
|
|
|
|
|
2023-06-18 14:32:51 +00:00
|
|
|
displayManager.setupCommands = ''
|
|
|
|
${pkgs.xorg.xrandr}/bin/xrandr --output DP-4 --rate 144.00 --size 1920x1080 --right-of HDMI-0 --primary --output HDMI-0 --auto
|
|
|
|
'';
|
2023-06-06 15:01:28 +00:00
|
|
|
|
|
|
|
nix = {
|
|
|
|
# This will add each flake input as a registry
|
|
|
|
# To make nix3 commands consistent with your flake
|
|
|
|
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
|
|
|
|
|
|
|
|
# This will additionally add your inputs to the system's legacy channels
|
|
|
|
# Making legacy nix commands consistent as well, awesome!
|
|
|
|
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
# Enable flakes and new 'nix' command
|
|
|
|
experimental-features = "nix-command flakes";
|
|
|
|
# Deduplicate and optimize nix store
|
|
|
|
auto-optimise-store = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# TODO_: This is just an example, be sure to use whatever bootloader you prefer
|
2023-06-06 15:23:18 +00:00
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
2023-06-18 14:32:51 +00:00
|
|
|
boot.supportedFilesystems = [ "zfs" ];
|
|
|
|
boot.zfs.forceImportRoot = false;
|
|
|
|
networking.hostId = "b28f793f";
|
|
|
|
|
2023-06-06 15:01:28 +00:00
|
|
|
|
|
|
|
# Setup keyfile
|
|
|
|
boot.initrd.secrets = {
|
|
|
|
"/crypto_keyfile.bin" = null;
|
|
|
|
};
|
|
|
|
|
|
|
|
users.users = {
|
|
|
|
mans = {
|
|
|
|
isNormalUser = true;
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
|
|
|
|
];
|
|
|
|
extraGroups = [ "wheel" "networkmanager" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-06-11 07:16:41 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
wget
|
|
|
|
neovim
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
|
2023-06-06 15:01:28 +00:00
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
extraSpecialArgs = { inherit inputs; };
|
|
|
|
users = {
|
|
|
|
# Import your home-manager configuration
|
2023-06-11 15:57:47 +00:00
|
|
|
mans = import ../../../home-manager/home.nix;
|
2023-06-06 15:01:28 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
|
|
system.stateVersion = "23.05";
|
|
|
|
}
|