formatting and first module

This commit is contained in:
fleaz 2022-01-25 01:13:49 +01:00
parent 29e3201c57
commit e24d7c1790
5 changed files with 203 additions and 247 deletions

View file

@ -5,11 +5,11 @@
{ config, pkgs, ... }:
{
imports =
[
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
<home-manager/nixos>
../../modules/sound.nix
];
# Use the systemd-boot EFI boot loader.
@ -75,15 +75,6 @@
services.printing.enable = true;
# Enable sound.
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
@ -97,7 +88,7 @@
nixpkgs.config.allowUnfree = true;
virtualisation.podman = {
enable=true;
enable = true;
dockerCompat = true;
};
@ -112,12 +103,14 @@
wdisplays
wofi
firefox
go
tig
nixfmt
discord
gnome.gnome-keyring
via
docker-compose
swaylock
swayidle
wl-clipboard
@ -130,7 +123,6 @@
htop
];
programs.vim = {
enable = true;
plugins = with pkgs.vimPlugins; [ vim-airline neoformat vim-monokai ];
@ -148,9 +140,7 @@
userEmail = "mail@felixbreidenstein.de";
};
programs.waybar = {
enable = true;
};
programs.waybar = { enable = true; };
programs.mako = {
enable = true;
@ -176,9 +166,7 @@
term = "xterm-256color";
font = "FiraCode:size=14";
};
scrollback = {
lines = 100000;
};
scrollback = { lines = 100000; };
colors = {
alpha = "0.98";
foreground = "B3B1AD";
@ -203,17 +191,13 @@
};
};
wayland.windowManager.sway = {
enable = true;
config = {
modifier = "Mod4";
input = {
"17498:8800:KBDFans_DZ60" = {
xkb_layout = "eu";
};
"17498:8800:KBDFans_DZ60" = { xkb_layout = "eu"; };
#"1133:49295:Logitech_G403_HERO_Gaming_Mouse" = {
# pointer_accel = "1";
#};
@ -237,26 +221,22 @@
};
};
gaps = {
inner = 8;
};
gaps = { inner = 8; };
window.border = 0;
workspaceAutoBackAndForth = true;
terminal = "foot";
bars = [ {
command = "${pkgs.waybar}/bin/waybar";
}];
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
keybindings = let
mod = "Mod4";
keybindings = let mod = "Mod4";
in {
"${mod}+Return" = "exec foot";
"${mod}+p" = "exec ${pkgs.wofi}/bin/wofi --show drun";
"${mod}+Shift+c" = "reload";
"${mod}+Shift+q" = "kill";
"${mod}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
"${mod}+Shift+e" =
"exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
"${mod}+x" = "move workspace to output right";
"${mod}+h" = "focus left";
@ -300,26 +280,22 @@
"${mod}+Shift+9" = "move container to workspace 9";
"${mod}+Shift+0" = "move container to workspace 10";
# Multimedia Keys
"XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" =
"exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioRaiseVolume" =
"exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" =
"exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
};
};
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim
wget
curl
git
];
environment.systemPackages = with pkgs; [ neovim wget curl git ];
programs.neovim.vimAlias = true;

View file

