add host Remilia

This commit is contained in:
2021-05-31 02:48:14 +05:30
parent 8952fafe65
commit 02fa695a0f
25 changed files with 98 additions and 32 deletions

1
hosts/personal/README.md Normal file
View File

@@ -0,0 +1 @@
Satori is my home laptop

34
hosts/personal/boot.nix Normal file
View File

@@ -0,0 +1,34 @@
{lib, config, pkgs, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_zen.override {
structuredExtraConfig = with lib.kernel; {
CONFIG_SCHED_MUQSS = yes;
};
ignoreConfigErrors = true;
});
initrd={
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod"];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel"];
extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
grub = {
enable = true;
useOSProber = true;
efiSupport = true;
device = "nodev";
splashImage = ./cirno.png;
splashMode = "stretch";
configurationName = "nixbruh";
};
};
kernelParams = [ "nvidia-drm.modeset=1" "intel_pstate=active"];
};
}

BIN
hosts/personal/cirno.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1,51 @@
{ config, lib, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/4c02ddf5-d00e-4d84-856f-c327ae44d047";
fsType = "btrfs";
options = ["compress-force=zstd:2"];
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/58B1-4631";
fsType = "vfat";
};
fileSystems."/home" =
{ device = "/dev/nvme0n1p6";
fsType = "ext4";
};
fileSystems."/mnt/Stuff" =
{ device = "/dev/sda2";
fsType = "ntfs";
options = ["uid=natto" "gid=users" "umask=0022" "rw"];
};
fileSystems."/mnt/Games" =
{ device = "/dev/sda4";
fsType = "ntfs";
options = ["uid=natto" "gid=users" "umask=0022" "rw"];
};
fileSystems."/mnt/Extra" =
{ device = "/dev/sda3";
fsType = "ntfs";
options = ["uid=natto" "gid=users" "umask=0022" "rw"];
};
fileSystems."/mnt/LinuxGames" =
{ device = "/dev/sda5";
fsType = "btrfs";
options = ["rw" "compress-force=zstd:2"];
};
swapDevices = [ {device = "/dev/nvme0n1p7";} ];
powerManagement = {
enable = true;
cpuFreqGovernor = "powersave";
};
}

View File

@@ -0,0 +1,21 @@
{config, ... }:
{
networking = {
hostName = "Satori";
wireless.enable = true; # Enables wireless support via wpa_supplicant.
firewall.allowedTCPPorts = [ 22 ];
interfaces = {
enp7s0.useDHCP = true;
wlp0s20f3 = {
useDHCP = true;
ipv4.addresses = [ {
prefixLength = 24;
address = "192.168.0.109";
} ];
};
};
defaultGateway = "192.168.0.1";
nameservers = [ "1.1.1.1" "8.8.8.8" ];
};
}

51
hosts/personal/pkgs.nix Normal file
View File

@@ -0,0 +1,51 @@
{lib, config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
bc
gnumake
pciutils
git
ntfs3g
python3
htop
nodejs
wineWowPackages.staging
wget
ripgrep
kbd
cachix
gcc
rustc
jdk
];
programs = {
steam.enable = true;
gnupg = {
agent = {
enableSSHSupport = true;
enable = true;
pinentryFlavor = "curses";
};
};
zsh = {
enable = true;
promptInit = "PROMPT='%B%F{cyan}%~ %F{blue}%f%b'\nRPROMPT='%B%F{cyan}%n%f@%F{red}%m%b'";
histSize = 12000;
enableCompletion = true;
syntaxHighlighting.enable = true;
autosuggestions. enable = true;
ohMyZsh.enable = true;
};
dconf.enable = true;
adb.enable = true;
};
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command ca-references flakes
'';
trustedUsers = [ "root" "natto" ];
};
}

17
hosts/personal/satori.nix Normal file
View File

@@ -0,0 +1,17 @@
{ lib, config, ...}:
{
imports =
[
./satori/hardware.nix
./satori/stuff.nix
./satori/pkgs.nix
./satori/networking.nix
./satori/boot.nix
./satori/services.nix
./common/nvidia-offload.nix
./common/pipewire.nix
./common/xorg.nix
./configs/nvim.nix
];
system.stateVersion = "20.09";
}

View File

@@ -0,0 +1,38 @@
{lib, config, pkgs, ... }:
{
systemd.services.nbfc = {
description = "Notebook Fancontrol";
wantedBy = lib.mkForce [];
serviceConfig = {
Type = "forking";
Restart = "on-failure";
ExecStart = "${pkgs.mono}/bin/mono-service -l:/run/nbfc.pid -m:NbfcService /opt/nbfc/NbfcService.exe";
ExecStop = "kill -SIGTERM $(cat /run/nbfc.pid)";
PIDFile = "/run/nbfc.pid";
};
};
services = {
tor.enable = true;
logmein-hamachi.enable = true;
mysql = {
enable = true;
package = pkgs.mysql;
dataDir = "/var/db";
};
sshd.enable = true;
/* vault = {
enable = true;
storageBackend = "mysql";
storagePath = "/var/db";
};*/
};
systemd.services = {
tor.wantedBy = lib.mkForce [];
logmein-hamachi.wantedBy = lib.mkForce [];
sshd.wantedBy = lib.mkForce [];
mysql.wantedBy = lib.mkForce [];
#printing.wantedBy = lib.mkForce [];
#vault.wantedBy = lib.mkForce [];
};
}

39
hosts/personal/stuff.nix Normal file
View File

@@ -0,0 +1,39 @@
{config, agenix, pkgs, ... }:
{
time.timeZone = "Asia/Kolkata";
environment = {
sessionVariables = {
QT_X11_NO_MITSHM="1";
QT_QPA_PLATFORMTHEME = "gtk3";
};
};
security={
sudo.enable = false;
doas = {
enable = true;
extraRules = [
{
users = [ "natto" ];
keepEnv = true;
persist = true;
}
];
};
};
nix.gc = {
automatic = false;
dates = "20:15";
};
fonts.fonts = with pkgs; [
fira-mono
font-awesome
vistafonts
noto-fonts-cjk
];
users.users.natto = {
isNormalUser = true;
shell = pkgs.zsh;
home = "/home/natto";
extraGroups = [ "wheel" "adbusers" ];
};
}