I don't know what the heck im doing, but I reshuffled some stuff in my systems dir
This commit is contained in:
parent
5f178ffdb2
commit
b61e532095
12 changed files with 149 additions and 197 deletions
26
system/common/global/default.nix
Normal file
26
system/common/global/default.nix
Normal 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;
|
||||
|
||||
|
||||
}
|
||||
10
system/common/global/fish.nix
Normal file
10
system/common/global/fish.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
vendor = {
|
||||
completions.enable = true;
|
||||
config.enable = true;
|
||||
functions.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
10
system/common/global/locale.nix
Normal file
10
system/common/global/locale.nix
Normal 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";
|
||||
}
|
||||
26
system/common/global/nix.nix
Normal file
26
system/common/global/nix.nix
Normal 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}" ];
|
||||
};
|
||||
}
|
||||
11
system/common/global/pipewire.nix
Normal file
11
system/common/global/pipewire.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
|
|
@ -12,9 +12,6 @@
|
|||
};
|
||||
|
||||
security = {
|
||||
rtkit = {
|
||||
enable = true;
|
||||
};
|
||||
polkit = {
|
||||
enable = true;
|
||||
};
|
||||
8
system/common/global/systemdboot.nix
Normal file
8
system/common/global/systemdboot.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
}
|
||||
24
system/common/user/ooks/default.nix
Normal file
24
system/common/user/ooks/default.nix
Normal 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}
|
||||
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -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,75 +99,22 @@
|
|||
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# User
|
||||
# Laptop Programs
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
users.users = {
|
||||
ooks = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
shell = pkgs.fish;
|
||||
|
||||
# User Packages
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
tree
|
||||
hyprland
|
||||
kitty
|
||||
];
|
||||
};
|
||||
powerManagement.powertop.enable = true;
|
||||
programs = {
|
||||
light.enable = true;
|
||||
dconf.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
};
|
||||
|
||||
# System Environment
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# XDG Portal
|
||||
# ------------------------------------------------------------------------------------------------
|
||||
|
||||
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
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue