Start from scratch

This commit is contained in:
Christoph Hollizeck 2025-10-26 22:40:37 +01:00
parent f15630dfb1
commit fe6de112e6
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
111 changed files with 428 additions and 6886 deletions

View file

@ -1,14 +0,0 @@
## Modules Part of the Flake
## [nixos](./nixos/README.md)
All the system configuration should go in here
## [home](./home/README.md)
All the home-manager configuration should go in here
## [darwin](./darwin/README.md)
> [!NOTE]
> I currently do not own a mac so I have not set up a mac specific configuration

13
modules/base/home.nix Normal file
View file

@ -0,0 +1,13 @@
{
flake.modules.homeManager.base = {
programs.home-manager.enable = true;
services = {
home-manager.autoExpire = {
enable = true;
frequency = "weekly";
store.cleanup = true;
};
};
};
}

View file

@ -0,0 +1,24 @@
{
flake.modules.nixos.base =
{ hostConfig, ... }:
{
networking = {
hostName = hostConfig.name;
networkmanager = {
enable = true;
};
useDHCP = false;
};
systemd = {
services.NetworkManager-wait-online.enable = false;
network.wait-online.enable = false;
};
services.resolved = {
enable = true;
};
};
}

View file

@ -0,0 +1,25 @@
{
flake.modules =
let
stateVersion = "25.05";
in
{
homeManager.base = {
home = {
inherit stateVersion;
};
};
nixos.base = {
system = {
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://search.nixos.org/options?&show=system.stateVersion&from=0&size=50&sort=relevance&type=packages&query=stateVersion).
inherit stateVersion;
};
};
};
}

View file

@ -0,0 +1,4 @@
{ inputs, ... }:
{
imports = [ inputs.flake-parts.flakeModules.modules ];
}

View file

@ -0,0 +1,37 @@
{
inputs,
lib,
config,
...
}:
let
prefix = "hosts/";
collectHostsModules = modules: lib.filterAttrs (name: _: lib.hasPrefix prefix name) modules;
in
{
flake.nixosConfigurations = lib.pipe (collectHostsModules config.flake.modules.nixos) [
(lib.mapAttrs' (
name: module:
let
specialArgs = {
inherit inputs;
hostConfig = module // {
name = lib.removePrefix prefix name;
};
};
in
{
name = lib.removePrefix prefix name;
value = inputs.nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = module.imports ++ [
inputs.home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = specialArgs;
}
];
};
}
))
];
}

View file

@ -1 +0,0 @@
# Home-manager configuration

View file

@ -1,65 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib.${namespace};
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.apps.cli-apps.fish;
in
{
options.${namespace}.apps.cli-apps.fish = {
enable = mkBoolOpt true "Whether or not to enable the fish shell";
};
config = mkIf cfg.enable {
catppuccin.fish.enable = true;
programs = {
fish = {
enable = true;
shellInit = ''
zoxide init fish | source
direnv hook fish | source
set -x LESS_TERMCAP_mb \e'[01;32m'
set -x LESS_TERMCAP_md \e'[01;32m'
set -x LESS_TERMCAP_me \e'[0m'
set -x LESS_TERMCAP_se \e'[0m'
set -x LESS_TERMCAP_so \e'[01;47;34m'
set -x LESS_TERMCAP_ue \e'[0m'
set -x LESS_TERMCAP_us \e'[01;36m'
set -x LESS -R
set -x GROFF_NO_SGR 1
'';
shellAliases = {
vim = "hx";
ls = "eza -lah --icons --git";
lss = "ls --total-size";
};
functions = {
checkHash = "nix hash to-sri --type sha256 $(nix-prefetch-url --unpack $argv)";
deployNixberry = "nixos-rebuild switch --flake .#nixberry --target-host nixberry --sudo --ask-sudo-password";
deployLoptland = "nixos-rebuild switch --flake .#loptland --target-host christophhollizeck.dev --sudo --ask-sudo-password";
checkPR = ''cd /home/cholli/projects/nixpkgs && ${lib.getExe pkgs.nixpkgs-review} pr $argv --post-result --systems "x86_64-linux aarch64-linux"'';
};
plugins = with pkgs.fishPlugins; [
{
name = "forgit";
src = forgit.src;
}
];
};
zoxide = {
enable = true;
options = [ "--cmd cd" ];
};
};
};
}

View file

@ -1,18 +0,0 @@
{
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt enabled;
cfg = config.${namespace}.apps.cli-apps.home-manager;
in
{
options.${namespace}.apps.cli-apps.home-manager = {
enable = mkBoolOpt true "Enable home-manager";
};
config = mkIf cfg.enable { programs.home-manager = enabled; };
}

View file

@ -1,75 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.apps.cli-apps.starship;
in
{
options.${namespace}.apps.cli-apps.starship = {
enable = mkBoolOpt true "Whether or not to enable starship shell";
};
config = mkIf cfg.enable {
catppuccin.starship.enable = false;
programs = {
fish.shellInit = "
starship init fish | source
";
starship = {
enable = true;
enableTransience = true;
settings = {
character = {
error_symbol = "[ ](bold red)";
};
time = {
disabled = false;
time_format = "%T";
utc_time_offset = "+2";
};
username = {
style_user = "#00de00";
style_root = "red";
format = "[$user]($style) ";
disabled = false;
show_always = true;
};
hostname = {
ssh_only = false;
format = "@ [$hostname](bold yellow) ";
disabled = false;
};
directory = {
home_symbol = "󰋞 ~";
read_only_style = "197";
read_only = " ";
format = "at [$path]($style)[$read_only]($read_only_style) ";
};
git_metrics = {
disabled = false;
added_style = "bold blue";
format = "[+$added]($added_style)/[-$deleted]($deleted_style) ";
};
git_status = {
format = "([$all_status$ahead_behind]($style) )";
ahead = "[$count](bold green)";
behind = "[$count](bold red)";
diverged = "[$ahead_count$behind_count](red)";
deleted = "[$count](red) ";
modified = "[!$count](yellow) ";
staged = "[+$count](green) ";
renamed = "[$count](green) ";
untracked = "[?$count](blue) ";
};
};
};
};
};
}

View file

@ -1,25 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.apps.graphviz;
in
{
options.${namespace}.apps.graphviz = {
enable = mkBoolOpt true "Whether or not you want to install graphviz";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ graphviz ];
home.shellAliases = {
nixsize = "nix-du -n=50 | dot -Tsvg > ~/Pictures/store.svg";
};
};
}

View file

@ -1,58 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.apps.kitty;
in
{
options.${namespace}.apps.kitty = {
enable = mkEnableOption "Kitty";
};
config = mkIf cfg.enable {
home.packages = [ pkgs.kitty ];
home.sessionVariables.TERMINAL = "kitty";
catppuccin.kitty.enable = true;
# TODO: move this to a thunar specific module
home.file.".config/Thunar/uca.xml".text = ''
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<icon>kitty</icon>
<name>Open Kitty here</name>
<submenu></submenu>
<unique-id>1726095927116900-1</unique-id>
<command>${pkgs.kitty}/bin/kitty %f</command>
<description>Example for a custom action</description>
<range></range>
<patterns>*</patterns>
<startup-notify/>
<directories/>
</action>
</actions>
'';
programs.kitty = {
enable = true;
# themeFile = "tokyo_night_night";
font = {
name = "FiraCode Nerd Font";
size = 15;
};
shellIntegration.enableFishIntegration = true;
settings = {
"background_opacity" = "0.90";
"shell" = "fish";
"confirm_os_window_close" = "0";
};
};
};
}

View file

@ -1,24 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt enabled;
cfg = config.${namespace}.tools.direnv;
in
{
options.${namespace}.tools.direnv = {
enable = mkBoolOpt false "Whether or not to enable direnv.";
};
config = mkIf cfg.enable {
programs.direnv = {
enable = true;
nix-direnv = enabled;
};
};
}

View file

