Skip to content

Commit

Permalink
MONSTER COMMIT
Browse files Browse the repository at this point in the history
Yuge commit with all kinds of stuff that chained into each other,
including a new server because the old one suddenly broke (?), lots of
new new-modules, the localserver module thing, a mail server (!), and
much more..

Changes:
- enable plymouth for all desktop machines
- regenerated mac and pc hardware config. The latter fixed the mirrored
zpool not importing one of the devices on boot (specifically the uas
kernel module). Also mounts /betty now
- Add the new server yuri
  - With nice zfs datasets having everything to backup under
  main/root/data. The "root" part allows for using the same pool and
  transitioning to e.g. encryption eventually.
  - Has proper ipv6 config with bind and everything
- remove namecoind
- remove konsole stuff
- simple console new-module, enabled by default
- include java in eth6 package
- mine.hardware options for setting battery, cpus, swap,
touchpad, wlan, audio. Can be used by other modules, e.g. the xmobar one
to set battery display, the same for htop
- remove git host for now
- centralized htop new-module, switching the config depending on hardware
values
- ipfs new-module with gateway
- centralized keylayout new-module
- localserver new-module! Somewhat easy but centralized configuration of
remote port forwarding stuff.
- somewhat Cetralized music new-module, should handle local/remote mpd
server too(but i split it into 3 files for now because it was too big, and
they're all over the place right now but I need to commit this shit now or else
i won't ever do it and end up just keep adding stuff)
- Added new-module profiles, one for desktop, one for server. They
enable other new-modules options, no import hell!
- Enabling grub splash image, i want to put some nice pic there, doing
this to remind myself of it
- Mail Server!
  - Using nixos-mailserver
  - with correct dns bind settings
  - Set digitalocean droplet name to mail.<domain> to have rDNS be
  correct
- youtubeDl new-module (is somewhat coupled to the music one :/)
- Disabled automatic scrubs, as this might've been the cause of the last
server dying (RIP paul)
- draft of proper dns record module in bind.nix, but it's just kinda WIP
work that's in there and i should clean that up
- webserver, webkeys new-module
- Nice znc newmodule with nice options to set channels and
detachedChannels for each network. All personal info separated.
- new-module for ssh-keys, setting them in another place
- personal folder for personal config stuff
- test module to test stuff (test user, test subdomain for now)
- X, dunst, live-wallpaper new-module, needs more options though
- zsh for all main users (so root has a nice shell now)
- nixops file layout now one for each host that declares network related
settingns, the default.nix nixops file only specifies the deployment
host, which could be different depending on where you deploy for (later
nixops' set-args can be used to pass these hosts).
- Removed some nfs config stains and some stuff i didn't know what it
was for or experimental stuff
- updated nixpkgs
- add sunrise to bind allowed queriers
- more pkgs
  - pics
  - screenshot
- update some private stuff related to this commit
  • Loading branch information
infinisil committed Mar 13, 2018
1 parent bf9e286 commit 94852ed
Show file tree
Hide file tree
Showing 74 changed files with 2,427 additions and 1,819 deletions.
2 changes: 0 additions & 2 deletions hardware/mac/boot.nix
Expand Up @@ -15,7 +15,5 @@ with lib;
efiSupport = true;
efiInstallAsRemovable = true;
};

plymouth.enable = true;
};
}
36 changes: 10 additions & 26 deletions hardware/mac/default.nix
Expand Up @@ -5,7 +5,6 @@
imports = [
./boot.nix
./hardware-configuration.nix
../../modules/zfs.nix
];

services.xserver.deviceSection = ''
Expand All @@ -22,9 +21,16 @@

services.tlp.enable = true;

mine.hasBattery = true;
mine.wlan.enable = true;
mine.touchpad.enable = true;
hardware.bluetooth.enable = true;

mine.hardware = {
battery = true;
cpuCount = 4;
swap = true;
touchpad = true;
wlan = true;
audio = true;
};

services.xserver.videoDrivers = [ "intel" ];

Expand Down Expand Up @@ -54,26 +60,4 @@
};
};
};

home-manager.users.infinisil = {

programs.htop.meters = {
left = [
"Memory"
"CPU"
"LeftCPUs2"
"RightCPUs2"
"Swap"
{ kind = "CPU"; mode = 3; }
];
right = [
{ kind = "Clock"; mode = 4; }
"Uptime"
"Tasks"
"LoadAverage"
{ kind = "Battery"; mode = 1; }
];
};

};
}
22 changes: 11 additions & 11 deletions hardware/mac/hardware-configuration.nix
Expand Up @@ -8,7 +8,7 @@
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];

boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "ohci_pci" "firewire_ohci" "usbhid" "usb_storage" "sd_mod" ];
boot.kernelModules = [ "kvm-intel" "wl" ];
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];

Expand All @@ -27,11 +27,6 @@
fsType = "zfs";
};

fileSystems."/root" =
{ device = "main/data/users/root";
fsType = "zfs";
};

