really big refactor

This commit is contained in:
sadan 2024-10-02 16:36:52 -04:00
parent 1d4904a4c9
commit 375a1b2e89
No known key found for this signature in database
20 changed files with 188 additions and 151 deletions

View file

@ -3,48 +3,15 @@
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, inputs, ... }:
let
_v = import ../../common/programs/virt.nix { };
wireshark = import ../../common/programs/wireshark.nix { };
in
{
imports =
[
# Include the results of the hardware scan.
./hardware-configuration.nix
../../common/modules/audio.nix
../../common/modules/kde.nix
../../common/systemModules/audio.nix
../../common/systemModules/kde.nix
../../common/users/meyer
inputs.sops-nix.nixosModules.sops
];
sops.defaultSopsFile = ../../secrets.yaml;
sops.defaultSopsFormat = "yaml";
sops.age.keyFile = "/home/meyer/.config/sops/age/keys.txt";
sops.secrets.password.neededForUsers = true;
users.users.meyer = {
isNormalUser = true;
hashedPasswordFile = config.sops.secrets.password.path;
extraGroups = [
"wireshark"
"kvm"
"libvirtd"
"wheel" # Enable sudo for the user.
"audio"
"sound"
"video"
"input"
"tty"
"plugdev"
];
shell = pkgs.zsh;
};
home-manager = {
extraSpecialArgs = { inherit inputs; };
users = {
"meyer" = import ./home.nix;
};
};
# Use the systemd-boot EFI boot loader.
boot.loader.grub.device = "nodev";
boot.kernelPackages = pkgs.linuxPackages_latest;
@ -81,28 +48,14 @@ in
avahi.enable = true;
usbmuxd.enable = true;
};
services.xserver.videoDrivers = ["amdgpu"];
services.xserver.videoDrivers = [ "amdgpu" ];
services.printing.enable = true;
services.printing.drivers = with pkgs; [
hplip
];
virtualisation = _v;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
programs = {
inherit wireshark;
};
programs.zsh.enable = true;
programs.steam.enable = true;
programs.steam.extraCompatPackages = with pkgs; [
@ -112,18 +65,12 @@ in
# networking.nameservers = ["10.0.0.97" "1.1.1.1"];
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
clinfo
fuse
ifuse
ddcutil
i2c-tools
# python311
# python311Packages.evdev
# python311Packages.xlib
gcc
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
curl

View file

@ -1,91 +0,0 @@
{ config, lib, pkgs, inputs, ... }:
let
flameshot = import ../../common/programs/flameshot.nix { inherit config; };
arrpc = import ../../common/programs/arrpc.nix { };
zsh = import ../../common/programs/zsh.nix { inherit lib pkgs; };
_s1 = import ../../common/sops.nix { inherit config; };
files = import ../../common/files.nix { inherit config; };
shell = import ../../common/shell.nix { inherit config pkgs; };
p = import ../../common/pkgs.nix { inherit pkgs config; };
_p1 = p.dev ++ p.gui ++ p.general ++ p.scripts ++ p.gaming;
DES = import ../../common/desktopEntries.nix { };
in
{
nixpkgs.config.allowInsecurePredicate = (pkg: true);
imports = [
inputs.sops-nix.homeManagerModules.sops
];
sops = _s1;
programs = {
inherit zsh;
};
programs.java.enable = true;
programs.java.package = pkgs.temurin-bin-17;
programs.zoxide.enable = true;
programs.zoxide.enableZshIntegration = true;
programs.git.enable = true;
programs.git.userName = "sadan";
programs.git.userEmail = "117494111+sadan4@users.noreply.github.com";
programs.git.extraConfig = {
gpg.format = "ssh";
user = {
signingkey = "~/.ssh/id_ed25519";
};
commit.gpgsign = true;
core.autocrlf = "input";
pull.rebase = true;
push.autoSetupRemote = true;
init.defaultBranch = "main";
rerere.enabled = true;
};
nixpkgs.config.allowUnfreePredicate = (pkg: true);
# Home Manager needs a bit of information about you and the paths it should
# nixpkg.config.allowUnfree = true;
# manage.
home.username = "meyer";
home.homeDirectory = "/home/meyer";
services = {
inherit arrpc flameshot;
};
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = _p1;
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = files;
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. If you don't want to manage your shell through Home
# Manager then you have to manually source 'hm-session-vars.sh' located at
# either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/meyer/etc/profile.d/hm-session-vars.sh
#
home.shellAliases = shell.dev.aliases;
home.sessionPath = shell.dev.path;
home.sessionVariables = shell.dev.env;
xdg.desktopEntries = DES;
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}