@ -1,124 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib.${namespace};
let
inherit (lib) mkIf types;
cfg = config.${namespace}.tools.git;
user = config.${namespace}.user;
in
{
options.${namespace}.tools.git = {
enable = mkBoolOpt true "Enable Git (Default true)";
userName = mkOpt types.str user.fullName "The name to configure git with.";
userEmail = mkOpt types.str user.email "The email to configure git with.";
signingKey = mkOpt types.str "ACCFA2DB47795D9E" "The pub key to sign commits with.";
signByDefault = mkOpt types.bool true "Whether to sign commits by default.";
};
config = mkIf cfg.enable {
systemd.user = {
services."git-maintenance@" = {
Unit = {
Description = "Optimize Git repositories data";
};
Service = {
Type = "oneshot";
ExecStart = ''"${lib.getExe config.programs.git.package}" --exec-path="${lib.getBin config.programs.git.package}/bin" -c credential.interactive=false -c core.askPass=true for-each-repo --config=maintenance.repo maintenance run --schedule=%i'';
LockPersonality = "yes";
MemoryDenyWriteExecute = "yes";
NoNewPrivileges = "yes";
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6 AF_VSOCK";
RestrictNamespaces = "yes";
RestrictRealtime = "yes";
RestrictSUIDSGID = "yes";
SystemCallArchitectures = "native";
SystemCallFilter = "@system-service";
};
};
timers = {
"git-maintenance@hourly" = {
Unit = {
Description = "Optimize Git repositories data";
};
Timer = {
OnCalendar = "*-*-* *:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
"git-maintenance@daily" = {
Unit = {
Description = "Optimize Git repositories data";
};
Timer = {
OnCalendar = "*-*-* 20:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
"git-maintenance@weekly" = {
Unit = {
Description = "Optimize Git repositories data";
};
Timer = {
OnCalendar = "Sun *-*-* 20:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
};
};
programs.git = {
enable = true;
lfs = enabled;
signing = {
key = cfg.signingKey;
inherit (cfg) signByDefault;
};
settings = {
user = {
name = cfg.userName;
email = cfg.userEmail;
};
core = {
fsmonitor = true;
};
init = {
defaultBranch = "main";
};
pull = {
rebase = true;
};
push = {
autoSetupRemote = true;
};
rebase = {
autoStash = true;
};
safe = {
directory = "${user.home}/projects/config";
};
maintenance = {
repo = [
"${user.home}/projects/nixpkgs"
"${user.home}/projects/config"
];
strategy = "incremental";
};
lfs."https://git.christophhollizeck.dev/Daholli/nixos-config.git/info/lfs".locksverify = true;
};
};
};
}

View file

@ -1,51 +0,0 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib)
types
mkIf
mkDefault
mkMerge
;
inherit (lib.${namespace}) mkOpt;
cfg = config.${namespace}.user;
home-directory = if cfg.name == null then null else "/home/${cfg.name}";
in
{
options.${namespace}.user = {
enable = mkOpt types.bool true "Whether to configure the user account.";
name = mkOpt (types.nullOr types.str) (config.snowfallorg.user.name or "cholli"
) "The user account.";
fullName = mkOpt types.str "Christoph Hollizeck" "The full name of the user.";
email = mkOpt types.str "christoph.hollizeck@hey.com" "The email of the user.";
home = mkOpt (types.nullOr types.str) home-directory "The user's home directory.";
};
config = mkIf cfg.enable (mkMerge [
{
assertions = [
{
assertion = cfg.name != null;
message = "${namespace}.user.name must be set";
}
{
assertion = cfg.home != null;
message = "${namespace}.user.home must be set";
}
];
home = {
username = mkDefault cfg.name;
homeDirectory = mkDefault cfg.home;
};
}
]);
}

View file

@ -0,0 +1,81 @@
{
config,
...
}:
let
in
{
flake.modules.nixos."hosts/yggdrasil" =
{ lib, pkgs, ... }:
{
imports =
with config.flake.modules.nixos;
[
# System modules
base
# Users
cholli
]
++ [
{
home-manager.users.cholli = {
imports = with config.flake.modules.homeManager; [
base
];
};
}
];
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd.availableKernelModules = [
"nvme"
"ahci"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
];
kernelModules = [ "kvm-amd" ];
};
services.fstrim.enable = true;
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/b1a956f4-91d5-456e-a92b-be505bb719bd";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/B4D4-8BA0";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
"/storage" = {
device = "/dev/disk/by-uuid/c3c1dec1-7716-4c37-a3f2-bb60f9af84fd";
fsType = "ext4";
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/4bec00ec-e9eb-4034-836a-ecf15e0bb40e"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = true;
};
}

View file

@ -1,50 +0,0 @@
# System configuration
## apps
These contain specialized configurations some simple some more complex to enable programs and everything around them.
This section also has a subsection `cli-apps` which is exclusively for apps that live in your terminal.
## [archetypes](./archetypes/README.md)
This section contains configurations that enable whole system types at once, check out the more in depth Readme in that section
Planned archetypes are:
- gaming (this is mostly fleshed out since I use it on my main machine)
- wsl
- pi
- minimal-server
- github runner?
## [desktop](./desktop/README.md)
This section contains everything related to GUI.
currently I am using Hyprland, but I was using more or less out of the box KDE for a long time and was very happy with it.
It also has a `addons` section where I plan to put all configurations for things of the hyprland ecosystem and bars such as waybar / ags (in the future).
## security
This has some of the configuration you need for your system to run properly, gpg has the yubikey configuration, the keyring is well a keyring, so that your computer can access the TPM, and also [sops-nix](https://github.com/Mic92/sops-nix) which I would recommend to setup for critical information.
## services
This section is fairly empty, but will be filled up when I start with the server configs.
## [submodules](./submodules/README.md)
This is the smaller archetypes section, just to combine some aspects that are never used alone into one package, such as the basic one that activates all the mandatory things I don't want to write out every time.
## system
This section is home to all of the low level system related configuration, it contains sections for your hardware, keyboard layouts what boot attributes to set, and which fonts to install.
## tools
This section could also be part of the cli-apps section but I want to have more system critical things here e.g Git and direnv both amazing tools that deserve a special spot in this config.
## user
Here you define the user, or I guess users if you have more people using this system, I will think about multi user systems when I need to :D

View file

@ -1,40 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.apps._1password;
username = config.${namespace}.user.name;
in
{
options.${namespace}.apps._1password = {
enable = mkBoolOpt true "Enable 1Password";
};
config = mkIf cfg.enable {
programs = {
_1password.enable = true;
_1password-gui = {
enable = true;
polkitPolicyOwners = [ username ];
};
};
${namespace}.home.file.".ssh/config".text = ''
Host *
ForwardAgent yes
IdentityAgent /home/${username}/.1password/agent.sock
Host loptland
Hostname christophhollizeck.dev
'';
};
}

View file

@ -1,170 +0,0 @@
{
config,
inputs,
lib,
namespace,
pkgs,
system,
...
}:
let
inherit (lib) mkIf mkEnableOption mkOption;
cfg = config.${namespace}.apps.cli-apps.helix;
cachix-url = "https://helix.cachix.org";
cachix-key = "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=";
helix-pkg = inputs.helix.packages.${system}.default;
in
{
options.${namespace}.apps.cli-apps.helix = {
enable = mkEnableOption "Whether to enable helix or not";
pkg = mkOption {
type = lib.types.package;
default = helix-pkg;
description = "Which helix pacakge to use";
};
};
config = mkIf cfg.enable {
environment = {
systemPackages = [
cfg.pkg
];
};
${namespace} = {
home.extraOptions = {
home.file.".config/helix/ignore".text = ''
.idea/
!**/appsettings.json
.direnv/
.devenv/
'';
catppuccin.helix.enable = true;
programs.helix = {
enable = true;
package = helix-pkg;
defaultEditor = true;
settings = {
editor = {
auto-format = true;
line-number = "relative";
file-picker = {
hidden = false;
};
lsp = {
display-inlay-hints = true;
display-messages = true;
};
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
indent-guides = {
render = true;
character = "|";
};
statusline = {
left = [
"mode"
"spinner"
];
center = [ "file-name" ];
right = [
"workspace-diagnostics"
"diagnostics"
"selections"
"position"
"total-line-numbers"
"spacer"
"file-encoding"
"file-line-ending"
"file-type"
];
separator = "";
};
};
keys = {
normal = {
esc = [
"collapse_selection"
"keep_primary_selection"
];
space = {
space = "file_picker";
};
C-j = (builtins.genList (_: "move_line_down") 5) ++ [ "align_view_center" ];
C-k = (builtins.genList (_: "move_line_up") 5) ++ [ "align_view_center" ];
};
};
};
languages = {
language = [
{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
language-servers = [
"nixd"
"nil"
];
}
{
# provided by the dev environment in the rust shell
name = "rust";
auto-format = true;
formatter.command = "cargo fmt";
language-servers = [ "rust-analyzer" ];
}
];
language-server = {
nixd = {
command = "${pkgs.nixd}/bin/nixd";
};
marksman = {
command = "${pkgs.marksman}/bin/marksman";
};
vscode-json-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-json-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
config.json.validate.enable = true;
};
vscode-html-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-html-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
};
vscode-css-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-css-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
};
vscode-eslint-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-eslint-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
};
};
};
};
};
nix.extra-substituters.${cachix-url} = {
key = cachix-key;
};
};
};
}

View file

@ -1,39 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.apps.cli-apps.nixvim;
in
{
options.${namespace}.apps.cli-apps.nixvim = {
enable = mkBoolOpt false "Whether to enable nixvim or not (Default true)";
};
config = mkIf cfg.enable {
environment = {
systemPackages = with pkgs; [
less
nvim-pkg
];
variables = {
EDITOR = "nvim";
SUDOEDITOR = "nvim";
PAGER = "less";
MANPAGER = "less";
};
};
${namespace}.home = {
extraOptions = {
# Use Neovim for Git diffs.
programs.fish.shellAliases.vimdiff = "nvim -d";
};
};
};
}

View file

@ -1,25 +0,0 @@
{
config,
lib,
namespace,
pkgs,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.apps.discord;
in
{
options.${namespace}.apps.discord = with types; {
enable = mkBoolOpt false "Whether or not to enable basic configuration";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
discord
vesktop
];
};
}

View file

@ -1,28 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.apps.obs-studio;
in
{
options.${namespace}.apps.obs-studio = with types; {
enable = mkBoolOpt false "Whether or not to enable obs-studio";
};
config = mkIf cfg.enable {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-move-transition
];
};
};
}

View file

@ -1,23 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.apps.starsector;
in
{
options.${namespace}.apps.starsector = {
enable = mkEnableOption "Whether or not to enable the game starsector.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
starsector
];
};
}

View file

@ -1,30 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.apps.steam;
in
{
options.${namespace}.apps.steam = {
enable = mkEnableOption "Whether or not to enable support for Steam.";
};
config = mkIf cfg.enable {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
extraCompatPackages = with pkgs; [ proton-ge-bin ];
};
environment.systemPackages = with pkgs; [
protontricks
];
};
}

View file

@ -1,19 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.apps.teamspeak;
in
{
options.${namespace}.apps.teamspeak = with types; {
enable = mkBoolOpt false "Whether or not to enable basic configuration";
};
config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ teamspeak6-client ]; };
}

View file

@ -1,37 +0,0 @@
{
config,
lib,
namespace,
pkgs,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.apps.vivaldi;
in
{
options.${namespace}.apps.vivaldi = with types; {
enable = mkBoolOpt false "Whether or not to enable vivaldi browser";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
vivaldi
vivaldi-ffmpeg-codecs
qt5.qtwayland
];
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
vivaldi-bin
'';
mode = "0755";
};
};
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
};
}

View file

@ -1,40 +0,0 @@
{
config,
inputs,
lib,
namespace,
system,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.apps.zen-browser;
zenbrowser = inputs.zen-browser.packages."${system}".default;
in
{
options.${namespace}.apps.zen-browser = {
enable = mkEnableOption "Whether or not to enable zen browser";
};
config = mkIf cfg.enable {
environment.systemPackages = [
zenbrowser
];
environment.sessionVariables = {
DEFAULT_BROWSER = "${zenbrowser}/bin/zen-beta";
BROWSER = "zen-beta";
};
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
zen
'';
mode = "0755";
};
};
};
}

View file

@ -1,22 +0,0 @@
# Archetypes
## Gaming
This archetype installs Steam and the Prismlauncher, a graphical user interface (KDE) and some other basic functionality.
I want to look into also setting up some factorio configs declarative later. Maybe setup Lutris to allow for some other games aswell.
Currently Steam with proton is working amazingly.
## Workstation
Mainly for Office or daily stuff, libre Office, Pdf readers and the likes come to mind.
## Server
I want to try setting up a DIY NAS at home using nix and maybe a rasberry pie but there is no real concrete plan for now.
## Pi / Homeassistant
> [!WARNING]
> WIP

View file

