mirror of
https://github.com/tuxdotrs/tawm.git
synced 2025-07-06 13:06:35 +05:30
initial commit
This commit is contained in:
180
hosts/canopus/default.nix
Executable file
180
hosts/canopus/default.nix
Executable file
@ -0,0 +1,180 @@
|
||||
{ inputs, outputs, lib, config, pkgs, username, ... }: {
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.asus-zephyrus-ga503
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
outputs.overlays.nur
|
||||
];
|
||||
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
joypixels.acceptLicense = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "Asia/Kolkata";
|
||||
i18n = {
|
||||
defaultLocale = "en_IN";
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "canopus";
|
||||
networkmanager.enable = true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 80 443 3000 6666 ];
|
||||
};
|
||||
};
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_zen;
|
||||
supportedFilesystems = [ "ntfs" ];
|
||||
initrd.systemd.enable = true;
|
||||
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
# configurationLimit = 5;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 1;
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
bluetooth.powerOnBoot = true;
|
||||
opengl.driSupport32Bit = true;
|
||||
};
|
||||
|
||||
security = {
|
||||
sudo.wheelNeedsPassword = false;
|
||||
polkit.enable = true;
|
||||
rtkit.enable = 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
ssh.startAgent = true;
|
||||
zsh.enable = true;
|
||||
thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ];
|
||||
};
|
||||
nix-ld.enable = true;
|
||||
nm-applet.enable = true;
|
||||
};
|
||||
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users.${username} = {
|
||||
initialPassword = "${username}";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "networkmanager" "wheel" "storage" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D 0xtux@pm.me''
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
logind = {
|
||||
extraConfig = "HandlePowerKey=suspend";
|
||||
lidSwitch = "suspend";
|
||||
lidSwitchExternalPower = "suspend";
|
||||
};
|
||||
|
||||
syncthing = {
|
||||
enable = true;
|
||||
user = "tux";
|
||||
dataDir = "/home/tux/";
|
||||
};
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "in";
|
||||
xkbVariant = "eng";
|
||||
libinput.touchpad.naturalScrolling = true;
|
||||
};
|
||||
|
||||
blueman.enable = true;
|
||||
|
||||
supergfxd.enable = true;
|
||||
|
||||
asusd = {
|
||||
enable = true;
|
||||
enableUserService = true;
|
||||
asusdConfig = "bat_charge_limit: 80";
|
||||
};
|
||||
|
||||
gvfs.enable = true;
|
||||
tumbler.enable = true;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
tailscale.enable = true;
|
||||
mullvad-vpn = {
|
||||
enable = true;
|
||||
package = pkgs.mullvad-vpn;
|
||||
};
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" "JetBrainsMono" ]; }) ];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
36
hosts/canopus/hardware-configuration.nix
Executable file
36
hosts/canopus/hardware-configuration.nix
Executable file
@ -0,0 +1,36 @@
|
||||
# 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/e79e5cdf-4197-4f44-96c7-3ab9ba9878bb";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/ADC4-BC71";
|
||||
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;
|
||||
}
|
Reference in New Issue
Block a user