about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/beta/configuration.nix55
-rw-r--r--nixos/beta/hardware-configuration.nix26
-rw-r--r--nixos/default.nix10
3 files changed, 90 insertions, 1 deletions
diff --git a/nixos/beta/configuration.nix b/nixos/beta/configuration.nix
new file mode 100644
index 0000000..3bad8be
--- /dev/null
+++ b/nixos/beta/configuration.nix
@@ -0,0 +1,55 @@
+{ config, pkgs, ... }:
+
+{
+  boot.loader.grub.enable = false;
+  boot.loader.generic-extlinux-compatible.enable = true;
+
+  networking.hostName = "beta"; # Define your hostname.
+
+  # Set your time zone.
+  time.timeZone = "Asia/Seoul";
+
+  # Define a user account. Don't forget to set a password with ‘passwd’.
+  users.users.core = {
+    isNormalUser = true;
+    extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
+  };
+
+  # Enable the OpenSSH daemon.
+  services.openssh.enable = true;
+  services.openssh.passwordAuthentication = false;
+
+  # Enable the ZNC IRC Bouncer.
+  services.znc = {
+    enable = true;
+    openFirewall = true;
+    useLegacyConfig = false;
+    modulePackages = with pkgs.zncModules; [ clientbuffer playback ];
+
+    config = {
+      LoadModule = [ "webadmin" ];
+      User.zachel = {
+        Admin = true;
+        Nick = "zachel";
+        RealName = "zachel";
+        QuitMsg = "Bye: Quitting";
+        LoadModule = [ "chansaver" "controlpanel" ];
+        Pass.password = {
+          # xkcdpass, not exposed to public.
+          Method = "sha256";
+          Hash = "8de38b14204314fa2887a503661b5a5fb74e4e46d36c05777be01a5b6eb24fdc";
+          Salt = "/mMuEH!TX+n:CMtXcQ4U";
+        };
+      };
+    };
+  };
+
+  # 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 = "22.05"; # Did you read the comment?
+
+}
diff --git a/nixos/beta/hardware-configuration.nix b/nixos/beta/hardware-configuration.nix
new file mode 100644
index 0000000..9191ca6
--- /dev/null
+++ b/nixos/beta/hardware-configuration.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+  boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ ];
+  boot.extraModulePackages = [ ];
+
+  fileSystems."/" =
+    { device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
+      fsType = "ext4";
+    };
+
+  swapDevices = [ ];
+
+  # The global useDHCP flag is deprecated, therefore explicitly set to false here.
+  # Per-interface useDHCP will be mandatory in the future, so this generated config
+  # replicates the default behaviour.
+  networking.useDHCP = lib.mkDefault false;
+  networking.interfaces.eth0.useDHCP = lib.mkDefault true;
+  networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
+
+  powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
+  # high-resolution display
+  hardware.video.hidpi.enable = lib.mkDefault true;
+}
diff --git a/nixos/default.nix b/nixos/default.nix
index 65bff77..e1b725a 100644
--- a/nixos/default.nix
+++ b/nixos/default.nix
@@ -1,4 +1,4 @@
-{ self, unstable, ... } @ inputs:
+{ self, unstable, unstable-small, ... } @ inputs:
 
 {
   alpha = self.lib.mkSystem {
@@ -10,4 +10,12 @@
       ./modules/cachix
     ];
   };
+
+  beta = self.lib.mkSystem {
+    name = "beta";
+    nixpkgs = unstable-small;
+    extraModules = [
+      ./modules/security.nix
+    ];
+  };
 }