🧹 Moved almost all files to /modules. Moved some code to separate files
3
.gitignore
vendored
@ -1,6 +1,3 @@
|
||||
# Autogenerated
|
||||
hardware-configuration.nix
|
||||
|
||||
# Symlink create by `nix build`
|
||||
result
|
||||
|
||||
|
@ -9,20 +9,7 @@
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./gnome
|
||||
./hardware-configuration.nix
|
||||
./keyboard.nix
|
||||
./terminal
|
||||
./hyprland
|
||||
./audio.nix
|
||||
./networking.nix
|
||||
./nixHelper.nix
|
||||
./development.nix
|
||||
./security.nix
|
||||
./locale.nix
|
||||
./sddm.nix
|
||||
];
|
||||
imports = [ ./modules ];
|
||||
|
||||
nixpkgs.overlays = [ outputs.overlays.unstable-packages ];
|
||||
|
||||
@ -46,27 +33,14 @@
|
||||
environment.sessionVariables = {
|
||||
# Tells Electron apps to use Wayland
|
||||
NIXOS_OZONE_WL = "1";
|
||||
NIXOS_CONFIG_PATH = "/etc/nixos";
|
||||
LIBVA_DRIVER_NAME = "iHD"; # For hardware acceleration
|
||||
};
|
||||
|
||||
fonts = {
|
||||
fontconfig.enable = true;
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||
jetbrains-mono
|
||||
# The line below will replace the lines above in 25.05
|
||||
# nerd-fonts.jetbrains-mono
|
||||
];
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnupg
|
||||
wget
|
||||
kitty
|
||||
xdg-utils
|
||||
xdg-desktop-portal
|
||||
xdg-desktop-portal-gtk
|
||||
kdePackages.qtwayland
|
||||
kdePackages.qtsvg
|
||||
@ -92,16 +66,7 @@
|
||||
# programs.mtr.enable = true;
|
||||
|
||||
programs = {
|
||||
gnupg.agent.enable = true;
|
||||
|
||||
kdeconnect.enable = true;
|
||||
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
};
|
||||
};
|
||||
|
||||
# List services that you want to enable:
|
||||
@ -111,48 +76,11 @@
|
||||
|
||||
services = {
|
||||
flatpak.enable = true;
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
# Load Nvidia driver for Xorg and Wayland
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
};
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = ./catppuccin.png;
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
polarity = "dark";
|
||||
opacity.terminal = 0.8;
|
||||
override = {
|
||||
base02 = "b0b0b0"; # Comments in shell
|
||||
base03 = "b0b0b0"; # Comments in nvim
|
||||
base04 = "b0b0b0"; # Secondary text in shell
|
||||
};
|
||||
xserver.enable = true;
|
||||
};
|
||||
|
||||
qt.enable = true;
|
||||
|
||||
hardware = {
|
||||
# Enable OpenGL
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD
|
||||
];
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
# Required
|
||||
modesetting.enable = true;
|
||||
# Use closed-source drivers
|
||||
open = false;
|
||||
# Enable the Nvidia settings menu
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
@ -50,7 +50,7 @@
|
||||
useUserPackages = true;
|
||||
# Passes inputs as an argument to home-manager
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
users.martin = import ./home;
|
||||
users.martin = import ./home-manager;
|
||||
};
|
||||
}
|
||||
stylix.nixosModules.stylix
|
||||
|
@ -21,11 +21,11 @@ in
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
# Turn off screens TODO buggy main monitor, turns off and on after resume
|
||||
# {
|
||||
# timeout = 120;
|
||||
# on-timeout = "hyprctl dispatch dpms off";
|
||||
# on-resume = "hyprctl dispatch dpms on";
|
||||
# }
|
||||
# {
|
||||
# timeout = 120;
|
||||
# on-timeout = "hyprctl dispatch dpms off";
|
||||
# on-resume = "hyprctl dispatch dpms on";
|
||||
# }
|
||||
# Suspend
|
||||
{
|
||||
timeout = suspendAfter;
|
Before Width: | Height: | Size: 969 B After Width: | Height: | Size: 969 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 877 B After Width: | Height: | Size: 877 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
19
modules/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./development.nix
|
||||
./fonts.nix
|
||||
./gnome
|
||||
./hardware
|
||||
./locale.nix
|
||||
./networking.nix
|
||||
./nix-helper.nix
|
||||
./hyprland
|
||||
./sddm.nix
|
||||
./security.nix
|
||||
./steam.nix
|
||||
./stylix.nix
|
||||
./terminal
|
||||
];
|
||||
}
|
14
modules/fonts.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
fonts = {
|
||||
fontconfig.enable = true;
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||
jetbrains-mono
|
||||
# The line below will replace the lines above in 25.05
|
||||
# nerd-fonts.jetbrains-mono
|
||||
];
|
||||
};
|
||||
|
||||
}
|
@ -10,7 +10,7 @@
|
||||
glib
|
||||
adwaita-icon-theme
|
||||
gnomeExtensions.appindicator
|
||||
# gnome-extension-manager
|
||||
# gnome-extension-manager
|
||||
loupe
|
||||
gnome-calculator
|
||||
gnome-disk-utility
|
10
modules/hardware/default.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./audio.nix
|
||||
./graphics
|
||||
./hardware-configuration.nix
|
||||
./keyboard.nix
|
||||
];
|
||||
}
|
19
modules/hardware/graphics/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./nvidia.nix
|
||||
];
|
||||
|
||||
# For hardware acceleration
|
||||
environment.sessionVariables.LIBVA_DRIVER_NAME = "iHD";
|
||||
|
||||
# Enable OpenGL
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
# Used for hardware-acceleration
|
||||
intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD
|
||||
];
|
||||
};
|
||||
}
|
15
modules/hardware/graphics/nvidia.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
hardware.nvidia = {
|
||||
# Required
|
||||
modesetting.enable = true;
|
||||
# Use closed-source drivers
|
||||
open = false;
|
||||
# Enable the Nvidia settings menu
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
|
||||
# Load Nvidia driver for Xorg and Wayland
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
}
|
@ -16,7 +16,5 @@
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
};
|
||||
services.tailscale.enable = true;
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
flavor = "mocha";
|
||||
font = "Noto Sans";
|
||||
fontSize = "9";
|
||||
background = "${./catppuccin_high.png}";
|
||||
background = "${../catppuccin_high.png}";
|
||||
loginBackground = true;
|
||||
})
|
||||
];
|
@ -2,9 +2,12 @@
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnupg
|
||||
yubioath-flutter
|
||||
];
|
||||
|
||||
programs.gnupg.agent.enable = true;
|
||||
|
||||
security.pam = {
|
||||
services = {
|
||||
login.u2fAuth = false; # U2F and password
|
10
modules/steam.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
};
|
||||
}
|
16
modules/stylix.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = ../catppuccin.png;
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
polarity = "dark";
|
||||
opacity.terminal = 0.8;
|
||||
override = {
|
||||
base02 = "b0b0b0"; # Comments in shell
|
||||
base03 = "b0b0b0"; # Comments in nvim
|
||||
base04 = "b0b0b0"; # Secondary text in shell
|
||||
};
|
||||
};
|
||||
}
|
11
modules/terminal/default.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./shell.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
kitty
|
||||
];
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
}
|
5
switch
@ -1,6 +1,9 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Accepts all arguments to nh os switch
|
||||
# For example --ask to prompt if the user want to switch configs
|
||||
|
||||
# Rebuild and switch the environment if successful
|
||||
git add .
|
||||
./fmt
|
||||
nh os switch .
|
||||
nh os switch . "$@"
|
||||
|