Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0230fe
commit 8707a0b
Showing
17 changed files
with
360 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule home-manager
updated
from e7600a to 498522
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ config, pkgs, ... }: | ||
|
||
let | ||
secrets = import ../../secrets.nix; | ||
|
||
in { | ||
imports = [ | ||
./hardware-configuration.nix | ||
../../profiles/common.nix | ||
../../profiles/graphical-desktop.nix | ||
]; | ||
|
||
# For tmpfs / | ||
environment.etc."nixos".source = pkgs.runCommand "persistent-link" {} '' | ||
ln -s /nix/persistent/etc/nixos $out | ||
''; | ||
|
||
|
||
users.users.root.initialHashedPassword = secrets.passwordHash; | ||
users.users.adisbladis.initialHashedPassword = secrets.passwordHash; | ||
users.mutableUsers = false; | ||
|
||
# Use the systemd-boot EFI boot loader. | ||
boot.loader.systemd-boot.enable = true; | ||
boot.loader.efi.canTouchEfiVariables = true; | ||
|
||
networking.hostId = "b6d4529e"; | ||
networking.hostName = "kombu"; | ||
networking.networkmanager.enable = true; | ||
|
||
services.xserver.videoDrivers = [ "amdgpu" ]; | ||
|
||
hardware.cpu.amd.updateMicrocode = true; | ||
|
||
hardware.enableRedistributableFirmware = true; | ||
|
||
hardware.opengl.enable = true; | ||
hardware.opengl.driSupport = true; | ||
|
||
# Enable the OpenSSH daemon. | ||
services.openssh.enable = true; | ||
services.openssh.passwordAuthentication = false; | ||
|
||
networking.useDHCP = false; | ||
networking.interfaces.eno1.useDHCP = true; | ||
networking.interfaces.eno2.useDHCP = true; | ||
networking.interfaces.wlp37s0.useDHCP = true; | ||
|
||
system.stateVersion = "20.03"; # Did you read the comment? | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# 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/installer/scan/not-detected.nix> | ||
]; | ||
|
||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" ]; | ||
boot.initrd.kernelModules = [ ]; | ||
boot.kernelModules = [ "kvm-amd" ]; | ||
boot.extraModulePackages = [ ]; | ||
|
||
fileSystems."/" = | ||
{ device = "none"; | ||
fsType = "tmpfs"; | ||
}; | ||
|
||
fileSystems."/nix" = | ||
{ device = "zroot/nix"; | ||
fsType = "zfs"; | ||
}; | ||
|
||
fileSystems."/boot" = | ||
{ device = "/dev/disk/by-uuid/2E10-DFF0"; | ||
fsType = "vfat"; | ||
}; | ||
|
||
swapDevices = [ ]; | ||
|
||
nix.maxJobs = lib.mkDefault 64; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# Edit this configuration file to define what should be installed on | ||
# your system. Help is available in the configuration.nix(5) man page | ||
# and in the NixOS manual (accessible by running ‘nixos-help’). | ||
|
||
{ config, pkgs, ... }: | ||
|
||
{ | ||
imports = | ||
[ # Include the results of the hardware scan. | ||
./hardware-configuration.nix | ||
]; | ||
|
||
# Use the systemd-boot EFI boot loader. | ||
boot.loader.systemd-boot.enable = true; | ||
boot.loader.efi.canTouchEfiVariables = true; | ||
|
||
networking.hostName = "tmpname"; # Define your hostname. | ||
|
||
# Select internationalisation properties. | ||
# i18n = { | ||
# consoleFont = "Lat2-Terminus16"; | ||
# consoleKeyMap = "us"; | ||
# defaultLocale = "en_US.UTF-8"; | ||
# }; | ||
|
||
# Set your time zone. | ||
time.timeZone = "Asia/Hong_Kong"; | ||
|
||
# List packages installed in system profile. To search by name, run: | ||
# $ nix-env -qaP | grep wget | ||
environment.systemPackages = with pkgs; [ | ||
wget | ||
curl | ||
mpv | ||
unzip | ||
kdeconnect | ||
# firefox | ||
# chromium | ||
falkon | ||
# krita | ||
|
||
htop | ||
]; | ||
|
||
# User stuffs | ||
services.avahi.enable = true; | ||
|
||
# Sane font defaults | ||
fonts.enableFontDir = true; | ||
fonts.enableGhostscriptFonts = true; | ||
fonts.fontconfig.ultimate.enable = true; | ||
fonts.fontconfig.ultimate.preset = "osx"; | ||
|
||
fonts.fonts = with pkgs; [ | ||
liberation_ttf | ||
inconsolata | ||
dejavu_fonts | ||
emacs-all-the-icons-fonts | ||
powerline-fonts | ||
source-code-pro | ||
]; | ||
|
||
environment.variables = { | ||
# Enable on screen keyboard globally | ||
QT_IM_MODULE = "qtvirtualkeyboard"; | ||
}; | ||
|
||
services.upower.enable = true; | ||
|
||
programs.fish.enable = true; | ||
|
||
hardware.bluetooth.enable = true; | ||
# hardware.pulseaudio.package = pkgs.pulseaudioFull; | ||
|
||
services.xserver.enable = true; | ||
services.xserver.layout = "se"; | ||
services.xserver.xkbOptions = "eurosign:e"; | ||
services.xserver.xkbVariant = "dvorak"; | ||
|
||
services.xserver.displayManager.sddm.enable = true; | ||
# services.xserver.displayManager.sddm.autoLogin.enable = true; | ||
# services.xserver.displayManager.sddm.autoLogin.user = "adisbladis"; | ||
|
||
services.xserver.desktopManager.plasma5.enableQt4Support = false; | ||
services.xserver.desktopManager.plasma5.enable = true; | ||
services.xserver.desktopManager.xterm.enable = false; | ||
|
||
services.unbound.enable = true; | ||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’. | ||
users.extraUsers.adisbladis = { | ||
isNormalUser = true; | ||
uid = 1000; | ||
extraGroups = [ "wheel" "networkmanager" "video" "audio" ]; | ||
shell = pkgs.fish; | ||
|
||
openssh.authorizedKeys.keys = [ | ||
"ssh-rsa | ||
AAAAB3NzaC1yc2EAAAADAQABAAACAQCTrw8gZoBYkh4Ud8/QCXAaJk020XMbRlcu61QPTnpjvLLxAwSr3d+K7ccDal9FaSQg0GBx58aVRcdVoFBFmHbX6iqR6OT2hoenbxRfVa69DaY6w/eIY5seQ0Xzio8PsX2Cc4IPdM3XqlpTLhQ2+/kNnDC9/NYs2UX6r318uHrHPW5hs6rFPxvekcel56Vy1LKrMb5EgLwOFuhqegKpuZl6Dw39HHAIi0+cVCqc+eP8SmgdcYCm7CjLXU4mV8BwIMx/8TSDravJhnRLYX+S+BFUA3sXTeg1xzUKhFTE3lF4MJTNB613bcygX4HLXcG0YJ/6CDLBVey0xCfyKSbc18nlhRzuePzU8yYL8TRVoMJrEEurq8ZrkxX+lFs83CnFq4epH3vdz+Y6Q8foTVEF0XECgJ08MElXZRFRA5iWvO4S2PQLqn8LKRVxbF6NV34IrchCQavirZCv01FKRYfbpiNSzGLxKn2qvHDiYeqLV8gqj6wgO+DF8w6DsJcEUO3qiUDpbfXMCU8S5HgwVB7oOh+0g0Gq81HmjX0/a2WhuhbwC1Glt+gyLCLd/2RTRIetMymT8kZ61izVVNh0PeAoy4d2DpcKdmaK8CNjZ1/8c9a4Pxzg1HIHlPEyKf9NZ+TlGlUjmTEVOefxAWBVpQuwqEsOF1BkG9tDZsPQdcMhZbtvYQ== | ||
cardno:000605255225" | ||
]; | ||
}; | ||
|
||
services.openssh.enable = true; | ||
services.openssh.permitRootLogin = "yes"; | ||
|
||
networking.firewall.enable = false; | ||
|
||
sound.enable = true; | ||
hardware.pulseaudio.enable = true; | ||
|
||
services.xserver.libinput.enable = true; | ||
networking.networkmanager.enable = true; | ||
|
||
boot.kernelPackages = pkgs.linuxPackages_latest; | ||
hardware.enableRedistributableFirmware = true; | ||
hardware.firmware = with pkgs; [ | ||
firmwareLinuxNonfree | ||
]; | ||
|
||
system.stateVersion = "18.09"; # Did you read the comment? | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# 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/installer/scan/not-detected.nix> | ||
]; | ||
|
||
boot.initrd.availableKernelModules = [ "xhci_pci" "dwc3_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_acpi" ]; | ||
boot.kernelModules = [ "kvm-intel" ]; | ||
boot.extraModulePackages = [ ]; | ||
|
||
fileSystems."/" = | ||
{ device = "/dev/disk/by-uuid/1769a4cf-b1ad-4180-b5c4-0eb9d637a5e1"; | ||
fsType = "ext4"; | ||
}; | ||
|
||
fileSystems."/boot" = | ||
{ device = "/dev/disk/by-uuid/DBCE-D7BC"; | ||
fsType = "vfat"; | ||
}; | ||
|
||
swapDevices = | ||
[ { device = "/dev/disk/by-uuid/90462b55-bc98-4c7f-b76d-5a187f1f3e36"; } | ||
]; | ||
|
||
nix.maxJobs = lib.mkDefault 4; | ||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ stdenv, lib, fetchFromGitHub, kernel }: | ||
|
||
with lib; | ||
|
||
let modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wireless/realtek/rtlwifi"; | ||
|
||
in stdenv.mkDerivation rec { | ||
name = "rtl8723bs_bt-${version}"; | ||
version = "2016-07-18"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "lwfinger"; | ||
repo = "rtlwifi_new"; | ||
rev = "09eb91f52a639ec5e4c5c4c98dc2afede046cf20"; | ||
sha256 = "0b7mvvsdsih48nb3dgknfd9xj5h38q8wyspxi7h0hynb8szjjda4"; | ||
}; | ||
|
||
hardeningDisable = [ "pic" "format" ]; | ||
|
||
nativeBuildInputs = kernel.moduleBuildDependencies; | ||
|
||
makeFlags = "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; | ||
|
||
enableParallelBuilding = true; | ||
|
||
installPhase = '' | ||
mkdir -p ${modDestDir} | ||
find . -name '*.ko' -exec cp --parents {} ${modDestDir} \; | ||
find ${modDestDir} -name '*.ko' -exec xz -f {} \; | ||
''; | ||
|
||
meta = { | ||
description = ""; | ||
inherit (src.meta) homepage; | ||
license = stdenv.lib.licenses.gpl2; | ||
platforms = with platforms; linux; | ||
maintainers = with maintainers; [ tvorog ]; | ||
priority = -1; | ||
}; | ||
} | ||
|
Oops, something went wrong.