my NixOS and nix-darwin config
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

added default configuration.nix for Khaos

+142
+109
hosts/Khaos/configuration.nix
··· 1 + # Edit this configuration file to define what should be installed on 2 + # your system. Help is available in the configuration.nix(5) man page 3 + # and in the NixOS manual (accessible by running ‘nixos-help’). 4 + 5 + { config, pkgs, ... }: 6 + 7 + { 8 + imports = 9 + [ # Include the results of the hardware scan. 10 + ./hardware-configuration.nix 11 + ]; 12 + 13 + # Bootloader. 14 + boot.loader.systemd-boot.enable = true; 15 + boot.loader.efi.canTouchEfiVariables = true; 16 + 17 + networking.hostName = "Khaos"; # Define your hostname. 18 + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 19 + 20 + # Configure network proxy if necessary 21 + # networking.proxy.default = "http://user:password@proxy:port/"; 22 + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 23 + 24 + # Enable networking 25 + networking.networkmanager.enable = true; 26 + 27 + # Set your time zone. 28 + time.timeZone = "America/Los_Angeles"; 29 + 30 + # Select internationalisation properties. 31 + i18n.defaultLocale = "en_US.UTF-8"; 32 + 33 + i18n.extraLocaleSettings = { 34 + LC_ADDRESS = "en_US.UTF-8"; 35 + LC_IDENTIFICATION = "en_US.UTF-8"; 36 + LC_MEASUREMENT = "en_US.UTF-8"; 37 + LC_MONETARY = "en_US.UTF-8"; 38 + LC_NAME = "en_US.UTF-8"; 39 + LC_NUMERIC = "en_US.UTF-8"; 40 + LC_PAPER = "en_US.UTF-8"; 41 + LC_TELEPHONE = "en_US.UTF-8"; 42 + LC_TIME = "en_US.UTF-8"; 43 + }; 44 + 45 + # Configure keymap in X11 46 + services.xserver.xkb = { 47 + layout = "us"; 48 + variant = ""; 49 + }; 50 + 51 + # Define a user account. Don't forget to set a password with ‘passwd’. 52 + users.users.suri = { 53 + isNormalUser = true; 54 + description = "suri"; 55 + extraGroups = [ "networkmanager" "wheel" ]; 56 + packages = with pkgs; []; 57 + }; 58 + 59 + # Allow unfree packages 60 + nixpkgs.config.allowUnfree = true; 61 + 62 + # List packages installed in system profile. To search, run: 63 + # $ nix search wget 64 + environment.systemPackages = with pkgs; [ 65 + helix 66 + git 67 + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. 68 + # wget 69 + ]; 70 + 71 + # Some programs need SUID wrappers, can be configured further or are 72 + # started in user sessions. 73 + # programs.mtr.enable = true; 74 + # programs.gnupg.agent = { 75 + # enable = true; 76 + # enableSSHSupport = true; 77 + # }; 78 + 79 + # List services that you want to enable: 80 + 81 + # Enable the OpenSSH daemon. 82 + services.openssh = { 83 + enable = true; 84 + ports = [22]; 85 + settings = { 86 + PasswordAuthentication = true; 87 + # allows all users 88 + AllowedUsers = null; 89 + UseDns = true; 90 + PermitRootLogin = "prohibit-password"; 91 + 92 + }; 93 + }; 94 + 95 + # Open ports in the firewall. 96 + networking.firewall.allowedTCPPorts = [ 22 ]; 97 + # networking.firewall.allowedUDPPorts = [ ... ]; 98 + # Or disable the firewall altogether. 99 + # networking.firewall.enable = false; 100 + 101 + # This value determines the NixOS release from which the default 102 + # settings for stateful data, like file locations and database versions 103 + # on your system were taken. It‘s perfectly fine and recommended to leave 104 + # this value at the release version of the first install of this system. 105 + # Before changing this value read the documentation for this option 106 + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 107 + system.stateVersion = "25.11"; # Did you read the comment? 108 + 109 + }
+33
hosts/Khaos/hardware-configuration.nix
··· 1 + # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 + # and may be overwritten by future invocations. Please make changes 3 + # to /etc/nixos/configuration.nix instead. 4 + { config, lib, pkgs, modulesPath, ... }: 5 + 6 + { 7 + imports = 8 + [ (modulesPath + "/installer/scan/not-detected.nix") 9 + ]; 10 + 11 + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; 12 + boot.initrd.kernelModules = [ ]; 13 + boot.kernelModules = [ "kvm-amd" ]; 14 + boot.extraModulePackages = [ ]; 15 + 16 + fileSystems."/" = 17 + { device = "/dev/disk/by-uuid/701d2b39-f6c8-45f4-9e3b-5272296265a3"; 18 + fsType = "ext4"; 19 + }; 20 + 21 + fileSystems."/boot" = 22 + { device = "/dev/disk/by-uuid/2B1D-4D6F"; 23 + fsType = "vfat"; 24 + options = [ "fmask=0077" "dmask=0077" ]; 25 + }; 26 + 27 + swapDevices = 28 + [ { device = "/dev/disk/by-uuid/78364d97-25d5-4c60-92b0-725ed6ba46a9"; } 29 + ]; 30 + 31 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 32 + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 33 + }