Compare commits
No commits in common. "b04079a0b73ad113e341cb39f0669a7d371bf37b" and "6b76c0a4f93ad79792a9cb4b99b7c659d14a07e5" have entirely different histories.
b04079a0b7
...
6b76c0a4f9
20
flake.nix
20
flake.nix
|
@ -169,6 +169,16 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
x86vm = makeNixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
hostName = "x86vm";
|
||||||
|
extraModules = [
|
||||||
|
"${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
|
||||||
|
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
|
||||||
|
./machines/x86vm/configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# WSL sytem
|
# WSL sytem
|
||||||
wsl = makeNixosSystem {
|
wsl = makeNixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
@ -250,6 +260,16 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
packages = {
|
||||||
|
x86_64-linux = {
|
||||||
|
# Hyper-V image
|
||||||
|
hyperv = nixos-generators.nixosGenerate {
|
||||||
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
modules = [ ./machines/hyperv/configuration.nix ];
|
||||||
|
format = "hyperv";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
} // flake-utils.lib.eachDefaultSystem (system:
|
} // flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
|
|
|
@ -54,13 +54,13 @@ with nLib; {
|
||||||
};
|
};
|
||||||
# Install games
|
# Install games
|
||||||
games = { launcher = mkEnableOption "Game launcher"; };
|
games = { launcher = mkEnableOption "Game launcher"; };
|
||||||
# Hyprland and supporting application configuration
|
# Swaywm and supoorting application configuration
|
||||||
hyprland = {
|
swaywm = {
|
||||||
enable = mkDefaultOption "hyprland" config.nathan.config.isDesktop;
|
enable = mkDefaultOption "swaywm" config.nathan.config.isDesktop;
|
||||||
};
|
};
|
||||||
# Alacritty, follows sway
|
# Alacritty, follows sway
|
||||||
alacritty =
|
alacritty =
|
||||||
mkDefaultOption "alacritty" config.nathan.programs.hyprland.enable;
|
mkDefaultOption "alacritty" config.nathan.programs.swaywm.enable;
|
||||||
# Communications applications
|
# Communications applications
|
||||||
communications = {
|
communications = {
|
||||||
# Enable by default if we are on a linux desktop
|
# Enable by default if we are on a linux desktop
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
let nathan = config.nathan;
|
let nathan = config.nathan;
|
||||||
in with lib; {
|
in with lib; {
|
||||||
config = mkIf nathan.programs.hyprland.enable (let
|
config = mkIf nathan.programs.swaywm.enable (let
|
||||||
swaylock-package =
|
swaylock-package =
|
||||||
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.swaylock-effects;
|
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.swaylock-effects;
|
||||||
swaylock-command = ''
|
swaylock-command = ''
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Setup system configuration
|
||||||
|
nathan = {
|
||||||
|
config = {
|
||||||
|
isDesktop = true;
|
||||||
|
setupGrub = true;
|
||||||
|
nix.autoUpdate = false;
|
||||||
|
harden = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Configure networking
|
||||||
|
networking = {
|
||||||
|
domain = "mccarty.io";
|
||||||
|
useDHCP = false;
|
||||||
|
interfaces.enp6s0.useDHCP = true;
|
||||||
|
nat.externalInterface = "enp6s0";
|
||||||
|
# Open ports for soulseek
|
||||||
|
firewall = {
|
||||||
|
allowedTCPPorts = [ 61377 ];
|
||||||
|
allowedUDPPorts = [ 61377 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Setup home manager
|
||||||
|
home-manager.users.nathan = import ./home.nix;
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
nathan = {
|
||||||
|
services = { email = { enable = true; }; };
|
||||||
|
config = { isDesktop = true; };
|
||||||
|
};
|
||||||
|
|
||||||
|
# # Sway outputs
|
||||||
|
# wayland.windowManager.sway.config = {
|
||||||
|
# output = {
|
||||||
|
# DP-1 = {
|
||||||
|
# pos = "0 140";
|
||||||
|
# scale = "1";
|
||||||
|
# subpixel = "rgb";
|
||||||
|
# };
|
||||||
|
# DP-3 = {
|
||||||
|
# pos = "2560 0";
|
||||||
|
# scale = "1.25";
|
||||||
|
# subpixel = "rgb";
|
||||||
|
# };
|
||||||
|
# HDMI-A-1 = {
|
||||||
|
# pos = "5632 140";
|
||||||
|
# scale = "1";
|
||||||
|
# subpixel = "rgb";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# startup = [
|
||||||
|
# # GLPaper
|
||||||
|
# { command = "glpaper DP-1 ${../../custom-files/sway/selen.frag} --fork"; }
|
||||||
|
# { command = "glpaper DP-3 ${../../custom-files/sway/selen.frag} --fork"; }
|
||||||
|
# { command = "glpaper HDMI-A-1 ${../../custom-files/sway/selen.frag} --fork"; }
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# # Mako output configuration
|
||||||
|
# programs.mako = {
|
||||||
|
# # Lock mako notifs to main display
|
||||||
|
# output = "DP-3";
|
||||||
|
# };
|
||||||
|
}
|
|
@ -60,10 +60,4 @@
|
||||||
max-jobs = 4;
|
max-jobs = 4;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Make hyprland work
|
|
||||||
environment.sessionVariables = {
|
|
||||||
# "WLR_NO_HARDWARE_CURSORS" = "1";
|
|
||||||
# "WLR_RENDERER" = "pixman";
|
|
||||||
"WLR_RENDERER_ALLOW_SOFTWARE" = "1";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
nathan = {
|
nathan = {
|
||||||
|
# services = { email = { enable = true; }; };
|
||||||
config = { isDesktop = true; };
|
config = { isDesktop = true; };
|
||||||
programs = {
|
programs = {
|
||||||
media.enable = false;
|
media.enable = false;
|
||||||
|
@ -12,12 +13,20 @@
|
||||||
sshSign = true;
|
sshSign = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# games = { launcher = true; };
|
||||||
|
# media.nicotineService = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [ gammastep ];
|
home.packages = with pkgs; [ gammastep ];
|
||||||
|
|
||||||
# Hyprland outputs + tweaks
|
# Sway outputs
|
||||||
|
home.sessionVariables = {
|
||||||
|
"WLR_NO_HARDWARE_CURSORS" = "1";
|
||||||
|
"WLR_RENDERER" = "pixman";
|
||||||
|
"WLR_RENDER_DRM_DEVICE" = "/dev/dri/renderD128";
|
||||||
|
"WLR_RENDERER_ALLOW_SOFTWARE" = "1";
|
||||||
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland.extraConfig = ''
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
monitor=Virtual-1,preferred,auto,1.5
|
monitor=Virtual-1,preferred,auto,1.5
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
nathan = {
|
||||||
|
programs = { games = true; };
|
||||||
|
config = {
|
||||||
|
isDesktop = true;
|
||||||
|
nix.autoUpdate = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home-manager.users.nathan = import ./home.nix;
|
||||||
|
|
||||||
|
# Workaround to get sway working in qemu
|
||||||
|
environment.variables = { "WLR_RENDERER" = "pixman"; };
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
nathan = {
|
||||||
|
programs = { util.git.gpgSign = false; };
|
||||||
|
config = { isDesktop = true; };
|
||||||
|
};
|
||||||
|
}
|
|
@ -81,10 +81,6 @@ in {
|
||||||
description = "How often to run backups";
|
description = "How often to run backups";
|
||||||
default = "hourly";
|
default = "hourly";
|
||||||
};
|
};
|
||||||
keepForever = mkOption {
|
|
||||||
description = "Keep monthly backups forever";
|
|
||||||
default = config.nathan.config.isDesktop;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
# Nginx
|
# Nginx
|
||||||
nginx = {
|
nginx = {
|
||||||
|
@ -173,13 +169,13 @@ in {
|
||||||
# On by default
|
# On by default
|
||||||
autoUpdate = mkEnableOptionT "Nix autoupdating";
|
autoUpdate = mkEnableOptionT "Nix autoupdating";
|
||||||
};
|
};
|
||||||
# hyprland configuration
|
# Swaywm configuration
|
||||||
# On by default if the system is a desktop
|
# On by default if the system is a desktop
|
||||||
hyprland = {
|
swaywm = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = config.nathan.config.isDesktop;
|
default = config.nathan.config.isDesktop;
|
||||||
example = true;
|
example = true;
|
||||||
description = "Whether to setup hyprland";
|
description = "Whether to setup swaywm";
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
let nc = config.nathan.config;
|
let nc = config.nathan.config;
|
||||||
in with lib; {
|
in with lib; {
|
||||||
config = mkIf nc.hyprland.enable {
|
config = mkIf nc.swaywm.enable {
|
||||||
# Turn on GDM for login
|
# Turn on GDM for login
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -28,16 +28,11 @@ with lib; {
|
||||||
environment.BORG_RSH = "ssh -i ${config.nathan.services.borg.sshKey}";
|
environment.BORG_RSH = "ssh -i ${config.nathan.services.borg.sshKey}";
|
||||||
compression = "auto,zstd";
|
compression = "auto,zstd";
|
||||||
startAt = config.nathan.services.borg.startAt;
|
startAt = config.nathan.services.borg.startAt;
|
||||||
prune.keep = if config.nathan.services.borg.keepForever then {
|
prune.keep = {
|
||||||
within = "7d"; # Keep all archives for the past week
|
within = "7d"; # Keep all archives for the past week
|
||||||
daily = 1; # Keep 1 snapshot a day for 2 weeks
|
daily = 1; # Keep 1 snapshot a day for 2 weeks
|
||||||
weekly = 4; # Keep 1 snapshot a week for 4 weeks
|
weekly = 4; # Keep 1 snapshot a week for 4 weeks
|
||||||
monthly = -1; # Keep unlimited monthly backups
|
monthly = -1; # Keep unlimited monthly backups
|
||||||
} else {
|
|
||||||
within = "7d"; # Keep all archives for the past week
|
|
||||||
daily = 1; # Keep 1 snapshot a day for 2 weeks
|
|
||||||
weekly = 4; # Keep 1 snapshot a week for 4 weeks
|
|
||||||
monthly = 3; # Keep 3 monthly backups
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue