da first commit

This commit is contained in:
Emile Clark-Boman 2024-10-30 13:51:36 +10:00
commit 68f969ec59
14 changed files with 875 additions and 0 deletions

View file

@ -0,0 +1,112 @@
{
pkgs,
inputs,
...
}: {
imports = [
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
# TODO: use GRUB2 instead
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
#boot.loader = {
# efi = {
# canTouchEfiVariables = true;
# efiSysMountPoint = "/boot/efi";
# };
# grub = {
# efiSupport = true;
# #efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work on this system
# device = "nodev";
# };
#};
networking.hostName = "myputer";
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone.
time.timeZone = "Australia/Brisbane";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
#useXkbConfig = true; # use xkb.options in tty.
};
# Enable sound.
#services.pipewire = {
# enable = true;
# pulse.enable = true;
#};
# Enable touchpad support (enabled default in most desktopManager).
# services.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.emile = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
#firefox
tree
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim
wget
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "24.05"; # Did you read the comment?
}

View file

@ -0,0 +1 @@
# TODO: (i haven't put NixOS on lolcathost yet)

147
hosts/myputer/default.nix Normal file
View file

@ -0,0 +1,147 @@
{
pkgs,
inputs,
...
}: {
imports = [
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
# TODO: use GRUB2 instead
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
#boot.loader = {
# efi = {
# canTouchEfiVariables = true;
# efiSysMountPoint = "/boot/efi";
# };
# grub = {
# efiSupport = true;
# #efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work on this system
# device = "nodev";
# };
#};
# Set your time zone.
time.timeZone = "Australia/Brisbane";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
#useXkbConfig = true; # use xkb.options in tty.
};
# ----- NETWORKING SECTION -----
networking.hostName = "myputer";
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = true;
# ----- SERVICES -----
services = {
# Set display manager (login screen)
displayManager = {
sddm = {
enable = true;
theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
# enable experimental sddm support for wayland
wayland.enable = true;
};
defaultSession = "hyprland";
};
# Enable sound
# TODO: use the modules/core/pipewire.nix module instead :)
pipewire = {
enable = true;
pulse.enable = true;
};
};
users.users = {
# just me fr (personal account)
me = {
isNormalUser = true;
extraGroups = [ "wheel" ];
shell = pkgs.fish;
packages = with pkgs; [
firefox
nitch
tldr
tree
];
};
# programming/development account
dev = {
isNormalUser = true;
extraGroups = [ "wheel" ];
shell = pkgs.zsh;
packages = with pkgs; [
tree
];
};
# user for my professional jobs and stuff
pro = {
isNormalUser = true;
extraGroups = [ "wheel" ];
shell = pkgs.fish;
packages = with pkgs; [
tree
];
};
};
# new users will use zsh by default
users.defaultUserShell = pkgs.bash;
# ---- SYSTEM PACKAGES -----
environment.systemPackages = with pkgs; [
vim
wget
kitty
git
];
# Enable the use of certain programs
programs = {
hyprland.enable = true;
fish.enable = true;
zsh.enable = true;
};
# Enable the new CLI commands and the flakes as experimental features
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# DO NOT MODIFY
system.stateVersion = "24.05"; # Did you read the comment?
}

View file

@ -0,0 +1,41 @@
# 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" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ff19e1b0-cacc-4270-a94b-7922f7224ae2";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/7046-177A";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/7f7e9d69-78e0-49f1-b792-6be26ed8e040"; }
];
# 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.enp34s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp38s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,35 @@
{ pkgs }:
let
#image = pkgs.fetchurl {
# url = "https://";
# sha256 = "";
#};
in
pkgs.stdenv.mkDerivation {
name = "sddm-theme";
src = pkgs.fetchFromGitHub {
owner = "MarianArlt";
repo = "sddm-sugar-dark";
rev = "ceb2c455663429be03ba62d9f898c571650ef7fe";
sha256 = "0153z1kylbhc9d12nxy9vpn0spxgrhgy36wy37pk6ysq7akaqlvy";
};
# dependencies
buildInputs = with pkgs.libsForQt5; [
qt5.qtbase
qt5.qtx11extras
qt5.qtquickcontrols2
qt5.qtgraphicaleffects
qt5.wrapQtAppsHook
#libsForQt5.qt5.qtquickcontrols2
#libsForQt5.qt5.qtgraphicaleffects
];
installPhase = ''
# move necessary files
mkdir -p $out
cp -R ./* $out/
'';
# set background
#rm $out/Background.jpg
#mv ${image} $out/Background.jpg
}