some formatting

This commit is contained in:
gwg313 2024-12-02 18:12:36 -05:00
parent c91faa5aaf
commit 57c3bb3e61
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
21 changed files with 472 additions and 360 deletions

View file

@ -2,32 +2,40 @@
## Overview ## Overview
This repository contains my NixOS configuration as a flake. This configuration is designed to provide a reproducible and declarative setup for my system. It includes system configuration, package management, and various other NixOS features. This repository contains my NixOS configuration as a flake. This configuration
is designed to provide a reproducible and declarative setup for my system. It
includes system configuration, package management, and various other NixOS
features.
### Window Manager ### Window Manager
- hyrpland
- waybar - hyrpland
- swaylock - waybar
- wofi - swaylock
- light - wofi
- grimshot - light
- mako - grimshot
- mako
### Terminal ### Terminal
- alacritty
- zsh - alacritty
- starship - zsh
- tmux - starship
- neovim(my configuration can be found [here](https://github.com/gwg313/nvim-nix)) - tmux
- eza - neovim(my configuration can be found
- ripgrep [here](https://github.com/gwg313/nvim-nix))
- fd - eza
- ripgrep
- fd
## Prerequisites ## Prerequisites
Before using this NixOS flake configuration, you should have the following prerequisites: Before using this NixOS flake configuration, you should have the following
prerequisites:
- NixOs should be installed on your system. - NixOs should be installed on your system.
- Familiarity with Nix and NixOS concepts is helpful but not required. - Familiarity with Nix and NixOS concepts is helpful but not required.
## Usage ## Usage

View file

@ -6,7 +6,8 @@
outputs, outputs,
user, user,
... ...
}: { }:
{
imports = [ imports = [
./packages.nix ./packages.nix
./users.nix ./users.nix
@ -16,12 +17,15 @@
# #
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = ["nix-command" "flakes"]; nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.auto-optimise-store = true; nix.settings.auto-optimise-store = true;
nix.optimise.automatic = true; nix.optimise.automatic = true;
nix.settings.trusted-users = ["${user}"]; nix.settings.trusted-users = [ "${user}" ];
# Disable so comma can be installed # Disable so comma can be installed
programs.command-not-found.enable = false; programs.command-not-found.enable = false;

View file

@ -2,7 +2,8 @@
config, config,
lib, lib,
... ...
}: { }:
{
options = { options = {
ssh_client.enable = lib.mkEnableOption "enable ssh client settings"; ssh_client.enable = lib.mkEnableOption "enable ssh client settings";
}; };

View file

@ -5,13 +5,21 @@
inputs, inputs,
outputs, outputs,
... ...
}: { }:
{
# Define a user account. Don't forget to set a password with 'passwd'. # Define a user account. Don't forget to set a password with 'passwd'.
programs.zsh.enable = true; programs.zsh.enable = true;
users.users.gwg313 = { users.users.gwg313 = {
isNormalUser = true; isNormalUser = true;
description = "Glen Goodwin"; description = "Glen Goodwin";
extraGroups = ["networkmanager" "wheel" "video" "docker" "audio" "wireshark"]; extraGroups = [
"networkmanager"
"wheel"
"video"
"docker"
"audio"
"wireshark"
];
shell = pkgs.zsh; shell = pkgs.zsh;
uid = 1000; uid = 1000;
}; };

View file

@ -4,8 +4,13 @@
user, user,
lib, lib,
... ...
}: { }:
imports = [./libvirt.nix ./podman.nix ./kubernetes.nix]; {
imports = [
./libvirt.nix
./podman.nix
./kubernetes.nix
];
libvirt.enable = lib.mkDefault true; libvirt.enable = lib.mkDefault true;
podman.enable = lib.mkDefault true; podman.enable = lib.mkDefault true;

View file

@ -54,12 +54,14 @@
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs"; pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { outputs =
{
self, self,
nixpkgs, nixpkgs,
home-manager, home-manager,
... ...
} @ inputs: let }@inputs:
let
inherit (self) outputs; inherit (self) outputs;
# Supported systems for your flake packages, shell, etc. # Supported systems for your flake packages, shell, etc.
systems = [ systems = [
@ -73,7 +75,8 @@
# pass to it, with each system as an argument # pass to it, with each system as an argument
forAllSystems = nixpkgs.lib.genAttrs systems; forAllSystems = nixpkgs.lib.genAttrs systems;
user = "gwg313"; user = "gwg313";
in { in
{
# Your custom packages # Your custom packages
# Accessible through 'nix build', 'nix shell', etc # Accessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
@ -82,7 +85,7 @@
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
# Your custom packages and modifications, exported as overlays # Your custom packages and modifications, exported as overlays
overlays = import ./overlays {inherit inputs;}; overlays = import ./overlays { inherit inputs; };
# Reusable nixos modules you might want to export # Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs # These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos; nixosModules = import ./modules/nixos;
@ -91,9 +94,11 @@
homeManagerModules = import ./modules/home-manager; homeManagerModules = import ./modules/home-manager;
devShells = forAllSystems ( devShells = forAllSystems (
system: let system:
let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
in { in
{
default = pkgs.mkShell { default = pkgs.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook; inherit (self.checks.${system}.pre-commit-check) shellHook;
buildInputs = with pkgs; [ buildInputs = with pkgs; [
@ -104,13 +109,15 @@
); );
checks = forAllSystems ( checks = forAllSystems (
system: let system:
let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
in { in
{
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = ./.; src = ./.;
hooks = { hooks = {
alejandra.enable = true; nixfmt-rfc-style.enable = true;
}; };
}; };
} }
@ -120,7 +127,9 @@
# Available through 'nixos-rebuild --flake .#your-hostname' # Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = { nixosConfigurations = {
candlekeep = nixpkgs.lib.nixosSystem { candlekeep = nixpkgs.lib.nixosSystem {
specialArgs = {inherit user inputs outputs;}; specialArgs = {
inherit user inputs outputs;
};
modules = [ modules = [
# > Our main nixos configuration file < # > Our main nixos configuration file <
./hosts/candlekeep/configuration.nix ./hosts/candlekeep/configuration.nix
@ -130,7 +139,9 @@
nixosConfigurations = { nixosConfigurations = {
grymforge = nixpkgs.lib.nixosSystem { grymforge = nixpkgs.lib.nixosSystem {
specialArgs = {inherit user inputs outputs;}; specialArgs = {
inherit user inputs outputs;
};
modules = [ modules = [
# > Our main nixos configuration file < # > Our main nixos configuration file <
./hosts/grymforge/configuration.nix ./hosts/grymforge/configuration.nix
@ -143,7 +154,9 @@
homeConfigurations = { homeConfigurations = {
"gwg313@candlekeep" = home-manager.lib.homeManagerConfiguration { "gwg313@candlekeep" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;}; extraSpecialArgs = {
inherit inputs outputs;
};
modules = [ modules = [
# > Our main home-manager configuration file < # > Our main home-manager configuration file <
./home-manager/machines/candlekeep.nix ./home-manager/machines/candlekeep.nix
@ -155,7 +168,9 @@
homeConfigurations = { homeConfigurations = {
"gwg313@grymforge" = home-manager.lib.homeManagerConfiguration { "gwg313@grymforge" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;}; extraSpecialArgs = {
inherit inputs outputs;
};
modules = [ modules = [
# > Our main home-manager configuration file < # > Our main home-manager configuration file <
./home-manager/machines/grymforge.nix ./home-manager/machines/grymforge.nix
@ -167,7 +182,9 @@
homeConfigurations = { homeConfigurations = {
"gwg313@dorino" = home-manager.lib.homeManagerConfiguration { "gwg313@dorino" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;}; extraSpecialArgs = {
inherit inputs outputs;
};
modules = [ modules = [
# > Our main home-manager configuration file < # > Our main home-manager configuration file <
./home-manager/machines/dorino.nix ./home-manager/machines/dorino.nix

View file

@ -1,12 +1,25 @@
# A fast, GPU-accelerated terminal emulator. # A fast, GPU-accelerated terminal emulator.
{pkgs, ...}: { {
pkgs,
lib,
...
}:
{
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
settings = { settings = {
env = { env = {
TERM = "xterm-256color"; TERM = "xterm-256color";
}; };
font = {
normal = {
family = lib.mkForce "Monaspace Krypton";
}; };
}; };
home.packages = with pkgs; [ueberzugpp]; };
};
home.packages = with pkgs; [
ueberzugpp
monaspace
];
} }

View file

@ -3,7 +3,8 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
imports = [ imports = [
./atuin.nix ./atuin.nix
./bat.nix ./bat.nix
@ -18,7 +19,8 @@
]; ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
home.packages = with pkgs; home.packages =
with pkgs;
[ [
# Editors # Editors
# neovim # Improved version of vim, often used with overlays. # neovim # Improved version of vim, often used with overlays.
@ -56,6 +58,7 @@
age age
portal portal
atac atac
dblab
# TUI Apps # TUI Apps
#ncdu_2 #ncdu_2

View file

@ -3,11 +3,15 @@
pkgs, pkgs,
lib, lib,
... ...
}: let }:
let
cfg = config.programs.discord; cfg = config.programs.discord;
discordPatcherBin = pkgs.writers.writePython3Bin "discord-krisp-patcher" { discordPatcherBin = pkgs.writers.writePython3Bin "discord-krisp-patcher" {
libraries = with pkgs.python3Packages; [pyelftools capstone]; libraries = with pkgs.python3Packages; [
pyelftools
capstone
];
flakeIgnore = [ flakeIgnore = [
"E265" # from nix-shell shebang "E265" # from nix-shell shebang
"E501" # line too long (82 > 79 characters) "E501" # line too long (82 > 79 characters)
@ -27,19 +31,16 @@
# link fix # link fix
nss = pkgs.nss_latest; nss = pkgs.nss_latest;
}; };
in { in
{
options.programs.discord = { options.programs.discord = {
enable = lib.mkEnableOption "Discord"; enable = lib.mkEnableOption "Discord";
wrapDiscord = lib.mkEnableOption "wrap the Discord binary with a patching each time"; wrapDiscord = lib.mkEnableOption "wrap the Discord binary with a patching each time";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.packages = home.packages = [
[discordPatcherBin] discordPatcherBin
++ ( ] ++ (if cfg.wrapDiscord then [ wrapDiscordBinary ] else [ pkgs.discord ]);
if cfg.wrapDiscord
then [wrapDiscordBinary]
else [pkgs.discord]
);
}; };
} }

View file

@ -1,9 +1,9 @@
import sys
import shutil import shutil
import sys
from elftools.elf.elffile import ELFFile
from capstone import * from capstone import *
from capstone.x86 import * from capstone.x86 import *
from elftools.elf.elffile import ELFFile
if len(sys.argv) < 2: if len(sys.argv) < 2:
print(f"Usage: {sys.argv[0]} [path to discord_krisp.node]") print(f"Usage: {sys.argv[0]} [path to discord_krisp.node]")
@ -13,14 +13,18 @@ if len(sys.argv) < 2:
executable = sys.argv[1] executable = sys.argv[1]
elf = ELFFile(open(executable, "rb")) elf = ELFFile(open(executable, "rb"))
symtab = elf.get_section_by_name('.symtab') symtab = elf.get_section_by_name(".symtab")
krisp_initialize_address = symtab.get_symbol_by_name("_ZN7discord15KrispInitializeEv")[0].entry.st_value krisp_initialize_address = symtab.get_symbol_by_name("_ZN7discord15KrispInitializeEv")[
isSignedByDiscord_address = symtab.get_symbol_by_name("_ZN7discord4util17IsSignedByDiscordERKNSt2Cr12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE")[0].entry.st_value 0
].entry.st_value
isSignedByDiscord_address = symtab.get_symbol_by_name(
"_ZN7discord4util17IsSignedByDiscordERKNSt2Cr12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE"
)[0].entry.st_value
text = elf.get_section_by_name('.text') text = elf.get_section_by_name(".text")
text_start = text['sh_addr'] text_start = text["sh_addr"]
text_start_file = text['sh_offset'] text_start_file = text["sh_offset"]
# This seems to always be zero (.text starts at the right offset in the file). Do it just in case? # This seems to always be zero (.text starts at the right offset in the file). Do it just in case?
address_to_file = text_start_file - text_start address_to_file = text_start_file - text_start
@ -72,9 +76,9 @@ if je_location:
print(f"Found patch location: 0x{je_location:x}") print(f"Found patch location: 0x{je_location:x}")
shutil.copyfile(executable, executable + ".orig") shutil.copyfile(executable, executable + ".orig")
f = open(executable, 'rb+') f = open(executable, "rb+")
f.seek(je_location - address_to_file) f.seek(je_location - address_to_file)
f.write(b'\x66\x90') # Two byte NOP f.write(b"\x66\x90") # Two byte NOP
f.close() f.close()
else: else:
if found_already_patched: if found_already_patched:

View file

@ -1,6 +1,8 @@
{...}: { { ... }:
{
programs.nixvim = { programs.nixvim = {
plugins.bufferline = let plugins.bufferline =
let
mouse = { mouse = {
right = right =
# Lua # Lua
@ -13,7 +15,8 @@
end end
''; '';
}; };
in { in
{
enable = true; enable = true;
settings = { settings = {

View file

@ -2,7 +2,8 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
programs.nixvim = { programs.nixvim = {
extraConfigLuaPre = extraConfigLuaPre =
# lua # lua
@ -97,40 +98,40 @@
"shellharden" "shellharden"
"shfmt" "shfmt"
]; ];
bicep = ["bicep"]; bicep = [ "bicep" ];
c = ["clang_format"]; c = [ "clang_format" ];
cmake = ["cmake-format"]; cmake = [ "cmake-format" ];
cpp = ["clang_format"]; cpp = [ "clang_format" ];
cs = ["csharpier"]; cs = [ "csharpier" ];
css = ["stylelint"]; css = [ "stylelint" ];
fish = ["fish_indent"]; fish = [ "fish_indent" ];
fsharp = ["fantomas"]; fsharp = [ "fantomas" ];
go = ["gofmt"]; go = [ "gofmt" ];
haskell = ["ormolu"]; haskell = [ "ormolu" ];
javascript = [ javascript = [
[ [
"prettierd" "prettierd"
"prettier" "prettier"
] ]
]; ];
json = ["jq"]; json = [ "jq" ];
lua = ["stylua"]; lua = [ "stylua" ];
markdown = ["deno_fmt"]; markdown = [ "deno_fmt" ];
nix = ["nixfmt"]; nix = [ "nixfmt" ];
python = [ python = [
"isort" "isort"
"black" "black"
]; ];
rust = ["rustfmt"]; rust = [ "rustfmt" ];
sh = [ sh = [
"shellcheck" "shellcheck"
"shellharden" "shellharden"
"shfmt" "shfmt"
]; ];
sql = ["sqlfluff"]; sql = [ "sqlfluff" ];
swift = ["swift_format"]; swift = [ "swift_format" ];
terraform = ["terraform_fmt"]; terraform = [ "terraform_fmt" ];
toml = ["taplo"]; toml = [ "taplo" ];
typescript = [ typescript = [
[ [
"prettierd" "prettierd"
@ -141,8 +142,8 @@
"xmlformat" "xmlformat"
"xmllint" "xmllint"
]; ];
yaml = ["yamlfmt"]; yaml = [ "yamlfmt" ];
zig = ["zigfmt"]; zig = [ "zigfmt" ];
"_" = [ "_" = [
"squeeze_blanks" "squeeze_blanks"
"trim_whitespace" "trim_whitespace"

View file

@ -1,11 +1,12 @@
{...}: { { ... }:
{
programs.nixvim = { programs.nixvim = {
plugins = { plugins = {
mini = { mini = {
enable = true; enable = true;
modules = { modules = {
bufremove = {}; bufremove = { };
}; };
}; };
}; };

View file

@ -1,4 +1,5 @@
{...}: { { ... }:
{
programs.nixvim = { programs.nixvim = {
plugins.noice = { plugins.noice = {
enable = true; enable = true;
@ -51,7 +52,7 @@
pattern = "^:%s*he?l?p?%s+"; pattern = "^:%s*he?l?p?%s+";
icon = "󰋖"; icon = "󰋖";
}; };
input = {}; input = { };
}; };
}; };

View file

@ -1,6 +1,7 @@
{pkgs, ...}: { { pkgs, ... }:
{
programs.nixvim = { programs.nixvim = {
extraPlugins = [pkgs.vimPlugins.precognition-nvim]; extraPlugins = [ pkgs.vimPlugins.precognition-nvim ];
keymaps = [ keymaps = [
{ {

View file

@ -1,8 +1,10 @@
# A highly customizable status bar for Sway and other Wayland-based compositors. # A highly customizable status bar for Sway and other Wayland-based compositors.
{pkgs, ...}: let { pkgs, ... }:
let
networkInterface.eth = "wlp3s0"; networkInterface.eth = "wlp3s0";
hwmon = "/sys/class/hwmon/hwmon0/temp1_input"; hwmon = "/sys/class/hwmon/hwmon0/temp1_input";
in { in
{
programs.waybar.enable = true; programs.waybar.enable = true;
programs.waybar.settings = { programs.waybar.settings = {
@ -10,9 +12,25 @@ in {
layer = "bottom"; layer = "bottom";
position = "top"; position = "top";
height = 24; height = 24;
modules-left = ["hyprland/workspaces" "sway/mode"]; modules-left = [
modules-center = ["hyprland/window" "gamemode"]; "hyprland/workspaces"
modules-right = ["network" "pulseaudio" "cpu" "custom/cpu_freq" "temperature" "memory" "battery" "tray" "clock"]; "sway/mode"
];
modules-center = [
"hyprland/window"
"gamemode"
];
modules-right = [
"network"
"pulseaudio"
"cpu"
"custom/cpu_freq"
"temperature"
"memory"
"battery"
"tray"
"clock"
];
"hyprland/workspaces".sort-by-number = true; "hyprland/workspaces".sort-by-number = true;
@ -34,9 +52,7 @@ in {
"custom/cpu_freq" = { "custom/cpu_freq" = {
format = "{}MHz "; format = "{}MHz ";
interval = 5; interval = 5;
exec = exec = pkgs.writeShellScript "cpuFreq" ''
pkgs.writeShellScript "cpuFreq"
''
${pkgs.busybox}/bin/cat /proc/cpuinfo | \ ${pkgs.busybox}/bin/cat /proc/cpuinfo | \
${pkgs.busybox}/bin/grep MHz | \ ${pkgs.busybox}/bin/grep MHz | \
${pkgs.busybox}/bin/cut -c 12-15 | \ ${pkgs.busybox}/bin/cut -c 12-15 | \
@ -55,7 +71,13 @@ in {
}; };
"format" = "{capacity}% {icon} "; "format" = "{capacity}% {icon} ";
"format-full" = ""; "format-full" = "";
"format-icons" = ["" "" "" "" ""]; "format-icons" = [
""
""
""
""
""
];
}; };
"memory"."format" = "{used:0.1f}G/{total:0.1f}G "; "memory"."format" = "{used:0.1f}G/{total:0.1f}G ";
@ -81,7 +103,10 @@ in {
"phone" = ""; "phone" = "";
"portable" = ""; "portable" = "";
"car" = ""; "car" = "";
"default" = ["" ""]; "default" = [
""
""
];
}; };
"on-click" = "pavucontrol"; "on-click" = "pavucontrol";
}; };

View file

@ -8,7 +8,8 @@
pkgs, pkgs,
user, user,
... ...
}: { }:
{
# You can import other NixOS modules here # You can import other NixOS modules here
imports = [ imports = [
# If you want to use modules your own flake exports (from modules/nixos): # If you want to use modules your own flake exports (from modules/nixos):
@ -90,18 +91,17 @@
# This will add each flake input as a registry # This will add each flake input as a registry
# To make nix3 commands consistent with your flake # To make nix3 commands consistent with your flake
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs); nix.registry = (lib.mapAttrs (_: flake: { inherit flake; })) (
(lib.filterAttrs (_: lib.isType "flake")) inputs
);
# This will additionally add your inputs to the system's legacy channels # This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome! # Making legacy nix commands consistent as well, awesome!
nix.nixPath = ["/etc/nix/path"]; nix.nixPath = [ "/etc/nix/path" ];
environment.etc = environment.etc = lib.mapAttrs' (name: value: {
lib.mapAttrs'
(name: value: {
name = "nix/path/${name}"; name = "nix/path/${name}";
value.source = value.flake; value.source = value.flake;
}) }) config.nix.registry;
config.nix.registry;
networking.hostName = "candlekeep"; networking.hostName = "candlekeep";
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -113,7 +113,7 @@
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILq54YrM3BbhBs0oDLOrc1bkg6FCCmkV4E3pWLZp0ejN gwg313@pm.me" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILq54YrM3BbhBs0oDLOrc1bkg6FCCmkV4E3pWLZp0ejN gwg313@pm.me"
]; ];
extraGroups = ["wheel"]; extraGroups = [ "wheel" ];
}; };
}; };

View file

@ -7,16 +7,23 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: { }:
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
../../common/nixos/nfs.nix ../../common/nixos/nfs.nix
]; ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"]; boot.initrd.availableKernelModules = [
boot.initrd.kernelModules = []; "nvme"
boot.kernelModules = ["kvm-amd"]; "xhci_pci"
boot.extraModulePackages = []; "usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/f2c87d99-ea17-4ef3-9ef6-bcc6637357f2"; device = "/dev/disk/by-uuid/f2c87d99-ea17-4ef3-9ef6-bcc6637357f2";
@ -31,7 +38,7 @@
}; };
swapDevices = [ swapDevices = [
{device = "/dev/disk/by-uuid/dd8d717a-d872-4780-af3c-af4c702b587a";} { device = "/dev/disk/by-uuid/dd8d717a-d872-4780-af3c-af4c702b587a"; }
]; ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -2,7 +2,8 @@
config, config,
user, user,
... ...
}: { }:
{
services.syncthing = { services.syncthing = {
enable = true; enable = true;
dataDir = "/home/gwg313"; dataDir = "/home/gwg313";
@ -17,13 +18,15 @@
settings = { settings = {
devices = { devices = {
"grymforge" = {id = "N2TYFZ4-ODIIHIZ-UP27V4V-NYMAZNI-SIATS5S-5NTM6JX-A67HCZ5-ZB4TVQJ";}; "grymforge" = {
id = "N2TYFZ4-ODIIHIZ-UP27V4V-NYMAZNI-SIATS5S-5NTM6JX-A67HCZ5-ZB4TVQJ";
};
}; };
folders = { folders = {
"repos" = { "repos" = {
path = "/home/gwg313/repos"; path = "/home/gwg313/repos";
devices = ["grymforge"]; devices = [ "grymforge" ];
versioning = { versioning = {
type = "staggered"; type = "staggered";
params = { params = {
@ -34,7 +37,7 @@
}; };
"documents" = { "documents" = {
path = "/home/gwg313/Documents"; path = "/home/gwg313/Documents";
devices = ["grymforge"]; devices = [ "grymforge" ];
versioning = { versioning = {
type = "staggered"; type = "staggered";
params = { params = {
@ -45,7 +48,7 @@
}; };
"obsidian" = { "obsidian" = {
path = "/home/gwg313/vault"; path = "/home/gwg313/vault";
devices = ["grymforge"]; devices = [ "grymforge" ];
versioning = { versioning = {
type = "staggered"; type = "staggered";
params = { params = {

View file

@ -2,7 +2,8 @@
config, config,
user, user,
... ...
}: { }:
{
services.syncthing = { services.syncthing = {
enable = true; enable = true;
dataDir = "/home/gwg313"; dataDir = "/home/gwg313";
@ -17,13 +18,15 @@
settings = { settings = {
devices = { devices = {
"candlekeep" = {id = "762A3TK-Z3ZX6DG-V4VASMJ-H6DJHE5-PBD6YZQ-MPILUWT-E7EY4O7-4EAPHAX";}; "candlekeep" = {
id = "762A3TK-Z3ZX6DG-V4VASMJ-H6DJHE5-PBD6YZQ-MPILUWT-E7EY4O7-4EAPHAX";
};
}; };
folders = { folders = {
"repos" = { "repos" = {
path = "/home/gwg313/repos"; path = "/home/gwg313/repos";
devices = ["candlekeep"]; devices = [ "candlekeep" ];
versioning = { versioning = {
type = "staggered"; type = "staggered";
params = { params = {
@ -34,7 +37,7 @@
}; };
"documents" = { "documents" = {
path = "/home/gwg313/Documents"; path = "/home/gwg313/Documents";
devices = ["candlekeep"]; devices = [ "candlekeep" ];
versioning = { versioning = {
type = "staggered"; type = "staggered";
params = { params = {
@ -45,7 +48,7 @@
}; };
"obsidian" = { "obsidian" = {
path = "/home/gwg313/vault"; path = "/home/gwg313/vault";
devices = ["candlekeep"]; devices = [ "candlekeep" ];
versioning = { versioning = {
type = "staggered"; type = "staggered";
params = { params = {

View file

@ -16,14 +16,17 @@ buildGoModule rec {
vendorHash = "sha256-zt1/gE4bVj+3yr9n0kT2FMYMEmiooy3k1lQ77rN6sTk="; vendorHash = "sha256-zt1/gE4bVj+3yr9n0kT2FMYMEmiooy3k1lQ77rN6sTk=";
ldflags = ["-s" "-w"]; ldflags = [
"-s"
"-w"
];
meta = { meta = {
description = "Smart session manager for the terminal"; description = "Smart session manager for the terminal";
homepage = "https://github.com/joshmedeski/sesh"; homepage = "https://github.com/joshmedeski/sesh";
changelog = "https://github.com/joshmedeski/sesh/releases/tag/${src.rev}"; changelog = "https://github.com/joshmedeski/sesh/releases/tag/${src.rev}";
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [gwg313]; maintainers = with lib.maintainers; [ gwg313 ];
mainProgram = "sesh"; mainProgram = "sesh";
}; };
} }