lexi refactor das muss ich mir nochmal nuechtern anschauen

This commit is contained in:
xqtc 2024-10-06 00:26:22 +02:00
parent d5ef609f6f
commit 4b5034ef41
26 changed files with 280 additions and 212 deletions

View file

@ -0,0 +1,11 @@
{inputs, ...}: {
perSystem = { system, ...}: {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
# The allowUnfreePredicate is due to home-manager#2942 (I haven't actually checked that it is necessary)
# https://github.com/nix-community/home-manager/issues/2942
config.allowUnfreePredicate = (_: true);
};
};
}

View file

@ -0,0 +1,21 @@
{ lib, flake-parts-lib, ... }:
let
inherit (lib)
mkOption
types
;
inherit (flake-parts-lib)
mkTransposedPerSystemModule
;
in
mkTransposedPerSystemModule {
name = "homeConfigurations";
option = mkOption {
type = types.raw;
default = { };
description = ''
home-manager configs
'';
};
file = ./hm-flake-part.nix;
}

28
flake-mods/hm.nix Normal file
View file

@ -0,0 +1,28 @@
{inputs, lib, ...}: {
imports = [
./hm-flake-part.nix
];
perSystem = { config, self', inputs', pkgs, system, ... }: let
# split system (e.g. x86_64-linux) into os and arch
splitSystem = lib.splitString "-" system;
os = builtins.elemAt splitSystem 0;
arch = builtins.elemAt splitSystem 1;
in {
legacyPackages.homeConfigurations.xqtc = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
../home
inputs.nixvim.homeManagerModules.nixvim
inputs.sops-nix.homeManagerModules.sops
{ inherit os arch; }
];
extraSpecialArgs = {inherit inputs;};
};
# # this sounds stupid, but it's the only way to make home-manager consume a
# # flake output with the system in it, which *should* be the case because it
# # wants system-specific pkgs, but flake-parts (rightfully so!) complains
# # that this isn't a package, so we do this to make both happy.
# packages.homeConfigurations.type = "derivation";
};
}

11
flake-mods/nixosHosts.nix Normal file
View file

@ -0,0 +1,11 @@
{inputs, lib, ...}: {
flake = lib.genAttrs [
"asmodeus" "seraphim" "lilith" "lambda" "beleth"
] (name: inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
../hosts/x86_64-linux/${name}
];
specialArgs = {inherit inputs;};
});
}

View file

