Compare commits
5 commits
renovate/l
...
main
Author | SHA1 | Date | |
---|---|---|---|
741b1e72bc | |||
6778b8dac3 | |||
be802492e9 | |||
4f834dd822 | |||
ab0d3a9974 |
36 changed files with 251 additions and 176 deletions
|
@ -68,11 +68,11 @@
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"src": {
|
"src": {
|
||||||
"name": null,
|
"name": null,
|
||||||
"sha256": "sha256-RIYo5Ilqbfs4kqYKSrztYLAqgvlPXqaEenVnMJvTWDk=",
|
"sha256": "sha256-eq7nUb/a8fjXiyy+tRmAr+gv1JYNCB5MYjualCL6JaU=",
|
||||||
"type": "url",
|
"type": "url",
|
||||||
"url": "https://github.com/koekeishiya/yabai/releases/download/v7.1.2/yabai-v7.1.2.tar.gz"
|
"url": "https://github.com/koekeishiya/yabai/releases/download/v7.1.3/yabai-v7.1.3.tar.gz"
|
||||||
},
|
},
|
||||||
"version": "v7.1.2"
|
"version": "v7.1.3"
|
||||||
},
|
},
|
||||||
"zsh-fast-syntax-highlighting": {
|
"zsh-fast-syntax-highlighting": {
|
||||||
"cargoLocks": null,
|
"cargoLocks": null,
|
||||||
|
|
|
@ -39,10 +39,10 @@
|
||||||
};
|
};
|
||||||
yabai = {
|
yabai = {
|
||||||
pname = "yabai";
|
pname = "yabai";
|
||||||
version = "v7.1.2";
|
version = "v7.1.3";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/koekeishiya/yabai/releases/download/v7.1.2/yabai-v7.1.2.tar.gz";
|
url = "https://github.com/koekeishiya/yabai/releases/download/v7.1.3/yabai-v7.1.3.tar.gz";
|
||||||
sha256 = "sha256-RIYo5Ilqbfs4kqYKSrztYLAqgvlPXqaEenVnMJvTWDk=";
|
sha256 = "sha256-eq7nUb/a8fjXiyy+tRmAr+gv1JYNCB5MYjualCL6JaU=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
zsh-fast-syntax-highlighting = {
|
zsh-fast-syntax-highlighting = {
|
||||||
|
|
|
@ -404,7 +404,7 @@
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"pre-commit-hooks": "pre-commit-hooks",
|
"pre-commit-hooks": "pre-commit-hooks",
|
||||||
"vscode-server": "vscode-server",
|
"vscode-server": "vscode-server",
|
||||||
"wsl": "wsl"
|
"nixos-wsl": "nixos-wsl"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
|
@ -488,7 +488,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"wsl": {
|
"nixos-wsl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": [],
|
"flake-compat": [],
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
username = "winston";
|
username = "winston";
|
||||||
isGraphical = false;
|
isGraphical = false;
|
||||||
extraModules = [ inputs.wsl.nixosModules.default ];
|
extraModules = [ inputs.nixos-wsl.nixosModules.default ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
imports = [ inputs.pre-commit-hooks.flakeModule ];
|
imports = [ inputs.pre-commit-hooks.flakeModule ];
|
||||||
|
@ -65,9 +65,6 @@
|
||||||
RULES = "./home/secrets/secrets.nix";
|
RULES = "./home/secrets/secrets.nix";
|
||||||
buildInputs =
|
buildInputs =
|
||||||
(with pkgs; [
|
(with pkgs; [
|
||||||
dhall
|
|
||||||
dhall-lsp-server
|
|
||||||
dhall-yaml
|
|
||||||
just
|
just
|
||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
nixd
|
nixd
|
||||||
|
@ -132,7 +129,7 @@
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
wsl = {
|
nixos-wsl = {
|
||||||
url = "github:nix-community/nixos-wsl";
|
url = "github:nix-community/nixos-wsl";
|
||||||
inputs.flake-compat.follows = "";
|
inputs.flake-compat.follows = "";
|
||||||
inputs.flake-utils.follows = "flake-utils";
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.stdenv) isLinux;
|
inherit (pkgs.stdenv) isLinux;
|
||||||
|
|
||||||
|
defaultBrowser = "firefox.desktop";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf config.isGraphical {
|
config = lib.mkIf config.isGraphical {
|
||||||
|
@ -156,12 +158,12 @@ in
|
||||||
|
|
||||||
home.packages = lib.mkIf isLinux [ pkgs.mullvad-browser ];
|
home.packages = lib.mkIf isLinux [ pkgs.mullvad-browser ];
|
||||||
|
|
||||||
xdg.mimeApps.defaultApplications = {
|
xdg.mimeApps.defaultApplications = lib.genAttrs [
|
||||||
"text/html" = "chromium.desktop";
|
"text/html"
|
||||||
"x-scheme-handler/http" = "chromium.desktop";
|
"x-scheme-handler/http"
|
||||||
"x-scheme-handler/https" = "chromium.desktop";
|
"x-scheme-handler/https"
|
||||||
"x-scheme-handler/about" = "chromium.desktop";
|
"x-scheme-handler/about"
|
||||||
"x-scheme-handler/unknown" = "chromium.desktop";
|
"x-scheme-handler/unknown"
|
||||||
};
|
] (_: defaultBrowser);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,6 +90,7 @@ in
|
||||||
'';
|
'';
|
||||||
extraEnv = # nu
|
extraEnv = # nu
|
||||||
''
|
''
|
||||||
|
$env.MANPAGER = "bat -l man -p"
|
||||||
$env.ENV_CONVERSIONS = {
|
$env.ENV_CONVERSIONS = {
|
||||||
"PATH": {
|
"PATH": {
|
||||||
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
|
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
osConfig,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -43,9 +44,10 @@ in
|
||||||
watchexec
|
watchexec
|
||||||
]
|
]
|
||||||
++ lib.optionals (config.isGraphical && isLinux) [
|
++ lib.optionals (config.isGraphical && isLinux) [
|
||||||
_1password-gui
|
(_1password-gui.override { polkitPolicyOwners = [ osConfig.dotfiles.username ]; })
|
||||||
uhk-agent
|
|
||||||
neovide
|
neovide
|
||||||
|
nextcloud-client
|
||||||
|
uhk-agent
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
sessionVariables.SSH_AUTH_SOCK = lib.optionalString isDarwin "${config.programs.gpg.homedir}/S.gpg-agent.ssh";
|
sessionVariables.SSH_AUTH_SOCK = lib.optionalString isDarwin "${config.programs.gpg.homedir}/S.gpg-agent.ssh";
|
||||||
|
|
14
home/lib.nix
14
home/lib.nix
|
@ -6,6 +6,7 @@
|
||||||
}:
|
}:
|
||||||
rec {
|
rec {
|
||||||
inherit (pkgs.stdenv) isLinux isDarwin;
|
inherit (pkgs.stdenv) isLinux isDarwin;
|
||||||
|
inherit (pkgs.lib) mkDefault mkOption types;
|
||||||
|
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
flakePath =
|
flakePath =
|
||||||
|
@ -21,10 +22,10 @@ rec {
|
||||||
"/Users/${username}"
|
"/Users/${username}"
|
||||||
else
|
else
|
||||||
throw "Unsupported system";
|
throw "Unsupported system";
|
||||||
home.username = username;
|
home.username = mkDefault username;
|
||||||
isGraphical = false;
|
isGraphical = mkDefault false;
|
||||||
targets.genericLinux.enable = isLinux;
|
targets.genericLinux.enable = mkDefault isLinux;
|
||||||
xdg.mime.enable = isLinux;
|
xdg.mime.enable = mkDefault isLinux;
|
||||||
};
|
};
|
||||||
|
|
||||||
modules =
|
modules =
|
||||||
|
@ -36,10 +37,7 @@ rec {
|
||||||
])
|
])
|
||||||
++ [
|
++ [
|
||||||
(
|
(
|
||||||
{ osConfig, lib, ... }:
|
{ osConfig, ... }:
|
||||||
let
|
|
||||||
inherit (lib) mkOption types;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
isGraphical = mkOption {
|
isGraphical = mkOption {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
let
|
let
|
||||||
homes = {
|
homes = {
|
||||||
futomaki = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAFFAuJa9TYB3IsHly1Z4WjQrr4cEkubNWQyhIClh6bH";
|
futomaki = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAFFAuJa9TYB3IsHly1Z4WjQrr4cEkubNWQyhIClh6bH";
|
||||||
sashimi = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIINxJEAR1Ql8bZqKgGmrnxvu5zwz+znis+RZo8jx0o0f";
|
sashimi = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICgFwSZPS1B3wndghjmgmamdM5LZ7hqv4fZsbcmYBQWT";
|
||||||
yuba = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHw8KqsIrn0SMTkBu0qZ5uHNXD0h6hpchTmWt54HhB5Z";
|
yuba = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHw8KqsIrn0SMTkBu0qZ5uHNXD0h6hpchTmWt54HhB5Z";
|
||||||
};
|
};
|
||||||
yubikeys._5ci = "age1yubikey1qfkn095xth4ukxjye98ew4ul6xdkyz7sek0hd67yfjs5z6tv7q9jgnfchls";
|
yubikeys._5ci = "age1yubikey1qfkn095xth4ukxjye98ew4ul6xdkyz7sek0hd67yfjs5z6tv7q9jgnfchls";
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
|
@ -66,6 +65,7 @@
|
||||||
builtins.concatStringsSep "\n" (map (app: ''yabai -m rule --add app="${app}" ${options}'') apps);
|
builtins.concatStringsSep "\n" (map (app: ''yabai -m rule --add app="${app}" ${options}'') apps);
|
||||||
unmanaged = apps: mkRules apps "manage=off";
|
unmanaged = apps: mkRules apps "manage=off";
|
||||||
in
|
in
|
||||||
|
# bash
|
||||||
''
|
''
|
||||||
# auto-inject scripting additions
|
# auto-inject scripting additions
|
||||||
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
|
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
|
||||||
|
@ -119,6 +119,7 @@
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
|
# bash
|
||||||
''
|
''
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
# focus window
|
# focus window
|
||||||
|
@ -157,11 +158,9 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.jankyborders ];
|
|
||||||
launchd.user.agents.jankyborders.serviceConfig = {
|
launchd.user.agents.jankyborders.serviceConfig = {
|
||||||
ProgramArguments = [ "${pkgs.jankyborders}/bin/borders" ];
|
ProgramArguments = [ (lib.getExe pkgs.jankyborders) ];
|
||||||
KeepAlive = true;
|
KeepAlive = true;
|
||||||
RunAtLoad = true;
|
RunAtLoad = true;
|
||||||
EnvironmentVariables.PATH = "${pkgs.jankyborders}/bin:${config.environment.systemPath}";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,9 +15,9 @@ let
|
||||||
);
|
);
|
||||||
binary =
|
binary =
|
||||||
{
|
{
|
||||||
swayfx = "sway";
|
hyprland = "Hyprland";
|
||||||
sway = "sway";
|
sway = "sway";
|
||||||
hyprland = "hypr";
|
swayfx = "sway";
|
||||||
}
|
}
|
||||||
.${desktop} or (throw "greetd: desktop not supported");
|
.${desktop} or (throw "greetd: desktop not supported");
|
||||||
in
|
in
|
||||||
|
@ -25,7 +25,7 @@ in
|
||||||
config = lib.mkIf condition {
|
config = lib.mkIf condition {
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.default_session.command = "${lib.getExe pkgs.greetd.tuigreet} --cmd '${pkgs.dbus}/bin/dbus-run-session ${binary}'";
|
settings.default_session.command = "${lib.getExe pkgs.greetd.tuigreet} --remember --cmd ${binary}";
|
||||||
};
|
};
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
security.pam.services.greetd = {
|
security.pam.services.greetd = {
|
|
@ -37,12 +37,13 @@ in
|
||||||
|
|
||||||
programs.sway = {
|
programs.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = lib.mkIf (config.dotfiles.desktop == "swayfx") pkgs.swayfx;
|
package = if (config.dotfiles.desktop == "swayfx") then pkgs.swayfx else pkgs.sway;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
swaylock-effects
|
swaylock-effects
|
||||||
swayidle
|
swayidle
|
||||||
];
|
];
|
||||||
extraSessionCommands = ''
|
extraSessionCommands = # bash
|
||||||
|
''
|
||||||
# session
|
# session
|
||||||
export XDG_SESSION_TYPE=wayland
|
export XDG_SESSION_TYPE=wayland
|
||||||
export XDG_SESSION_DESKTOP=sway
|
export XDG_SESSION_DESKTOP=sway
|
|
@ -11,7 +11,13 @@ let
|
||||||
flakeInputs = filterAttrs (name: value: (value ? outputs) && (name != "self")) inputs;
|
flakeInputs = filterAttrs (name: value: (value ? outputs) && (name != "self")) inputs;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs = {
|
||||||
|
config.allowUnfree = true;
|
||||||
|
|
||||||
|
# prefer my own registry & path pinning for *all* inputs
|
||||||
|
flake.setNixPath = false;
|
||||||
|
flake.setFlakeRegistry = false;
|
||||||
|
};
|
||||||
nix = {
|
nix = {
|
||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
{ lib, pkgs, ... }:
|
|
||||||
let
|
|
||||||
inherit (lib) mkForce;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services = {
|
|
||||||
kanata.enable = mkForce false;
|
|
||||||
dnsmasq.enable = mkForce false;
|
|
||||||
mullvad-vpn.enable = mkForce false;
|
|
||||||
stubby.enable = mkForce false;
|
|
||||||
};
|
|
||||||
virtualisation.podman.enable = mkForce false;
|
|
||||||
|
|
||||||
system = {
|
|
||||||
build.installBootLoader = mkForce "${pkgs.coreutils}/bin/true";
|
|
||||||
stateVersion = "23.11";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -2,7 +2,10 @@
|
||||||
{
|
{
|
||||||
imports = [ ./hardware.nix ];
|
imports = [ ./hardware.nix ];
|
||||||
|
|
||||||
dotfiles.desktop = "sway";
|
dotfiles = {
|
||||||
|
desktop = "sway";
|
||||||
|
gaming.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
|
@ -17,54 +20,31 @@
|
||||||
time.timeZone = "Europe/Vienna";
|
time.timeZone = "Europe/Vienna";
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
flatpak.enable = true;
|
|
||||||
openssh.enable = true;
|
openssh.enable = true;
|
||||||
pcscd.enable = true;
|
pcscd.enable = true;
|
||||||
transmission.enable = true;
|
|
||||||
transmission.openFirewall = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.podman.enable = true;
|
virtualisation = {
|
||||||
virtualisation.libvirtd.enable = true;
|
libvirtd.enable = true;
|
||||||
|
podman.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
users.users."${config.dotfiles.username}".extraGroups = [
|
users.users."${config.dotfiles.username}".extraGroups = [
|
||||||
"libvirtd"
|
"libvirtd"
|
||||||
"transmission"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
cabextract
|
(pkgs.wrapOBS {
|
||||||
discover-overlay
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
lutris-free
|
obs-backgroundremoval
|
||||||
mangohud
|
obs-composite-blur
|
||||||
|
obs-pipewire-audio-capture
|
||||||
|
wlrobs
|
||||||
|
];
|
||||||
|
})
|
||||||
virt-manager
|
virt-manager
|
||||||
wineWowPackages.staging
|
virtiofsd
|
||||||
winetricks
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
|
||||||
gamemode = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
custom = {
|
|
||||||
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
|
|
||||||
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
steam = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.steam.override {
|
|
||||||
extraEnv.MANGOHUD = 1;
|
|
||||||
extraPkgs =
|
|
||||||
p: with p; [
|
|
||||||
corefonts
|
|
||||||
protontricks
|
|
||||||
gamescope
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "22.11";
|
system.stateVersion = "22.11";
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ rec {
|
||||||
hmCommonConfig =
|
hmCommonConfig =
|
||||||
{ username }:
|
{ username }:
|
||||||
(
|
(
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
homeLib = import ../home/lib.nix { inherit inputs username pkgs; };
|
homeLib = import ../home/lib.nix { inherit inputs username pkgs; };
|
||||||
in
|
in
|
||||||
|
@ -34,6 +34,9 @@ rec {
|
||||||
extraModules ? [ ],
|
extraModules ? [ ],
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||||
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
ldTernary =
|
ldTernary =
|
||||||
l: d:
|
l: d:
|
||||||
if pkgs.stdenv.isLinux then
|
if pkgs.stdenv.isLinux then
|
||||||
|
@ -42,17 +45,16 @@ rec {
|
||||||
d
|
d
|
||||||
else
|
else
|
||||||
throw "Unsupported system";
|
throw "Unsupported system";
|
||||||
target = ldTernary "nixosConfigurations" "darwinConfigurations";
|
|
||||||
builder = ldTernary inputs.nixpkgs.lib.nixosSystem inputs.darwin.lib.darwinSystem;
|
builder = ldTernary inputs.nixpkgs.lib.nixosSystem inputs.darwin.lib.darwinSystem;
|
||||||
|
hostPlatform = ldTernary "nixos" "darwin";
|
||||||
module = ldTernary "nixosModules" "darwinModules";
|
module = ldTernary "nixosModules" "darwinModules";
|
||||||
hostPlatform = ldTernary "linux" "darwin";
|
target = ldTernary "nixosConfigurations" "darwinConfigurations";
|
||||||
|
|
||||||
linuxModules = [ inputs.nixos-cosmic.nixosModules.default ];
|
|
||||||
darwinModules = [ inputs.nekowinston-nur.darwinModules.default ];
|
darwinModules = [ inputs.nekowinston-nur.darwinModules.default ];
|
||||||
|
linuxModules = [
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
inputs.nixos-cosmic.nixosModules.default
|
||||||
inherit (pkgs) lib;
|
inputs.nixos-wsl.nixosModules.default
|
||||||
inherit (pkgs.lib) mkOption types;
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
${target}."${host}" = builder {
|
${target}."${host}" = builder {
|
||||||
|
@ -60,43 +62,25 @@ rec {
|
||||||
modules =
|
modules =
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
options = {
|
config = {
|
||||||
dotfiles = {
|
dotfiles = {
|
||||||
username = mkOption {
|
username = lib.mkDefault username;
|
||||||
type = types.str;
|
desktop = if (pkgs.stdenv.isLinux && isGraphical) then "sway" else null;
|
||||||
default = username;
|
|
||||||
description = "The username of the user";
|
|
||||||
};
|
};
|
||||||
desktop = mkOption {
|
isGraphical = lib.mkDefault isGraphical;
|
||||||
type = types.nullOr (
|
networking.hostName = lib.mkDefault host;
|
||||||
types.enum [
|
|
||||||
"cosmic"
|
|
||||||
"gnome"
|
|
||||||
"hyprland"
|
|
||||||
"sway"
|
|
||||||
"swayfx"
|
|
||||||
]
|
|
||||||
);
|
|
||||||
default = if (pkgs.stdenv.isLinux && isGraphical) then "sway" else null;
|
|
||||||
description = "The desktop environment to use";
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
isGraphical = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = isGraphical;
|
|
||||||
description = "Whether the system is a graphical target";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config.networking.hostName = host;
|
|
||||||
}
|
}
|
||||||
|
../modules/shared
|
||||||
|
../modules/${hostPlatform}
|
||||||
./common/shared
|
./common/shared
|
||||||
./common/${hostPlatform}
|
./common/${hostPlatform}
|
||||||
./${host}
|
./${host}
|
||||||
inputs.home-manager.${module}.home-manager
|
inputs.home-manager.${module}.home-manager
|
||||||
(hmCommonConfig { inherit username; })
|
(hmCommonConfig { inherit username; })
|
||||||
]
|
]
|
||||||
++ lib.optionals pkgs.stdenv.isLinux linuxModules
|
|
||||||
++ lib.optionals pkgs.stdenv.isDarwin darwinModules
|
++ lib.optionals pkgs.stdenv.isDarwin darwinModules
|
||||||
|
++ lib.optionals pkgs.stdenv.isLinux linuxModules
|
||||||
++ extraModules;
|
++ extraModules;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
|
|
|
@ -19,13 +19,12 @@ in
|
||||||
brews = [ ];
|
brews = [ ];
|
||||||
casks = [
|
casks = [
|
||||||
"1password"
|
"1password"
|
||||||
(skipSha "affinity-designer")
|
"affinity-designer"
|
||||||
(skipSha "affinity-photo")
|
"affinity-photo"
|
||||||
(skipSha "affinity-publisher")
|
"affinity-publisher"
|
||||||
"alfred"
|
"alfred"
|
||||||
"blender"
|
"blender"
|
||||||
(noQuarantine "easy-move-plus-resize")
|
"element"
|
||||||
(skipSha "element")
|
|
||||||
"elgato-wave-link"
|
"elgato-wave-link"
|
||||||
"eloston-chromium"
|
"eloston-chromium"
|
||||||
"iina"
|
"iina"
|
||||||
|
|
|
@ -11,7 +11,9 @@
|
||||||
longitude = 16.363449;
|
longitude = 16.363449;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.buildMachines = [
|
nix = {
|
||||||
|
distributedBuilds = true;
|
||||||
|
buildMachines = [
|
||||||
{
|
{
|
||||||
hostName = "orb";
|
hostName = "orb";
|
||||||
sshUser = "nixos";
|
sshUser = "nixos";
|
||||||
|
@ -28,4 +30,5 @@
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
imports = [ ../common/wsl ];
|
dotfiles.wsl.enable = true;
|
||||||
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
location = {
|
location = {
|
||||||
|
@ -8,10 +8,5 @@
|
||||||
};
|
};
|
||||||
time.timeZone = "Europe/Vienna";
|
time.timeZone = "Europe/Vienna";
|
||||||
|
|
||||||
wsl = {
|
system.stateVersion = "23.11";
|
||||||
enable = true;
|
|
||||||
defaultUser = "winston";
|
|
||||||
startMenuLaunchers = true;
|
|
||||||
useWindowsDriver = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
1
modules/darwin/default.nix
Normal file
1
modules/darwin/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ }
|
6
modules/nixos/default.nix
Normal file
6
modules/nixos/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./gaming.nix
|
||||||
|
./wsl.nix
|
||||||
|
];
|
||||||
|
}
|
41
modules/nixos/gaming.nix
Normal file
41
modules/nixos/gaming.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.dotfiles.gaming;
|
||||||
|
gamePkgs =
|
||||||
|
pkgs: with pkgs; [
|
||||||
|
corefonts
|
||||||
|
gamescope
|
||||||
|
mangohud
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.dotfiles.gaming.enable = lib.mkEnableOption "gaming configuration";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
discover-overlay
|
||||||
|
(lutris.override { extraPkgs = gamePkgs; })
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
gamemode = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
custom = {
|
||||||
|
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
|
||||||
|
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
steam = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.steam.override { extraPkgs = gamePkgs; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
37
modules/nixos/wsl.nix
Normal file
37
modules/nixos/wsl.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.dotfiles.wsl;
|
||||||
|
inherit (lib) mkDefault mkForce;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.dotfiles.wsl.enable = lib.mkEnableOption "NixOS-WSL specific options";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# disable services that are not needed in WSL
|
||||||
|
services = {
|
||||||
|
dnsmasq.enable = mkForce false;
|
||||||
|
kanata.enable = mkForce false;
|
||||||
|
mullvad-vpn.enable = mkForce false;
|
||||||
|
stubby.enable = mkForce false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# podman runs on native Windows
|
||||||
|
virtualisation.podman.enable = mkForce false;
|
||||||
|
|
||||||
|
# main WSL defaults
|
||||||
|
wsl = {
|
||||||
|
enable = mkDefault true;
|
||||||
|
defaultUser = mkDefault config.dotfiles.username;
|
||||||
|
startMenuLaunchers = mkDefault true;
|
||||||
|
useWindowsDriver = mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# skip installing the bootloader
|
||||||
|
system.build.installBootLoader = mkForce "${pkgs.coreutils}/bin/true";
|
||||||
|
};
|
||||||
|
}
|
36
modules/shared/config.nix
Normal file
36
modules/shared/config.nix
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib) types;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
dotfiles = lib.mkOption {
|
||||||
|
type = types.submodule {
|
||||||
|
options = {
|
||||||
|
desktop = lib.mkOption {
|
||||||
|
description = "The desktop environment to use";
|
||||||
|
type = types.nullOr (
|
||||||
|
types.enum [
|
||||||
|
"cosmic"
|
||||||
|
"gnome"
|
||||||
|
"hyprland"
|
||||||
|
"sway"
|
||||||
|
"swayfx"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
};
|
||||||
|
username = lib.mkOption {
|
||||||
|
description = "The username of the user";
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
isGraphical = lib.mkEnableOption "" // {
|
||||||
|
description = "Whether the system is a graphical target";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
5
modules/shared/default.nix
Normal file
5
modules/shared/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./config.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -4,15 +4,15 @@
|
||||||
(
|
(
|
||||||
final: prev:
|
final: prev:
|
||||||
let
|
let
|
||||||
srcs = prev.callPackages ../_sources/generated.nix { };
|
srcs = final.callPackages ../_sources/generated.nix { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nushellPlugins = (prev.nushellPlugins or { }) // {
|
nushellPlugins = (prev.nushellPlugins or { }) // {
|
||||||
clipboard = prev.callPackage ./nu_plugin_clipboard.nix { };
|
clipboard = final.callPackage ./nu_plugin_clipboard.nix { };
|
||||||
};
|
};
|
||||||
starship = prev.starship.overrideAttrs (old: {
|
starship = prev.starship.overrideAttrs (old: {
|
||||||
patches = [
|
patches = [
|
||||||
(prev.fetchpatch {
|
(final.fetchpatch {
|
||||||
url = "https://github.com/starship/starship/pull/4439.patch";
|
url = "https://github.com/starship/starship/pull/4439.patch";
|
||||||
sha256 = "sha256-BKH3elz96Oa424Oz5UIKA2/BOpkym1LTestvccFinnc=";
|
sha256 = "sha256-BKH3elz96Oa424Oz5UIKA2/BOpkym1LTestvccFinnc=";
|
||||||
})
|
})
|
||||||
|
@ -22,10 +22,10 @@
|
||||||
inherit (srcs.yabai) version src;
|
inherit (srcs.yabai) version src;
|
||||||
});
|
});
|
||||||
nur = import inputs.nur {
|
nur = import inputs.nur {
|
||||||
nurpkgs = prev;
|
nurpkgs = final;
|
||||||
pkgs = prev;
|
pkgs = final;
|
||||||
repoOverrides = {
|
repoOverrides = {
|
||||||
nekowinston = inputs.nekowinston-nur.packages.${prev.stdenv.system};
|
nekowinston = inputs.nekowinston-nur.packages.${final.stdenv.system};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue