mirror of
https://git.gay/xqtc/nixos-config
synced 2024-12-03 20:03:55 +01:00
nix fmt
This commit is contained in:
parent
590734a38b
commit
828989b482
|
@ -8,7 +8,7 @@
|
|||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
|
||||
sops = {
|
||||
sops = {
|
||||
defaultSopsFile = ../secrets.yaml;
|
||||
validateSopsFiles = false;
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{inputs, ...}: {
|
||||
perSystem = { system, ...}: {
|
||||
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);
|
||||
config.allowUnfreePredicate = _: true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,21 +1,26 @@
|
|||
{ lib, flake-parts-lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
{
|
||||
lib,
|
||||
flake-parts-lib,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
inherit (flake-parts-lib)
|
||||
inherit
|
||||
(flake-parts-lib)
|
||||
mkTransposedPerSystemModule
|
||||
;
|
||||
in
|
||||
mkTransposedPerSystemModule {
|
||||
name = "homeConfigurations";
|
||||
option = mkOption {
|
||||
type = types.raw;
|
||||
default = { };
|
||||
description = ''
|
||||
home-manager configs
|
||||
'';
|
||||
};
|
||||
file = ./hm-flake-part.nix;
|
||||
}
|
||||
mkTransposedPerSystemModule {
|
||||
name = "homeConfigurations";
|
||||
option = mkOption {
|
||||
type = types.raw;
|
||||
default = {};
|
||||
description = ''
|
||||
home-manager configs
|
||||
'';
|
||||
};
|
||||
file = ./hm-flake-part.nix;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,19 @@
|
|||
{inputs, lib, ...}: {
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hm-flake-part.nix
|
||||
];
|
||||
perSystem = { config, self', inputs', pkgs, system, ... }: let
|
||||
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;
|
||||
|
@ -14,7 +25,7 @@
|
|||
../home
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
{ inherit os arch; }
|
||||
{inherit os arch;}
|
||||
];
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
};
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
{inputs, lib, ...}: {
|
||||
flake.nixosConfigurations = 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;};
|
||||
});
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
flake.nixosConfigurations =
|
||||
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;};
|
||||
});
|
||||
}
|
||||
|
|
14
flake.nix
14
flake.nix
|
@ -42,14 +42,22 @@
|
|||
};
|
||||
#inputs.agenix.url = "github:ryantm/agenix";
|
||||
|
||||
outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
outputs = inputs @ {flake-parts, ...}:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
imports = [
|
||||
./flake-mods/hm.nix
|
||||
./flake-mods/nixosHosts.nix
|
||||
./flake-mods/allowUnfree.nix
|
||||
];
|
||||
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
|
||||
perSystem = { config, self', inputs', pkgs, system, ... }: {};
|
||||
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
||||
perSystem = {
|
||||
config,
|
||||
self',
|
||||
inputs',
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: {};
|
||||
flake = {};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
./system.nix
|
||||
];
|
||||
home.username = "xqtc";
|
||||
home.homeDirectory = if config.os == "linux" then "/home/xqtc" else "/Users/xqtc";
|
||||
home.homeDirectory =
|
||||
if config.os == "linux"
|
||||
then "/home/xqtc"
|
||||
else "/Users/xqtc";
|
||||
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
...
|
||||
}:
|
||||
with inputs; {
|
||||
home.sessionVariables.DEFAULT_BROWSER = if (config.os == "linux") then "${pkgs.firefox}/bin/firefox" else "firefox";
|
||||
home.sessionVariables.DEFAULT_BROWSER =
|
||||
if (config.os == "linux")
|
||||
then "${pkgs.firefox}/bin/firefox"
|
||||
else "firefox";
|
||||
|
||||
programs.firefox = lib.mkIf (config.os == "linux") {
|
||||
enable = true;
|
||||
|
|
|
@ -9,119 +9,115 @@
|
|||
maxfetch = pkgs.writeScriptBin "maxfetch" (builtins.readFile ../config-files/maxfetch.sh);
|
||||
startdwl = pkgs.writeScriptBin "startdwl" (builtins.readFile ../config-files/startdwl.sh);
|
||||
in {
|
||||
home.packages = (lib.optionals (config.os == "linux") (with 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
|
||||
home.packages =
|
||||
(lib.optionals (config.os == "linux") (with 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
|
||||
|
||||
ncspot
|
||||
ncspot
|
||||
|
||||
wakatime-cli
|
||||
wakatime-cli
|
||||
|
||||
neofetch
|
||||
# uwufetch
|
||||
maxfetch
|
||||
startdwl
|
||||
btop
|
||||
iftop
|
||||
ranger
|
||||
neofetch
|
||||
# uwufetch
|
||||
maxfetch
|
||||
startdwl
|
||||
btop
|
||||
iftop
|
||||
ranger
|
||||
|
||||
cargo-mommy
|
||||
cargo-mommy
|
||||
|
||||
just
|
||||
fzf
|
||||
just
|
||||
fzf
|
||||
|
||||
catppuccin-kde
|
||||
catppuccin-kde
|
||||
|
||||
typst
|
||||
typst
|
||||
|
||||
# marked as broken
|
||||
# anki
|
||||
# marked as broken
|
||||
# anki
|
||||
|
||||
freetube
|
||||
freetube
|
||||
|
||||
openvpn
|
||||
openvpn
|
||||
|
||||
moodle-dl
|
||||
moodle-dl
|
||||
|
||||
obsidian
|
||||
|
||||
obsidian
|
||||
prismlauncher
|
||||
|
||||
# marked as broken
|
||||
# syncthingtray
|
||||
|
||||
rbw
|
||||
|
||||
prismlauncher
|
||||
nodejs
|
||||
|
||||
# marked as broken
|
||||
# syncthingtray
|
||||
# cabal
|
||||
ghc
|
||||
|
||||
# marked as broken
|
||||
# rizin
|
||||
# (cutter.withPlugins (ps: with ps; [jsdec rz-ghidra sigdb]))
|
||||
|
||||
rbw
|
||||
nerdfonts
|
||||
ipafont
|
||||
|
||||
vesktop
|
||||
element-desktop
|
||||
|
||||
nodejs
|
||||
qbittorrent
|
||||
nicotine-plus
|
||||
|
||||
# cabal
|
||||
ghc
|
||||
qmk
|
||||
|
||||
# marked as broken
|
||||
# rizin
|
||||
# (cutter.withPlugins (ps: with ps; [jsdec rz-ghidra sigdb]))
|
||||
neovide
|
||||
|
||||
xournalpp
|
||||
zathura
|
||||
|
||||
nerdfonts
|
||||
ipafont
|
||||
ripgrep
|
||||
|
||||
vesktop
|
||||
element-desktop
|
||||
sayonara
|
||||
# mpv
|
||||
feishin
|
||||
|
||||
qbittorrent
|
||||
nicotine-plus
|
||||
nix-tree
|
||||
|
||||
qmk
|
||||
|
||||
neovide
|
||||
|
||||
xournalpp
|
||||
zathura
|
||||
|
||||
ripgrep
|
||||
|
||||
sayonara
|
||||
# mpv
|
||||
feishin
|
||||
|
||||
nix-tree
|
||||
|
||||
nixos-icons
|
||||
]);
|
||||
nixos-icons
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,10 @@
|
|||
...
|
||||
}: {
|
||||
programs = {
|
||||
zsh.enable = if config.os == "linux" then true else false;
|
||||
zsh.enable =
|
||||
if config.os == "linux"
|
||||
then true
|
||||
else false;
|
||||
atuin = {
|
||||
enable = true;
|
||||
enableNushellIntegration = true;
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
|
||||
age = {
|
||||
sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
keyFile = if (config.os == "linux") then "/home/xqtc/.config/sops/age/keys.txt" else "/Users/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;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -14,19 +14,19 @@
|
|||
# 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";
|
||||
mode = "600";
|
||||
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";
|
||||
mode = "600";
|
||||
};
|
||||
"xqtc_public" = {
|
||||
# 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";
|
||||
mode = "640";
|
||||
};
|
||||
};
|
||||
"xqtc_public" = {
|
||||
# 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";
|
||||
mode = "640";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue