Home

infra @main - refs - log -
-
https://git.jolheiser.com/infra.git
dragonwell flake
tree log patch
add shincha Signed-off-by: jolheiser <git@jolheiser.com>
Signature
-----BEGIN SSH SIGNATURE----- U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgBTEvCQk6VqUAdN2RuH6bj1dNkY oOpbPWj+jw4ua1B1cAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5 AAAAQP6HrUSeMnkzyqUkm34D6qmLOJEuCmdMo2pZhSCHIEzs9SS10aZd3pg35SgOFSVyvt aOUmwzMX9tlKOxlsTw6QQ= -----END SSH SIGNATURE-----
jolheiser <git@jolheiser.com>
2 months ago
3 changed files, 140 additions(+), 0 deletions(-)
flake.nixshincha/default.nixshincha/hardware.nix
M flake.nixflake.nix
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
diff --git a/flake.nix b/flake.nix
index c1c7d2213ea1bccac3732249dd268b597585af18..f358dbc8633bbc218909adf409c121e59aac616e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -80,6 +80,7 @@             services.tclip.package = inputs.tclip.packages.${pkgs.system}.tclipd;
           };
         jasmine.imports = [ ./jasmine ];
         gunpowder.imports = [ ./gunpowder ];
+        shincha.imports = [ ./shincha ];
       };
       nixConfig = {
         extra-substitutors = [ "https://jolheiser.cachix.org" ];
I shincha/default.nix
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
diff --git a/shincha/default.nix b/shincha/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..26a2950a9fd7b3f5e5c9f52da49e44a04496bf07
--- /dev/null
+++ b/shincha/default.nix
@@ -0,0 +1,90 @@
+let
+  username = "jolheiser";
+  key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJBxdG9mduIWiQ+egYKMvUKKCyShdeM8O6QsLs6g5aGt";
+in
+{
+  imports = [
+    ./hardware.nix
+  ];
+
+  boot.loader.grub = {
+    enable = true;
+    device = "/dev/sda";
+    useOSProber = true;
+  };
+
+  networking = {
+    hostName = "shincha";
+    networkmanager.enable = true;
+    firewall.enable = true;
+  };
+
+  time.timeZone = "America/Chicago";
+
+  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";
+  };
+
+  services.xserver = {
+    enable = true;
+    displayManager.lightdm.enable = true;
+    desktopManager.xfce.enable = true;
+    layout = "us";
+    xkbVariant = "";
+  };
+
+  services = {
+    tailscale.enable = true;
+    openssh.enable = true;
+  };
+
+  users.users = {
+    "${username}" = {
+      isNormalUser = true;
+      extraGroups = [
+        "networkmanager"
+        "wheel"
+      ];
+      openssh.authorizedKeys.keys = [ key ];
+    };
+    "root".openssh.authorizedKeys.keys = [ key ];
+  };
+
+  # Allow unfree packages
+  nixpkgs.config.allowUnfree = true;
+
+  nix = {
+    gc.automatic = true;
+    settings = {
+      trusted-users = [
+        "@sudo"
+        "@wheel"
+        "jolheiser"
+      ];
+      experimental-features = [
+        "flakes"
+        "nix-command"
+      ];
+      auto-optimise-store = true;
+    };
+  };
+
+  # 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 = "23.11"; # Did you read the comment?
+
+}
I shincha/hardware.nix
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
diff --git a/shincha/hardware.nix b/shincha/hardware.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b8df18186289f95395c69555e039228d4c9234c9
--- /dev/null
+++ b/shincha/hardware.nix
@@ -0,0 +1,49 @@
+# 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"
+    "usbhid"
+    "usb_storage"
+    "sd_mod"
+    "sr_mod"
+    "rtsx_pci_sdmmc"
+  ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ "kvm-intel" ];
+  boot.extraModulePackages = [ ];
+
+  fileSystems."/" = {
+    device = "/dev/disk/by-uuid/c69e65fc-7746-4a18-a7f1-32cf2a2189d5";
+    fsType = "ext4";
+  };
+
+  swapDevices = [
+    { device = "/dev/disk/by-uuid/6402ff67-4e46-40c1-8f14-cdd7dd892fef"; }
+  ];
+
+  # 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.enp1s0.useDHCP = lib.mkDefault true;
+  # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
+
+  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}