move modules out
This commit is contained in:
parent
6c910125f7
commit
ab9955e681
10 changed files with 18 additions and 20 deletions
16
common/desktop/core.nix
Normal file
16
common/desktop/core.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ config, pkgs, system, lib, inputs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
ghostty
|
||||
kitty
|
||||
vscode
|
||||
inputs.zen-browser.packages."${system}".default
|
||||
fastfetch
|
||||
hyfetch
|
||||
sway-contrib.grimshot
|
||||
discord
|
||||
];
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
}
|
37
common/desktop/sway.nix
Normal file
37
common/desktop/sway.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
||||
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
|
||||
bindsym Mod4+shift+e exec swaynag \
|
||||
-t warning \
|
||||
-m "what you want do :3" \
|
||||
-b "Poweroff" "systemctl poweroff" \
|
||||
-b "Reboot" "systemctl reboot"
|
||||
'';
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
grim
|
||||
sway-contrib.grimshot
|
||||
wl-clipboard
|
||||
mako
|
||||
];
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd 'sway --unsupported-gpu'";
|
||||
#command = "${pkgs.sway}/bin/sway --unsupported-gpu --config ${swayConfig}";
|
||||
user = "regent";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
7
common/efi.nix
Normal file
7
common/efi.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
fileSystems."/boot".options = [ "umask=0077" ];
|
||||
}
|
||||
|
42
common/nvidia.nix
Normal file
42
common/nvidia.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Enable OpenGL
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Load nvidia driver for Xorg and Wayland
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
}
|
24
common/services.nix
Normal file
24
common/services.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
# system packages + services
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
fastfetch
|
||||
lsof
|
||||
btop
|
||||
git
|
||||
openssl
|
||||
stdenv
|
||||
gnumake
|
||||
parted
|
||||
zfs
|
||||
|
||||
sqlite
|
||||
];
|
||||
|
||||
services.openssh.enable = true;
|
||||
services.printing.enable = true;
|
||||
services.tailscale.enable = true;
|
||||
services.tailscale.useRoutingFeatures = "both";
|
||||
}
|
13
common/system.nix
Normal file
13
common/system.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
# boot, networking, locale
|
||||
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
environment.variables.EDITOR = "vim";
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
}
|
||||
|
27
common/users.nix
Normal file
27
common/users.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
users.users.regent = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "docker" "wheel" ];
|
||||
packages = with pkgs; [ tree ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTESAAAAIJ0pUS@lV9dSjkgYbdh9utZ5CDM2dPN70S5fBqN1m3Pb"
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCS9VBRE13jojnqVjuUZWTcOK8GokDDlk2U0i61vEJizVzNowGnIAbwq0cOaFEBX4JBkOa4I8Ku2Pw7fODuoehSK/t7FrfXExk2PBT3k0mfzqQYxfq5bzae7AWr7n/sKUBTtvHSACfidxzQpV7VSgW68jqdOt6h7FHSeS2jac7wUNPobL0uCkFB4FiEQOnIqlRGSSabVemL7bC9H9lUyOODSTthiq9S3pPYknyHDRKUtSCSw4pfpasr4bxDVSW99h3GBcW0hZbpw5bwlxQlwbclxQDnn7XJhWpq6zL/2ScVGJgd94z7FshKoF5IFTk6e7a/Ouv4Ato4hRLxEe5u70CH ssh-key-2023-07-11"
|
||||
];
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
user.name = "waveringana";
|
||||
user.email = "ana@nekomimi.pet";
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
security.sudo.enable = true;
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue