move some common stuff to shared files
This commit is contained in:
@@ -14,11 +14,12 @@
|
|||||||
username = "jared";
|
username = "jared";
|
||||||
homeDirectory = "/home/jared";
|
homeDirectory = "/home/jared";
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
cowsay
|
spotify
|
||||||
|
strawberry
|
||||||
|
nodePackages.prettier
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# stylix.enable = true;
|
|
||||||
|
|
||||||
# Add stuff for your user as you see fit:
|
# Add stuff for your user as you see fit:
|
||||||
# programs.neovim.enable = true;
|
# programs.neovim.enable = true;
|
||||||
|
|||||||
@@ -10,47 +10,21 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/nvidia.nix
|
../../modules/nvidia.nix
|
||||||
|
../../modules/common.nix
|
||||||
../../modules/gnome.nix
|
../../modules/gnome.nix
|
||||||
# Does not play nicely with Nvidia right now
|
|
||||||
# ../../modules/hyprland/hyprland.nix
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
../../modules/protonvpn.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
sops.defaultSopsFile = ../../secrets/secrets.yaml;
|
sops.defaultSopsFile = ../../secrets/secrets.yaml;
|
||||||
sops.defaultSopsFormat = "yaml";
|
sops.defaultSopsFormat = "yaml";
|
||||||
sops.age.keyFile = "/home/${username}/.config/sops/age/keys.txt";
|
sops.age.keyFile = "/home/${username}/.config/sops/age/keys.txt";
|
||||||
|
|
||||||
sops.secrets."protonvpn/norway_config" = {};
|
|
||||||
sops.secrets."protonvpn/us_config" = {};
|
|
||||||
sops.secrets."protonvpn/auth-user-pass" = {};
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
loader.systemd-boot.enable = true;
|
|
||||||
loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
kernel.sysctl = {
|
|
||||||
"vm.swappiness" = 10;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "tito";
|
hostName = "tito";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
|
||||||
printing.enable = true;
|
|
||||||
openssh.enable = true;
|
|
||||||
tailscale.enable = true;
|
|
||||||
pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
steam = {
|
steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -58,15 +32,8 @@
|
|||||||
dedicatedServer.openFirewall = true;
|
dedicatedServer.openFirewall = true;
|
||||||
};
|
};
|
||||||
chromium.enable = true;
|
chromium.enable = true;
|
||||||
nh = {
|
|
||||||
enable = true;
|
|
||||||
#clean.enable = true;
|
|
||||||
#clean.extraArgs = "--keep-since 4d --keep 3";
|
|
||||||
flake = "/etc/nixos";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
users.users.${username} = {
|
users.users.${username} = {
|
||||||
@@ -81,55 +48,12 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
git
|
|
||||||
neovim
|
|
||||||
gcc
|
|
||||||
tailscale
|
|
||||||
firefox
|
|
||||||
htop
|
|
||||||
nerdfonts
|
|
||||||
kitty
|
|
||||||
yazi
|
|
||||||
nodejs
|
|
||||||
openvpn
|
|
||||||
audio-recorder
|
|
||||||
qemu
|
|
||||||
qemu_kvm
|
|
||||||
spotify
|
|
||||||
strawberry
|
|
||||||
|
|
||||||
sops
|
|
||||||
];
|
|
||||||
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
services.openvpn.servers = {
|
|
||||||
proton-norway = {
|
|
||||||
autoStart = false;
|
|
||||||
config = ''
|
|
||||||
config ${config.sops.secrets."protonvpn/norway_config".path}
|
|
||||||
auth-user-pass ${config.sops.secrets."protonvpn/auth-user-pass".path}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
proton-united-states = {
|
|
||||||
autoStart = false;
|
|
||||||
config = ''
|
|
||||||
config ${config.sops.secrets."protonvpn/us_config".path}
|
|
||||||
auth-user-pass ${config.sops.secrets."protonvpn/auth-user-pass".path}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/da-one-ocean.yaml";
|
|
||||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/solarflare.yaml";
|
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/solarflare.yaml";
|
||||||
#stylix.image = /home/jared/Pictures/venice.jpg;
|
|
||||||
stylix.image = /home/jared/Pictures/tropea.jpg;
|
stylix.image = /home/jared/Pictures/tropea.jpg;
|
||||||
|
|
||||||
stylix.targets.gnome.enable = true;
|
stylix.targets.gnome.enable = true;
|
||||||
stylix.cursor.package = pkgs.vimix-cursor-theme;
|
stylix.cursor.package = pkgs.vimix-cursor-theme;
|
||||||
stylix.cursor.name = "Vimix-Cursors";
|
stylix.cursor.name = "Vimix-Cursors";
|
||||||
# stylix.enable = true;
|
|
||||||
# stylix.targets.kitty.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
# ============= Maybe common ============= #
|
# ============= Maybe common ============= #
|
||||||
@@ -137,34 +61,4 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.nameservers = [
|
|
||||||
"192.168.1.3"
|
|
||||||
"9.9.9.9"
|
|
||||||
"1.1.1.1"
|
|
||||||
];
|
|
||||||
|
|
||||||
time.timeZone = "America/Chicago";
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "en_US.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
|
||||||
LC_MEASUREMENT = "en_US.UTF-8";
|
|
||||||
LC_MONETARY = "en_US.UTF-8";
|
|
||||||
LC_NAME = "en_US.UTF-8";
|
|
||||||
LC_NUMERIC = "en_US.UTF-8";
|
|
||||||
LC_PAPER = "en_US.UTF-8";
|
|
||||||
LC_TELEPHONE = "en_US.UTF-8";
|
|
||||||
LC_TIME = "en_US.UTF-8";
|
|
||||||
};
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 7d";
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,71 +11,21 @@
|
|||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../../modules/common.nix
|
||||||
../../modules/gnome.nix
|
../../modules/gnome.nix
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
../../modules/protonvpn.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
sops.defaultSopsFile = ../../secrets/secrets.yaml;
|
sops.defaultSopsFile = ../../secrets/secrets.yaml;
|
||||||
sops.defaultSopsFormat = "yaml";
|
sops.defaultSopsFormat = "yaml";
|
||||||
sops.age.keyFile = "/home/${username}/.config/sops/age/keys.txt";
|
sops.age.keyFile = "/home/${username}/.config/sops/age/keys.txt";
|
||||||
|
|
||||||
sops.secrets."protonvpn/norway_config" = {};
|
|
||||||
sops.secrets."protonvpn/us_config" = {};
|
|
||||||
sops.secrets."protonvpn/auth-user-pass" = {};
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
loader.systemd-boot.enable = true;
|
|
||||||
loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
kernel.sysctl = {
|
|
||||||
"vm.swappiness" = 10;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "xps";
|
hostName = "xps";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
|
||||||
printing.enable = true;
|
|
||||||
openssh.enable = true;
|
|
||||||
tailscale.enable = true;
|
|
||||||
pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.etc."openvpn/update-resolv-conf".source = "${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf";
|
|
||||||
services.openvpn.servers = {
|
|
||||||
proton-norway = {
|
|
||||||
autoStart = false;
|
|
||||||
config = ''
|
|
||||||
config ${config.sops.secrets."protonvpn/norway_config".path}
|
|
||||||
auth-user-pass ${config.sops.secrets."protonvpn/auth-user-pass".path}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
proton-united-states = {
|
|
||||||
autoStart = false;
|
|
||||||
config = ''
|
|
||||||
config ${config.sops.secrets."protonvpn/us_config".path}
|
|
||||||
auth-user-pass ${config.sops.secrets."protonvpn/auth-user-pass".path}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
nh = {
|
|
||||||
enable = true;
|
|
||||||
flake = "/home/${username}/nix-config";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
users.users.${username} = {
|
users.users.${username} = {
|
||||||
@@ -89,97 +39,17 @@
|
|||||||
"docker"
|
"docker"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
#services.xserver.enable = true;
|
|
||||||
|
|
||||||
# Enable the Pantheon Desktop Environment.
|
|
||||||
#services.xserver.displayManager.lightdm.enable = true;
|
|
||||||
#services.xserver.desktopManager.pantheon.enable = true;
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable automatic login for the user.
|
# Enable automatic login for the user.
|
||||||
services.displayManager.autoLogin.enable = true;
|
services.displayManager.autoLogin.enable = true;
|
||||||
services.displayManager.autoLogin.user = "jared";
|
services.displayManager.autoLogin.user = "${username}";
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
git
|
|
||||||
neovim
|
|
||||||
gcc
|
|
||||||
tailscale
|
|
||||||
firefox
|
|
||||||
htop
|
|
||||||
nerdfonts
|
|
||||||
kitty
|
|
||||||
yazi
|
|
||||||
nodejs
|
|
||||||
openvpn
|
|
||||||
audio-recorder
|
|
||||||
qemu
|
|
||||||
qemu_kvm
|
|
||||||
spotify
|
|
||||||
strawberry
|
|
||||||
unzip
|
|
||||||
libation
|
|
||||||
nodePackages.prettier
|
|
||||||
update-resolv-conf
|
|
||||||
dconf2nix
|
|
||||||
libation
|
|
||||||
sops
|
|
||||||
ghostty.packages.x86_64-linux.default
|
|
||||||
];
|
|
||||||
environment.variables = {
|
|
||||||
EDITOR = "nvim";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
stylix.enable = true;
|
stylix.enable = true;
|
||||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/solarflare.yaml";
|
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/solarflare.yaml";
|
||||||
stylix.image = ../../backgrounds/SupermassiveBinaryBlackHoles.png;
|
stylix.image = ../../backgrounds/SupermassiveBinaryBlackHoles.png;
|
||||||
stylix.cursor.package = pkgs.vimix-cursor-theme;
|
stylix.cursor.package = pkgs.vimix-cursor-theme;
|
||||||
stylix.cursor.name = "Vimix-Cursors";
|
stylix.cursor.name = "Vimix-Cursors";
|
||||||
stylix.targets.gnome.enable = true;
|
stylix.targets.gnome.enable = true;
|
||||||
# stylix.targets.kitty.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
|
|
||||||
networking.nameservers = [
|
|
||||||
"192.168.1.3"
|
|
||||||
"1.1.1.1"
|
|
||||||
"9.9.9.9"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Chicago";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "en_US.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
|
||||||
LC_MEASUREMENT = "en_US.UTF-8";
|
|
||||||
LC_MONETARY = "en_US.UTF-8";
|
|
||||||
LC_NAME = "en_US.UTF-8";
|
|
||||||
LC_NUMERIC = "en_US.UTF-8";
|
|
||||||
LC_PAPER = "en_US.UTF-8";
|
|
||||||
LC_TELEPHONE = "en_US.UTF-8";
|
|
||||||
LC_TIME = "en_US.UTF-8";
|
|
||||||
};
|
|
||||||
#sound.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 7d";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
109
modules/common.nix
Normal file
109
modules/common.nix
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
stylix,
|
||||||
|
username,
|
||||||
|
ghostty,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
boot = {
|
||||||
|
loader.systemd-boot.enable = true;
|
||||||
|
loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
kernel.sysctl = {
|
||||||
|
"vm.swappiness" = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
printing.enable = true;
|
||||||
|
openssh.enable = true;
|
||||||
|
tailscale.enable = true;
|
||||||
|
flatpak.enable = true;
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
# Configure keymap in X11
|
||||||
|
xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
neovim
|
||||||
|
gcc
|
||||||
|
tailscale
|
||||||
|
firefox
|
||||||
|
htop
|
||||||
|
nerdfonts
|
||||||
|
kitty
|
||||||
|
yazi
|
||||||
|
nodejs
|
||||||
|
openvpn
|
||||||
|
audio-recorder
|
||||||
|
qemu
|
||||||
|
qemu_kvm
|
||||||
|
unzip
|
||||||
|
libation
|
||||||
|
nodePackages.prettier
|
||||||
|
dconf2nix
|
||||||
|
libation
|
||||||
|
sops
|
||||||
|
ghostty.packages.x86_64-linux.default
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
nh = {
|
||||||
|
enable = true;
|
||||||
|
flake = "/home/${username}/nix-config";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.nameservers = [
|
||||||
|
"192.168.1.3"
|
||||||
|
"1.1.1.1"
|
||||||
|
"9.9.9.9"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
{ config, pkgs, stylix, ... }:
|
{ config, pkgs, stylix, ... }:
|
||||||
{
|
{
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
|
|
||||||
# stylix.targets.gnome.enable = true;
|
# Enable the GNOME Desktop Environment.
|
||||||
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
|
|
||||||
# Enable the GNOME Desktop Environment.
|
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
26
modules/protonvpn.nix
Normal file
26
modules/protonvpn.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
sops.secrets."protonvpn/norway_config" = {};
|
||||||
|
sops.secrets."protonvpn/us_config" = {};
|
||||||
|
sops.secrets."protonvpn/auth-user-pass" = {};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
update-resolv-conf
|
||||||
|
];
|
||||||
|
environment.etc."openvpn/update-resolv-conf".source = "${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf";
|
||||||
|
services.openvpn.servers = {
|
||||||
|
proton-norway = {
|
||||||
|
autoStart = false;
|
||||||
|
config = ''
|
||||||
|
config ${config.sops.secrets."protonvpn/norway_config".path}
|
||||||
|
auth-user-pass ${config.sops.secrets."protonvpn/auth-user-pass".path}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
proton-united-states = {
|
||||||
|
autoStart = false;
|
||||||
|
config = ''
|
||||||
|
config ${config.sops.secrets."protonvpn/us_config".path}
|
||||||
|
auth-user-pass ${config.sops.secrets."protonvpn/auth-user-pass".path}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user