initial commit
This commit is contained in:
8
bootloader.nix
Normal file
8
bootloader.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
|
||||
31
configuration.nix
Normal file
31
configuration.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
# 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, ... }:
|
||||
|
||||
let
|
||||
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz";
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./bootloader.nix
|
||||
./networking.nix
|
||||
./misc.nix
|
||||
./packages.nix
|
||||
(import "${home-manager}/nixos")
|
||||
./user/stormwind/user.nix
|
||||
./sshd.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 = "24.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
40
hardware-configuration.nix
Normal file
40
hardware-configuration.nix
Normal file
@@ -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 = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/f8ce741e-1a4d-469d-bc6c-0777c1c84423";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/802B-4F26";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/7e34cdc3-bd48-435a-8ea2-e1fe43926262"; }
|
||||
];
|
||||
|
||||
# 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.enp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
31
misc.nix
Normal file
31
misc.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "de";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
}
|
||||
|
||||
9
networking.nix
Normal file
9
networking.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = "Stormwind";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
13
packages.nix
Normal file
13
packages.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
];
|
||||
}
|
||||
|
||||
9
sshd.nix
Normal file
9
sshd.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
passwordAuthentication = true;
|
||||
};
|
||||
}
|
||||
|
||||
15
user/stormwind/git.nix
Normal file
15
user/stormwind/git.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "RootHost-Stormwind";
|
||||
userEmail = "RootHost-Stormwind@ze.mawtrixx.net";
|
||||
extraConfig = {
|
||||
init = {
|
||||
defaultBranch = "master";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
32
user/stormwind/user.nix
Normal file
32
user/stormwind/user.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.stormwind = {
|
||||
isNormalUser = true;
|
||||
description = "stormwind";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
packages = with pkgs; [];
|
||||
|
||||
openssh.authorizedKeys.keys = [
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBsZZ1qSy+cu1QMlPoZZ2ovv8G+4OIyI07/di68F7NtZ leon macbook''
|
||||
''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCtoTBVNYtsmDLM6vB2PjWIsJ+8gzzTe+j/uFT6usF/rudJN7SU9iSvoQkJhximjcK7ZWbRKJyX84aOv4b/S5ZD5vduxkb+oJlp2dGUagNYkhVTTRhkfgVKmTceD2jlauAIELlCQEm1Y3REEGZHkatc6Hy8yHtqYLixClF3fvO8NAE9NyC7ntgiKkFNhC7UjmCVAA0T97mYAvd5Q7kAeBzcU6Hcz7WsASwHoTxwUcTdqMjZXghxPgN8R+4zNr5P9PYNI2i+F2OzFxqr7Ipg9QbTSgDU+wtTWEvwxeUmZMJTf4xmjF/WmU9NxP61bbtC8U1k31hOqbKXar//oACa/XKLtaqyWiN/iEwWeiGD2WcJizRq+y8Y6mfgXHbogB7Ro7/vSlSkccSs+Ibeu4u8/wjVWQTu7cO3ZG/R4HYsW/tFLdMCzeYWFim19m3EuGpZfKFv7fzlG4Xm9XZFjpROEZPGdYPN0gI4zzVe1Xh/y5oxM1/gQwolRSnT8sFrQpv0x04dZbmV8ub+AygGNfXN8UlYkBjEZVKRzDwbSCvIikNh18V7cvTlD1wCludIwL6XCGWiOuGBE797qkr3Wy+wS5yDp+9CQeqWnqz6k6A4j6oBKZzwxfhMBauZCBnAcI5K9BwxzAG24EgpdjJ9vk7kOq41qdxj5esiC58nFdZB0MaE6Q== leon-macbook-key''
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.stormwind = { pkgs, ... }: {
|
||||
imports =
|
||||
[
|
||||
./git.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "24.11";
|
||||
};
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services.getty.autologinUser = "stormwind";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user