@ -4,28 +4,27 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/1d2ce540-2fce-4621-8a4d-e05e09369bc3";
fileSystems."/" = {
device = "/dev/disk/by-uuid/1d2ce540-2fce-4621-8a4d-e05e09369bc3";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/782C-3B0B";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/782C-3B0B";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/6a0a9641-00c5-490e-abcc-9efeaeaca1f8"; }
];
[{ device = "/dev/disk/by-uuid/6a0a9641-00c5-490e-abcc-9efeaeaca1f8"; }];
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -7,10 +7,8 @@
let
home-manager = (import ./nix/sources.nix).home-manager;
secretsFile = "/root.key";
in
{
imports =
[
in {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
"${home-manager}/nixos"
@ -38,7 +36,6 @@ in
# copy the secret into the additional initramfs. `null` means same path
boot.initrd.secrets."${secretsFile}" = null;
networking.hostName = "jimbo"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -49,7 +46,6 @@ in
networking.useDHCP = false;
networking.networkmanager.enable = true;
hardware.opengl = {
enable = true;
driSupport = true;
@ -90,12 +86,7 @@ in
};
# List packages installed in system profile. To search, run:
environment.systemPackages = with pkgs; [
vim
wget
curl
git
];
environment.systemPackages = with pkgs; [ vim wget curl git ];
services.openssh.enable = true;
programs.ssh.startAgent = true;
@ -118,7 +109,6 @@ in
vscode
vscode-extensions.vscodevim.vim
wdisplays
albert
firefox
@ -163,7 +153,6 @@ in
htop
];
programs.neovim = {
enable = true;
vimAlias = true;
@ -175,9 +164,7 @@ in
programs.zsh = {
enable = true;
sessionVariables = {
GOPATH = "/home/fleaz/workspace/go";
};
sessionVariables = { GOPATH = "/home/fleaz/workspace/go"; };
oh-my-zsh = {
enable = true;
plugins = [ "git" "fzf" ];
@ -192,9 +179,7 @@ in
userEmail = "mail@felixbreidenstein.de";
};
programs.waybar = {
enable = true;
};
programs.waybar = { enable = true; };
programs.mako = {
enable = true;
@ -225,7 +210,6 @@ in
};
};
services.blueman-applet.enable = true;
programs.foot = {
@ -235,9 +219,7 @@ in
term = "xterm-256color";
font = "FiraCode:size=14";
};
scrollback = {
lines = 100000;
};
scrollback = { lines = 100000; };
colors = {
alpha = "0.98";
foreground = "B3B1AD";
@ -262,8 +244,6 @@ in
};
};
wayland.windowManager.sway = {
enable = true;
@ -272,9 +252,7 @@ in
focus.followMouse = false;
input = {
"17498:8800:KBDFans_DZ60" = {
xkb_layout = "eu";
};
"17498:8800:KBDFans_DZ60" = { xkb_layout = "eu"; };
#"1133:49295:Logitech_G403_HERO_Gaming_Mouse" = {
# pointer_accel = "1";
#};
@ -298,28 +276,22 @@ in
};
};
gaps = {
inner = 8;
};
gaps = { inner = 8; };
window.border = 0;
workspaceAutoBackAndForth = true;
terminal = "foot";
bars = [{
command = "${pkgs.waybar}/bin/waybar";
}];
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
keybindings =
let
mod = "Mod4";
in
{
keybindings = let mod = "Mod4";
in {
"${mod}+Return" = "exec foot";
"${mod}+p" = "exec ${pkgs.wofi}/bin/wofi --show drun";
"${mod}+Shift+c" = "reload";
"${mod}+Shift+q" = "kill";
"${mod}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
"${mod}+Shift+e" =
"exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
"${mod}+x" = "move workspace to output right";
"${mod}+h" = "focus left";
@ -363,11 +335,13 @@ in
"${mod}+Shift+9" = "move container to workspace 9";
"${mod}+Shift+0" = "move container to workspace 10";
# Multimedia Keys
"XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" =
"exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioRaiseVolume" =
"exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" =
"exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
};
};

View file

@ -4,36 +4,33 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
fileSystems."/" = {
device = "/dev/disk/by-uuid/5c29ff32-7186-4bfb-91ba-4bd14a72c7fa";
fsType = "ext4";
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/55265801-0adc-4cde-9e88-a6c4a2a6c8c1";
boot.initrd.luks.devices."cryptroot".device =
"/dev/disk/by-uuid/55265801-0adc-4cde-9e88-a6c4a2a6c8c1";
fileSystems."/boot/efi" =
{
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/A809-ABDC";
fsType = "vfat";
};
swapDevices =
[{
swapDevices = [{
device = "/dev/disk/by-partuuid/706747af-4066-461f-8eac-06339c68f0db";
randomEncryption = true;
}];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

10
modules/sound.nix Normal file
View file

@ -0,0 +1,10 @@
{ ... }: {
# Enable sound.
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}