Compare commits
No commits in common. "2d3ca78643c64b7639a6690caf8ffc20e470760e" and "fe0fe21a1233172e5d51e3432f4560a7f8ba56f3" have entirely different histories.
2d3ca78643
...
fe0fe21a12
10 changed files with 13 additions and 219 deletions
|
@ -16,7 +16,6 @@ mkIf (elem "zsh" config.machine.conffiles) {
|
|||
ustrip = "sed -e '/\.service\|\.timer\|\.target\|\.socket\|\.slice\|\.scope\|\.path\|\.mount\|\.device)/!d' -e 's/loaded.*$//g' -e 's/^ \|^● //g'";
|
||||
lsunits = "systemctl list-units | ustrip";
|
||||
};
|
||||
|
||||
shellInit = ''
|
||||
function ll() { exa -abgHhl@ --git --color=always --group-directories-first $@ | bat --paging=always --style=changes --color=always --theme="Solarized (dark)" }
|
||||
function lln() { exa -abgHhl@ --git --color=always --group-directories-first $@ | bat --paging=always --style=changes --color=always --theme="Solarized (dark)" -n }
|
||||
|
@ -24,9 +23,8 @@ mkIf (elem "zsh" config.machine.conffiles) {
|
|||
function rwhich() { realpath $(which $@) }
|
||||
function cdf() { cd $(rwhich $@ | sed "s/$@$//") }
|
||||
function sfu() { lsunits | rg -i $@ }
|
||||
function map() { for f in "$\{@:2\}"; do; eval $1 \"$f\"; done }
|
||||
function map() { for f in "$\{@:2\}"; do; eval $1 $f; done }
|
||||
'';
|
||||
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
plugins = [ "cabal" "docker" "gitfast" "python" "pip" "sudo" "systemd" "man" ];
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.cron.enable = false;
|
||||
networking.dhcpcd.extraConfig = "noarp";
|
||||
system.stateVersion = "21.05";
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
{ config, pkgs, modulesPath, ... }:
|
||||
|
||||
let
|
||||
cfg = config.machine;
|
||||
in {
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
tmpOnTmpfs = true;
|
||||
cleanTmpDir = true;
|
||||
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
kernelParams = [
|
||||
# get backlight service to work part one (fixes systemd backlight service)
|
||||
"acpi_backlight=native"
|
||||
];
|
||||
kernel.sysctl = {
|
||||
"kernel.nmi_watchdog" = 0;
|
||||
"fs.inotify.max_user_watches" = 524288;
|
||||
"vm.dirty_writeback_centisecs" = 1500;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/cf8db7d5-5da7-4fb9-818d-ed5dd2815f0d";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/96E4-9DF3";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
hardware = {
|
||||
firmware = with pkgs; [ firmwareLinuxNonfree ];
|
||||
enableAllFirmware = true;
|
||||
ksm.enable = true;
|
||||
opengl = {
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
zeroconf.discovery.enable = false;
|
||||
extraClientConf = ''
|
||||
autospawn = no
|
||||
'';
|
||||
};
|
||||
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
};
|
||||
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
cpuFreqGovernor = "powersave";
|
||||
};
|
||||
services = {
|
||||
upower.enable = true;
|
||||
# Fix Backlight Part 2 (allows acpilight to modify brightness)
|
||||
udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chmod 664 /sys/class/backlight/%k/brightness"
|
||||
'';
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../options/copySysConf.nix
|
||||
];
|
||||
config.machine = {
|
||||
allowUnfree = true;
|
||||
hostName = "Marid";
|
||||
administrators = [ { name = "derped"; id = 1337; } ];
|
||||
conffiles = [
|
||||
"etcfiles"
|
||||
"etcvars"
|
||||
"fonts"
|
||||
"zsh"
|
||||
];
|
||||
pkgs = [
|
||||
"base"
|
||||
"dict"
|
||||
"nodejs"
|
||||
"emacs"
|
||||
"emacs::company"
|
||||
"emacs::docker"
|
||||
"emacs::doom-modeline"
|
||||
"emacs::doom-themes"
|
||||
"emacs::elpy"
|
||||
"emacs::fcitx"
|
||||
"emacs::flycheck"
|
||||
"emacs::flyspell"
|
||||
"emacs::undo-tree"
|
||||
"emacs::lsp"
|
||||
"emacs::magit"
|
||||
"emacs::mu4e"
|
||||
"emacs::nix-mode"
|
||||
"emacs::org"
|
||||
"emacs::php-mode"
|
||||
"emacs::web-mode"
|
||||
"emacs::yasnippet"
|
||||
"extra"
|
||||
"mail_utils"
|
||||
"python3"
|
||||
"xpkgs"
|
||||
];
|
||||
services = [
|
||||
"docker"
|
||||
"desktop"
|
||||
"udev"
|
||||
"fprintd"
|
||||
];
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowPing = true;
|
||||
allowedUDPPorts = [ ];
|
||||
allowedTCPPorts = [ ];
|
||||
allowedUDPPortRanges = [ ];
|
||||
allowedTCPPortRanges = [ ];
|
||||
};
|
||||
desktop.wms = [ "none+i3" "i3" ];
|
||||
};
|
||||
|
||||
config.system.copySysConf = {
|
||||
enable = false;
|
||||
addToNixPath = false;
|
||||
};
|
||||
}
|
|
@ -18,10 +18,6 @@ mkIf (elem "emacs::lsp" config.machine.pkgs) {
|
|||
${optionalString (elem "emacs::rust" config.machine.pkgs) ''
|
||||
(setq lsp-rust-clippy-preference "on")
|
||||
''}
|
||||
${optionalString (elem "emacs::web-mode" config.machine.pkgs) ''
|
||||
(setq lsp-clients-deno-enable-unstable 't)
|
||||
(setq lsp-disabled-clients '(ts-ls))
|
||||
''}
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
mkIf (elem "emacs::telega" config.machine.pkgs) {
|
||||
programs.emacs.init.usePackage.telegram = {
|
||||
enable = true;
|
||||
defer = true;
|
||||
package = epkgs: [ epkgs.telega epkgs.visual-fill-column ];
|
||||
command = [ "telega" ];
|
||||
config = ''
|
||||
(telega-alert-mode 1)
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -28,32 +28,19 @@ mkIf (elem "emacs::web-mode" config.machine.pkgs) {
|
|||
};
|
||||
js2-mode = {
|
||||
enable = true;
|
||||
mode = [
|
||||
''("\\.js\\'" . js2-mode)''
|
||||
];
|
||||
};
|
||||
typescript-mode = {
|
||||
tide = {
|
||||
enable = true;
|
||||
hook = lib.optional (elem "emacs::lsp" config.machine.pkgs)
|
||||
''(typescript-mode . (lambda () (lsp)))'';
|
||||
mode = [
|
||||
''("\\.ts\\'" . typescript-mode)''
|
||||
after = [ "typescript-mode" "company" "flycheck" ];
|
||||
hook = [
|
||||
"(typescript-mode . tide-setup)"
|
||||
"(typescript-mode . tide-hl-identifier-mode)"
|
||||
"(before-save . tide-format-before-save)"
|
||||
];
|
||||
config = ''
|
||||
(setq company-tooltip-align-annotations t)
|
||||
'';
|
||||
};
|
||||
# tide = {
|
||||
# enable = true;
|
||||
# after = [ "typescript-mode" "company" "flycheck" ];
|
||||
# hook = [
|
||||
# "(typescript-mode . tide-setup)"
|
||||
# "(typescript-mode . tide-hl-identifier-mode)"
|
||||
# "(before-save . tide-format-before-save)"
|
||||
# ];
|
||||
# config = ''
|
||||
# (flycheck-mode +1)
|
||||
# (setq flycheck-check-syntax-automatically '(save mode-enabled))
|
||||
# (setq company-tooltip-align-annotations t)
|
||||
# '';
|
||||
# };
|
||||
impatient-mode = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.machine;
|
||||
in {
|
||||
{
|
||||
config.machine.pkgsets.xpkgs.pkgs = with pkgs; [
|
||||
feh
|
||||
scrot
|
||||
|
@ -17,7 +15,7 @@ in {
|
|||
pavucontrol
|
||||
xclip
|
||||
xlibs.xkill
|
||||
(if (cfg.hostName == "Marid") then xbacklight else xorg.xbacklight)
|
||||
xorg.xbacklight
|
||||
xdiskusage
|
||||
];
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ in mkIf (elem "desktop" cfg.services) {
|
|||
services.xserver = {
|
||||
enable = !(elem "sway" cfg.desktop.wms);
|
||||
layout = "de";
|
||||
videoDrivers = [ "intel" ];
|
||||
displayManager.defaultSession = ifelse (cfg.desktop.wms != []) (elemAt cfg.desktop.wms 0) null;
|
||||
windowManager = mkIf (cfg.desktop.wms != []) {
|
||||
i3 = mkIf (elem "i3" cfg.desktop.wms) (import ./desktop/i3.nix { inherit pkgs; });
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
mkIf (elem "fprintd" config.machine.services) {
|
||||
security.pam.services = let
|
||||
unlock = [
|
||||
"sudo"
|
||||
"i3lock"
|
||||
"login"
|
||||
"lightdm"
|
||||
];
|
||||
in listToAttrs (forEach unlock (n: {name = n; value = { fprintAuth = true; }; }));
|
||||
|
||||
services.fprintd = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue