Add kasei

This commit is contained in:
Oystein Kristoffer Tveit 2022-03-22 16:36:19 +01:00
parent 1f105ac9d1
commit 092271897c
2 changed files with 316 additions and 0 deletions

View File

@ -0,0 +1,277 @@
{ config, lib, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
../../pluggables/tools/programming.nix
];
systemd.targets = {
sleep.enable = false;
suspend.enable = false;
hibernate.enable = false;
hybrid-sleep.enable = false;
};
nix.package = pkgs.nixFlakes;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
# security.pam.services.login.unixAuth = true;
boot.loader = {
grub = {
enable = true;
version = 2;
efiSupport = true;
fsIdentifier = "label";
device = "nodev";
efiInstallAsRemovable = true;
};
# efi.efiSysMountPoint = "/boot/efi";
# efi.canTouchEfiVariables = true;
};
time.timeZone = "Europe/Oslo";
networking = {
hostName = "kasei";
networkmanager.enable = true;
useDHCP = false;
interfaces.wlp5s0.useDHCP = true;
interfaces.wlp2s0f0u4.useDHCP = true;
nameservers = [
"1.1.1.1"
"8.8.8.8"
];
firewall.enable=true;
};
i18n = {
defaultLocale = "en_US.UTF-8";
inputMethod = {
enabled = "fcitx";
fcitx.engines = with pkgs.fcitx-engines; [ mozc ];
};
# inputMethod = {
# enabled = "fcitx5";
# fcitx5.addons = with pkgs; [
# fcitx5-mozc
# fcitx5-gtk
# ];
# };
};
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
# services = {
# openssh = {
# enable = true;
# passwordAuthentication = false;
# challengeResponseAuthentication = false;
# permitRootLogin = "no";
# };
# printing.enable = true;
# cron = {
# enable = true;
# systemCronJobs = [
# # "*/5 * * * * root date >> /tmp/cron.log"
# ];
# };
# };
users.users = {
h7x4 = {
isNormalUser = true;
extraGroups = [
"wheel"
"networkmanager"
"docker"
"audio"
"video"
"disk"
"libvirtd"
"input"
];
shell = pkgs.zsh;
};
};
environment = {
variables = {
EDITOR = "nvim";
VISUAL = "nvim";
};
systemPackages = with pkgs; [
wget
haskellPackages.xmobar
];
shells = with pkgs; [
bashInteractive
zsh
dash
];
etc = {
sudoLecture = {
target = "sudo.lecture";
text = "Be careful or something, idk...\n";
};
"resolv.conf" = with lib; with pkgs; {
source = writeText "resolv.conf" ''
${concatStringsSep "\n" (map (ns: "nameserver ${ns}") config.networking.nameservers)}
options edns0
'';
};
currentSystemPackages = {
target = "current-system-packages";
text = let
inherit (lib.strings) concatStringsSep;
inherit (lib.lists) sort;
inherit (lib.trivial) lessThan;
packages = map (p: "${p.name}") config.environment.systemPackages;
sortedUnique = sort lessThan (lib.unique packages);
in concatStringsSep "\n" sortedUnique;
};
};
};
fonts = {
enableDefaultFonts = true;
fonts = with pkgs; [
cm_unicode
dejavu_fonts
fira-code
fira-code-symbols
powerline-fonts
iosevka
symbola
corefonts
ipaexfont
ipafont
liberation_ttf
migmix
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
open-sans
source-han-sans
source-sans
ubuntu_font_family
victor-mono
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
];
fontconfig = {
defaultFonts = {
serif = [ "Droid Sans Serif" "Ubuntu" ];
sansSerif = [ "Droid Sans" "Ubuntu" ];
monospace = [ "Fira Code" "Ubuntu" ];
emoji = [ "Noto Sans Emoji" ];
};
};
};
services = {
openssh.enable = true;
gnome.gnome-keyring.enable = true;
printing.enable = true;
dbus = {
enable = true;
packages = with pkgs; [
gcr
gnome3.dconf
];
};
cron = {
enable = true;
systemCronJobs = [
# "*/5 * * * * root date >> /tmp/cron.log"
];
};
xserver = {
enable = true;
layout = "us";
xkbOptions = "caps:escape";
displayManager.lightdm.enable = true;
libinput = {
enable = true;
touchpad.disableWhileTyping = true;
};
windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
};
};
};
sound.enable = true;
hardware.pulseaudio.enable = true;
hardware.bluetooth.enable = true;
programs = {
dconf.enable = true;
git.enable = true;
light.enable = true;
npm.enable = true;
tmux.enable = true;
neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
configure = {
packages.myVimPackage = with pkgs.vimPlugins; {
start = [
direnv-vim
vim-nix
vim-polyglot
];
opt = [
vim-monokai
];
};
customRC = ''
set number relativenumber
set undofile
set undodir=~/.cache/vim/undodir
packadd! vim-monokai
colorscheme monokai
'';
};
};
};
security.sudo.extraConfig = ''
Defaults lecture = always
Defaults lecture_file = /etc/${config.environment.etc.sudoLecture.target}
'';
virtualisation = {
docker.enable = true;
libvirtd.enable = true;
};
system.stateVersion = "21.11";
}

View File

@ -0,0 +1,39 @@
# 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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "wl" ];
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/70a0ca95-4ca4-4298-a8c4-e492705cfb93";
fsType = "btrfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D883-A077";
fsType = "vfat";
};
fileSystems."/data" =
{ device = "/dev/disk/by-uuid/d9fd4a61-3d62-40b9-bbdb-67d925b66074";
fsType = "ext4";
};
fileSystems."/data/sdb" =
{ device = "/dev/disk/by-uuid/7afc5f6b-947a-4c86-a5b5-dfefe42899c0";
fsType = "ext4";
};
swapDevices = [ ];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}