mirror of
https://github.com/MichaelFisher1997/nixos.git
synced 2025-04-27 15:23:10 +00:00
first commit
This commit is contained in:
commit
3379f712ac
179
configuration.nix
Normal file
179
configuration.nix
Normal file
@ -0,0 +1,179 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./packages.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/nvme0n1";
|
||||
boot.loader.grub.useOSProber = true;
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
networking.hostName = "hypr-nix"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_GB.UTF-8";
|
||||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
||||
LC_MEASUREMENT = "en_GB.UTF-8";
|
||||
LC_MONETARY = "en_GB.UTF-8";
|
||||
LC_NAME = "en_GB.UTF-8";
|
||||
LC_NUMERIC = "en_GB.UTF-8";
|
||||
LC_PAPER = "en_GB.UTF-8";
|
||||
LC_TELEPHONE = "en_GB.UTF-8";
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "gb";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "uk";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
sound.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
services.blueman.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.micqdf = {
|
||||
isNormalUser = true;
|
||||
description = "micqdf";
|
||||
extraGroups = [ "networkmanager" "wheel" "docker"];
|
||||
packages = with pkgs; [
|
||||
# thunderbird
|
||||
];
|
||||
};
|
||||
|
||||
# Install programs config
|
||||
programs.java.enable = true;
|
||||
programs.firefox.enable = true;
|
||||
programs.sway.enable = true;
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
|
||||
programs.fish.enable = true;
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
|
||||
|
||||
#hardware.opengl.driSupport = true; # This is already enabled by default
|
||||
hardware.bluetooth.enable = true; # enables support for Bluetooth
|
||||
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
|
||||
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
programs.steam.enable = true;
|
||||
programs.steam.gamescopeSession.enable = true;
|
||||
|
||||
programs.gamemode.enable = true;
|
||||
|
||||
|
||||
fileSystems."/mnt/BigNAS" = {
|
||||
device = "10.27.27.239:/BigNAS";
|
||||
fsType = "nfs";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/NV1" = {
|
||||
device = "/dev/nvme1n1p2";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
# List services that you want to enable:
|
||||
environment.sessionVariables = {
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/user/.steam/root/compatibilitytools.d";
|
||||
hyprshot = "/home/micqdf/flakes/hyprshot/Hyprshot";
|
||||
};
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.tumbler.enable = true;
|
||||
services.tailscale.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
system.autoUpgrade.enable = true;
|
||||
system.autoUpgrade.allowReboot = true;
|
||||
|
||||
}
|
33
hardware-configuration.nix
Normal file
33
hardware-configuration.nix
Normal file
@ -0,0 +1,33 @@
|
||||
# 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 = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/2ccf7538-1328-4793-a455-d62e09c1f057";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
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.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
31
hyprshot.nix
Normal file
31
hyprshot.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "hyprshot";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "Gustash";
|
||||
repo = "hyprshot";
|
||||
rev = "main"; # Specify the commit hash or branch name
|
||||
sha256 = "nix-prefetch-git https://github.com/Gustash/hyprshot
|
||||
"; # Fill with the actual sha256 hash
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
# Add build instructions if required, e.g., make
|
||||
echo "Building hyprshot"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
ln -s $src/hyprshot $out/bin/hyprshot
|
||||
chmod +x $src/hyprshot
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A brief description of hyprshot";
|
||||
homepage = "https://github.com/Gustash/hyprshot.git";
|
||||
license = pkgs.lib.licenses.mit;
|
||||
};
|
||||
}
|
||||
|
101
packages.nix
Normal file
101
packages.nix
Normal file
@ -0,0 +1,101 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Applications you want to install with Nix.
|
||||
# You can remove these applications if you don't use them.
|
||||
vim
|
||||
neovim
|
||||
fish
|
||||
zsh
|
||||
curl
|
||||
wget
|
||||
neofetch
|
||||
kitty
|
||||
brave
|
||||
webcord
|
||||
vscode
|
||||
tor-browser
|
||||
monero-gui
|
||||
htop
|
||||
btop
|
||||
ranger
|
||||
tmux
|
||||
lsd
|
||||
nfs-utils
|
||||
waybar
|
||||
wttrbar
|
||||
rofi-wayland
|
||||
hackgen-nf-font
|
||||
tldr
|
||||
blueman
|
||||
wl-clipboard
|
||||
waypaper
|
||||
btrfs-progs
|
||||
golangci-lint
|
||||
golangci-lint-langserver
|
||||
playerctl
|
||||
swaybg
|
||||
swww
|
||||
google-chrome
|
||||
gvfs
|
||||
git
|
||||
go
|
||||
zig
|
||||
slack
|
||||
nwg-look
|
||||
dunst
|
||||
udiskie
|
||||
networkmanagerapplet
|
||||
spotify
|
||||
xorg.xkill
|
||||
ldmtool
|
||||
kitty
|
||||
flatpak
|
||||
libcanberra-gtk3
|
||||
docker
|
||||
docker-compose
|
||||
pamixer
|
||||
xfce.thunar-volman
|
||||
xfce.thunar-dropbox-plugin
|
||||
xfce.thunar-archive-plugin
|
||||
xfce.tumbler
|
||||
hyprland-protocols
|
||||
onlyoffice-bin
|
||||
svt-av1
|
||||
rav1e
|
||||
libaom
|
||||
slurp
|
||||
pavucontrol
|
||||
nix-prefetch-git
|
||||
ddev
|
||||
libsForQt5.kate
|
||||
sublime
|
||||
tailscale
|
||||
libcap
|
||||
gcc
|
||||
go
|
||||
telegram-desktop
|
||||
falkon
|
||||
firefox
|
||||
php
|
||||
rcon
|
||||
rconc
|
||||
php83Packages.composer
|
||||
zip
|
||||
unzip
|
||||
gzip
|
||||
mangohud
|
||||
protonup
|
||||
lutris
|
||||
wlr-randr
|
||||
bottles
|
||||
];
|
||||
|
||||
programs.thunar.enable = true;
|
||||
programs.thunar.plugins = with pkgs.xfce; [
|
||||
thunar-archive-plugin
|
||||
thunar-volman
|
||||
];
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user