fileSystems."/var/lib/ipfs" =
{ device = "main/data/ipfs";
fsType = "zfs";
Expand All @@ -42,6 +37,16 @@
fsType = "zfs";
};

fileSystems."/root" =
{ device = "main/data/users/root";
fsType = "zfs";
};

fileSystems."/home/infinisil/Music" =
{ device = "main/server/music";
fsType = "zfs";
};

fileSystems."/home/infinisil/imp" =
{ device = "main/data/important/users/infinisil";
fsType = "zfs";
Expand All @@ -57,11 +62,6 @@
fsType = "vfat";
};

fileSystems."/home/infinisil/Music" =
{ device = "main/server/music";
fsType = "zfs";
};

swapDevices =
[ { device = "/dev/disk/by-uuid/7ad864a0-75c9-4696-8532-6b405ac94d21"; }
];
Expand Down
11 changes: 8 additions & 3 deletions hardware/pc/default.nix
@@ -1,11 +1,18 @@
{ config, pkgs, lib, ... }:

with lib;

{
imports = [
./hardware-configuration.nix
../../modules/zfs.nix
];

mine.hardware = {
swap = true;
cpuCount = 8;
audio = true;
};

boot = {
zfs.enableUnstable = true;
loader = {
Expand All @@ -28,8 +35,6 @@
KERNEL=="uinput", MODE="0660", GROUP="users", OPTIONS+="static_node=uinput"
'';

powerManagement.cpuFreqGovernor = lib.mkForce "powersave";

system.stateVersion = "18.03";

}
7 changes: 6 additions & 1 deletion hardware/pc/hardware-configuration.nix
Expand Up @@ -8,7 +8,7 @@
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];

boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "uas" "sd_mod" "sr_mod" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];

Expand All @@ -27,6 +27,11 @@
fsType = "vfat";
};

fileSystems."/betty" =
{ device = "main/betty";
fsType = "zfs";
};

swapDevices = [ ];

nix.maxJobs = lib.mkDefault 8;
Expand Down
44 changes: 44 additions & 0 deletions hardware/yuri/default.nix
@@ -0,0 +1,44 @@
{ config, pkgs, ... }:

{
imports = [
./hardware-configuration.nix
];

boot = {
loader.grub.device = "/dev/vda";
zfs.devNodes = "/dev";
kernelParams = [ "net.ifnames=0" ];
};

mine.hardware = {
cpuCount = 1;
swap = true;
};

services.znapzend = {
enable = true;
autoCreation = true;
pure = true;
zetup = {
"main/root/data" = {
plan = "1hour=>10mins,1day=>1hour,1week=>1day,1month=>1week";
recursive = true;
destinations.pc = {
host = "pc";
dataset = "main/backup/server";
plan = "1day=>1hour,1week=>1day,1month=>1week,1year=>1month";
};
};
};
};

users.users.root.openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7zf2O8yBXxh2tX9v/3ZztXtYeV4W9vTY2iSrm92HSErjz5KcIY/AAKaqbWXHZgsZk2pehBqNbQMOwn0WWdLvil2+Ah97cvl7d9b9XdCkfOPhNB6FKcTzPmMp5Rivi/IodVMhT2xO9S1zO0Y2Q7dsYgk5leKyiD10pkcw23p6MPMKhKV2DPgY6BiszrTEVmtyOHpGkji9rE1iB9MyOINY9eC4etmnNINXMlwttV0GjbJI9WXXEQN2mRaPPp1PBWaPOgoP3ufKi9MR1hEhAantyrfBm2SeqjUvXG5JN1RyooohIWIHWXNJlYFldFPsCD/C1HnE5ylJeLBbZEw0TPb6x infinisil@NixOS"
];

services.openssh.enable = true;

system.stateVersion = "18.03"; # Did you read the comment?

}
55 changes: 55 additions & 0 deletions hardware/yuri/hardware-configuration.nix
@@ -0,0 +1,55 @@
# 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, ... }:

{
imports =
[ <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
];

boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_blk" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{ device = "main/root";
fsType = "zfs";
};

fileSystems."/nix" =
{ device = "main/root/nix";
fsType = "zfs";
};

fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/d5f30c4e-5f44-4998-9c8b-7e62fe2113ce";
fsType = "ext4";
};

fileSystems."/home" =
{ device = "main/root/data/home";
fsType = "zfs";
};

fileSystems."/root" =
{ device = "main/root/data/root";
fsType = "zfs";
};

fileSystems."/var/lib" =
{ device = "main/root/data/varlib";
fsType = "zfs";
};

fileSystems."/home/infinisil/music" =
{ device = "main/root/data/music";
fsType = "zfs";
};

swapDevices =
[ { device = "/dev/disk/by-uuid/5a75abf7-1fd3-4ec8-81ea-a872a3848e4a"; }
];

nix.maxJobs = lib.mkDefault 1;
}
30 changes: 0 additions & 30 deletions modules/audio.nix

This file was deleted.

0 comments on commit 94852ed

Please sign in to comment.