@ -164,6 +164,24 @@
} }
}, },
"flake-parts": { "flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixvim", "nixvim",
@ -558,6 +576,18 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"lastModified": 1727825735,
"narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
}
},
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1727111026, "lastModified": 1727111026,
@ -720,7 +750,7 @@
"inputs": { "inputs": {
"devshell": "devshell", "devshell": "devshell",
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts", "flake-parts": "flake-parts_2",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
@ -816,6 +846,7 @@
"compose2nix": "compose2nix", "compose2nix": "compose2nix",
"dwl-source": "dwl-source", "dwl-source": "dwl-source",
"firefox-addons": "firefox-addons", "firefox-addons": "firefox-addons",
"flake-parts": "flake-parts",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"home-manager": "home-manager", "home-manager": "home-manager",
"lix-module": "lix-module", "lix-module": "lix-module",

View file

@ -6,6 +6,7 @@
nixos-aarch64-widevine.url = "github:epetousis/nixos-aarch64-widevine"; nixos-aarch64-widevine.url = "github:epetousis/nixos-aarch64-widevine";
nixpkgs-master.url = "github:NixOS/nixpkgs/master"; nixpkgs-master.url = "github:NixOS/nixpkgs/master";
apple-silicon.url = "github:tpwrules/nixos-apple-silicon"; apple-silicon.url = "github:tpwrules/nixos-apple-silicon";
flake-parts.url = "github:hercules-ci/flake-parts";
compose2nix = { compose2nix = {
url = "github:aksiksi/compose2nix"; url = "github:aksiksi/compose2nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -41,78 +42,14 @@
}; };
#inputs.agenix.url = "github:ryantm/agenix"; #inputs.agenix.url = "github:ryantm/agenix";
outputs = inputs @ { outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } {
self, imports = [
nixpkgs, ./flake-mods/hm.nix
nixpkgs-master, ./flake-mods/nixosHosts.nix
firefox-addons, ./flake-mods/allowUnfree.nix
home-manager,
proxmox-nixos,
nixos-hardware,
nixvim,
nh,
lix-module,
dwl-source,
sops-nix,
...
}: let
lib = nixpkgs.lib;
util = (import ./overlays/util.nix {} {}).util;
system = "x86_64-linux";
in {
nixosConfigurations = {
"asmodeus" = lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
./hosts/x86_64-linux/asmodeus
]; ];
specialArgs = {inherit inputs;}; systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
}; perSystem = { config, self', inputs', pkgs, system, ... }: {};
"seraphim" = lib.nixosSystem { flake = {};
system = "x86_64-linux";
modules = [./hosts/x86_64-linux/seraphim];
specialArgs = {inherit inputs;};
};
"lilith" = lib.nixosSystem {
system = "x86_64-linux";
modules = [./hosts/x86_64-linux/lilith];
specialArgs = {inherit inputs;};
};
"lambda" = lib.nixosSystem {
system = "x86_64-linux";
modules = [./hosts/x86_64-linux/lambda];
specialArgs = {inherit inputs;};
};
"beleth" = lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/x86_64-linux/beleth
proxmox-nixos.nixosModules.proxmox-ve
({
pkgs,
lib,
...
}: {
services.proxmox-ve.enable = false;
nixpkgs.overlays = [
proxmox-nixos.overlays.${system}
];
services.openssh.settings.AcceptEnv = lib.mkForce "GIT_PROTOCOL LANG LC_*";
})
];
specialArgs = {inherit inputs;};
};
"alastor" = lib.nixosSystem {
system = "aarch64-linux";
modules = [./hosts/aarch64-linux/alastor {nixpkgs.overlays = [inputs.nixos-aarch64-widevine.overlays.default];}];
specialArgs = {inherit inputs;};
};
};
formatter = {
x86_64-linux = inputs.nixpkgs.legacyPackages.x86_64-linux.alejandra;
aarch64-linux = inputs.nixpkgs.legacyPackages.aarch64-linux.alejandra;
};
}; };
} }

View file

@ -29,7 +29,7 @@ up=$(uptime | awk -F'( |,|:)+' '{
up=$(sed -e "s/ h/h/g" <<< ${up}) up=$(sed -e "s/ h/h/g" <<< ${up})
up=$(sed -e "s/ m/m/g" <<< ${up}) up=$(sed -e "s/ m/m/g" <<< ${up})
pkgs=$(nix-store --query --requisites /run/current-system | wc -l) pkgs=$(nix-store --query --requisites /run/current-system 2>/dev/null | wc -l)
arch=$(nix-instantiate --eval -E 'builtins.currentSystem') arch=$(nix-instantiate --eval -E 'builtins.currentSystem')
arch_sanitized=$(echo $arch | sed 's/^"//;s/"$//') arch_sanitized=$(echo $arch | sed 's/^"//;s/"$//')
@ -127,7 +127,7 @@ fetch() {
echo "" echo ""
echo " ╭─────────────╮ " echo " ╭─────────────╮ "
echo "${red}${normal} user │ ${red}$(whoami)${normal}" echo "${red}${normal} user │ ${red}$(whoami)${normal}"
echo "${yellow}${normal} distro │ ${yellow}$(sed -nE "s@PRETTY_NAME=\"([^\"]*)\"@\1@p" /etc/os-release)${normal} " echo "${yellow}${normal} distro │ ${yellow}$(sed -nE "s@PRETTY_NAME=\"([^\"]*)\"@\1@p" /etc/os-release 2>/dev/null || echo "MacOS")${normal} "
echo "${green}${normal} kernel │ ${green}$(uname -r)${normal} " echo "${green}${normal} kernel │ ${green}$(uname -r)${normal} "
echo "${cyan}󱂬 ${normal} de/wm │ ${cyan}$XDG_CURRENT_DESKTOP${normal} " echo "${cyan}󱂬 ${normal} de/wm │ ${cyan}$XDG_CURRENT_DESKTOP${normal} "
echo "${blue}${normal} uptime │ ${blue}${up}${normal} " echo "${blue}${normal} uptime │ ${blue}${up}${normal} "

View file

@ -3,6 +3,10 @@ vim.keymap.set("n", "<C-Right>", "<c-w>l")
vim.keymap.set("n", "<C-Left>", "<c-w>h") vim.keymap.set("n", "<C-Left>", "<c-w>h")
vim.keymap.set("n", "<C-Up>", "<c-w>k") vim.keymap.set("n", "<C-Up>", "<c-w>k")
vim.keymap.set("n", "<C-Down>", "<c-w>j") vim.keymap.set("n", "<C-Down>", "<c-w>j")
vim.keymap.set("n", "<C-L>", "<c-w>l")
vim.keymap.set("n", "<C-H>", "<c-w>h")
vim.keymap.set("n", "<C-K>", "<c-w>k")
vim.keymap.set("n", "<C-J>", "<c-w>j")
-- Escape for exiting terminal mode -- Escape for exiting terminal mode
vim.keymap.set('t', '<Esc>', '<C-\\><C-n>') vim.keymap.set('t', '<Esc>', '<C-\\><C-n>')

View file

@ -7,9 +7,10 @@
}: { }: {
imports = [ imports = [
./modules ./modules
./system.nix
]; ];
home.username = "xqtc"; home.username = "xqtc";
home.homeDirectory = "/home/xqtc"; home.homeDirectory = if config.os == "linux" then "/home/xqtc" else "/Users/xqtc";
programs.wezterm = { programs.wezterm = {
enable = true; enable = true;
@ -18,7 +19,7 @@
programs.joshuto = {enable = true;}; programs.joshuto = {enable = true;};
dconf.enable = true; dconf.enable = config.os == "linux";
services.easyeffects = lib.mkIf (pkgs.system == "x86_64-linux") {enable = true;}; services.easyeffects = lib.mkIf (pkgs.system == "x86_64-linux") {enable = true;};

View file

@ -22,6 +22,6 @@
./zoxide.nix ./zoxide.nix
./sops.nix ./sops.nix
./spotify-cli.nix ./spotify-cli.nix
# ./ssh.nix ./ssh.nix
]; ];
} }

View file

@ -3,12 +3,13 @@
outputs, outputs,
config, config,
pkgs, pkgs,
lib,
... ...
}: }:
with inputs; { with inputs; {
home.sessionVariables.DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox"; home.sessionVariables.DEFAULT_BROWSER = if (config.os == "linux") then "${pkgs.firefox}/bin/firefox" else "firefox";
programs.firefox = { programs.firefox = lib.mkIf (config.os == "linux") {
enable = true; enable = true;
package = package =
pkgs.firefox.override {cfg = {enableGnomeExtensions = true;};}; pkgs.firefox.override {cfg = {enableGnomeExtensions = true;};};

View file

@ -4,7 +4,7 @@
... ...
}: { }: {
programs.foot = { programs.foot = {
enable = true; enable = config.os == "linux";
settings = { settings = {
main = { main = {
font = "ComicShannsMono Nerd Font Mono:size=11"; font = "ComicShannsMono Nerd Font Mono:size=11";

View file

@ -2,6 +2,7 @@
config, config,
pkgs, pkgs,
inputs, inputs,
lib,
... ...
}: { }: {
dconf.settings = { dconf.settings = {
@ -52,7 +53,7 @@
''; '';
}; };
}; };
home.packages = with pkgs; [ home.packages = lib.optionals (config.os == "linux") (with pkgs; [
gnomeExtensions.user-themes gnomeExtensions.user-themes
gnomeExtensions.blur-my-shell gnomeExtensions.blur-my-shell
gnomeExtensions.tray-icons-reloaded gnomeExtensions.tray-icons-reloaded
@ -63,7 +64,7 @@
gnomeExtensions.burn-my-windows gnomeExtensions.burn-my-windows
gnomeExtensions.desktop-cube gnomeExtensions.desktop-cube
catppuccin-cursors.mochaPink catppuccin-cursors.mochaPink
]; ]);
# home.pointerCursor = { # home.pointerCursor = {
# gtk.enable = true; # gtk.enable = true;
# x11.enable = true; # x11.enable = true;

View file

@ -2,131 +2,126 @@
config, config,
inputs, inputs,
pkgs, pkgs,
lib,
... ...
}: let }: let
flameshot = pkgs.flameshot.overrideDerivation (old: {NIX_CFLAGS_COMPILE = "-DUSE_WAYLAND_GRIM";}); flameshot = pkgs.flameshot.overrideDerivation (old: {NIX_CFLAGS_COMPILE = "-DUSE_WAYLAND_GRIM";});
x86pkgs =
if pkgs.system == "x86_64-linux"
then [
pkgs.steam
pkgs.heroic
pkgs.protonup-qt
pkgs.via
pkgs.telegram-desktop
pkgs.jetbrains.rust-rover
pkgs.tutanota-desktop
pkgs.bitwarden-desktop
pkgs.bottles
flameshot
pkgs.grim
# pkgs.ida-free
# pkgs.spotify
]
else [];
maxfetch = pkgs.writeScriptBin "maxfetch" (builtins.readFile ../config-files/maxfetch.sh); maxfetch = pkgs.writeScriptBin "maxfetch" (builtins.readFile ../config-files/maxfetch.sh);
startdwl = pkgs.writeScriptBin "startdwl" (builtins.readFile ../config-files/startdwl.sh); startdwl = pkgs.writeScriptBin "startdwl" (builtins.readFile ../config-files/startdwl.sh);
in { in {
home.packages = home.packages = (lib.optionals (config.os == "linux") (with pkgs; [
[ yubioath-flutter
pkgs.yubioath-flutter steam
heroic
protonup-qt
via
telegram-desktop
jetbrains.rust-rover
tutanota-desktop
bitwarden-desktop
bottles
flameshot
grim
networkmanagerapplet
nextcloud-client
swaylock-effects
wdisplays
brightnessctl
pavucontrol
swayfx
sway-contrib.grimshot
libnotify
swww
strace
ltrace
ghidra
imhex
qmk-udev-rules
jellyfin-media-player
signal-desktop
# ida-free
# spotify
])) ++ (with pkgs; [
nh
pkgs.ncspot ncspot
pkgs.wakatime-cli wakatime-cli
pkgs.neofetch neofetch
# pkgs.uwufetch # uwufetch
maxfetch maxfetch
startdwl startdwl
pkgs.btop btop
pkgs.iftop iftop
pkgs.ranger ranger
pkgs.cargo-mommy cargo-mommy
pkgs.evcxr
pkgs.just just
pkgs.fzf fzf
pkgs.catppuccin-kde catppuccin-kde
pkgs.typst typst
pkgs.networkmanagerapplet # marked as broken
# anki
pkgs.anki freetube
pkgs.freetube openvpn
pkgs.openvpn moodle-dl
pkgs.moodle-dl
pkgs.nextcloud-client obsidian
pkgs.obsidian
pkgs.swaylock-effects
pkgs.wdisplays
pkgs.prismlauncher prismlauncher
pkgs.syncthingtray # marked as broken
# syncthingtray
pkgs.brightnessctl
pkgs.pavucontrol
pkgs.rbw rbw
pkgs.swayfx
pkgs.sway-contrib.grimshot
pkgs.libnotify nodejs
pkgs.strace # cabal
pkgs.ltrace ghc
pkgs.nodejs # marked as broken
# rizin
# (cutter.withPlugins (ps: with ps; [jsdec rz-ghidra sigdb]))
# pkgs.cabal
pkgs.ghc
pkgs.rizin nerdfonts
(pkgs.cutter.withPlugins (ps: with ps; [jsdec rz-ghidra sigdb])) ipafont
pkgs.imhex vesktop
pkgs.ghidra element-desktop
pkgs.nerdfonts qbittorrent
pkgs.ipafont nicotine-plus
pkgs.signal-desktop qmk
pkgs.vesktop
pkgs.element-desktop
pkgs.qbittorrent neovide
pkgs.nicotine-plus
pkgs.qmk xournalpp
pkgs.qmk-udev-rules zathura
pkgs.neovide ripgrep
pkgs.xournalpp sayonara
pkgs.zathura # mpv
feishin
pkgs.ripgrep nix-tree
pkgs.sayonara nixos-icons
pkgs.mpv ]);
pkgs.jellyfin-media-player
pkgs.feishin
pkgs.nix-tree
pkgs.nixos-icons
pkgs.swww
]
++ x86pkgs;
} }

View file

@ -20,7 +20,7 @@
clipboard.providers.wl-copy.enable = true; clipboard.providers.wl-copy.enable = true;
options = { opts = {
number = true; # Show line numbers number = true; # Show line numbers
relativenumber = true; # Show relative line numbers relativenumber = true; # Show relative line numbers
@ -47,22 +47,22 @@
wakatime.enable = true; wakatime.enable = true;
headlines.enable = true; headlines.enable = true;
twilight.enable = true; twilight.enable = true;
comment-nvim = { comment = {
enable = true; enable = true;
}; };
indent-blankline.enable = true; indent-blankline.enable = true;
lualine = { lualine = {
enable = true; enable = true;
disabledFiletypes.statusline = ["neo-tree"];
componentSeparators = {
left = "";
right = "";
};
sectionSeparators = {
left = "";
right = "";
};
settings = { settings = {
disabled_filetypes.statusline = ["neo-tree"];
component_separators = {
left = "";
right = "";
};
section_separators = {
left = "";
right = "";
};
sections = { sections = {
lualine_y = [ lualine_y = [
{ {
@ -153,9 +153,7 @@
# port = "31337"; # port = "31337";
# host = "127.0.0.1"; # host = "127.0.0.1";
# }; # };
}; server.settings = {
server = {
settings = {
inlayHints = { inlayHints = {
closureStyle = "rust_analyzer"; closureStyle = "rust_analyzer";
}; };
@ -179,7 +177,7 @@
nushell.enable = true; nushell.enable = true;
clangd.enable = true; clangd.enable = true;
svelte.enable = true; svelte.enable = true;
tsserver.enable = true; ts-ls.enable = true;
java-language-server.enable = true; java-language-server.enable = true;
hls.enable = true; hls.enable = true;
eslint.enable = true; eslint.enable = true;
@ -194,7 +192,7 @@
typing.autoClosingAngleBrackets.enable = true; typing.autoClosingAngleBrackets.enable = true;
}; };
}; };
nil_ls.enable = true; nil-ls.enable = true;
}; };
}; };
dap = { dap = {
@ -210,12 +208,12 @@
treesitter = { treesitter = {
enable = true; enable = true;
folding = true; folding = true;
indent = true;
nixvimInjections = true; nixvimInjections = true;
settings = { settings = {
ensure_installed = "all"; ensure_installed = "all";
# highlight.enable = true; # highlight.enable = true;
highlight.enable = true; highlight.enable = true;
indent.enable = true;
}; };
}; };
treesitter-refactor = { treesitter-refactor = {
@ -269,6 +267,7 @@
}; };
}; };
telescope.enable = true; telescope.enable = true;
web-devicons.enable = true; # required by telescope
telescope.extensions = {file-browser.enable = true;}; telescope.extensions = {file-browser.enable = true;};
which-key.enable = true; which-key.enable = true;
cmp-nvim-lsp.enable = true; cmp-nvim-lsp.enable = true;
@ -285,7 +284,6 @@
enable = true; enable = true;
theme = null; theme = null;
iconsEnabled = true;
layout = [ layout = [
{ {
type = "padding"; type = "padding";

View file

@ -6,7 +6,7 @@
... ...
}: { }: {
programs.rbw = { programs.rbw = {
enable = true; enable = config.os == "linux";
settings = { settings = {
email = "xqtc@tutanota.com"; email = "xqtc@tutanota.com";
lock_timeout = 300; lock_timeout = 300;
@ -14,7 +14,7 @@
}; };
}; };
programs.rofi = { programs.rofi = {
enable = true; enable = config.os == "linux";
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
plugins = [pkgs.rofi-rbw-wayland pkgs.rofi-power-menu]; plugins = [pkgs.rofi-rbw-wayland pkgs.rofi-power-menu];
extraConfig = { extraConfig = {

View file

@ -5,7 +5,7 @@
... ...
}: { }: {
programs = { programs = {
zsh.enable = true; zsh.enable = if config.os == "linux" then true else false;
atuin = { atuin = {
enable = true; enable = true;
enableNushellIntegration = true; enableNushellIntegration = true;

View file

@ -10,7 +10,7 @@
age = { age = {
sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"]; sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
keyFile = "/home/xqtc/.config/sops/age/keys.txt"; keyFile = if (config.os == "linux") then "/home/xqtc/.config/sops/age/keys.txt" else "/Users/xqtc/.config/sops/age/keys.txt";
generateKey = true; generateKey = true;
}; };
}; };

View file

@ -5,14 +5,14 @@
inputs, inputs,
... ...
}: { }: {
services.spotifyd.enable = true; services.spotifyd.enable = config.os == "linux";
services.spotifyd.settings.global = { services.spotifyd.settings.global = {
bitrate = 320; bitrate = 320;
username = "xqtc@tutanota.com"; username = "xqtc@tutanota.com";
password_cmd = "cat /etc/spotifyd_pw"; password_cmd = "cat /etc/spotifyd_pw";
}; };
sops.secrets = { sops.secrets = lib.mkIf (config.os == "linux") {
"spotify/password" = { "spotify/password" = {
path = "/etc/spotifyd_pw"; path = "/etc/spotifyd_pw";
}; };

View file

@ -5,16 +5,28 @@
pkgs, pkgs,
... ...
}: { }: {
sops.secrets = { sops = {
"private_keys/xqtc" = { # defaultSopsFile = ../secrets.yaml;
path = "/home/xqtc/.ssh/id_ed25519"; # validateSopsFiles = false;
#
# age = {
# sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
# keyFile = "/var/lib/sops/age/keys.txt";
# generateKey = true;
# };
secrets = {
"xqtc_private" = {
# path = if (pkgs.system == "aarch64-darwin") then "/Users/xqtc/.ssh/id_ed25519" else "/home/xqtc/.ssh/id_ed25519";
path = config.home.homeDirectory + "/.ssh/id_ed25519";
# owner = "xqtc"; # owner = "xqtc";
mode = "600"; mode = "600";
}; };
"public_keys/xqtc" = { "xqtc_public" = {
path = "/home/xqtc/.ssh/id_ed25519.pub"; # path = if (pkgs.system == "aarch64-darwin") then "/Users/xqtc/.ssh/id_ed25519.pub" else "/home/xqtc/.ssh/id_ed25519.pub";
path = config.home.homeDirectory + "/.ssh/id_ed25519.pub";
# owner = "xqtc"; # owner = "xqtc";
mode = "640"; mode = "640";
}; };
}; };
};
} }

View file

@ -6,7 +6,7 @@
... ...
}: { }: {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = config.os == "linux";
package = pkgs.hyprland; package = pkgs.hyprland;
#xwayland.enable = true; #xwayland.enable = true;
@ -20,7 +20,7 @@
lib.mkIf (pkgs.system == "x86_64-linux") lib.mkIf (pkgs.system == "x86_64-linux")
*/ */
{ {
enable = true; enable = config.os == "linux";
settings = { settings = {
mainBar = { mainBar = {
layer = "top"; layer = "top";
@ -113,7 +113,7 @@
}; };
services.mako = { services.mako = {
enable = true; enable = config.os == "linux";
font = "ComicShannsMono Nerd Font Mono 15"; font = "ComicShannsMono Nerd Font Mono 15";
backgroundColor = "#1e1e2e"; backgroundColor = "#1e1e2e";
textColor = "#cdd6f4"; textColor = "#cdd6f4";

10
home/system.nix Normal file
View file

@ -0,0 +1,10 @@
{lib, ...}: {
options.os = lib.mkOption {
type = lib.types.str;
default = "linux";
};
options.arch = lib.mkOption {
type = lib.types.str;
default = "x86_64";
};
}

View file

@ -27,6 +27,11 @@ beleth:
# fi # fi
# @echo "Host arch needs to be 'x86_64-linux'! Aborting..."; # @echo "Host arch needs to be 'x86_64-linux'! Aborting...";
beleth-non-nixos:
set -euxo pipefail
ssh {{beleth-user-host}} "cd nixos-config && git pull && nixos-rebuild --flake . switch && echo meow"
ssh {{beleth-user-host}} "cd && cd /var/www/cheats-rs/ && git pull && zola build && cd && sh build_website.sh";
website: website:
#!/usr/bin/env bash #!/usr/bin/env bash
set -euxo pipefail set -euxo pipefail

1
result Symbolic link
View file

@ -0,0 +1 @@
/nix/store/7nlb2hg141qvsbychf5kd0pqb49yp579-home-manager-generation

1
tmp.txt Normal file
View file

@ -0,0 +1 @@
"signal-desktop" "vesktop" "element-desktop" "qbittorrent" "nicotine-plus" "qmk" "qmk-udev-rules" "neovide" "xournalpp" "zathura" "ripgrep" "sayonara" "mpv" "jellyfin-media-player" "feishin" "nix-tree" "nixos-icons"