@ -1,36 +0,0 @@
{
config,
lib,
namespace,
pkgs,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.archetypes.gaming;
in
{
options.${namespace}.archetypes.gaming = with types; {
enable = mkBoolOpt false "Whether or not to enable the gaming archetype.";
};
config = mkIf cfg.enable {
${namespace} = {
submodules = {
basics = enabled;
games = enabled;
socials = enabled;
};
system.hardware = {
audio = enabled;
};
apps = {
zen-browser = enabled;
};
};
};
}

View file

@ -1,5 +0,0 @@
# Desktop Configurations
Here I have all of my desktop-/windowmanager configuration and their erspective configurable addons.
For now this is mostly reserved for [Hyprland](https://hyprland.org/).

View file

@ -1,43 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.desktop.addons.hypridle;
in
{
options.${namespace}.desktop.addons.hypridle = {
enable = mkEnableOption "Enable HyprIdle";
};
config = mkIf cfg.enable {
${namespace}.home.extraOptions = {
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock-blur";
};
listener = [
{
timeout = 600;
on-timeout = "loginctl lock-session";
}
{
timeout = 1200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
};
};
}

View file

@ -1,136 +0,0 @@
{
config,
inputs,
lib,
namespace,
pkgs,
system,
...
}:
let
inherit (lib) mkIf mkEnableOption;
hyprlock-package = inputs.hyprlock.packages.${system}.hyprlock;
hyprlock-blur = pkgs.writeShellScriptBin "hyprlock-blur" ''
${pkgs.grim}/bin/grim -o DP-1 -l 0 /tmp/screenshot1.png &
${pkgs.grim}/bin/grim -o HDMI-A-1 -l 0 /tmp/screenshot2.png &
wait &&
hyprlock
'';
cfg = config.${namespace}.desktop.addons.hyprlock;
username = config.${namespace}.user.name;
in
{
options.${namespace}.desktop.addons.hyprlock = {
enable = mkEnableOption "Enable Hyprlock";
};
config = mkIf cfg.enable {
security.pam.services.hyprlock = {
allowNullPassword = false;
startSession = false;
text = ''
auth include login
account include login
'';
};
environment.systemPackages = [ hyprlock-blur ];
${namespace}.desktop.hyprland.settings = {
bind = [
"$mod CTRL, l, exec, hyprlock-blur"
];
};
snowfallorg.users.${username}.home.config = {
programs.hyprlock = {
enable = true;
package = hyprlock-package;
settings = {
# inspiration from https://github.com/justinmdickey/publicdots/blob/main/.config/hypr/hyprlock.conf
background = [
{
monitor = "DP-1";
path = "/tmp/screenshot1.png";
blur_passes = 1; # 0 disables blurring
blur_size = 7;
noise = 1.17e-2;
}
{
monitor = "HDMI-A-1";
path = "/tmp/screenshot2.png";
blur_passes = 2; # 0 disables blurring
blur_size = 7;
noise = 1.17e-2;
}
];
label = [
{
monitor = "DP-1";
text = "$TIME";
color = "rgba(242, 243, 244, 0.75)";
font_size = 95;
font_family = "JetBrains Mono";
position = "0, 300";
halign = "center";
valign = "center";
}
{
monitor = "DP-1";
text = ''cmd[update:1000] echo $(date +"%A, %B %d")'';
color = "rgba(242, 243, 244, 0.75)";
font_size = 22;
font_family = "JetBrains Mono";
position = "0, 200";
halign = "center";
valign = "center";
}
];
image = {
monitor = "DP-1";
path = "/home/${username}/Pictures/profile.png";
position = "0, 50";
halign = "center";
valign = "center";
};
input-field = {
monitor = "DP-1";
size = "200,50";
outline_thickness = 2;
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.35; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
outer_color = "rgba(0, 0, 0, 0)";
inner_color = "rgba(0, 0, 0, 0.2)";
font_color = "rgb(111, 45, 104)";
fade_on_empty = false;
rounding = -1;
check_color = "rgb(30, 107, 204)";
placeholder_text = ''<i><span foreground="##cdd6f4">Input Password...</span></i>'';
hide_input = false;
position = "0, -100";
halign = "center";
valign = "center";
};
general = {
auth_method = "pam";
};
};
};
};
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 MiB

View file

@ -1,510 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib)
mkIf
mkEnableOption
;
cfg = config.${namespace}.desktop.addons.hyprpanel;
username = config.${namespace}.user.name;
in
{
options.${namespace}.desktop.addons.hyprpanel = {
enable = mkEnableOption "Enable HyprIdle";
};
config = mkIf cfg.enable {
snowfallorg.users.${username}.home.config = {
wayland.windowManager.hyprland.settings.exec-once = [
"${pkgs.hyprpanel}/bin/hyprpanel"
];
programs.hyprpanel = {
enable = true;
settings = {
menus.dashboard.powermenu.avatar.image = "/home/cholli/Pictures/profile.png";
bar = {
launcher.autoDetectIcon = true;
workspaces = {
show_icons = false;
show_numbered = true;
};
layouts = {
"0" = {
"left" = [
"dashboard"
"workspaces"
];
"middle" = [
"windowtitle"
];
"right" = [
"volume"
"bluetooth"
"cputemp"
"cpu"
"ram"
"systray"
"clock"
"notifications"
];
};
"1" = {
"left" = [
"workspaces"
];
"right" = [
"clock"
];
};
};
customModules = {
ram = {
icon = " ";
labelType = "used/total";
};
cpu = {
icon = " ";
leftClick = "kitty --hold btop";
};
cpuTemp = {
sensor = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp3_input";
unit = "metric";
showUnit = true;
};
};
clock.format = "%a %b %d %H:%M:%S";
notifications = {
show_total = true;
hideCountWhenZero = false;
};
};
layouts = {
"0" = {
left = [
"dashboard"
"workspaces"
];
middle = [ "windowtitle" ];
right = [
"volume"
"bluetooth"
"cputemp"
"cpu"
"ram"
"systray"
"clock"
"notifications"
];
};
"1" = {
left = [ "workspaces" ];
right = [ "clock" ];
};
};
theme = {
bar = {
floating = true;
background = "#11111b";
border.color = "#b4befe";
buttons = {
background = "#242438";
battery.background = "#242438";
battery.border = "#f9e2af";
battery.icon = "#242438";
battery.icon_background = "#f9e2af";
battery.text = "#f9e2af";
bluetooth.background = "#242438";
bluetooth.border = "#89dceb";
bluetooth.icon = "#1e1e2e";
bluetooth.icon_background = "#89dbeb";
bluetooth.text = "#89dceb";
borderColor = "#b4befe";
clock.background = "#242438";
clock.border = "#f5c2e7";
clock.icon = "#232338";
clock.icon_background = "#f5c2e7";
clock.text = "#f5c2e7";
dashboard.background = "#f9e2af";
dashboard.border = "#f9e2af";
dashboard.icon = "#1e1e2e";
hover = "#45475a";
icon = "#242438";
icon_background = "#b4befe";
media.background = "#242438";
media.border = "#b4befe";
media.icon = "#1e1e2e";
media.icon_background = "#b4befe";
media.text = "#b4befe";
modules.cava.background = "#242438";
modules.cava.border = "#94e2d5";
modules.cava.icon = "#242438";
modules.cava.icon_background = "#94e2d5";
modules.cava.text = "#94e2d5";
modules.cpu.background = "#242438";
modules.cpu.border = "#f38ba8";
modules.cpu.icon = "#181825";
modules.cpu.icon_background = "#f38ba8";
modules.cpu.text = "#f38ba8";
modules.hypridle.background = "#242438";
modules.hypridle.border = "#f5c2e7";
modules.hypridle.icon = "#242438";
modules.hypridle.icon_background = "#f5c2e7";
modules.hypridle.text = "#f5c2e7";
modules.hyprsunset.background = "#242438";
modules.hyprsunset.border = "#fab387";
modules.hyprsunset.icon = "#242438";
modules.hyprsunset.icon_background = "#fab387";
modules.hyprsunset.text = "#fab387";
modules.kbLayout.background = "#242438";
modules.kbLayout.border = "#89dceb";
modules.kbLayout.icon = "#181825";
modules.kbLayout.icon_background = "#89dceb";
modules.kbLayout.text = "#89dceb";
modules.microphone.background = "#242438";
modules.microphone.border = "#a6e3a1";
modules.microphone.icon = "#242438";
modules.microphone.icon_background = "#a6e3a1";
modules.microphone.text = "#a6e3a1";
modules.netstat.background = "#242438";
modules.netstat.border = "#a6e3a1";
modules.netstat.icon = "#181825";
modules.netstat.icon_background = "#a6e3a1";
modules.netstat.text = "#a6e3a1";
modules.power.background = "#242438";
modules.power.border = "#f38ba8";
modules.power.icon = "#181825";
modules.power.icon_background = "#f38ba8";
modules.ram.background = "#242438";
modules.ram.border = "#f9e2af";
modules.ram.icon = "#181825";
modules.ram.icon_background = "#f9e2af";
modules.ram.text = "#f9e2af";
modules.storage.background = "#242438";
modules.storage.border = "#f5c2e7";
modules.storage.icon = "#181825";
modules.storage.icon_background = "#f5c2e7";
modules.storage.text = "#f5c2e7";
modules.submap.background = "#242438";
modules.submap.border = "#94e2d5";
modules.submap.icon = "#181825";
modules.submap.icon_background = "#94e2d5";
modules.submap.text = "#94e2d5";
modules.updates.background = "#242438";
modules.updates.border = "#cba6f7";
modules.updates.icon = "#181825";
modules.updates.icon_background = "#cba6f7";
modules.updates.text = "#cba6f7";
modules.weather.background = "#242438";
modules.weather.border = "#b4befe";
modules.weather.icon = "#242438";
modules.weather.icon_background = "#b4befe";
modules.weather.text = "#b4befe";
modules.worldclock.background = "#242438";
modules.worldclock.border = "#f5c2e7";
modules.worldclock.icon = "#242438";
modules.worldclock.icon_background = "#f5c2e7";
modules.worldclock.text = "#f5c2e7";
network.background = "#242438";
network.border = "#cba6f7";
network.icon = "#242438";
network.icon_background = "#caa6f7";
network.text = "#cba6f7";
notifications.background = "#242438";
notifications.border = "#b4befe";
notifications.icon = "#1e1e2e";
notifications.icon_background = "#b4befe";
notifications.total = "#b4befe";
style = "split";
systray.background = "#242438";
systray.border = "#b4befe";
systray.customIcon = "#cdd6f4";
text = "#b4befe";
volume.background = "#242438";
volume.border = "#eba0ac";
volume.icon = "#242438";
volume.icon_background = "#eba0ac";
volume.text = "#eba0ac";
windowtitle.background = "#242438";
windowtitle.border = "#f5c2e7";
windowtitle.icon = "#1e1e2e";
windowtitle.icon_background = "#f5c2e7";
windowtitle.text = "#f5c2e7";
workspaces.active = "#f5c2e7";
workspaces.available = "#89dceb";
workspaces.background = "#242438";
workspaces.border = "#f5c2e7";
workspaces.hover = "#f5c2e7";
workspaces.numbered_active_highlighted_text_color = "#181825";
workspaces.numbered_active_underline_color = "#f5c2e7";
workspaces.occupied = "#f2cdcd";
y_margins = "0.2em";
};
menus = {
background = "#11111b";
border.color = "#313244";
buttons.active = "#f5c2e6";
buttons.default = "#b4befe";
buttons.disabled = "#585b71";
buttons.text = "#181824";
cards = "#1e1e2e";
check_radio_button.active = "#b4beff";
check_radio_button.background = "#45475a";
dimtext = "#585b70";
dropdownmenu.background = "#11111b";
dropdownmenu.divider = "#1e1e2e";
dropdownmenu.text = "#cdd6f4";
feinttext = "#313244";
iconbuttons.active = "#b4beff";
iconbuttons.passive = "#cdd6f3";
icons.active = "#b4befe";
icons.passive = "#585b70";
label = "#b4befe";
listitems.active = "#b4befd";
listitems.passive = "#cdd6f4";
menu = {
battery.background.color = "#11111b";
battery.border.color = "#313244";
battery.card.color = "#1e1e2e";
battery.icons.active = "#f9e2af";
battery.icons.passive = "#9399b2";
battery.label.color = "#f9e2af";
battery.listitems.active = "#f9e2af";
battery.listitems.passive = "#cdd6f3";
battery.slider.background = "#585b71";
battery.slider.backgroundhover = "#45475a";
battery.slider.primary = "#f9e2af";
battery.slider.puck = "#6c7086";
battery.text = "#cdd6f4";
bluetooth.background.color = "#11111b";
bluetooth.border.color = "#313244";
bluetooth.card.color = "#1e1e2e";
bluetooth.iconbutton.active = "#89dceb";
bluetooth.iconbutton.passive = "#cdd6f4";
bluetooth.icons.active = "#89dceb";
bluetooth.icons.passive = "#9399b2";
bluetooth.label.color = "#89dceb";
bluetooth.listitems.active = "#89dcea";
bluetooth.listitems.passive = "#cdd6f4";
bluetooth.scroller.color = "#89dceb";
bluetooth.status = "#6c7086";
bluetooth.switch.disabled = "#313245";
bluetooth.switch.enabled = "#89dceb";
bluetooth.switch.puck = "#454759";
bluetooth.switch_divider = "#45475a";
bluetooth.text = "#cdd6f4";
clock.background.color = "#11111b";
clock.border.color = "#313244";
clock.calendar.contextdays = "#585b70";
clock.calendar.currentday = "#f5c2e7";
clock.calendar.days = "#cdd6f4";
clock.calendar.paginator = "#f5c2e6";
clock.calendar.weekdays = "#f5c2e7";
clock.calendar.yearmonth = "#94e2d5";
clock.card.color = "#1e1e2e";
clock.text = "#cdd6f4";
clock.time.time = "#f5c2e7";
clock.time.timeperiod = "#94e2d5";
clock.weather.hourly.icon = "#f5c2e7";
clock.weather.hourly.temperature = "#f5c2e7";
clock.weather.hourly.time = "#f5c2e7";
clock.weather.icon = "#f5c2e7";
clock.weather.stats = "#f5c2e7";
clock.weather.status = "#94e2d5";
clock.weather.temperature = "#cdd6f4";
clock.weather.thermometer.cold = "#89b4fa";
clock.weather.thermometer.extremelycold = "#89dceb";
clock.weather.thermometer.extremelyhot = "#f38ba8";
clock.weather.thermometer.hot = "#fab387";
clock.weather.thermometer.moderate = "#b4befe";
dashboard.background.color = "#11111b";
dashboard.border.color = "#313244";
dashboard.card.color = "#1e1e2e";
dashboard.controls.bluetooth.background = "#89dceb";
dashboard.controls.bluetooth.text = "#181824";
dashboard.controls.disabled = "#585b70";
dashboard.controls.input.background = "#f5c2e7";
dashboard.controls.input.text = "#181824";
dashboard.controls.notifications.background = "#f9e2af";
dashboard.controls.notifications.text = "#181824";
dashboard.controls.volume.background = "#eba0ac";
dashboard.controls.volume.text = "#181824";
dashboard.controls.wifi.background = "#cba6f7";
dashboard.controls.wifi.text = "#181824";
dashboard.directories.left.bottom.color = "#eba0ac";
dashboard.directories.left.middle.color = "#f9e2af";
dashboard.directories.left.top.color = "#f5c2e7";
dashboard.directories.right.bottom.color = "#b4befe";
dashboard.directories.right.middle.color = "#cba6f7";
dashboard.directories.right.top.color = "#94e2d5";
dashboard.monitors.bar_background = "#45475a";
dashboard.monitors.cpu.bar = "#eba0ad";
dashboard.monitors.cpu.icon = "#eba0ac";
dashboard.monitors.cpu.label = "#eba0ac";
dashboard.monitors.disk.bar = "#f5c2e8";
dashboard.monitors.disk.icon = "#f5c2e7";
dashboard.monitors.disk.label = "#f5c2e7";
dashboard.monitors.gpu.bar = "#a6e3a2";
dashboard.monitors.gpu.icon = "#a6e3a1";
dashboard.monitors.gpu.label = "#a6e3a1";
dashboard.monitors.ram.bar = "#f9e2ae";
dashboard.monitors.ram.icon = "#f9e2af";
dashboard.monitors.ram.label = "#f9e2af";
dashboard.powermenu.confirmation.background = "#11111b";
dashboard.powermenu.confirmation.body = "#cdd6f4";
dashboard.powermenu.confirmation.border = "#313244";
dashboard.powermenu.confirmation.button_text = "#11111a";
dashboard.powermenu.confirmation.card = "#1e1e2e";
dashboard.powermenu.confirmation.confirm = "#a6e3a1";
dashboard.powermenu.confirmation.deny = "#f38ba8";
dashboard.powermenu.confirmation.label = "#b4befe";
dashboard.powermenu.logout = "#a6e3a1";
dashboard.powermenu.restart = "#fab387";
dashboard.powermenu.shutdown = "#f38ba8";
dashboard.powermenu.sleep = "#89dceb";
dashboard.profile.name = "#f5c2e7";
dashboard.shortcuts.background = "#b4befe";
dashboard.shortcuts.recording = "#a6e3a1";
dashboard.shortcuts.text = "#181824";
media.album = "#f5c2e8";
media.artist = "#94e2d6";
media.background.color = "#11111b";
media.border.color = "#313244";
media.buttons.background = "#b4beff";
media.buttons.enabled = "#94e2d4";
media.buttons.inactive = "#585b70";
media.buttons.text = "#11111b";
media.card.color = "#1e1e2e";
media.slider.background = "#585b71";
media.slider.backgroundhover = "#45475a";
media.slider.primary = "#f5c2e7";
media.slider.puck = "#6c7086";
media.song = "#b4beff";
media.timestamp = "#cdd6f4";
network.background.color = "#11111b";
network.border.color = "#313244";
network.card.color = "#1e1e2e";
network.iconbuttons.active = "#cba6f7";
network.iconbuttons.passive = "#cdd6f4";
network.icons.active = "#cba6f7";
network.icons.passive = "#9399b2";
network.label.color = "#cba6f7";
network.listitems.active = "#cba6f6";
network.listitems.passive = "#cdd6f4";
network.scroller.color = "#cba6f7";
network.status.color = "#6c7086";
network.switch.disabled = "#313245";
network.switch.enabled = "#cba6f7";
network.switch.puck = "#454759";
network.text = "#cdd6f4";
notifications.background = "#11111b";
notifications.border = "#313244";
notifications.card = "#1e1e2e";
notifications.clear = "#f38ba8";
notifications.label = "#b4befe";
notifications.no_notifications_label = "#313244";
notifications.pager.background = "#11111b";
notifications.pager.button = "#b4befe";
notifications.pager.label = "#9399b2";
notifications.scrollbar.color = "#b4befe";
notifications.switch.disabled = "#313245";
notifications.switch.enabled = "#b4befe";
notifications.switch.puck = "#454759";
notifications.switch_divider = "#45475a";
power.background.color = "#11111b";
power.border.color = "#313244";
power.buttons.logout.background = "#1e1e2e";
power.buttons.logout.icon = "#181824";
power.buttons.logout.icon_background = "#a6e3a1";
power.buttons.logout.text = "#a6e3a1";
power.buttons.restart.background = "#1e1e2e";
power.buttons.restart.icon = "#181824";
power.buttons.restart.icon_background = "#fab387";
power.buttons.restart.text = "#fab387";
power.buttons.shutdown.background = "#1e1e2e";
power.buttons.shutdown.icon = "#181824";
power.buttons.shutdown.icon_background = "#f38ba7";
power.buttons.shutdown.text = "#f38ba8";
power.buttons.sleep.background = "#1e1e2e";
power.buttons.sleep.icon = "#181824";
power.buttons.sleep.icon_background = "#89dceb";
power.buttons.sleep.text = "#89dceb";
systray.dropdownmenu.background = "#11111b";
systray.dropdownmenu.divider = "#1e1e2e";
systray.dropdownmenu.text = "#cdd6f4";
volume.audio_slider.background = "#585b71";
volume.audio_slider.backgroundhover = "#45475a";
volume.audio_slider.primary = "#eba0ac";
volume.audio_slider.puck = "#585b70";
volume.background.color = "#11111b";
volume.border.color = "#313244";
volume.card.color = "#1e1e2e";
volume.iconbutton.active = "#eba0ac";
volume.iconbutton.passive = "#cdd6f4";
volume.icons.active = "#eba0ac";
volume.icons.passive = "#9399b2";
volume.input_slider.background = "#585b71";
volume.input_slider.backgroundhover = "#45475a";
volume.input_slider.primary = "#eba0ac";
volume.input_slider.puck = "#585b70";
volume.label.color = "#eba0ac";
volume.listitems.active = "#eba0ab";
volume.listitems.passive = "#cdd6f4";
volume.text = "#cdd6f4";
};
popover.background = "#181824";
popover.border = "#181824";
popover.text = "#b4befe";
progressbar.background = "#45475a";
progressbar.foreground = "#b4befe";
slider.background = "#585b71";
slider.backgroundhover = "#45475a";
slider.primary = "#b4befe";
slider.puck = "#6c7086";
switch.disabled = "#313245";
switch.enabled = "#b4befe";
switch.puck = "#454759";
text = "#cdd6f4";
tooltip.background = "#11111b";
tooltip.text = "#cdd6f4";
};
outer_spacing = "0.0em";
transparent = true;
};
notification.actions.background = "#b4befd";
notification.actions.text = "#181825";
notification.background = "#181826";
notification.border = "#313243";
notification.close_button.background = "#f38ba7";
notification.close_button.label = "#11111b";
notification.label = "#b4befe";
notification.labelicon = "#b4befe";
notification.text = "#cdd6f4";
notification.time = "#7f849b";
osd.bar_color = "#b4beff";
osd.bar_container = "#11111b";
osd.bar_empty_color = "#313244";
osd.bar_overflow_color = "#f38ba7";
osd.icon = "#11111b";
osd.icon_container = "#b4beff";
osd.label = "#b4beff";
};
};
};
};
};
}

View file

@ -1,41 +0,0 @@
{
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.desktop.addons.hyprpaper;
username = config.${namespace}.user.name;
picture-path = "/home/${username}/Pictures/firewatch.jpg";
in
{
options.${namespace}.desktop.addons.hyprpaper = {
enable = mkEnableOption "Enable Hyprpaper";
};
config = mkIf cfg.enable {
snowfallorg.users.${username}.home.config = {
home.file = {
# https://www.reddit.com/r/WidescreenWallpaper/comments/13hib3t/purple_firewatch_3840x1620/
"Pictures/firewatch.jpg".source = ./firewatch.jpg;
};
wayland.windowManager.hyprland.settings.exec-once = [
''hyprctl hyprpaper wallpaper "DP-1,${picture-path}"''
];
services.hyprpaper = {
enable = true;
settings = {
preload = [ picture-path ];
wallpaper = "DP-1,${picture-path}";
};
};
};
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

View file

@ -1,134 +0,0 @@
/*Dracula theme based on the Purple official rofi theme*/
/* https://github.com/dracula/rofi/tree/main */
configuration {
show-icons: true;
display-drun: "";
disable-history: false;
}
* {
font: "Jetbrains Mono 12";
foreground: #f8f8f2;
background-color: #282a36;
active-background: #6272a4;
urgent-background: #ff5555;
urgent-foreground: #282a36;
selected-background: @active-background;
selected-urgent-background: @urgent-background;
selected-active-background: @active-background;
separatorcolor: @active-background;
bordercolor: @active-background;
}
#window {
background-color: @background-color;
border: 3;
border-radius: 6;
border-color: @bordercolor;
padding: 15;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 0px;
border-color: @separatorcolor;
padding: 1px;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 0px;
border-color: @bordercolor;
spacing: 2px ;
scrollbar: false;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 3px ;
}
#element.normal.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @foreground;
}
#element.selected.normal {
background-color: @selected-background;
text-color: @foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @foreground;
}
#element.alternate.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.alternate.urgent {
background-color: @urgent-background;
text-color: @foreground;
}
#element.alternate.active {
background-color: @active-background;
text-color: @foreground;
}
#scrollbar {
width: 2px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
#sidebar {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
background-color: @selected-background;
text-color: @foreground;
}
#inputbar {
spacing: 0;
text-color: @foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @foreground;
}
#entry {
spacing: 0;
text-color: @foreground;
}
#prompt {
spacing: 0;
text-color: @foreground;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ">";
margin: 0px 0.3em 0em 0em ;
text-color: @foreground;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}

View file

@ -1,35 +0,0 @@
{
config,
namespace,
options,
pkgs,
lib,
...
}:
let
cfg = config.${namespace}.desktop.addons.rofi;
inherit (lib)
mkIf
mkEnableOption
mkOption
types
;
in
{
options.${namespace}.desktop.addons.rofi = {
enable = mkEnableOption "Rofi";
package = mkOption {
type = types.package;
default = pkgs.rofi;
description = "The package to use for Rofi";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
${namespace}.home.file = {
".config/rofi/config.rasi".source = ./config.rasi;
};
};
}

View file

@ -1,194 +0,0 @@
{
"layer": "top",
"height": 42,
"position": "top",
"mod": "dock",
"margin-left": 10,
"margin-right": 10,
"margin-top": 7,
"margin-bottom": 0,
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
"reload_style_on_change": true,
"modules-left": [
"custom/smallspacer",
"hyprland/workspaces",
"custom/spacer"
],
"modules-center": [
"custom/padd",
"custom/l_end",
"custom/r_end",
"hyprland/window",
"custom/padd"
],
"modules-right": [
"custom/padd",
"custom/l_end",
"tray",
"custom/smallspacer",
"pulseaudio",
"pulseaudio/slider",
"memory",
"cpu",
"clock",
"custom/padd"
],
"custom/smallspacer": {
"format": ""
},
"memory": {
"interval": 1,
"rotate": 270,
"format": "{icon}",
"format-icons": [
"󰝦",
"󰪞",
"󰪟",
"󰪠",
"󰪡",
"󰪢",
"󰪣",
"󰪤",
"󰪥"
],
"max-length": 10
},
"cpu": {
"interval": 1,
"format": "{icon}",
"rotate": 270,
"format-icons": [
"󰝦",
"󰪞",
"󰪟",
"󰪠",
"󰪡",
"󰪢",
"󰪣",
"󰪤",
"󰪥"
]
},
"tray": {
"icon-size": 18,
"rotate": 0,
"spacing": 3
},
"hyprland/window": {
"format": "<span weight='bold' >{initialTitle}</span>",
"max-length": 120,
"separate-outputs": true,
"icon": false,
"icon-size": 18
},
"custom/spacer": {
"format": "|"
},
"hyprland/workspaces": {
"format": "{icon}",
"format-icons": {
"default": "",
"active": ""
}
},
"wlr/workspaces": {
"persistent-workspaces": {
"1": [
"DP-2"
],
"2": [
"HDMI-A-1"
],
"3": [
"DP-2"
],
"4": [
"HDMI-A-1"
]
}
},
"idle_inhibitor": {
"format": "{icon}",
"rotate": 0,
"format-icons": {
"activated": "󰥔",
"deactivated": ""
}
},
"clock": {
"format": "{:%H:%M}",
"rotate": 0,
"tooltip-format": "<tt>{calendar}</tt>",
"calendar": {
"mode": "month",
"mode-mon-col": 3,
"on-scroll": 1,
"on-click-right": "mode",
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b>{}</b></span>"
}
}
},
"pulseaudio": {
"format": " {icon}",
"rotate": 0,
"tooltip-format": "{icon} {desc} // {volume}%",
"scroll-step": 5,
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"default": [
"",
"",
""
]
}
},
"custom/l_end": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/r_end": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/sl_end": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/sr_end": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/rl_end": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/rr_end": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/padd": {
"format": " ",
"interval": "once",
"tooltip": false
},
"pulseaudio/slider": {
"min": 5,
"max": 100,
"rotate": 0,
"device": "pulseaudio",
"scroll-step": 1
}
}

