I don't know what the heck im doing, but I reshuffled some stuff in my systems dir

This commit is contained in:
ooks-io 2023-07-28 11:25:05 +12:00
parent 5f178ffdb2
commit b61e532095
12 changed files with 149 additions and 197 deletions

View file

@ -0,0 +1,26 @@
{ inputs, outputs, ... }: {
imports = [
inputs.home-manager.nixosModules.home-manager
./nix.nix
./fish.nix
./locale.nix
./security.nix
./systemdboot.nix
./pipewire.nix
] ++ (builtins.attrValues outputs.nixosModules);
home-manager.extraSpecialArgs = { inherit inputs outputs; };
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [
"openssl-1.1.1u"
];
};
};
hardware.enableRedistibutableFirmware = true;
}

View file

@ -0,0 +1,10 @@
{
programs.fish = {
enable = true;
vendor = {
completions.enable = true;
config.enable = true;
functions.enable = true;
};
};
}

View file

@ -0,0 +1,10 @@
{ lib, ... }: {
i18n = {
defaultLocale = lib.mkDefault "en_US.UTF-8";
};
supportedLocales = lib.mkDefault [
"en_US.UTF-8/UTF-8"
];
};
time.timeZone = lib.mkDefault "Pacific/Auckland";
}

View file

@ -0,0 +1,26 @@
{ inputs, lib, ... }:
{
nix = {
settings = {
trusted-users = [ "root" "@wheel" ];
auto-optimise-store = lib.mkDefault true;
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
warn-dirty = false;
system-features = [ "kvm" "big-parallel" "nixos-test" ];
flake-registry = "";
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 2d";
};
# Add each flake input as a registry
# To make nix3 commands consistent with the flake
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
# Add nixpkgs input to NIX_PATH
# This lets nix2 commands still use <nixpkgs>
nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ];
};
}

View file

@ -0,0 +1,11 @@
{
security.rtkit.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
}

View file

@ -12,9 +12,6 @@
};
security = {
rtkit = {
enable = true;
};
polkit = {
enable = true;
};

View file

@ -0,0 +1,8 @@
{
boot.loader = {
systemd-boot = {
enable = true;
};
efi.canTouchEfiVariables = true;
};
}

View file

@ -0,0 +1,24 @@
{ pkgs, config, ... }:
let ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in
{
users.users.ooks = {
isNormalUser = true
shell = pkgs.fish;
extraGroups = [
"wheel"
"video"
"audio"
] ++ ifTheyExist [
"git"
"network"
"libvirtd"
"deluge"
];
packages = [ pkgs.home-manager ];
};
home-manager.users.ooks = import ../../../../home/ooks/${config.networking.hostName}
}

View file

@ -1,6 +1,3 @@
# 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, ... }:
{
@ -44,7 +41,11 @@
fsType = "vfat";
};
swapDevices = [ ];
swapDevices = [
device = "/swap/swapfile";
size = 8196;
];
# 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

View file

@ -1,78 +0,0 @@
{ pkgs, ... }
{
# System Packages
# -------------------------------------------------------------------------------------------------
environment = {
binsh = with pkgs; [ fish ]
systemPackages = with pkgs; [
# Editor
neovim
# Utility
wget
neofetch
glib
xdg-utils
killall
zip
rar
btop
p7zip
git
pciutils
gdb
dash
curl
# Programming
cargo
# Fonts
jetbrains-mono
# File browsers
ranger
joshuto
# Wayland
wayland
wayland-scanner
wayland-utils
egl-wayland
wayland-protocols
wev # Wayland window debugger
wl-clipboard # Wayland clipboard
wlr-randr
# Firmware
linux-firmware
# Audio
alsa-lib
alsa-utils
flac
pulsemixer
# Appearance
lxappearance
# Screenshot
pkgs.sway-contrib.grimshot
flameshot
grim
# Notification
dunst
libnotify
];
};
# Programs
# -------------------------------------------------------------------------------------------------
programs.mtr.enable = true
programs.gnupg.agent = {
enable = true;
enabeSSHSupport = true;
};
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
programs.fish = {
enable = true
};

View file

@ -8,9 +8,15 @@
# -------------------------------------------------------------------------------------------------
{
imports =
[ # Include the results of the hardware scan
imports = [
inputs.hardware.nixosModules.common-pc-ssd
./hardware-configuration.nix
../common/user/ooks
../common/global/
];
# Bootloader
@ -47,25 +53,15 @@
nixpkgs.system = "x86_64-linux";
# Networking
# Hostname and networking
# -------------------------------------------------------------------------------------------------
networking = {
hostName = "ooksthink"; # Define your hostname.
networkmanager.enable = true; # Easiest to use and most distros use this by default.
hostName = "ooksthink";
networkmanager.enable = true;
};
# Time Zone
# -------------------------------------------------------------------------------------------------
time.timeZone = "Pacific/Auckland";
# Localization
# -------------------------------------------------------------------------------------------------
i18n.defaultLocale = "en_US.UTF-8";
# X Server
# -------------------------------------------------------------------------------------------------
@ -90,7 +86,7 @@
# Printing
# -------------------------------------------------------------------------------------------------
# services.printing.enable = true;
services.printing.enable = true;
# Sound
# -------------------------------------------------------------------------------------------------
@ -103,76 +99,23 @@
# services.xserver.libinput.enable = true;
# User
# Laptop Programs
# -------------------------------------------------------------------------------------------------
users.users = {
ooks = {
isNormalUser = true;
extraGroups = [ "wheel" ];
shell = pkgs.fish;
powerManagement.powertop.enable = true;
programs = {
light.enable = true;
dconf.enable = true;
kdeconnect.enable = true;
};
# User Packages
# -------------------------------------------------------------------------------------------------
# XDG Portal
# ------------------------------------------------------------------------------------------------
packages = with pkgs; [
firefox
tree
hyprland
kitty
];
};
};
# System Environment
# -------------------------------------------------------------------------------------------------
environment = {
binsh = "${pkgs.dash}/bin/dash";
shells = with pkgs; [ fish ];
systemPackages = with pkgs; [
# Editor
# ------
neovim
# Utility
# ------
wget
dash
neofetch
glib
xdg-utils
pciutils
gdb
killall
jetbrains-mono
cargo
p7zip
joshuto
zip
rar
btop
git
libnotify
dunst
wl-clipboard
wlr-randr
wayland
wayland-scanner
wayland-utils
egl-wayland
wayland-protocols
wev
alsa-lib
alsa-utils
flac
pulsemixer
linux-firmware
lxappearance
pkgs.sway-contrib.grimshot
flameshot
grim
];
};
xdg.portal = {
enable = true;
wlr.enable = true;
};
# Fonts
# -------------------------------------------------------------------------------------------------
@ -189,30 +132,16 @@ fonts.fonts = with pkgs; [
enable = true;
enableSSHSupport = true;
};
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
programs.fish = {
enable = true;
};
# Services
# -------------------------------------------------------------------------------------------------
security.rtkit.enable = true;
services = {
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
};
dbus.packages = [ pkgs.gcr ];
getty.autologinUser = "ooks";
dbus = {
enable = true;
packages = [ pkgs.gcr ];
};
auto-cpufreq = {
enable = true;
settings = {
@ -245,18 +174,6 @@ fonts.fonts = with pkgs; [
};
};
# Security
# -------------------------------------------------------------------------------------------------
security.polkit.enable = true;
security.sudo = {
enable = true;
extraConfig = ''
ooks ALL=(ALL) NOPASSWD:ALL
'';
};
# D-Bus
# -------------------------------------------------------------------------------------------------