Compare commits

...

1 Commits

Author SHA1 Message Date
669bc5bb3d
Enable audio and add a basic home configuration 2020-05-09 01:30:09 +02:00
7 changed files with 194 additions and 18 deletions

View File

@ -4,7 +4,6 @@
# Kernel configuration # Kernel configuration
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
# TODO Add resume_offset
kernelParams = [ "zfs.zfs_arc_max=536870912" ]; kernelParams = [ "zfs.zfs_arc_max=536870912" ];
kernelModules = [ "i915" "acpi_call" ]; kernelModules = [ "i915" "acpi_call" ];
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
@ -64,10 +63,6 @@
# Enable the TLP daemon # Enable the TLP daemon
services.tlp.enable = true; services.tlp.enable = true;
# Add a swap file and resume from it
swapDevices = [ { device = "/swap"; size = 8192; } ];
boot.resumeDevice = "/swap";
# NixOS version # NixOS version
system.stateVersion = "20.09"; system.stateVersion = "20.09";
@ -78,6 +73,7 @@
./modules/gui.nix ./modules/gui.nix
./modules/datasync.nix ./modules/datasync.nix
./modules/audio.nix ./modules/audio.nix
./modules/hardware-configuration.nix
]; ];
} }

15
modules/audio.nix Normal file
View File

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
{
# Enable ALSA
sound.enable = true;
# Configure PulseAudio with mopidy tweaks
hardware.pulseaudio = {
enable = true;
tcp = {
enable = true;
anonymousClients.allowedIpRanges = [ "127.0.0.1" ];
};
};
}

View File

@ -19,6 +19,7 @@
dataset = "syscea/root"; dataset = "syscea/root";
}; };
}; };
"syscea/state/home" = { "syscea/state/home" = {
plan = "1d=>1h,1m=>1d,1y=>1m"; plan = "1d=>1h,1m=>1d,1y=>1m";
recursive = true; recursive = true;

View File

@ -2,13 +2,16 @@
{ {
# Display manager # Display manager
services.xserver.displayManager = { services.xserver = {
defaultSession = "sway"; enable = true;
sddm = { displayManager = {
enable = true; defaultSession = "sway";
autologin = { sddm = {
enable = true; enable = true;
user = "coolneng"; autoLogin = {
enable = true;
user = "coolneng";
};
}; };
}; };
}; };
@ -47,10 +50,11 @@
enable = true; enable = true;
temperature = { temperature = {
day = 6500; day = 6500;
night = 5500; night = 5000;
}; };
}; };
location = {
# Bar latitude = 35.89;
programs.waybar.enable = true; longitude = -5.32;
};
} }

View File

@ -0,0 +1,46 @@
# 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 = [ "xhci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "syscea/stateful/root";
fsType = "zfs";
};
fileSystems."/nix" =
{ device = "syscea/ephemeral/nix";
fsType = "zfs";
};
fileSystems."/tmp" =
{ device = "syscea/ephemeral/tmp";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "syscea/stateful/home";
fsType = "zfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/4AED-6F54";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/29d26e6a-b421-41c3-9826-76e4da00e3bb"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

116
modules/home.nix Normal file
View File

@ -0,0 +1,116 @@
{ config, lib, pkgs, ... }:
# Doom emacs overlay
let
doom-emacs = pkgs.callPackage (builtins.fetchTarball {
url = https://github.com/vlaci/nix-doom-emacs/archive/master.tar.gz;
}) {
doomPrivateDir = ./doom.d;
};
in
{
home.packages = [
# Text editors
doom-emacs
pkgs.neovim
# Terminals
pkgs.tmux
pkgs.tmuxp
# Development
pkgs.git
pkgs.direnv
pkgs.lorri
];
# Create coolneng user
users.users.coolneng = {
isNormalUser = true;
home = "/home/coolneng";
extraGroups = [ "wheel" "video" "audio" ];
shell = "/run/current-system/sw/bin/fish";
};
# Enable home manager
programs.home-manager.enable = true;
# Terminal emulator
programs.kitty = {
enable = true;
font.name = "Go Mono 11";
settings = {
repaint_delay = 30;
input_delay = 10;
enable_audio_bell = false;
foreground = "#c6c8d1";
background = "#161821";
color0 = "#161821";
color8 = "#6b7089";
color1 = "#e27878";
color9 = "#e98989";
color2 = "#b4be82";
color10= "#c0ca8e";
color3 = "#e2a478";
color11= "#e9b189";
color4 = "#84a0c6";
color12= "#91acd1";
color5 = "#a093c7";
color13= "#ada0d3";
color6 = "#89b8c2";
color14= "#95c4ce";
color7 = "#c6c8d1";
color15= "#d2d4de";
};
};
# Shell
home.sessionVariables = {
# fff colors [0-9]
FFF_COL1 = 4;
FFF_COL2 = 8;
# fff favourites;
FFF_FAV1 = "$HOME/Documents/Uni";
FFF_FAV2 = "$HOME/Documents/Papers";
FFF_FAV3 = "$HOME/Documents/Books/Academic";
FFF_FAV4 = "$HOME/Documents/Education";
};
programs.fish = {
enable = true;
shellAbbrs = {
la = "ls -lA";
f = "fff";
vim = "nvim";
};
shellAliases = {
wlan = "iw dev wlp2s0 scan | grep SSID";
bc = "bc -l";
docker = "podman";
docker-compose = "podman-compose";
};
plugins = [
{
name = "colored-man";
src = builtins.fetchGit {
name = "fish-colored-man";
url = "https://github.com/decors/fish-colored-man";
rev = "c1e9db7765c932587b795d6c8965e9cff2fd849a";
};
}
{
name = "prompt-theme";
src = builtins.fetchGit {
name = "fish-colored-man";
url = "https://github.com/oh-my-fish/theme-nai";
rev = "9616e644e95fe79eb59b8c9d77fe44b9f096db2f";
};
}
];
};
# Emacs startup
home.file.".emacs.d/init.el".text = ''
(load "default.el")
'';
}

View File

@ -12,9 +12,8 @@
firefox firefox
chromium chromium
# LaTeX # LaTeX
texlive.combind.scheme-full texlive.combined.scheme-full
pandoc pandoc
pandoc-citeproc
]; ];
# Fonts declaration # Fonts declaration
@ -24,7 +23,6 @@
siji siji
cherry cherry
iosevka iosevka
emacs.all-the-icons-fonts
]; ];
}; };