mirror of
https://github.com/davegallant/nix-config
synced 2025-08-07 05:02:28 +00:00
Improve layout structure more
This commit is contained in:
@@ -15,10 +15,10 @@
|
|||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
./modules/g810-led.nix
|
./modules/g810-led.nix
|
||||||
./main/fonts.nix
|
./main/fonts.nix
|
||||||
|
./main/general.nix
|
||||||
./main/kernel.nix
|
./main/kernel.nix
|
||||||
./main/packages.nix
|
./main/packages.nix
|
||||||
./main/printing.nix
|
./main/printing.nix
|
||||||
# ./main/general.nix
|
|
||||||
# ./main/hardware.nix
|
# ./main/hardware.nix
|
||||||
# ./main/misc.nix
|
# ./main/misc.nix
|
||||||
# ./main/networking.nix
|
# ./main/networking.nix
|
||||||
|
@@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
home = {
|
home = { sessionVariables = { EDITOR = "vim"; }; };
|
||||||
sessionVariables = { EDITOR = "vim"; };
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
gpg-agent = {
|
gpg-agent = {
|
||||||
|
@@ -3,15 +3,6 @@
|
|||||||
{
|
{
|
||||||
imports = [ ./hardware.nix ];
|
imports = [ ./hardware.nix ];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
package = pkgs.nixFlakes;
|
|
||||||
extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
@@ -19,9 +10,6 @@
|
|||||||
networking.hostName = "hephaestus"; # Define your hostname.
|
networking.hostName = "hephaestus"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Toronto";
|
|
||||||
|
|
||||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||||
# replicates the default behaviour.
|
# replicates the default behaviour.
|
||||||
@@ -52,15 +40,6 @@
|
|||||||
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
|
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
|
||||||
hardware.pulseaudio.support32Bit = true;
|
hardware.pulseaudio.support32Bit = true;
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.dave = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" "docker" ];
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ gnome3.gnome-tweaks ];
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
programs.gnupg.agent = {
|
programs.gnupg.agent = {
|
||||||
@@ -71,9 +50,6 @@
|
|||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
|
|
||||||
system.stateVersion = "unstable";
|
|
||||||
system.autoUpgrade.enable = true;
|
|
||||||
|
|
||||||
# systemd.services.g810-led = {
|
# systemd.services.g810-led = {
|
||||||
# description = "Set Logitech G810 Led Profile";
|
# description = "Set Logitech G810 Led Profile";
|
||||||
# serviceConfig = {
|
# serviceConfig = {
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -22,18 +21,9 @@
|
|||||||
|
|
||||||
# Set default fonts.
|
# Set default fonts.
|
||||||
fonts.fontconfig.defaultFonts = {
|
fonts.fontconfig.defaultFonts = {
|
||||||
sansSerif = [
|
sansSerif = [ "Noto Sans" ];
|
||||||
"Noto Sans"
|
serif = [ "Noto Serif" ];
|
||||||
];
|
monospace = [ "MesloLGS Nerd Font" "Noto Sans Mono" ];
|
||||||
serif = [
|
emoji = [ "Noto Color Emoji" ];
|
||||||
"Noto Serif"
|
|
||||||
];
|
|
||||||
monospace = [
|
|
||||||
"MesloLGS Nerd Font"
|
|
||||||
"Noto Sans Mono"
|
|
||||||
];
|
|
||||||
emoji = [
|
|
||||||
"Noto Color Emoji"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
39
nix/main/general.nix
Normal file
39
nix/main/general.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
system.stateVersion = "unstable";
|
||||||
|
system.autoUpgrade.enable = true;
|
||||||
|
|
||||||
|
# Automatically optimize the Nix store.
|
||||||
|
nix.autoOptimiseStore = true;
|
||||||
|
|
||||||
|
# Enable Nix flake support.
|
||||||
|
nix.package = pkgs.nixUnstable;
|
||||||
|
nix.extraOptions = "experimental-features = nix-command flakes";
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.dave = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" "docker" ];
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
keyMap = "us";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/Toronto";
|
||||||
|
|
||||||
|
# Set keyboard layout.
|
||||||
|
services.xserver = {
|
||||||
|
layout = "us";
|
||||||
|
xkbVariant = "altgr-intl";
|
||||||
|
xkbOptions = "caps:escape";
|
||||||
|
};
|
||||||
|
}
|
@@ -120,18 +120,6 @@
|
|||||||
python38Packages.setuptools
|
python38Packages.setuptools
|
||||||
python38Packages.virtualenv
|
python38Packages.virtualenv
|
||||||
|
|
||||||
# fonts
|
|
||||||
dejavu_fonts
|
|
||||||
fira-code
|
|
||||||
fira-code-symbols
|
|
||||||
fira-mono
|
|
||||||
font-awesome
|
|
||||||
google-fonts
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-cjk
|
|
||||||
noto-fonts-emoji
|
|
||||||
noto-fonts-extra
|
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
asciinema
|
asciinema
|
||||||
github-cli
|
github-cli
|
||||||
@@ -149,6 +137,9 @@
|
|||||||
xdg_utils
|
xdg_utils
|
||||||
zathura
|
zathura
|
||||||
|
|
||||||
|
# gnome
|
||||||
|
gnome3.gnome-tweaks
|
||||||
|
|
||||||
# overlays
|
# overlays
|
||||||
# lpass
|
# lpass
|
||||||
# rfd
|
# rfd
|
||||||
|
@@ -2,10 +2,8 @@
|
|||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let cfg = config.hardware.g810-led;
|
||||||
cfg = config.hardware.g810-led;
|
in {
|
||||||
in
|
|
||||||
{
|
|
||||||
options.hardware.g810-led = {
|
options.hardware.g810-led = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
@@ -36,9 +34,8 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
services.udev.packages = [
|
services.udev.packages =
|
||||||
(pkgs.g810-led.override { profile = cfg.profile; })
|
[ (pkgs.g810-led.override { profile = cfg.profile; }) ];
|
||||||
];
|
|
||||||
|
|
||||||
# Workaround mentioned here:
|
# Workaround mentioned here:
|
||||||
# https://github.com/MatMoul/g810-led/blob/14e331ad2ab7c5ffb546e0c14dd6164b517ff9ca/PROFILES.md
|
# https://github.com/MatMoul/g810-led/blob/14e331ad2ab7c5ffb546e0c14dd6164b517ff9ca/PROFILES.md
|
||||||
|
Reference in New Issue
Block a user