diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/boot.nix | 9 | ||||
| -rw-r--r-- | config/default.nix | 22 | ||||
| -rw-r--r-- | config/environment.nix | 11 | ||||
| -rw-r--r-- | config/hardware/default.nix | 13 | ||||
| -rw-r--r-- | config/hardware/hardware-configuration.nix | 43 | ||||
| -rw-r--r-- | config/networking/default.nix | 13 | ||||
| -rw-r--r-- | config/nix.nix | 11 | ||||
| -rw-r--r-- | config/users.nix | 5 |
8 files changed, 127 insertions, 0 deletions
diff --git a/config/boot.nix b/config/boot.nix new file mode 100644 index 0000000..257f64d --- /dev/null +++ b/config/boot.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +{ + personal.boot = { + grub.enable = true; + }; + boot.loader.grub.device = "/dev/disk/by-id/ata-SATA_SSD_A45E07221AE300053322"; + boot.kernelPackages = pkgs.linuxPackages_latest; +} diff --git a/config/default.nix b/config/default.nix new file mode 100644 index 0000000..ff22fc8 --- /dev/null +++ b/config/default.nix @@ -0,0 +1,22 @@ +{ modulesPath, ... }: + +{ + imports = [ + (modulesPath + "/profiles/headless.nix") + (modulesPath + "/profiles/minimal.nix") + ./boot.nix + ./environment.nix + ./hardware + ./networking + ./nix.nix + ./users.nix + ]; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "22.11"; # Did you read the comment? +} diff --git a/config/environment.nix b/config/environment.nix new file mode 100644 index 0000000..61f55ff --- /dev/null +++ b/config/environment.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: + +{ + personal.environment = { + enable = true; + locale.enable = true; + }; + programs.bash.promptInit = '' + PS1="\n\[\033[1;32m\][\[\e]0;\u@$(hostname -f): \w\a\]\u@$(hostname -f):\w]\$\[\033[0m\] " + ''; +} diff --git a/config/hardware/default.nix b/config/hardware/default.nix new file mode 100644 index 0000000..a6219f8 --- /dev/null +++ b/config/hardware/default.nix @@ -0,0 +1,13 @@ +{ nixos-hardware, ... }: { + imports = [ + ./hardware-configuration.nix + nixos-hardware.nixosModules.pcengines-apu + nixos-hardware.nixosModules.common-pc-ssd + nixos-hardware.nixosModules.common-cpu-amd + ]; + personal.hardware = { + usb.enable = true; + firmwareNonFree.enable = true; + }; + swapDevices = [{ device = "/swap"; }]; +} diff --git a/config/hardware/hardware-configuration.nix b/config/hardware/hardware-configuration.nix new file mode 100644 index 0000000..68cf8c9 --- /dev/null +++ b/config/hardware/hardware-configuration.nix @@ -0,0 +1,43 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/9e447187-fae1-466a-b37d-4de1fe240c6f"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/47e77d74-1aad-4d99-9aa7-568d8524b305"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/b99733fc-3734-41d3-8fe5-2682714f319e"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/config/networking/default.nix b/config/networking/default.nix new file mode 100644 index 0000000..9dac00f --- /dev/null +++ b/config/networking/default.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: + +{ + personal.networking = { + enable = true; + ssh.enable = true; + }; + + networking = { + hostName = "kerberos"; + domain = "local"; + }; +} diff --git a/config/nix.nix b/config/nix.nix new file mode 100644 index 0000000..7b8360a --- /dev/null +++ b/config/nix.nix @@ -0,0 +1,11 @@ +{ lib, ... }: + +{ + personal.nix = { + enable = true; + autoUpgrade = true; + gc.enable = true; + flake = "git+file:///etc/nixos/"; + }; + nix.settings.max-jobs = lib.mkDefault 1; +} diff --git a/config/users.nix b/config/users.nix new file mode 100644 index 0000000..36aacef --- /dev/null +++ b/config/users.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + personal.user.enable = true; +} |
