diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..8d47d78 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,96 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "Asia/Singapore"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_SG.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_SG.UTF-8"; + LC_IDENTIFICATION = "en_SG.UTF-8"; + LC_MEASUREMENT = "en_SG.UTF-8"; + LC_MONETARY = "en_SG.UTF-8"; + LC_NAME = "en_SG.UTF-8"; + LC_NUMERIC = "en_SG.UTF-8"; + LC_PAPER = "en_SG.UTF-8"; + LC_TELEPHONE = "en_SG.UTF-8"; + LC_TIME = "en_SG.UTF-8"; + }; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.rafiq = { + isNormalUser = true; + description = "Mohammad Rafiq"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; []; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # 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 = "24.11"; # Did you read the comment? + +} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 565dc68..0000000 --- a/flake.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - description = "a minimal NixOS config using flake and home-manager"; - - # Declare dependencies - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; - - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = inputs @ { - self, - nixpkgs, - home-manager, - ... - }: { - nixosConfigurations = { - hekate = nixpkgs.lib.nixosSystem { - modules = [ - ./hosts/hekate - - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - - home-manager.users.rafiq = import ./users/rafiq/home.nix; - } - ]; - }; - }; - }; -} diff --git a/hosts/hekate/hardware-configuration.nix b/hardware-configuration.nix similarity index 83% rename from hosts/hekate/hardware-configuration.nix rename to hardware-configuration.nix index 344113b..a65b51e 100644 --- a/hosts/hekate/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -8,24 +8,24 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/98672de4-5c33-44e5-a79e-e512a2e0c7c0"; + { device = "/dev/disk/by-uuid/fd1c608a-b327-4a2c-bd0c-ef11eec310c5"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/D25D-5694"; + { device = "/dev/disk/by-uuid/7205-0072"; fsType = "vfat"; options = [ "fmask=0077" "dmask=0077" ]; }; swapDevices = - [ { device = "/dev/disk/by-uuid/b4a0eab4-93f4-430a-83c8-66b9459185a8"; } + [ { device = "/dev/disk/by-uuid/b32f52d9-9801-4e2f-9321-e8894e9af768"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -33,7 +33,6 @@ # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.docker0.useDHCP = lib.mkDefault true; # networking.interfaces.enp12s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp13s0.useDHCP = lib.mkDefault true; diff --git a/hosts/hekate/configuration.nix b/hosts/hekate/configuration.nix deleted file mode 100644 index 6ca3f41..0000000 --- a/hosts/hekate/configuration.nix +++ /dev/null @@ -1,92 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ config, lib, pkgs, ... }: - -{ - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - networking.hostName = "hekate"; # Define your hostname. - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - - # Set your time zone. - time.timeZone = "Asia/Singapore"; - - i18n.defaultLocale = "en_US.UTF-8"; - console = { - font = "Lat2-Terminus32"; - keyMap = "us"; - useXkbConfig = true; # use xkb.options in tty. - }; - - # Enable the X11 windowing system. - services.xserver.enable = true; - - # Configure keymap in X11 - services.xserver.xkb.layout = "us"; - services.xserver.xkb.options = "eurosign:e,caps:escape"; - - # Enable CUPS to print documents. - services.printing.enable = true; - - # Enable sound. - hardware.pulseaudio.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.rafiq. = { - isNormalUser = true; - extraGroups = [ "networkmanager" "wheel" ]; # Enable ‘sudo’ for the user. - }; - - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - wget - git - ]; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - system.copySystemConfiguration = true; - - # This option defines the first version of NixOS you have installed on this particular machine, - # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. - # - # Most users should NEVER change this value after the initial install, for any reason, - # even if you've upgraded your system to a new NixOS release. - # - # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, - # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how - # to actually do that. - # - # This value being lower than the current NixOS release does NOT mean your system is - # out of date, out of support, or vulnerable. - # - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, - # and migrated your data accordingly. - # - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . - system.stateVersion = "24.11"; # Did you read the comment? -} - diff --git a/hosts/hekate/default.nix b/hosts/hekate/default.nix deleted file mode 100644 index 8c73acc..0000000 --- a/hosts/hekate/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -# automatically called by flake.nix -{ config, pkgs, lib, ... }: - -{ - imports = [ - ./configuration.nix - ]; -} diff --git a/users/rafiq/home.nix b/users/rafiq/home.nix deleted file mode 100644 index cd639ee..0000000 --- a/users/rafiq/home.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, pkgs, ... }: - -{ - home.username = "rafiq"; - home.homeDirectory = "/home/rafiq"; - - home.stateVersion = "24.11" - - programs.home-manager.enable = true; - - # Git Configuration - programs.git = { - enable = true; - userName = "Mohammad Rafiq"; - userEmail = "mohammadrafiq567@gmail.com"; - }; -}