restructured again

This commit is contained in:
2021-05-16 08:00:04 +05:30
parent a3e2fa3b5a
commit 7578463af7
30 changed files with 164 additions and 58 deletions

1
satori/README.md Normal file
View File

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

36
satori/boot.nix Normal file
View File

@@ -0,0 +1,36 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
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 = ../modules/cirno.png;
splashMode = "stretch";
configurationName = "nixbruh";
};
};
kernelParams = [ "nvidia-drm.modeset=1" "intel_pstate=active"];
};
}

51
satori/hardware.nix Normal file
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=zstd:10"];
};
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"];
};
swapDevices = [ {device = "/dev/nvme0n1p7";} ];
powerManagement = {
enable = true;
cpuFreqGovernor = "powersave";
};
}

20
satori/networking.nix Normal file
View File

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

50
satori/pkgs.nix Normal file
View File

@@ -0,0 +1,50 @@
{lib, config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
xclip
xorg.xkbcomp
xorg.xmodmap
p7zip
git
glxinfo
sxiv
vim
wineWowPackages.staging
neofetch
w3m
gnumake
pciutils
jdk
ntfs3g
python3
htop
nodejs
wget
ripgrep
patchelf
feh
dwm
dmenu
st
kbd
];
programs = {
steam.enable = true;
gnupg = {
agent = {
enableSSHSupport = true;
enable = true;
pinentryFlavor = "curses";
};
};
fish.enable = true;
dconf.enable = true;
};
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command ca-references flakes
'';
};
}

37
satori/stuff.nix Normal file
View File

@@ -0,0 +1,37 @@
{lib, config, agenix, pkgs, ... }:
{
imports = [
./stuff/fonts.nix
./stuff/users.nix
./stuff/services.nix
];
time.timeZone = "Asia/Kolkata";
environment = {
sessionVariables = {
QT_X11_NO_MITSHM="1";
EDITOR = "nvim";
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";
};
nixpkgs.config = {
allowUnfree = true;
allowBroken = true;
};
}

12
satori/stuff/fonts.nix Normal file
View File

@@ -0,0 +1,12 @@
{lib, config, pkgs, ... }:
{
fonts.fonts = with pkgs; [
fira-mono
font-awesome-ttf
powerline-fonts
vistafonts
noto-fonts-cjk
noto-fonts-emoji
];
}

38
satori/stuff/services.nix Normal file
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 [];
#vault.wantedBy = lib.mkForce [];
};
}

10
satori/stuff/users.nix Normal file
View File

@@ -0,0 +1,10 @@
{config, pkgs, ... }:
{
users.users.natto = {
isNormalUser = true;
shell = pkgs.fish;
home = "/home/natto";
extraGroups = [ "wheel" "video" "audio" ];
};
}