View file

@ -1,47 +0,0 @@
{
lib,
config,
options,
pkgs,
namespace,
...
}:
let
cfg = config.${namespace}.desktop.addons.waybar;
inherit (lib)
mkEnableOption
mkOption
mkIf
types
;
inherit (lib.${namespace}) enabled;
in
{
options.${namespace}.desktop.addons.waybar = {
enable = mkEnableOption "Waybar";
package = mkOption {
type = types.package;
default = pkgs.waybar;
description = "The package to use for Waybar";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
services.upower = enabled;
fonts.packages = with pkgs; [
cascadia-code
jetbrains-mono
maple-mono-NF
material-design-icons
noto-fonts-cjk-sans
];
${namespace}.home.file = {
".config/waybar/config.jsonc".source = ./config.jsonc;
".config/waybar/style.css".source = ./style.css;
};
};
}

View file

@ -1,240 +0,0 @@
* {
font-family: "JetBrains Mono Nerd Font";
font-weight: bold;
font-size: 16px;
}
window#waybar {
background: #0F0F17;
border-radius: 12px;
border: 3px solid rgba(255, 255, 255, 0.1);
}
tooltip {
background: #171717;
color: #A1BDCE;
font-size: 13px;
border-radius: 7px;
border: 2px solid #101a24;
}
#workspaces {
margin-left: 2px;
}
#workspaces button {
color: #86aaec;
margin-left: 2px;
background-color: transparent;
}
#workspaces button.hover {
background-color: transparent;
}
#workspaces button.active {
color: #c296eb;
background-color: transparent;
}
#taskbar button {
box-shadow: none;
text-shadow: none;
font-size: 4px;
padding: 0px;
border-radius: 9px;
margin-bottom: 3px;
margin-left: 0px;
padding-left: 3px;
padding-right: 3px;
margin-right: 0px;
color: @wb-color;
animation: tb_normal 20s ease-in-out 1;
}
#taskbar button.active {
background: @wb-act-bg;
color: @wb-act-color;
margin-left: 3px;
padding-left: 12px;
padding-right: 12px;
margin-right: 3px;
animation: tb_active 20s ease-in-out 1;
transition: all 0.4s cubic-bezier(.55, -0.68, .48, 1.682);
min-height: 9px;
}
#taskbar button:hover {
background: @wb-hvr-bg;
color: @wb-hvr-color;
animation: tb_hover 20s ease-in-out 1;
transition: all 0.3s cubic-bezier(.55, -0.68, .48, 1.682);
}
#tray menu * {
min-height: 16px;
font-weight: bold;
font-size: 13px;
color: #9488e3;
}
#tray menu separator {
min-height: 10px
}
#custom-spacer {
opacity: 0.0;
}
#custom-smallspacer {
opacity: 0.0;
}
#bluetooth {
color: #E6E7E7;
background: #161320;
opacity: 1;
margin: 4px 0px 4px 0px;
padding-left: 4px;
padding-right: 4px;
}
#clock {
color: #A1BDCE;
font-size: 15px;
font-weight: 900;
font-family: "JetBrains Mono Nerd Font";
background: rgba(23, 23, 23, 0.0);
opacity: 1;
margin: 3px 0px 0px 0px;
padding-left: 10px;
padding-right: 10px;
border: none;
}
#pulseaudio {
font-weight: normal;
font-size: 20px;
color: #6F8FDB;
background: rgba(22, 19, 32, 0.0);
opacity: 1;
margin: 0px 0px 0px 0px;
padding-left: 3px;
padding-right: 3px;
}
#cpu {
font-weight: normal;
font-size: 24px;
color: #915CAF;
}
#memory {
font-weight: normal;
font-size: 24px;
color: #E4C9AF;
}
@keyframes blink {
to {
color: #4a4a4a;
}
}
#tray,
#window {
color: #A1BDCE;
font-family: "Martian Mono";
}
#custom-l_end,
#custom-r_end,
#custom-sl_end,
#custom-sr_end,
#custom-rl_end,
#upower#headset,
#upower {
color: #a6d189;
}
#custom-rr_end {
font-weight: normal;
color: #E8EDF0;
background: rgba(23, 23, 23, 0.0);
opacity: 1;
margin: 0px 0px 0px 0px;
padding-left: 4px;
padding-right: 4px;
;
}
#pulseaudio-slider slider {
background: #A1BDCE;
background-color: transparent;
box-shadow: none;
margin-right: 7px;
}
#pulseaudio-slider trough {
margin-top: -3px;
min-width: 90px;
min-height: 10px;
margin-bottom: -4px;
border-radius: 8px;
background: #343434;
}
#pulseaudio-slider highlight {
border-radius: 8px;
background-color: #2096C0;
}
#taskbar {
padding: 1px;
}
#custom-r_end {
border-radius: 0px 7px 7px 0px;
margin-right: 1px;
padding-right: 3px;
}
#custom-l_end {
border-radius: 7px 0px 0px 7px;
margin-left: 1px;
padding-left: 3px;
}
#custom-sr_end {
border-radius: 0px;
margin-right: 1px;
padding-right: 3px;
}
#custom-sl_end {
border-radius: 0px;
margin-left: 1px;
padding-left: 3px;
}
#custom-rr_end {
border-radius: 0px 7px 7px 0px;
margin-right: 1px;
padding-right: 3px;
}
#custom-rl_end {
border-radius: 7px 0px 0px 7px;
margin-left: 1px;
padding-left: 3px;
}
#custom-expand {
min-width: 25px;
color: #A1BDCE;
font-size: 16px;
}

View file

@ -1,43 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption;
user = config.${namespace}.user.name;
cfg = config.${namespace}.desktop.hyprland;
in
{
options.${namespace}.desktop = {
enable = mkEnableOption "Whether to enable desktop theming";
};
config = mkIf cfg.enable {
${namespace}.home.extraOptions = {
dconf = {
settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
};
systemd.user.sessionVariables = config.home-manager.users.${user}.home.sessionVariables;
};
qt = {
enable = true;
platformTheme = "gnome";
style = "adwaita-dark";
};
};
}

View file

@ -1,398 +0,0 @@
{
config,
inputs,
lib,
pkgs,
system,
namespace,
...
}:
with lib.${namespace};
let
inherit (lib)
mkIf
mkEnableOption
mkOption
mkMerge
types
;
cfg = config.${namespace}.desktop.hyprland;
cachix-url = "https://hyprland.cachix.org";
cachix-key = "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=";
hyprland-package = inputs.hyprland.packages.${system}.hyprland;
focus-1password = pkgs.writeShellScriptBin "focus-or-open-1pass" ''
running=$(hyprctl -j clients | jq -r '.[] | select(.class == "1password") | .workspace.id')
if [[ $running != "" ]]; then
hyprctl dispatch workspace $running
else
# always open on w/space 4
hyprctl dispatch workspace 9
ELECTRON_OZONE_PLATFORM_HINT=x11 1password&
fi
'';
# clipsync = pkgs.writeShellScriptBin "clipsync" ''
# insert() {
# # Read all the piped input into variable.
# value=$(cat)
# wValue="$(wl-paste)"
# xValue="$(xclip -o -selection clipboard)"
# notify() {
# notify-send -u low -c clipboard "$1" "$value"
# }
# if [ "$value" != "$wValue" ]; then
# notify "Wayland"
# echo -n "$value" | wl-copy
# fi
# if [ "$value" != "$xValue" ]; then
# notify "X11"
# echo -n "$value" | xclip -selection clipboard
# fi
# }
# watch() {
# # Wayland -> X11
# wl-paste --type text --watch clipsync insert &
# # X11 -> Wayland
# while clipnotify; do
# xclip -o -selection clipboard | clipsync insert
# done &
# }
# kill() {
# pkill wl-paste
# pkill clipnotify
# pkill xclip
# pkill clipsync
# }
# "$@"
# '';
in
{
options.${namespace}.desktop.hyprland = {
enable = mkEnableOption "Whether to enable hyprland";
settings = mkOption {
type = types.attrs;
default = { };
description = "Additional Hyprland settings to apply.";
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
# Auth Agent
hyprpolkitagent
# Notification daemon
libnotify
# Wayland Utilities
wlr-randr
# Clipboard Stuff
wl-clipboard
xclip
clipnotify
# clipsync
# Screenshot Utility
grimblast
# File Manager
xfce.thunar
# clean sddm theme
elegant-sddm
# json cli parser for bash script to focus 1password
jq
focus-1password
hyprpanel
#####
xdg-dbus-proxy
];
programs = {
hyprland = {
enable = true;
package = hyprland-package;
portalPackage = inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland;
withUWSM = true;
};
};
xdg = {
autostart.enable = true;
portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal
pkgs.xdg-desktop-portal-gtk
];
xdgOpenUsePortal = true;
config = {
common = {
default = [ "*" ];
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
};
hyprland = {
default = [
"hyprland"
"gtk"
];
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
"org.freedesktop.impl.portal.OpenURI" = [ "gtk" ];
};
};
};
};
services.displayManager.gdm = {
enable = true;
wayland = true;
};
${namespace} = {
desktop = {
enable = true;
addons = {
rofi = {
enable = true;
package = pkgs.rofi-unwrapped;
};
hypridle = enabled;
hyprlock = enabled;
hyprpanel = enabled;
hyprpaper = enabled;
};
};
nix.extra-substituters.${cachix-url} = {
key = cachix-key;
};
home.extraOptions = {
wayland.windowManager.hyprland = {
enable = true;
package = hyprland-package;
plugins = [ inputs.hy3.packages.${system}.hy3 ];
systemd.variables = [ "--all" ];
settings = mkMerge [
{
"$mod" = "SUPER";
exec-once = [
"systemctl --user start hyprpolkitagent"
"[workspace 2 silent] steam"
"[workspace 8 silent] discord"
"[workspace 9 silent] ELECTRON_OZONE_PLATFORM_HINT=x11 1password" # fix for promts not showing up anymore
"[workspace 1 silent] zen-beta"
"${pkgs.xorg.xhost}/bin/xhost +"
];
windowrulev2 = [
#stean is a bit wierd, since it opens in multiple phases, so just move the last window to the workspace
"workspace 2 silent, class:^(steam)$, title:^(Steam)"
# make xwaylandvideobridge window invisible
"opacity 0.0 override, class:^(xwaylandvideobridge)$"
"noanim, class:^(xwaylandvideobridge)$"
"noinitialfocus, class:^(xwaylandvideobridge)$"
"maxsize 1 1, class:^(xwaylandvideobridge)$"
"noblur, class:^(xwaylandvideobridge)$"
];
general = {
layout = "hy3";
gaps_in = 5;
gaps_out = 5;
border_size = 1;
"col.active_border" = "rgba(88888888)";
"col.inactive_border" = "rgba(00000088)";
allow_tearing = true;
resize_on_border = true;
};
misc = {
# hyprchan
force_default_wallpaper = 2;
# focus new windows that want to be focused
focus_on_activate = true;
};
decoration = {
rounding = 16;
blur = {
enabled = true;
brightness = 1.0;
contrast = 1.0;
noise = 1.0e-2;
vibrancy = 0.2;
vibrancy_darkness = 0.5;
passes = 4;
size = 7;
popups = true;
popups_ignorealpha = 0.2;
};
shadow = {
enabled = true;
range = 100;
render_power = 2;
ignore_window = true;
color = "rgba(00000055)";
offset = "0 15";
scale = 0.97;
};
};
animations = {
enabled = true;
animation = [
"border, 1, 2, default"
"fade, 1, 4, default"
"windows, 1, 3, default, popin 80%"
"workspaces, 1, 2, default, slide"
];
};
bind = [
# compositor commands
"$mod SHIFT, R, exec, hyprctl reload"
"$mod SHIFT, Q, killactive,"
"$mod SHIFT, E, exec, pkill Hyprland"
"$mod, F, fullscreen,"
"$mod, G, togglegroup,"
"$mod SHIFT, N, changegroupactive, f"
"$mod SHIFT, P, changegroupactive, b"
"$mod, R, togglesplit,"
"$mod, T, togglefloating,"
"$mod ALT, ,resizeactive,"
"$mod CTRL, left, movecurrentworkspacetomonitor, l"
"$mod CTRL, right, movecurrentworkspacetomonitor, r"
# move focus
"$mod, h, hy3:movefocus, l"
"$mod, j, hy3:movefocus, d"
"$mod, k, hy3:movefocus, u"
"$mod, l, hy3:movefocus, r"
"$mod, left, hy3:movefocus, l"
"$mod, down, hy3:movefocus, d"
"$mod, up, hy3:movefocus, u"
"$mod, right, hy3:movefocus, r"
# move focus
"$mod SHIFT, h, hy3:movewindow, l, once"
"$mod SHIFT, j, hy3:movewindow, d, once"
"$mod SHIFT, k, hy3:movewindow, u, once"
"$mod SHIFT, l, hy3:movewindow, r, once"
"$mod SHIFT, left, hy3:movewindow, l, once"
"$mod SHIFT, down, hy3:movewindow, d, once"
"$mod SHIFT, up, hy3:movewindow, u, once"
"$mod SHIFT, right, hy3:movewindow, r, once"
#run important programs
"$mod, Return, exec, kitty"
"$mod, D, exec, rofi -show drun"
"$mod, P, exec, focus-or-open-1pass"
# "$mod, D, exec, rofi -show combi"
#screenshot
", Print, exec, grimblast copy area"
]
++ (
# workspaces
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
builtins.concatLists (
builtins.genList (
i:
let
ws = i + 1;
in
[
"$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, hy3:movetoworkspace, ${toString ws}"
]
) 9
)
);
# mouse movements
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod ALT, mouse:272, resizewindow"
];
bindl = [
# volume
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
];
bindle = [
# volume
", XF86AudioRaiseVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%+"
", XF86AudioLowerVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%-"
];
input = {
kb_layout = "us";
# focus change on cursor move
follow_mouse = 2;
force_no_accel = 1;
accel_profile = "flat";
};
plugin = {
hy3 = {
autotile = {
enable = true;
trigger_width = 800;
trigger_height = 500;
};
};
};
}
cfg.settings
];
};
};
};
environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland
ELECTRON_OZONE_PLATFORM_HINT = "auto";
XDG_SESSION_TYPE = "wayland";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_QPA_PLATFORM = "wayland;xcb";
};
};
}

View file

@ -1,29 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.desktop.kde;
in
{
options.${namespace}.desktop.kde = with types; {
enable = mkEnableOption "Whether to enable a kde plasma6";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
xdg-utils
kdePackages.qtbase
];
services = {
xserver = enabled;
desktopManager.plasma6 = enabled;
};
};
}

View file

@ -1,38 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.home;
in
{
options.${namespace}.home = with types; {
file = mkOpt attrs { } (mdDoc "A set of files to be managed by home-manager's `home.file`.");
configFile = mkOpt attrs { } (
mdDoc "A set of files to be managed by home-manager's `xdg.configFile`."
);
extraOptions = mkOpt attrs { } "Options to pass directly to home-manager.";
};
config = {
snowfallorg.users.${config.${namespace}.user.name}.home.config = mkMerge [
{
home.stateVersion = config.system.stateVersion;
home.file = mkAliasDefinitions options.${namespace}.home.file;
xdg.enable = true;
xdg.configFile = mkAliasDefinitions options.${namespace}.home.configFile;
}
config.${namespace}.home.extraOptions
];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
};
};
}

View file

@ -1,107 +0,0 @@
{
config,
inputs,
lib,
namespace,
pkgs,
system,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.nix;
substituters-submodule = types.submodule (
{ name, ... }:
{
options = with types; {
key = mkOpt (nullOr str) null "The trusted public key for this substituter.";
};
}
);
in
{
options.${namespace}.nix = with types; {
enable = mkBoolOpt true "Whether or not to manage nix configuration.";
package = mkOpt package pkgs.lix "Which nix package to use.";
default-substituter = {
url = mkOpt str "https://cache.nixos.org" "The url for the substituter.";
key =
mkOpt str "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"The trusted public key for the substituter.";
};
extra-substituters = mkOpt (attrsOf substituters-submodule) { } "Extra substituters to configure.";
};
config = mkIf cfg.enable {
assertions = mapAttrsToList (name: value: {
assertion = value.key != null;
message = "plusultra.nix.extra-substituters.${name}.key must be set";
}) cfg.extra-substituters;
environment.systemPackages = with pkgs; [
nixfmt-rfc-style
nix-prefetch-git
nix-du
nix-weather
nix-index
nix-output-monitor
];
programs.nh = {
enable = true;
package = inputs.nh-flake.packages.${system}.nh;
flake = "/home/cholli/projects/config";
};
nix =
let
users = [
"root"
config.${namespace}.user.name
"gitea-runner"
] ++ optional config.services.hydra.enable "hydra hydra-www hydra-evaluator hydra-queue-runner";
in
{
package = cfg.package;
settings =
{
experimental-features = "nix-command flakes";
http-connections = 50;
warn-dirty = false;
log-lines = 50;
sandbox = "relaxed";
auto-optimise-store = true;
trusted-users = users;
allowed-users = users;
allowed-uris = "github: https://github.com/ git+https://github.com/ gitlab: https://gitlab.com/ git+https://gitlab.com/";
substituters = [
cfg.default-substituter.url
] ++ (mapAttrsToList (name: value: name) cfg.extra-substituters);
trusted-public-keys = [
cfg.default-substituter.key
] ++ (mapAttrsToList (name: value: value.key) cfg.extra-substituters);
}
// (lib.optionalAttrs config.${namespace}.tools.direnv.enable {
keep-outputs = true;
keep-derivations = true;
});
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 7d";
};
# flake-utils-plus
generateRegistryFromInputs = true;
generateNixPathFromInputs = true;
linkInputs = true;
};
};
}

View file

@ -1,75 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.security.acme;
in
{
options.${namespace}.security.acme = with lib.types; {
enable = mkEnableOption "Enable sops (Default true)";
email = mkOpt str config.${namespace}.user.email "The email to use.";
sopsFile = mkOption {
type = lib.types.path;
default = lib.snowfall.fs.get-file "secrets/secrets.yaml";
description = "SecretFile";
};
domainname = mkOpt str "christophhollizeck.dev" "domainname to use";
staging = mkOpt bool false "Use staging server for testing or not";
};
config = mkIf cfg.enable {
sops = {
secrets = {
"netcup/customer_number" = {
inherit (cfg) sopsFile;
};
"netcup/api/key" = {
inherit (cfg) sopsFile;
};
"netcup/api/password" = {
inherit (cfg) sopsFile;
};
};
templates = {
"netcup.env" = {
content = ''
NETCUP_CUSTOMER_NUMBER=${config.sops.placeholder."netcup/customer_number"}
NETCUP_API_KEY=${config.sops.placeholder."netcup/api/key"}
NETCUP_API_PASSWORD=${config.sops.placeholder."netcup/api/password"}
NETCUP_PROPAGATION_TIMEOUT=1200
'';
};
};
};
security.acme = {
acceptTerms = true;
defaults = {
inherit (cfg) email;
group = mkIf config.services.nginx.enable "nginx";
reloadServices = optional config.services.nginx.enable "nginx.service";
dnsProvider = "netcup";
environmentFile = config.sops.templates."netcup.env".path;
};
certs."${cfg.domainname}" = {
server = mkIf cfg.staging "https://acme-staging-v02.api.letsencrypt.org/directory";
dnsResolver = "1.1.1.1:53";
extraDomainNames = [ "*.${cfg.domainname}" ];
};
};
};
}

View file

@ -1,70 +0,0 @@
{
config,
inputs,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.security.gpg;
gpgConf = "${inputs.gpg-base-conf}/gpg.conf";
gpgAgentConf = ''
enable-ssh-support
default-cache-ttl 60
max-cache-ttl 120
pinentry-program ${pkgs.pinentry-qt}/bin/pinentry-qt
'';
reload-yubikey = pkgs.writeShellScriptBin "reload-yubikey" ''
${pkgs.gnupg}/bin/gpg-connect-agent "scd serialno" "learn --force" /bye
'';
in
{
options.${namespace}.security.gpg = with types; {
enable = mkBoolOpt false "Wether or not to enable GPG.";
agentTimeout = mkOpt int 5 "The amount of time to wait before continuing with shell init.";
};
config = mkIf cfg.enable {
services.pcscd.enable = true;
services.udev.packages = with pkgs; [ yubikey-personalization ];
environment.systemPackages = with pkgs; [
cryptsetup
paperkey
gnupg
pinentry-curses
pinentry-qt
yubikey-manager
yubioath-flutter
reload-yubikey
];
programs = {
ssh.startAgent = false;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
enableExtraSocket = true;
};
};
${namespace} = {
home.file = {
".gnupg/.keep".text = "";
".gnupg/gpg.conf".source = gpgConf;
".gnupg/gpg-agent.conf".text = gpgAgentConf;
".gnupg/scdeamon.conf".text = "disable-ccid";
};
};
};
}

View file

@ -1,30 +0,0 @@
{
options,
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.security.keyring;
in
{
options.${namespace}.security.keyring = {
enable = mkBoolOpt true "Whether to enable gnome keyring.";
};
config = mkIf cfg.enable {
services.gnome.gnome-keyring.enable = true;
security.pam.services.gdm.enableGnomeKeyring = true;
services.dbus.packages = [
pkgs.gnome-keyring
pkgs.gcr
];
environment.systemPackages = [ pkgs.seahorse ];
};
}

View file

@ -1,33 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.security.sops;
in
{
options.${namespace}.security.sops = with types; {
enable = mkBoolOpt true "Enable sops (Default true)";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
sops
age
ssh-to-age
];
sops = {
defaultSopsFile = lib.snowfall.fs.get-file "secrets/secrets.yaml";
defaultSopsFormat = "yaml";
# age.keyFile = "/home/cholli/.config/sops/age/keys.txt";
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
};
};
}

View file

@ -1,56 +0,0 @@
{
config,
lib,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.security.syncthing;
user = config.${namespace}.user;
in
{
options.${namespace}.security.syncthing = with types; {
enable = mkEnableOption "Enable Syncthing";
};
config = mkIf cfg.enable {
services.syncthing = {
enable = true;
user = user.name;
dataDir = "/home/" + user.name + "/Documents";
configDir = "/home/" + user.name + "/Documents/.config/syncthing";
settings = {
folders = {
"Documents" = {
# Name of folder in Syncthing, also the folder ID
path = "/home/" + user.name + "/Documents"; # Which folder to add to Syncthing
};
"Pictures" = {
path = "/home/" + user.name + "/Pictures";
};
"7vfj7-k83xj" = {
path = "/home/" + user.name + "/WhatsApp Documents";
};
};
gui = {
theme = "black";
};
};
};
# Syncthing ports: 8384 for remote access to GUI
# 22000 TCP and/or UDP for sync traffic
# 21027/UDP for discovery
# source: https://docs.syncthing.net/users/firewall.html
networking.firewall.allowedTCPPorts = [
8384
22000
];
networking.firewall.allowedUDPPorts = [
22000
21027
];
};
}

View file

@ -1,79 +0,0 @@
{
lib,
config,
namespace,
pkgs,
...
}:
with lib.${namespace};
let
cfg = config.${namespace}.services.factorio-server;
inherit (lib) mkIf mkOption mkEnableOption;
in
{
options.${namespace}.services.factorio-server = {
enable = mkEnableOption "Enable Factorio Headless Server";
sopsFile = mkOption {
type = lib.types.path;
default = lib.snowfall.fs.get-file "secrets/secrets.yaml";
description = "SecretFile";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.factorio-headless ];
sops = {
secrets = {
"factorio/token" = {
restartUnits = [ "factorio.service" ];
inherit (cfg) sopsFile;
};
"factorio/username" = {
restartUnits = [ "factorio.service" ];
inherit (cfg) sopsFile;
};
"factorio/game_password" = {
restartUnits = [ "factorio.service" ];
inherit (cfg) sopsFile;
};
};
templates."extraSettingsFile.json".content = ''
{
"name": "Pyanodons Holli",
"description": "Trying to run a factorio-headless-server on my nix system",
"tags": ["vanilla"],
"max_players": 10,
"game_password": "${config.sops.placeholder."factorio/game_password"}",
"allow_commands": "admins-only",
"autosave_slots": 5,
"ignore_player_limit_for_returning_players": true,
"username" : "${config.sops.placeholder."factorio/username"}",
"token": "${config.sops.placeholder."factorio/token"}"
}
'';
templates."extraSettingsFile.json".mode = "0444";
};
systemd.tmpfiles.rules = [
"Z /var/lib/factorio/mods 770 65400 65400 - -"
"Z /var/lib/factorio/saves 770 65400 65400 - -"
];
services.factorio = {
enable = true;
openFirewall = true;
public = true;
lan = true;
nonBlockingSaving = true;
autosave-interval = 5;
saveName = "Pyanodons";
loadLatestSave = true;
admins = [
"daholli"
"galbrain"
"geigeabc"
];
extraSettingsFile = config.sops.templates."extraSettingsFile.json".path;
};
};
}

View file

@ -1,182 +0,0 @@
{
lib,
config,
namespace,
pkgs,
...
}:
with lib.${namespace};
let
cfg = config.${namespace}.services.gitea-runner;
inherit (lib) mkIf mkOption mkEnableOption;
inherit (lib.types)
attrsOf
package
path
submodule
str
;
in
{
options.${namespace}.services.gitea-runner = {
enable = mkEnableOption "Enable gitea/forgejo runner";
git-url = mkOption {
type = str;
default = "https://git.christophhollizeck.dev";
};
sopsFile = mkOption {
type = path;
default = lib.snowfall.fs.get-file "secrets/secrets.yaml";
description = "SecretFile";
};
runner-package = mkOption {
type = package;
default = pkgs.forgejo-actions-runner;
description = "Which runner to use Gitea/Forgjo";
};
## taken from nixos/modules/services/continuous-integration/gitea-actions-runner.nix
runner-instances = mkOption {
default = { };
description = ''
Gitea Actions Runner instances.
'';
type = attrsOf (submodule {
options = {
enable = mkEnableOption "Gitea Actions Runner instance";
name = mkOption {
type = str;
example = literalExpression "config.networking.hostName";
description = ''
The name identifying the runner instance towards the Gitea/Forgejo instance.
'';
};
url = mkOption {
type = str;
example = "https://forge.example.com";
description = ''
Base URL of your Gitea/Forgejo instance.
'';
};
tokenFile = mkOption {
type = nullOr (either str path);
default = null;
description = ''
Path to an environment file, containing the `TOKEN` environment
variable, that holds a token to register at the configured
Gitea/Forgejo instance.
'';
};
labels = mkOption {
type = listOf str;
example = literalExpression ''
[
# provide a debian base with nodejs for actions
"debian-latest:docker://node:18-bullseye"
# fake the ubuntu name, because node provides no ubuntu builds
"ubuntu-latest:docker://node:18-bullseye"
# provide native execution on the host
#"native:host"
]
'';
description = ''
Labels used to map jobs to their runtime environment. Changing these
labels currently requires a new registration token.
Many common actions require bash, git and nodejs, as well as a filesystem
that follows the filesystem hierarchy standard.
'';
};
settings = mkOption {
description = ''
Configuration for `act_runner daemon`.
See https://gitea.com/gitea/act_runner/src/branch/main/internal/pkg/config/config.example.yaml for an example configuration
'';
type = types.submodule {
freeformType = settingsFormat.type;
};
default = { };
};
hostPackages = mkOption {
type = listOf package;
default = with pkgs; [
bash
coreutils
curl
gawk
gitMinimal
gnused
nodejs
wget
];
defaultText = literalExpression ''
with pkgs; [
bash
coreutils
curl
gawk
gitMinimal
gnused
nodejs
wget
]
'';
description = ''
List of packages, that are available to actions, when the runner is configured
with a host execution label.
'';
};
};
});
};
};
config = mkIf cfg.enable {
sops = {
secrets = {
"forgejo/runner/token" = {
inherit (cfg) sopsFile;
};
};
};
services.gitea-actions-runner = {
package = cfg.runner-package;
instances = {
native = {
enable = true;
name = "monolith";
url = cfg.git-url;
tokenFile = config.sops.secrets."forgejo/runner/token".path;
labels = [
"native:host"
];
hostPackages = with pkgs; [
bash
coreutils
curl
gawk
gitMinimal
gnused
nodejs
wget
lix
];
settings = {
log.level = "info";
runner = {
capacity = 1;
timeout = "3h";
shutdown_timeout = "5s";
fetch_timeout = "10s";
fetch_inteval = "5s";
};
};
};
} // cfg.runner-instances;
};
};
}

View file

@ -1,40 +0,0 @@
{
lib,
config,
namespace,
...
}:
let
cfg = config.${namespace}.services.hydra;
inherit (lib) mkIf mkOption mkEnableOption;
in
{
options.${namespace}.services.hydra = {
enable = mkEnableOption "Enable Hydra CI";
httpPort = mkOption {
type = lib.types.int;
default = 2000;
description = "The path to host the http server on, relevant for nginx forwarding";
};
enableCache = mkEnableOption "Enable cache using nix-server";
};
config = mkIf cfg.enable {
services.nix-serve = mkIf cfg.enableCache {
enable = true;
secretKeyFile = "/var/cache-priv-key.pem";
};
services.hydra = {
enable = true;
hydraURL = "http://localhost:${toString cfg.httpPort}";
port = cfg.httpPort;
notificationSender = "hydra@localhost";
useSubstitutes = true;
extraConfig = ''
allow-import-from-derivation = 1
'';
};
};
}

View file

@ -1,29 +0,0 @@
{
lib,
config,
namespace,
...
}:
let
cfg = config.${namespace}.services.openssh;
inherit (lib) mkIf mkEnableOption;
in
{
options.${namespace}.services.openssh = {
enable = mkEnableOption "Enable SSH";
};
config = mkIf cfg.enable {
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
services.fail2ban = {
enable = true;
};
};
}

View file

@ -1,52 +0,0 @@
{
lib,
config,
namespace,
...
}:
let
cfg = config.${namespace}.services.remotebuild;
inherit (lib) mkIf mkEnableOption;
in
{
options.${namespace}.services.remotebuild = {
enable = mkEnableOption "Enable remotebuild";
};
config = mkIf cfg.enable {
users.users.remotebuild = {
isNormalUser = true;
createHome = false;
group = "remotebuild";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYZjG+XPNoVHVdCel5MK4mwvtoFCqDY1WMI1yoU71Rd root@yggdrasil"
];
};
users.groups.remotebuild = { };
nix = {
nrBuildUsers = 64;
settings = {
trusted-users = [ "remotebuild" ];
min-free = 10 * 1024 * 1024;
max-free = 200 * 1024 * 1024;
max-jobs = "auto";
cores = 0;
};
daemonIOSchedClass = lib.mkDefault "idle";
daemonCPUSchedPolicy = lib.mkDefault "idle";
};
systemd.services.nix-daemon.serviceConfig = {
MemoryAccounting = true;
MemoryMax = "90%";
OOMScoreAdjust = 500;
Slice = "-.slice";
};
};
}

View file

@ -1,19 +0,0 @@
# Submodule Configurations
This is mostly just to make Archetypes configurations look a bit neater and make bitesized collections of programs used in tandem
## basics
Every setup will want this. It handles are the things that you need anyways.
## basics wsl
Just [basics](#basics) without the boot stuff mostly because wsl is a bit special there.
## games
Stuff related to gaming
## socials
If was more active on social media I would have stuff to put here, for now this is just ways to talk to other people e.g discord

View file

@ -1,70 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt enabled;
cfg = config.${namespace}.submodules.basics-wsl;
in
{
options.${namespace}.submodules.basics-wsl = {
enable = mkBoolOpt false "Whether or not to enable basic configuration.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
fastfetch
fd
tree
ripgrep
fzf
eza
wslu
wsl-open
zip
unzip
];
${namespace} = {
nix = {
enable = true;
extra-substituters = {
"https://cache.lix.systems" = {
key = "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=";
};
"https://nix-community.cachix.org" = {
key = "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
};
"https://nixcache.christophhollizeck.dev" = {
key = "christophhollizeck.dev:7pPAvm9xqFQB8FDApVNL6Tii1Jsv+Sj/LjEIkdeGhbA=";
};
};
};
apps.cli-apps.helix = enabled;
tools = {
git = enabled;
};
system.hardware = {
networking = enabled;
};
system = {
fonts = enabled;
locale = enabled;
time = enabled;
xkb = enabled;
};
};
};
}

View file

@ -1,73 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.submodules.basics;
in
{
options.${namespace}.submodules.basics = with types; {
enable = mkEnableOption "Whether or not to enable basic configuration.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
fastfetch
fd
tree
ripgrep
fzf
eza
#optional
pciutils
usbutils
btop
zip
unzip
];
${namespace} = {
nix = {
enable = true;
extra-substituters = {
"https://cache.lix.systems" = {
key = "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=";
};
"https://nix-community.cachix.org" = {
key = "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
};
"https://nixcache.christophhollizeck.dev" = {
key = "christophhollizeck.dev:7pPAvm9xqFQB8FDApVNL6Tii1Jsv+Sj/LjEIkdeGhbA=";
};
};
};
apps.cli-apps.helix = enabled;
tools = {
git = enabled;
};
system.hardware = {
networking = enabled;
};
system = {
boot = enabled;
fonts = enabled;
locale = enabled;
time = enabled;
xkb = enabled;
};
};
};
}

View file

@ -1,84 +0,0 @@
Arch: win64
CompatData: ''
Creation_Date: '2024-11-12 18:24:45.924771'
Custom_Path: false
DLL_Overrides: {}
DXVK: dxvk-2.4.1
Environment: Custom
Environment_Variables: {}
External_Programs:
b8ae3872-d1d4-435f-ba7f-1cd829b4da81:
executable: eve-online-latest+Setup.exe
folder: /home/cholli/Downloads
id: b8ae3872-d1d4-435f-ba7f-1cd829b4da81
name: eve-online-latest+Setup
path: /home/cholli/Downloads/eve-online-latest+Setup.exe
Installed_Dependencies:
- dotnet40
- dotnet48
- vcredist2022
Language: sys
LatencyFleX: latencyflex-v0.1.1
NVAPI: dxvk-nvapi-v0.7.1
Name: EVE
Parameters:
custom_dpi: 96
decorated: true
discrete_gpu: false
dxvk: true
dxvk_nvapi: false
fixme_logs: false
fsr: false
fsr_quality_mode: none
fsr_sharpening_strength: 2
fullscreen_capture: false
gamemode: false
gamescope: false
gamescope_borderless: false
gamescope_fps: 0
gamescope_fps_no_focus: 0
gamescope_fullscreen: true
gamescope_game_height: 0
gamescope_game_width: 0
gamescope_scaling: false
gamescope_window_height: 0
gamescope_window_width: 0
latencyflex: false
mangohud: false
mouse_warp: true
obsvkc: false
pulseaudio_latency: false
renderer: gl
sandbox: false
sync: wine
take_focus: false
use_be_runtime: true
use_eac_runtime: true
use_runtime: false
use_steam_runtime: false
versioning_automatic: false
versioning_compression: false
versioning_exclusion_patterns: false
virtual_desktop: false
virtual_desktop_res: 1280x720
vkbasalt: false
vkd3d: true
vmtouch: false
vmtouch_cache_cwd: false
Path: EVE
Runner: caffe-9.7
RunnerPath: ''
Sandbox:
share_net: false
share_sound: false
State: 0
Uninstallers: {}
Update_Date: '2024-11-12 18:36:11.134986'
VKD3D: vkd3d-proton-2.13
Versioning: false
Versioning_Exclusion_Patterns: []
Windows: win10
WorkingDir: /storage/home/bottles
data: {}
run_in_terminal: false
session_arguments: ''

View file

@ -1,28 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.submodules.games;
in
{
options.${namespace}.submodules.games = with types; {
enable = mkBoolOpt false "Whether or not you want to enable steam and other games";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ prismlauncher ];
${namespace} = {
apps = {
steam = enabled;
};
};
};
}

View file

@ -1,25 +0,0 @@
{
config,
lib,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.submodules.socials;
in
{
options.${namespace}.submodules.socials = with types; {
enable = mkBoolOpt false "Whether to enable social apps";
};
config = mkIf cfg.enable {
${namespace} = {
apps = {
discord = enabled;
teamspeak = enabled;
};
};
};
}

View file

@ -1,33 +0,0 @@
{
config,
inputs,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.autoUpgrade;
in
{
options.${namespace}.system.autoUpgrade = with types; {
enable = mkEnableOption "Enable auto-upgrade";
time = mkOpt str "02:00" "Time to run auto-upgrade";
};
config = mkIf cfg.enable {
system.autoUpgrade = {
enable = true;
flake = inputs.self.outPath;
flags = [
"--update-input"
"nixpkgs"
"--print-build-logs"
];
dates = cfg.time;
randomizedDelaySec = "45min";
};
};
}

View file

@ -1,29 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.boot;
in
{
options.${namespace}.system.boot = with types; {
enable = mkBoolOpt false "Whether or not to enable booting.";
};
config = mkIf cfg.enable {
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
services.fstrim = enabled;
};
}

View file

@ -1,41 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.fonts;
in
{
options.${namespace}.system.fonts = with types; {
enable = mkBoolOpt false "Whether or not to manage fonts.";
fonts = mkOpt (listOf package) [ ] "Custom font packages to install.";
};
config = mkIf cfg.enable {
environment.variables = {
# Enable icons in tooling since we have nerdfonts.
LOG_ICONS = "true";
};
environment.systemPackages = with pkgs; [ font-manager ];
fonts.packages =
with pkgs;
[
font-awesome
powerline-fonts
powerline-symbols
nerd-fonts.code-new-roman
nerd-fonts.fira-code
nerd-fonts.symbols-only
fira
]
++ cfg.fonts;
};
}

View file

@ -1,46 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.hardware.audio;
in
{
options.${namespace}.system.hardware.audio = with types; {
enable = mkBoolOpt false "Whether or not to enable audio";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
pavucontrol
easyeffects
];
services.pulseaudio = disabled;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.configPackages = [
(pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/11-bluetooth-policy.conf" ''
wireplumber.settings = {
bluetooth.autoswitch-to-headset-profile = false
}
'')
(pkgs.writeTextDir "share/wireplumber/policy.lua.d/11-bluetooth-policy.conf" ''
bluetooth_policy.policy["media-role.use-headset-profile"] = false
'')
];
};
};
}

View file

@ -1,46 +0,0 @@
{
config,
lib,
namespace,
pkgs,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.hardware.bluetooth;
in
{
options.${namespace}.system.hardware.bluetooth = with types; {
enable = mkBoolOpt false "Whether or not to enable bluetooth";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ kdePackages.bluez-qt ];
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Experimental = true;
KernelExperimental = true;
Enable = "Source,Sink,Media,Socket";
};
};
};
fileSystems."/var/lib/bluetooth" = {
device = "/persist/var/lib/bluetooth";
options = [
"bind"
"noauto"
"x-systemd.automount"
];
noCheck = true;
};
# https://github.com/NixOS/nixpkgs/issues/170573
};
}

View file

@ -1,29 +0,0 @@
{
lib,
config,
pkgs,
namespace,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.system.hardware.gpu.amd;
in
{
options.${namespace}.system.hardware.gpu.amd = {
enable = mkEnableOption "Enable AMD GPU";
};
config = mkIf cfg.enable {
hardware.graphics = {
enable = true;
enable32Bit = true;
};
environment = {
variables = {
AMD_VULKAN_ICD = "RADV";
};
};
};
}

View file

@ -1,47 +0,0 @@
{
lib,
config,
pkgs,
namespace,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.system.hardware.gpu.nvidia;
in
{
options.${namespace}.system.hardware.gpu.nvidia = {
enable = mkEnableOption "Enable Nvidia GPU";
};
config = mkIf cfg.enable {
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = [
pkgs.nvidia-vaapi-driver
];
};
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta; # stable, beta
};
services.xserver.videoDrivers = [ "nvidia" ];
boot.kernelParams = [
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
"nvidia_drm.fbdev=1"
];
environment.sessionVariables = {
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
LIBVA_DRIVER_NAME = "nvidia";
NVD_BACKEND = "direct";
};
};
}

View file

@ -1,19 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.hardware.networking;
in
{
options.${namespace}.system.hardware.networking = with types; {
enable = mkBoolOpt false "Whether or not to enable networking";
};
config = mkIf cfg.enable { networking.networkmanager.enable = true; };
}

View file

@ -1,39 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.locale;
in
{
options.${namespace}.system.locale = with types; {
enable = mkBoolOpt false "Whether or not to manage locale settings.";
};
config = mkIf cfg.enable {
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LANG = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
console = {
keyMap = mkForce "us";
};
};
}

View file

@ -1,19 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.time;
in
{
options.${namespace}.system.time = with types; {
enable = mkBoolOpt false "Whether or not to configure timezone information.";
};
config = mkIf cfg.enable { time.timeZone = "Europe/Berlin"; };
}

View file

@ -1,26 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.xkb;
in
{
options.${namespace}.system.xkb = with types; {
enable = mkBoolOpt false "Whether or not to configure xkb.";
};
config = mkIf cfg.enable {
console.useXkbConfig = true;
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
xkb.options = "caps:escape";
};
};
}

View file

@ -1,23 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.tools.devenv;
in
{
options.${namespace}.tools.devenv = {
enable = mkEnableOption "Whether or not to enable direnv.";
};
config = mkIf cfg.enable {
environment.systemPackages = [
pkgs.devenv
];
};
}

View file

@ -1,26 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.tools.direnv;
in
{
options.${namespace}.tools.direnv = with types; {
enable = mkBoolOpt false "Whether or not to enable direnv.";
};
config = mkIf cfg.enable {
${namespace}.home.extraOptions = {
programs.direnv = {
enable = true;
nix-direnv = enabled;
};
};
};
}

View file

@ -1,60 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.tools.git;
user = config.${namespace}.user;
in
{
options.${namespace}.tools.git = with types; {
enable = mkBoolOpt true "Wether or not to enable git (Default enabled)";
userName = mkOpt types.str user.fullName "The name to use git with";
userEmail = mkOpt types.str user.email "The email to use git with";
signingKey = mkOpt types.str "ACCFA2DB47795D9E" "The key ID to sign commits with.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
git
gitAndTools.gh
# gitbutler
];
${namespace}.home.extraOptions = {
programs.git = {
enable = true;
inherit (cfg) userName userEmail;
lfs.enable = true;
signing = {
key = cfg.signingKey;
signByDefault = true;
};
extraConfig = {
init = {
defaultBranch = "main";
};
pull = {
rebase = true;
};
push = {
autoSetupRemote = true;
};
rebase = {
autoStash = true;
};
safe = {
directory = "${config.users.users.${user.name}.home}/projects/config";
};
lfs."https://git.christophhollizeck.dev/Daholli/nixos-config.git/info/lfs".locksverify = true;
};
};
};
};
}

View file

@ -1,77 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.user;
defaultIconFileName = "profile.png";
in
{
options.${namespace}.user = with types; {
name = mkOpt str "cholli" "The name to use for the user account.";
fullName = mkOpt str "Christoph Hollizeck" "The full name of the user.";
email = mkOpt str "christoph.hollizeck@hey.com" "The email of the user.";
initialPassword = mkOpt str "asdf" "The initial password to use when the user is first created.";
icon = mkOpt (nullOr path) ./${defaultIconFileName} "The profile picture to use for the user.";
extraGroups = mkOpt (listOf str) [ ] "Groups for the user to be assigned.";
extraOptions = mkOpt attrs { } (mdDoc "Extra options passed to `users.users.<name>`.");
trustedPublicKeys = mkOption {
default = [ ];
type = nullOr (listOf str);
description = "Trusted public keys for this user for the machine";
};
};
config = {
environment.systemPackages = [ ];
# remove default nix alias
environment.shellAliases = {
l = null;
ls = null;
ll = null;
};
programs.fish = enabled;
users.defaultUserShell = pkgs.fish;
${namespace}.home = {
file = {
"Desktop/.keep".text = "";
"Documents/.keep".text = "";
"Downloads/.keep".text = "";
"Music/.keep".text = "";
"Pictures/.keep".text = "";
"Videos/.keep".text = "";
"projects/.keep".text = "";
".face".source = cfg.icon;
"Pictures/${defaultIconFileName}".source = cfg.icon;
};
};
users.users.${cfg.name} = {
isNormalUser = true;
inherit (cfg) name initialPassword;
home = "/home/${cfg.name}";
group = "users";
# Arbitrary user ID to use for the user. Since I only
# have a single user on my machines this won't ever collide.
# However, if you add multiple users you'll need to change this
# so each user has their own unique uid (or leave it out for the
# system to select).
uid = 1000;
openssh.authorizedKeys.keys = cfg.trustedPublicKeys;
extraGroups = [ "steamcmd" ] ++ cfg.extraGroups;
} // cfg.extraOptions;
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

View file

@ -0,0 +1,7 @@
{
inputs,
...
}:
{
systems = import inputs.systems;
}

View file

@ -0,0 +1,44 @@
{
config,
...
}:
{
flake = {
meta.users = {
cholli = {
email = "christoph.hollizeck@hey.com";
name = "Christoph Hollizeck";
username = "cholli";
key = "ACCFA2DB47795D9E";
authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHFrDiO5+vMfD5MimkzN32iw3MnSMLZ0mHvOrHVVmLD0"
];
};
};
modules.nixos.cholli =
{ pkgs, ... }:
{
programs.fish.enable = true;
users.users.cholli = {
description = config.flake.meta.users.cholli.name;
isNormalUser = true;
createHome = true;
extraGroups = [
"audio"
"input"
"networkmanager"
"sound"
"tty"
"wheel"
];
shell = pkgs.fish;
};
};
};
}