feat: initial commit
This commit is contained in:
commit
7fc2437bed
38 changed files with 1528 additions and 0 deletions
16
modules/aliases.nix
Normal file
16
modules/aliases.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
ls = "lsd --color=auto";
|
||||
la = "lsd -lAh --group-directories-first";
|
||||
lt = "lsd -lAh --group-directories-first --tree";
|
||||
llt = "unbuffer lsd -lAh --group-directories-first --tree | less -r";
|
||||
gg = "cd ~/git";
|
||||
gs = "git status";
|
||||
gl = "git log --oneline";
|
||||
glg = "git log --oneline --graph --decorate --all";
|
||||
gaa = "git add --all";
|
||||
gc = "git commit -m";
|
||||
gp = "git push";
|
||||
ta = "tmux attach";
|
||||
ngc = "sudo nix-collect-garbage -d";
|
||||
nec = "sudo nvim -u $HOME/.config/nvim/init.lua --cmd 'cd /etc/nixos'";
|
||||
}
|
||||
11
modules/audio.nix
Normal file
11
modules/audio.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ ... }: {
|
||||
# Enable pipewire - audio
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
}
|
||||
9
modules/bluetooth.nix
Normal file
9
modules/bluetooth.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ ... }: {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
|
||||
5
modules/boot.nix
Normal file
5
modules/boot.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }: {
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
6
modules/dbus.nix
Normal file
6
modules/dbus.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
services.dbus = {
|
||||
enable = true;
|
||||
packages = [ pkgs.gcr ]; # needed for gnome pinentry
|
||||
};
|
||||
}
|
||||
22
modules/default.nix
Normal file
22
modules/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
imports = [
|
||||
./audio.nix
|
||||
./bluetooth.nix
|
||||
./boot.nix
|
||||
./dbus.nix
|
||||
./fonts.nix
|
||||
./i18n.nix
|
||||
./keyd.nix
|
||||
./network.nix
|
||||
./nix.nix
|
||||
./nvidia.nix
|
||||
./opengl.nix
|
||||
./power.nix
|
||||
./packages.nix
|
||||
./print.nix
|
||||
./security.nix
|
||||
./shell.nix
|
||||
./unfree.nix
|
||||
./xdg-portal.nix
|
||||
];
|
||||
}
|
||||
9
modules/fonts.nix
Normal file
9
modules/fonts.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }: {
|
||||
# Add fonts
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "DejaVuSansMono" ]; })
|
||||
];
|
||||
};
|
||||
}
|
||||
11
modules/i18n.nix
Normal file
11
modules/i18n.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ ... }: {
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "us";
|
||||
};
|
||||
}
|
||||
28
modules/keyd.nix
Normal file
28
modules/keyd.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ ... }: {
|
||||
# Enable keyd and remap keys
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards.default.settings = {
|
||||
main = {
|
||||
leftalt = "layer(meta)";
|
||||
leftmeta = "layer(alt)";
|
||||
altgr = "layer(control)";
|
||||
rightalt = "layer(control)";
|
||||
capslock = "layer(nav)";
|
||||
};
|
||||
meta = {
|
||||
capslock = "overload(nav, capslock)";
|
||||
};
|
||||
nav = {
|
||||
h = "left";
|
||||
j = "down";
|
||||
k = "up";
|
||||
l = "right";
|
||||
"0" = "home";
|
||||
"4" = "end";
|
||||
u = "pageup";
|
||||
d = "pagedown";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
7
modules/network.nix
Normal file
7
modules/network.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }: {
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
systemd.services = {
|
||||
NetworkManager-wait-online.enable = false;
|
||||
};
|
||||
}
|
||||
7
modules/nix.nix
Normal file
7
modules/nix.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }: {
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
15
modules/nvidia.nix
Normal file
15
modules/nvidia.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ ... }: {
|
||||
/*
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
# Modesetting is needed for most Wayland compositors
|
||||
modesetting.enable = true;
|
||||
# Use the open source version of the kernel module
|
||||
# Only available on driver 515.43.04+
|
||||
open = false;
|
||||
# Enable the nvidia settings menu
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
*/
|
||||
}
|
||||
7
modules/opengl.nix
Normal file
7
modules/opengl.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }: {
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
}
|
||||
23
modules/packages.nix
Normal file
23
modules/packages.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
pciutils
|
||||
qt6.qtwayland
|
||||
xdg-utils # for opening default programs
|
||||
glib # gsettings
|
||||
git
|
||||
mercurial # contains 'hg'
|
||||
wget
|
||||
neofetch
|
||||
lsd
|
||||
ripgrep
|
||||
expect # contains 'unbuffer'
|
||||
# languages
|
||||
gcc13
|
||||
go
|
||||
openjdk17
|
||||
javaPackages.openjfx17
|
||||
gradle_7
|
||||
python312
|
||||
nodejs_20
|
||||
];
|
||||
}
|
||||
6
modules/power.nix
Normal file
6
modules/power.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }: {
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
powertop.enable = true;
|
||||
};
|
||||
}
|
||||
4
modules/print.nix
Normal file
4
modules/print.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }: {
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
}
|
||||
6
modules/security.nix
Normal file
6
modules/security.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }: {
|
||||
security.polkit.enable = true;
|
||||
|
||||
# rtkit is optional but recommended
|
||||
security.rtkit.enable = true;
|
||||
}
|
||||
22
modules/shell.nix
Normal file
22
modules/shell.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
aliases = import ./aliases.nix;
|
||||
in
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
users.users.gandalf = {
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
environment = {
|
||||
shellAliases = aliases;
|
||||
};
|
||||
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
}
|
||||
3
modules/unfree.nix
Normal file
3
modules/unfree.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
8
modules/xdg-portal.nix
Normal file
8
modules/xdg-portal.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }: {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
# gtk portal needed to make gtk apps happy
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue