Compare commits
5 Commits
6b76c0a4f9
...
b04079a0b7
Author | SHA1 | Date |
---|---|---|
Nathan McCarty | b04079a0b7 | |
Nathan McCarty | 6dd05347dc | |
Nathan McCarty | 9e1fb8e4a4 | |
Nathan McCarty | 540d8f18fe | |
Nathan McCarty | 7c995bfdce |
20
flake.nix
20
flake.nix
|
@ -169,16 +169,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
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 = makeNixosSystem {
|
||||
system = "x86_64-linux";
|
||||
|
@ -260,16 +250,6 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
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:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
|
|
|
@ -54,13 +54,13 @@ with nLib; {
|
|||
};
|
||||
# Install games
|
||||
games = { launcher = mkEnableOption "Game launcher"; };
|
||||
# Swaywm and supoorting application configuration
|
||||
swaywm = {
|
||||
enable = mkDefaultOption "swaywm" config.nathan.config.isDesktop;
|
||||
# Hyprland and supporting application configuration
|
||||
hyprland = {
|
||||
enable = mkDefaultOption "hyprland" config.nathan.config.isDesktop;
|
||||
};
|
||||
# Alacritty, follows sway
|
||||
alacritty =
|
||||
mkDefaultOption "alacritty" config.nathan.programs.swaywm.enable;
|
||||
mkDefaultOption "alacritty" config.nathan.programs.hyprland.enable;
|
||||
# Communications applications
|
||||
communications = {
|
||||
# Enable by default if we are on a linux desktop
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
let nathan = config.nathan;
|
||||
in with lib; {
|
||||
config = mkIf nathan.programs.swaywm.enable (let
|
||||
config = mkIf nathan.programs.hyprland.enable (let
|
||||
swaylock-package =
|
||||
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.swaylock-effects;
|
||||
swaylock-command = ''
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
{ 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;
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{ 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,4 +60,10 @@
|
|||
max-jobs = 4;
|
||||
};
|
||||
|
||||
# Make hyprland work
|
||||
environment.sessionVariables = {
|
||||
# "WLR_NO_HARDWARE_CURSORS" = "1";
|
||||
# "WLR_RENDERER" = "pixman";
|
||||
"WLR_RENDERER_ALLOW_SOFTWARE" = "1";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
{
|
||||
nathan = {
|
||||
# services = { email = { enable = true; }; };
|
||||
config = { isDesktop = true; };
|
||||
programs = {
|
||||
media.enable = false;
|
||||
|
@ -13,20 +12,12 @@
|
|||
sshSign = true;
|
||||
};
|
||||
};
|
||||
# games = { launcher = true; };
|
||||
# media.nicotineService = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [ gammastep ];
|
||||
|
||||
# Sway outputs
|
||||
home.sessionVariables = {
|
||||
"WLR_NO_HARDWARE_CURSORS" = "1";
|
||||
"WLR_RENDERER" = "pixman";
|
||||
"WLR_RENDER_DRM_DEVICE" = "/dev/dri/renderD128";
|
||||
"WLR_RENDERER_ALLOW_SOFTWARE" = "1";
|
||||
};
|
||||
# Hyprland outputs + tweaks
|
||||
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
monitor=Virtual-1,preferred,auto,1.5
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
{ 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"; };
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
nathan = {
|
||||
programs = { util.git.gpgSign = false; };
|
||||
config = { isDesktop = true; };
|
||||
};
|
||||
}
|
|
@ -81,6 +81,10 @@ in {
|
|||
description = "How often to run backups";
|
||||
default = "hourly";
|
||||
};
|
||||
keepForever = mkOption {
|
||||
description = "Keep monthly backups forever";
|
||||
default = config.nathan.config.isDesktop;
|
||||
};
|
||||
};
|
||||
# Nginx
|
||||
nginx = {
|
||||
|
@ -169,13 +173,13 @@ in {
|
|||
# On by default
|
||||
autoUpdate = mkEnableOptionT "Nix autoupdating";
|
||||
};
|
||||
# Swaywm configuration
|
||||
# hyprland configuration
|
||||
# On by default if the system is a desktop
|
||||
swaywm = {
|
||||
hyprland = {
|
||||
enable = mkOption {
|
||||
default = config.nathan.config.isDesktop;
|
||||
example = true;
|
||||
description = "Whether to setup swaywm";
|
||||
description = "Whether to setup hyprland";
|
||||
type = lib.types.bool;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
let nc = config.nathan.config;
|
||||
in with lib; {
|
||||
config = mkIf nc.swaywm.enable {
|
||||
config = mkIf nc.hyprland.enable {
|
||||
# Turn on GDM for login
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
|
|
@ -28,11 +28,16 @@ with lib; {
|
|||
environment.BORG_RSH = "ssh -i ${config.nathan.services.borg.sshKey}";
|
||||
compression = "auto,zstd";
|
||||
startAt = config.nathan.services.borg.startAt;
|
||||
prune.keep = {
|
||||
prune.keep = if config.nathan.services.borg.keepForever then {
|
||||
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 = -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