diff options
| -rw-r--r-- | config/boot.nix | 6 | ||||
| -rw-r--r-- | config/default.nix | 24 | ||||
| -rw-r--r-- | config/environment.nix | 9 | ||||
| -rw-r--r-- | config/hardware/default.nix | 21 | ||||
| -rw-r--r-- | config/networking.nix | 15 | ||||
| -rw-r--r-- | config/nix.nix | 16 | ||||
| -rw-r--r-- | config/services/default.nix | 3 | ||||
| -rw-r--r-- | config/users.nix | 3 |
8 files changed, 97 insertions, 0 deletions
diff --git a/config/boot.nix b/config/boot.nix new file mode 100644 index 0000000..0cbef3b --- /dev/null +++ b/config/boot.nix @@ -0,0 +1,6 @@ +{...}: { + personal.boot = { + grub.enable = true; + efi.enable = true; + }; +} diff --git a/config/default.nix b/config/default.nix new file mode 100644 index 0000000..07ec68d --- /dev/null +++ b/config/default.nix @@ -0,0 +1,24 @@ +{modulesPath, ...}: { + imports = [ + (modulesPath + "/profiles/headless.nix") + (modulesPath + "/profiles/minimal.nix") + ./boot.nix + ./environment.nix + ./networking.nix + ./nix.nix + ./services + ./users.nix + ]; + + # needed so that the server doesn't rebuild big packages + # originally enabled in modulesPath + profiles/minimal.nix + environment.noXlibs = 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/config/environment.nix b/config/environment.nix new file mode 100644 index 0000000..31e9815 --- /dev/null +++ b/config/environment.nix @@ -0,0 +1,9 @@ +{...}: { + 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..a4f9ed3 --- /dev/null +++ b/config/hardware/default.nix @@ -0,0 +1,21 @@ +{nixos-hardware, ...}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + + # Community-curated hardware configuration + nixos-hardware.nixosModules.thinkpad-x1-9th-gen # includes intel cpu and ssd + ]; + + personal.hardware = { + usb.enable = false; + disks.crypted = "/dev/disk/by-uuid/18b3e6f0-6ad5-471e-bdf4-e1710d99f13f"; + firmwareNonFree.enable = true; + keyboard.keyMap = "fr"; + backlights = { + screen = "intel_backlight"; + keyboard = "dell::kbd_backlight"; + }; + sound.enable = false; + }; +} diff --git a/config/networking.nix b/config/networking.nix new file mode 100644 index 0000000..44464eb --- /dev/null +++ b/config/networking.nix @@ -0,0 +1,15 @@ +{...}: { + personal.networking = { + enable = true; + firewall.http = true; + ssh.enable = true; + }; + + networking = { + hostName = "hephaistos"; + domain = "local"; + + useDHCP = false; + interfaces."???".useDHCP = true; + }; +} diff --git a/config/nix.nix b/config/nix.nix new file mode 100644 index 0000000..01ff7ff --- /dev/null +++ b/config/nix.nix @@ -0,0 +1,16 @@ +{...}: { + personal.nix = { + enable = true; + autoUpgrade = { + enable = true; + autoUpdateInputs = ["nixpkgs"]; + }; + gc.enable = true; + flake = "git+file:///etc/nixos/"; + }; + nix.settings.max-jobs = "???"; + nixpkgs.flake = { + setNixPath = true; + setFlakeRegistry = true; + }; +} diff --git a/config/services/default.nix b/config/services/default.nix new file mode 100644 index 0000000..d854dcc --- /dev/null +++ b/config/services/default.nix @@ -0,0 +1,3 @@ +{...}: { + imports = []; +} diff --git a/config/users.nix b/config/users.nix new file mode 100644 index 0000000..8dedba0 --- /dev/null +++ b/config/users.nix @@ -0,0 +1,3 @@ +{...}: { + personal.user.enable = true; +} |
