mirror of
https://github.com/tuxdotrs/nixos-config.git
synced 2025-07-07 02:06:34 +05:30
initial commit
This commit is contained in:
102
hosts/configuration.nix
Normal file
102
hosts/configuration.nix
Normal file
@ -0,0 +1,102 @@
|
||||
{ pkgs, username, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../modules/virtualisation/docker.nix
|
||||
];
|
||||
|
||||
fonts.fonts = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||
];
|
||||
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users.${username} = {
|
||||
initialPassword = "${username}";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "networkmanager" "wheel" "storage" "audio" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D 0xtux@pm.me"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
ohMyZsh.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestions.enable = true;
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
config = {
|
||||
user = {
|
||||
email = "0xtux@pm.me";
|
||||
name = "0xTux";
|
||||
signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D 0xtux@pm.me";
|
||||
};
|
||||
commit.gpgsign = true;
|
||||
gpg.format = "ssh";
|
||||
};
|
||||
};
|
||||
starship.enable = true;
|
||||
dconf.enable = true;
|
||||
seahorse.enable = true;
|
||||
nix-ld.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
# Codecs
|
||||
x264
|
||||
x265
|
||||
|
||||
# Runtime
|
||||
nodejs
|
||||
nodePackages.pnpm
|
||||
go
|
||||
python311
|
||||
gcc
|
||||
jdk17
|
||||
|
||||
# Utils
|
||||
ranger
|
||||
nitch
|
||||
wget
|
||||
pciutils
|
||||
portal
|
||||
fast-cli
|
||||
exa
|
||||
bat
|
||||
zoxide
|
||||
ripgrep
|
||||
lazygit
|
||||
gdu
|
||||
bottom
|
||||
btop
|
||||
nvtop
|
||||
zip
|
||||
unzip
|
||||
|
||||
# xorg
|
||||
xorg.xsetroot
|
||||
xorg.xwininfo
|
||||
xorg.xrandr
|
||||
xorg.xhost
|
||||
xorg.xev
|
||||
|
||||
];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
54
hosts/default.nix
Normal file
54
hosts/default.nix
Normal file
@ -0,0 +1,54 @@
|
||||
{ args, username, nixpkgs, nixpkgs-unstable, home-manager, astronvim, ... }:
|
||||
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
config.joypixels.acceptLicense = true;
|
||||
};
|
||||
|
||||
pkgs-unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
config.joypixels.acceptLicense = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
sirius = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit args username pkgs pkgs-unstable;
|
||||
hostname = "sirius";
|
||||
};
|
||||
modules = [
|
||||
|
||||
# Common config
|
||||
./configuration.nix
|
||||
|
||||
# Device specific config
|
||||
./sirius/configuration.nix
|
||||
|
||||
# Home Manager
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit username pkgs pkgs-unstable astronvim;
|
||||
};
|
||||
home-manager.users.${username} = {
|
||||
imports = [
|
||||
|
||||
# Common config
|
||||
./home.nix
|
||||
|
||||
# Device specific config
|
||||
./sirius/home.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
18
hosts/home.nix
Normal file
18
hosts/home.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ pkgs, username, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../modules/alacritty/home.nix
|
||||
../modules/nvim/home.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "${username}";
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = "23.05";
|
||||
|
||||
packages = with pkgs; [ ];
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
212
hosts/sirius/configuration.nix
Executable file
212
hosts/sirius/configuration.nix
Executable file
@ -0,0 +1,212 @@
|
||||
{ pkgs, pkgs-unstable, username, hostname, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
|
||||
../../modules/bspwm/configuration.nix
|
||||
../../modules/hyprland/configuration.nix
|
||||
|
||||
../../modules/virtualisation/waydroid.nix
|
||||
../../modules/virtualisation/qemu.nix
|
||||
|
||||
../../modules/hardware/nvidia.nix
|
||||
../../modules/hardware/bluetooth.nix
|
||||
];
|
||||
|
||||
time.timeZone = "Asia/Kolkata";
|
||||
i18n.defaultLocale = "en_IN";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_IN";
|
||||
LC_IDENTIFICATION = "en_IN";
|
||||
LC_MEASUREMENT = "en_IN";
|
||||
LC_MONETARY = "en_IN";
|
||||
LC_NAME = "en_IN";
|
||||
LC_NUMERIC = "en_IN";
|
||||
LC_PAPER = "en_IN";
|
||||
LC_TELEPHONE = "en_IN";
|
||||
LC_TIME = "en_IN";
|
||||
};
|
||||
|
||||
xdg.portal.enable = true;
|
||||
sound.enable = true;
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_zen;
|
||||
supportedFilesystems = [ "ntfs" ];
|
||||
initrd.systemd.enable = true;
|
||||
initrd.network.enable = true;
|
||||
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 5;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 1;
|
||||
};
|
||||
plymouth = {
|
||||
enable = true;
|
||||
theme = "breeze";
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "${hostname}";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
security = {
|
||||
polkit.enable = true;
|
||||
sudo.wheelNeedsPassword = false;
|
||||
rtkit.enable = true;
|
||||
};
|
||||
|
||||
hardware = {
|
||||
nvidia.prime.nvidiaBusId = "PCI:1:0:0";
|
||||
nvidia.prime.amdgpuBusId = "PCI:7:0:0";
|
||||
pulseaudio.enable = true;
|
||||
pulseaudio.support32Bit = true;
|
||||
};
|
||||
|
||||
systemd = {
|
||||
enableEmergencyMode = false;
|
||||
|
||||
user = {
|
||||
services.polkit-gnome-authentication-agent-1 = {
|
||||
description = "polkit-gnome-authentication-agent-1";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
wants = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
};
|
||||
};
|
||||
|
||||
# services.barrier = {
|
||||
# description = "Barrier KVM Client";
|
||||
# wantedBy = [ "graphical.target" ];
|
||||
# wants = [ "network-online.target" ];
|
||||
# after = [ "network-online.target" ];
|
||||
# serviceConfig = {
|
||||
# Type = "simple";
|
||||
# ExecStart = "${pkgs.barrier}/bin/barrierc -f --debug INFO --display :0 --name esoteric --disable-crypto 192.168.1.2:24800";
|
||||
# Restart = "always";
|
||||
# RestartSec = 3;
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
logind = {
|
||||
extraConfig = "HandlePowerKey=suspend";
|
||||
lidSwitch = "suspend";
|
||||
lidSwitchExternalPower = "suspend";
|
||||
};
|
||||
|
||||
syncthing = {
|
||||
enable = true;
|
||||
user = "tux";
|
||||
dataDir = "/home/tux/";
|
||||
};
|
||||
|
||||
mopidy = {
|
||||
enable = true;
|
||||
extensionPackages = [ pkgs.mopidy-mpd pkgs.mopidy-spotify pkgs.mopidy-mopify ];
|
||||
};
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "in";
|
||||
xkbVariant = "eng";
|
||||
libinput.touchpad.naturalScrolling = true;
|
||||
};
|
||||
|
||||
supergfxd.enable = true;
|
||||
|
||||
asusd = {
|
||||
enable = true;
|
||||
enableUserService = true;
|
||||
asusdConfig = "bat_charge_limit: 80";
|
||||
};
|
||||
|
||||
gvfs.enable = true;
|
||||
tumbler.enable = true;
|
||||
flatpak.enable = true;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
tailscale.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ];
|
||||
};
|
||||
steam = {
|
||||
enable = true;
|
||||
};
|
||||
nix-ld.enable = true;
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
pulseaudio = true;
|
||||
permittedInsecurePackages = [
|
||||
"python-2.7.18.6"
|
||||
];
|
||||
};
|
||||
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
vscode = prev.vscode.overrideAttrs (oldAttrs: rec {
|
||||
src = (builtins.fetchTarball {
|
||||
url = "https://code.visualstudio.com/sha/download?build=stable&os=linux-x64";
|
||||
sha256 = "09hy3nw1bblrl0blzpwv492gy0hwwbaq4csx00mcymskginz1wyx";
|
||||
});
|
||||
version = "latest";
|
||||
buildInputs = oldAttrs.buildInputs ++ [ pkgs.krb5 ];
|
||||
});
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
barrier
|
||||
lxappearance
|
||||
service-wrapper
|
||||
polkit_gnome
|
||||
|
||||
libreoffice-qt
|
||||
wezterm
|
||||
firefox
|
||||
brave
|
||||
discord
|
||||
starship
|
||||
telegram-desktop
|
||||
parsec-bin
|
||||
steam
|
||||
spotify
|
||||
geany
|
||||
galaxy-buds-client
|
||||
anydesk
|
||||
beekeeper-studio
|
||||
vlc
|
||||
retroarch
|
||||
qbittorrent
|
||||
blender
|
||||
neovide
|
||||
vscode
|
||||
|
||||
colorpicker
|
||||
scrcpy
|
||||
nixpkgs-fmt
|
||||
|
||||
];
|
||||
}
|
38
hosts/sirius/hardware-configuration.nix
Normal file
38
hosts/sirius/hardware-configuration.nix
Normal file
@ -0,0 +1,38 @@
|
||||
# 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 = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/c1d20368-e03e-4965-bdb4-5cc928518c1f";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/6FC0-6829";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
7
hosts/sirius/home.nix
Normal file
7
hosts/sirius/home.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ config, pkgs, pkgs-unstable, username, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules/hyprland/home.nix
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user