🧹 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`
|
# Symlink create by `nix build`
|
||||||
result
|
result
|
||||||
|
|
||||||
|
@ -9,20 +9,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ ./modules ];
|
||||||
./gnome
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./keyboard.nix
|
|
||||||
./terminal
|
|
||||||
./hyprland
|
|
||||||
./audio.nix
|
|
||||||
./networking.nix
|
|
||||||
./nixHelper.nix
|
|
||||||
./development.nix
|
|
||||||
./security.nix
|
|
||||||
./locale.nix
|
|
||||||
./sddm.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.overlays = [ outputs.overlays.unstable-packages ];
|
nixpkgs.overlays = [ outputs.overlays.unstable-packages ];
|
||||||
|
|
||||||
@ -46,27 +33,14 @@
|
|||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
# Tells Electron apps to use Wayland
|
# Tells Electron apps to use Wayland
|
||||||
NIXOS_OZONE_WL = "1";
|
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:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
gnupg
|
|
||||||
wget
|
wget
|
||||||
kitty
|
|
||||||
xdg-utils
|
xdg-utils
|
||||||
|
xdg-desktop-portal
|
||||||
xdg-desktop-portal-gtk
|
xdg-desktop-portal-gtk
|
||||||
kdePackages.qtwayland
|
kdePackages.qtwayland
|
||||||
kdePackages.qtsvg
|
kdePackages.qtsvg
|
||||||
@ -92,16 +66,7 @@
|
|||||||
# programs.mtr.enable = true;
|
# programs.mtr.enable = true;
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
gnupg.agent.enable = true;
|
|
||||||
|
|
||||||
kdeconnect.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:
|
# List services that you want to enable:
|
||||||
@ -111,48 +76,11 @@
|
|||||||
|
|
||||||
services = {
|
services = {
|
||||||
flatpak.enable = true;
|
flatpak.enable = true;
|
||||||
|
xserver.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
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
qt.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
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
# Passes inputs as an argument to home-manager
|
# Passes inputs as an argument to home-manager
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
users.martin = import ./home;
|
users.martin = import ./home-manager;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
stylix.nixosModules.stylix
|
stylix.nixosModules.stylix
|
||||||
|
@ -21,11 +21,11 @@ in
|
|||||||
on-timeout = "loginctl lock-session";
|
on-timeout = "loginctl lock-session";
|
||||||
}
|
}
|
||||||
# Turn off screens TODO buggy main monitor, turns off and on after resume
|
# Turn off screens TODO buggy main monitor, turns off and on after resume
|
||||||
# {
|
# {
|
||||||
# timeout = 120;
|
# timeout = 120;
|
||||||
# on-timeout = "hyprctl dispatch dpms off";
|
# on-timeout = "hyprctl dispatch dpms off";
|
||||||
# on-resume = "hyprctl dispatch dpms on";
|
# on-resume = "hyprctl dispatch dpms on";
|
||||||
# }
|
# }
|
||||||
# Suspend
|
# Suspend
|
||||||
{
|
{
|
||||||
timeout = suspendAfter;
|
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
|
glib
|
||||||
adwaita-icon-theme
|
adwaita-icon-theme
|
||||||
gnomeExtensions.appindicator
|
gnomeExtensions.appindicator
|
||||||
# gnome-extension-manager
|
# gnome-extension-manager
|
||||||
loupe
|
loupe
|
||||||
gnome-calculator
|
gnome-calculator
|
||||||
gnome-disk-utility
|
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.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
services.tailscale = {
|
services.tailscale.enable = true;
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
@ -6,7 +6,7 @@
|
|||||||
flavor = "mocha";
|
flavor = "mocha";
|
||||||
font = "Noto Sans";
|
font = "Noto Sans";
|
||||||
fontSize = "9";
|
fontSize = "9";
|
||||||
background = "${./catppuccin_high.png}";
|
background = "${../catppuccin_high.png}";
|
||||||
loginBackground = true;
|
loginBackground = true;
|
||||||
})
|
})
|
||||||
];
|
];
|
@ -2,9 +2,12 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
gnupg
|
||||||
yubioath-flutter
|
yubioath-flutter
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.gnupg.agent.enable = true;
|
||||||
|
|
||||||
security.pam = {
|
security.pam = {
|
||||||
services = {
|
services = {
|
||||||
login.u2fAuth = false; # U2F and password
|
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
|
#!/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
|
# Rebuild and switch the environment if successful
|
||||||
git add .
|
git add .
|
||||||
./fmt
|
./fmt
|
||||||
nh os switch .
|
nh os switch . "$@"
|
||||||
|