Modularize nixos and home-manager packages
This commit is contained in:
parent
b0979afa53
commit
51d2c2aa7c
32 changed files with 713 additions and 482 deletions
|
|
@ -1,82 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
# is wrapped in if statement to enable when needed
|
||||
../programs/gaming/default.nix
|
||||
../programs/themes/stylix.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
openssl
|
||||
dbus
|
||||
glib
|
||||
gtk4
|
||||
gtk3
|
||||
libadwaita
|
||||
gtk-layer-shell
|
||||
gtk4-layer-shell
|
||||
direnv
|
||||
dconf
|
||||
gsettings-desktop-schemas
|
||||
gnome.nixos-gsettings-overrides
|
||||
bibata-cursors
|
||||
xorg.xkbutils
|
||||
libxkbcommon
|
||||
icon-library
|
||||
adwaita-icon-theme
|
||||
hicolor-icon-theme
|
||||
morewaita-icon-theme
|
||||
kdePackages.breeze-icons
|
||||
seahorse
|
||||
upower
|
||||
(lib.mkIf config.conf.streamdeck.enable (callPackage
|
||||
../override/streamdeck.nix
|
||||
{ }))
|
||||
];
|
||||
|
||||
gtk.iconCache.enable = false;
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
cantarell-fonts
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
services.upower.enable = true;
|
||||
services.printing.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.dbus.packages = with pkgs; [
|
||||
gnome2.GConf
|
||||
];
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
programs.fish.enable = true;
|
||||
programs.fish.promptInit = ''
|
||||
${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
|
||||
'';
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
jdk
|
||||
zlib
|
||||
];
|
||||
programs.dconf.enable = true;
|
||||
programs.direnv = {
|
||||
package = pkgs.direnv;
|
||||
silent = false;
|
||||
loadInNixShell = true;
|
||||
direnvrcExtra = "";
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
package = pkgs.nix-direnv;
|
||||
};
|
||||
};
|
||||
programs.ssh.startAgent = true;
|
||||
programs.gnupg.agent.enable = true;
|
||||
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
services = {
|
||||
# needed for GNOME services outside of GNOME Desktop
|
||||
dbus.packages = with pkgs; [
|
||||
gcr
|
||||
gnome.gnome-settings-daemon
|
||||
];
|
||||
|
||||
gnome.gnome-keyring.enable = true;
|
||||
gvfs.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -11,7 +11,10 @@ in
|
|||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Enable networking
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
networking.networkmanager.enable = true;
|
||||
networking.hostName = config.conf.hostname;
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
|
|
@ -23,25 +26,14 @@ in
|
|||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
services.printing.browsing = true;
|
||||
services.printing.drivers = [ pkgs.hplip ];
|
||||
services.printing.startWhenNeeded = true; # optional
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
nixpkgs.hostPlatform = lib.mkDefault config.conf.system;
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
hardware.cpu.${config.conf.cpu}.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
services.fstrim.enable = lib.mkDefault true;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
|
@ -65,8 +57,6 @@ in
|
|||
"resume=\"PARTLABEL=SWAP\""
|
||||
] ++ config.conf.boot_params;
|
||||
|
||||
networking.hostName = config.conf.hostname;
|
||||
|
||||
# allows user change later on
|
||||
users.mutableUsers = true;
|
||||
users.users.${username} = {
|
||||
|
|
@ -82,8 +72,6 @@ in
|
|||
password = "firstlogin";
|
||||
};
|
||||
|
||||
system.stateVersion = "unstable";
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-label/ROOT";
|
||||
|
|
@ -115,10 +103,4 @@ in
|
|||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-label/SWAP"; }];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault config.conf.system;
|
||||
hardware.cpu.${config.conf.cpu}.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
services.fstrim.enable = lib.mkDefault true;
|
||||
nix.settings.auto-optimise-store = true;
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./big_g.nix
|
||||
./login_manager.nix
|
||||
./env.nix
|
||||
./xkb_layout.nix
|
||||
./base_packages.nix
|
||||
./common_hardware.nix
|
||||
./theme.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, ...
|
||||
}: {
|
||||
{ pkgs, config, ... }: {
|
||||
environment.variables = {
|
||||
GSETTINGS_SCHEMA_DIR = "${pkgs.glib.getSchemaPath pkgs.gsettings-desktop-schemas}";
|
||||
NEOVIDE_MAXIMIZED = "0";
|
||||
|
|
@ -13,7 +10,7 @@
|
|||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
GOPATH = "$HOME/.go";
|
||||
FLAKE = "home/${config.conf.username}/gits/dotFiles/nix";
|
||||
FLAKE = config.conf.nix_path;
|
||||
# don't ask... marksman somehow requires this
|
||||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT = 1;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{ options, ... }: options.extra.extraHardwareConfig
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
username = config.conf.username;
|
||||
session = {
|
||||
command = "${lib.getExe inputs.hyprland.packages.${config.conf.system}.hyprland} --config /etc/greetd/hyprgreet.conf";
|
||||
user = username;
|
||||
};
|
||||
in
|
||||
{
|
||||
services.xserver.displayManager.session = [
|
||||
{
|
||||
manage = "desktop";
|
||||
name = "Hyprland";
|
||||
start = ''
|
||||
${lib.getExe pkgs.hyprland} & waitPID=$!
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
# greetd display manager
|
||||
programs.hyprland.enable = true;
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
terminal.vt = 1;
|
||||
default_session = session;
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."greetd/environments".text = ''
|
||||
Hyprland
|
||||
'';
|
||||
|
||||
# should technically be the same, but this is configured instead in order to provide a decent out of the box login experience.
|
||||
environment.etc."greetd/hyprgreet.conf".text = ''
|
||||
exec-once=gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||
|
||||
monitor=${config.conf.login_manager.monitor},${config.conf.login_manager.resolution},0x0,${config.conf.login_manager.scale}
|
||||
monitor=_,disable
|
||||
|
||||
input {
|
||||
force_no_accel = true
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_splash_rendering = false
|
||||
disable_hyprland_logo = false
|
||||
}
|
||||
|
||||
exec-once=regreet --style /home/${username}/.config/gtk-3.0/gtk.css; hyprctl dispatch exit
|
||||
'';
|
||||
|
||||
# unlock GPG keyring on login
|
||||
security.pam.services.greetd.enableGnomeKeyring = true;
|
||||
}
|
||||
8
base/theme.nix
Normal file
8
base/theme.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ lib, config, ... }: {
|
||||
# imports = lib.mkIf config.conf.default_base_packages.enable [
|
||||
imports = [
|
||||
# is wrapped in if statement to enable when needed
|
||||
../programs/gaming/default.nix
|
||||
../programs/themes/stylix.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -19,5 +19,3 @@ in
|
|||
symbolsFile = "${layout}";
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue