summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2024-11-29 05:48:17 +0100
committerMartin Fischer <martin@push-f.com>2024-12-11 08:32:16 +0100
commit28985997fcc6ccd9d475a98141b1ac35066a83c7 (patch)
treeba02c1679061ef245ee873eb2883d308c8142b86
parent2ae50cc68e42b9d790dfba26a8c42219e7ae8f6a (diff)
add config files generated by graphical NixOS installer
-rw-r--r--README.md5
-rw-r--r--nixos/README.md4
-rw-r--r--nixos/configuration.nix93
-rw-r--r--nixos/hardware-configuration.nix40
4 files changed, 140 insertions, 2 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..8786519
--- /dev/null
+++ b/README.md
@@ -0,0 +1,5 @@
+# Martin's config files
+
+This repository contains my personal config files.
+
+* `nixos/` -- contains my [NixOS](https://nixos.org/) configurations
diff --git a/nixos/README.md b/nixos/README.md
index 5888527..e96348b 100644
--- a/nixos/README.md
+++ b/nixos/README.md
@@ -19,8 +19,8 @@ We're assuming that you just installed NixOS by going through the [official inst
1. Clone this repo to a local directory and enter it:
```
nix-shell -p git --run \
- 'git clone https://github.com/infinisil/sane-stable-nixos nixos'
- cd nixos
+ 'git clone https://git.push-f.com/config ~/config'
+ cd ~/config/nixos
```
2. Add your initial NixOS configuration files, either
- Move your existing configuration files into it:
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
new file mode 100644
index 0000000..96e0c82
--- /dev/null
+++ b/nixos/configuration.nix
@@ -0,0 +1,93 @@
+# 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 = "Europe/Vienna";
+
+ # Select internationalisation properties.
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = "en_US.UTF-8";
+ LC_IDENTIFICATION = "en_US.UTF-8";
+ LC_MEASUREMENT = "en_US.UTF-8";
+ LC_MONETARY = "en_US.UTF-8";
+ LC_NAME = "en_US.UTF-8";
+ LC_NUMERIC = "en_US.UTF-8";
+ LC_PAPER = "en_US.UTF-8";
+ LC_TELEPHONE = "en_US.UTF-8";
+ LC_TIME = "en_US.UTF-8";
+ };
+
+ # Configure keymap in X11
+ services.xserver.xkb = {
+ layout = "us";
+ variant = "colemak_dh";
+ };
+
+ # Define a user account. Don't forget to set a password with ‘passwd’.
+ users.users.martin = {
+ isNormalUser = true;
+ description = "Martin";
+ extraGroups = [ "networkmanager" "wheel" ];
+ packages = with pkgs; [];
+ };
+
+ # 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.05"; # Did you read the comment?
+
+}
diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix
new file mode 100644
index 0000000..54b9d60
--- /dev/null
+++ b/nixos/hardware-configuration.nix
@@ -0,0 +1,40 @@
+# 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 = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-amd" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/7b33d046-ffd6-4baf-8bd8-a88e3c04d538";
+ fsType = "ext4";
+ };
+
+ boot.initrd.luks.devices."luks-cf2639e7-1f9c-4c2d-989a-ef2d9950f751".device = "/dev/disk/by-uuid/cf2639e7-1f9c-4c2d-989a-ef2d9950f751";
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/3FA1-5306";
+ fsType = "vfat";
+ options = [ "fmask=0077" "dmask=0077" ];
+ };
+
+ 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.wlp1s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}