This commit is contained in:
cnst
2024-08-01 19:11:01 +02:00
parent ec2d61b288
commit a58147df97
17 changed files with 168 additions and 310 deletions

View File

@@ -1,10 +1,7 @@
{
inputs,
outputs,
lib,
config,
pkgs,
system,
...
}: let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
@@ -33,54 +30,20 @@ in {
];
};
programs.dconf.enable = true;
imports = [
inputs.home-manager.nixosModules.home-manager
./imports.nix
./system.nix
./hardware-configuration.nix
];
home-manager.users.toothpick = import ../../../home/users/toothpick/home.nix;
nix = let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in {
settings = {
auto-optimise-store = lib.mkDefault true;
warn-dirty = false;
# Enable flakes and new 'nix' command
experimental-features = [
"nix-command"
"flakes"
];
# Opinionated: disable global registry
flake-registry = "";
# Workaround for https://github.com/NixOS/nix/issues/9574
nix-path = config.nix.nixPath;
};
# Opinionated: disable channels
channel.enable = false;
# Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
};
# Bootloader
boot.loader = {
systemd-boot.enable = lib.mkForce false;
efi.canTouchEfiVariables = true;
};
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
environment.sessionVariables = {
FLAKE = "/home/toothpick/.nix-config";
boot = {
blacklistedKernelModules = ["ucsi_ccg"];
consoleLogLevel = 3;
kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos;
kernelParams = [
"quiet"
"splash"
];
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "24.05";
system.stateVersion = lib.mkDefault "23.11";
}

View File

@@ -20,15 +20,9 @@
"usb_storage"
"sd_mod"
];
kernelModules = [];
kernelModules = ["nvidia"];
};
kernelModules = ["kvm-intel"];
kernelPackages = pkgs.linuxPackages_zen;
consoleLogLevel = 3;
kernelParams = [
"quiet"
"splash"
];
extraModulePackages = [];
};

View File

@@ -1,120 +0,0 @@
{pkgs, ...}: {
imports = [
# core
../../core/fonts.nix
../../core/hyprland.nix
../../core/zsh.nix
../../core/network/toothpc.nix
# hardware
../../hardware/toothpc.nix
# locale
../../locale
# services
#../../services/blueman
../../services/dbus
../../services/gnome-keyring
../../services/greetd
../../services/gvfs
../../services/mullvad
../../services/openssh
../../services/audio
../../services/udisks
../../services/xserver/toothpc.nix
../../services/locate
../../services/samba
# extra
../../extra/gaming.nix
../../extra/android
#../../extra/workstation
#../../extra/nix-ld
];
environment = {
systemPackages = with pkgs; [
# Core
fd
git
niv
nix-output-monitor
nvd
sbctl
python312Packages.nvidia-ml-py
# Util
samba4Full
anyrun
curl
fzf
gnome-disk-utility
lazygit
ntfs3g
p7zip
ripgrep
stow
tmux
tmuxifier
tree-sitter
udiskie
unrar
unzip
wget
xdg-user-dirs
xdg-utils
# Dev
binutils
clang
clang-tools
cargo-edit
cargo-insta
cargo-nextest
gcc
gnumake
cmake
python3
python312Packages.httplib2
python312Packages.oauth2
gtk3
gtk4
# misc.language_servers
typescript-language-server
typescript
nixd
nil
statix
hyprlang
alejandra
nixpkgs-fmt
pyright
isort
rustfmt
rust-analyzer
clippy
lua-language-server
stylua
nodePackages_latest.nodejs
nodePackages.prettier
prettierd
black
vimPlugins.nvim-treesitter-parsers.typescript
# ags_dependencies
bash
coreutils
dart-sass
gawk
imagemagick
procps
util-linux
gnome.gnome-control-center
mission-center
overskride
wlogout
];
};
}

View File

@@ -1,41 +0,0 @@
{
inputs,
outputs,
...
}: {
programs = {
nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/toothpick/.nix-config";
};
};
security = {
rtkit.enable = true;
pam.services.hyprlock = {};
};
environment.localBinInPath = true;
console.useXkbConfig = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs outputs;
};
};
nixpkgs = {
overlays = [
(_: prev: {
python312 = prev.python312.override {packageOverrides = _: pysuper: {nose = pysuper.pynose;};};
})
];
config = {
allowUnfree = true;
input-fonts.acceptLicense = true;
};
};
}