/some/ things should work now

This commit is contained in:
xunuwu 2024-10-23 13:51:33 +02:00
parent 7f7d9af446
commit 4cec867a78
No known key found for this signature in database
21 changed files with 190 additions and 122 deletions

21
flake.lock generated
View file

@ -304,6 +304,26 @@
"type": "github" "type": "github"
} }
}, },
"haumea": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1708375098,
"narHash": "sha256-DaFJp3wDHgOqx98U0SF57bXaH2Orp106c+jSdPCVu1E=",
"owner": "nix-community",
"repo": "haumea",
"rev": "ec6350fd9353e7f27ce0e85d31f82e3ed73e4d70",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "haumea",
"type": "github"
}
},
"hercules-ci-effects": { "hercules-ci-effects": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_3",
@ -549,6 +569,7 @@
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"hardware": "hardware", "hardware": "hardware",
"haumea": "haumea",
"home-manager": "home-manager", "home-manager": "home-manager",
"microvm": "microvm", "microvm": "microvm",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",

View file

@ -58,6 +58,10 @@
url = "github:Open-Wine-Components/umu-launcher/?dir=packaging\/nix&submodules=1"; url = "github:Open-Wine-Components/umu-launcher/?dir=packaging\/nix&submodules=1";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
haumea = {
url = "github:nix-community/haumea";
inputs.nixpkgs.follows = "nixpkgs";
};
## deduplication ## deduplication
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs"; flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";

View file

@ -4,6 +4,7 @@
homeImports, homeImports,
lib, lib,
pkgs, pkgs,
config,
... ...
}: let }: let
specialArgs = { specialArgs = {
@ -13,7 +14,10 @@
rootPaths = prependAll "${self}/"; rootPaths = prependAll "${self}/";
modulePaths = prependAll "${self}/system/"; modulePaths = prependAll "${self}/system/";
inherit (import "${self}/system") desktop; profiles = inputs.haumea.lib.load {
inputs = {inherit inputs lib;};
src = "${self}/profiles";
};
in { in {
flake.colmena = { flake.colmena = {
meta = { meta = {
@ -40,21 +44,21 @@ in {
}; };
imports = lib.flatten [ imports = lib.flatten [
./kidney ./kidney
(modulePaths [ (with profiles; [
"core/tools.nix" core.tools
"core/users.nix" core.users
"core/locale.nix" core.locale
"programs/tools.nix" programs.tools
"programs/zsh.nix" programs.zsh
"programs/home-manager.nix" programs.home-manager
"hardware/graphics.nix" hardware.graphics
"services/flatpak.nix" services.flatpak
"services/xdg-portals.nix" services.xdg-portals
"nix" nix.default
"nix/gc.nix" nix.gc
]) ])
{ {
home-manager = { home-manager = {
@ -70,37 +74,67 @@ in {
targetUser = "xun"; targetUser = "xun";
targetHost = "nixdesk.local"; targetHost = "nixdesk.local";
}; };
imports = imports = lib.flatten [
desktop ./nixdesk
++ lib.flatten [
./nixdesk
(rootPaths [ (rootPaths [
"secrets" "secrets"
"secrets/nixdesk" "secrets/nixdesk"
]) ])
(modulePaths [ (with profiles; [
"services/syncthing.nix" core.default
"services/virt/waydroid.nix" core.tools
#"services/virt/virt-manager.nix" core.compat
#"network/wifi.nix" core.boot
#"services/ollama.nix" core.docs
"desktop/x11/nosleep.nix" core.gvfs
# "programs/gamemode.nix" # TEMP: TODO nix.gc
# "programs/gamescope.nix" # TEMP: TODO
# "programs/steam.nix" # TEMP: TODO
"programs/RE"
])
{ hardware.graphics
home-manager = { hardware.steam-hardware
users.xun.imports = homeImports."xun@nixdesk"; hardware.bluetooth
extraSpecialArgs = specialArgs; hardware.qmk
};
} network.networkd
]; network.avahi
network.localsend
network.tailscale
network.goldberg
desktop.default
desktop.awesome
desktop.sway
#..desktop.hyprland
programs.default
programs.tools
services.default
services.pipewire
services.flatpak
services.syncthing
services.virt.waydroid
#services.virt.virt-manager
#network.wifi
#services.ollama
desktop.x11.nosleep
# programs.gamemode # TEMP: TODO
# programs.gamescope # TEMP: TODO
# programs.steam # TEMP: TODO
programs.RE.default
])
{
home-manager = {
users.xun.imports = homeImports."xun@nixdesk";
extraSpecialArgs = specialArgs;
};
}
];
}; };
hopper = { hopper = {
deployment = { deployment = {

View file

@ -1,4 +1,8 @@
{pkgs, ...}: let {
self,
super,
root,
}: {pkgs, ...}: let
list-of-libraries = with pkgs; [ list-of-libraries = with pkgs; [
alsa-lib alsa-lib
at-spi2-atk at-spi2-atk

View file

@ -1,10 +1,14 @@
{lib, ...}: { {
self,
super,
root,
}: {
imports = [ imports = [
./security.nix super.security
./users.nix super.users
./ssh.nix super.ssh
./locale.nix super.locale
../nix root.nix.default
../programs/zsh.nix root.programs.zsh
]; ];
} }

View file

@ -1,4 +1,8 @@
{pkgs, ...}: { {
self,
super,
root,
}: {pkgs, ...}: {
documentation = { documentation = {
dev.enable = true; dev.enable = true;
# man.generateCaches = true; # this does slow down builds by quite a lot # man.generateCaches = true; # this does slow down builds by quite a lot

View file

@ -1,4 +1,4 @@
{lib, ...}: { {...}: {lib, ...}: {
i18n = { i18n = {
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";
supportedLocales = [ supportedLocales = [

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { {...}: {pkgs, ...}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
htop htop
btop btop

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { {...}: {pkgs, ...}: {
users.users.xun = { users.users.xun = {
isNormalUser = true; isNormalUser = true;
initialPassword = "nixos"; initialPassword = "nixos";

View file

@ -1,37 +0,0 @@
let
desktop = [
./core
./core/tools.nix
./core/compat.nix
./core/boot.nix
./core/docs.nix
./core/gvfs.nix
./nix/gc.nix
./hardware/graphics.nix
./hardware/steam-hardware.nix
./hardware/bluetooth.nix
./hardware/qmk.nix
./network/networkd.nix
./network/avahi.nix
./network/localsend.nix
./network/tailscale.nix
./network/goldberg.nix
./desktop
./desktop/awesome.nix
./desktop/sway.nix
#./desktop/hyprland.nix
./programs
./programs/tools.nix
./services
./services/pipewire.nix
./services/flatpak.nix
];
in {
inherit desktop;
}

View file

@ -1,4 +1,8 @@
{pkgs, ...}: { {
self,
super,
root,
}: {pkgs, ...}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
localsend localsend
]; ];

View file

@ -1,4 +1,8 @@
{ {
self,
super,
root,
}: {
config, config,
pkgs, pkgs,
inputs, inputs,
@ -6,8 +10,8 @@
... ...
}: { }: {
imports = [ imports = [
./nixpkgs.nix super.nixpkgs
./substituters.nix super.substituters
]; ];
# git is needed for flakes # git is needed for flakes

View file

@ -1,4 +1,8 @@
{ {
self,
super,
root,
}: {
nixpkgs = { nixpkgs = {
config.allowUnfree = true; config.allowUnfree = true;
config.permittedInsecurePackages = []; config.permittedInsecurePackages = [];

View file

@ -1,4 +1,8 @@
{ {
self,
super,
root,
}: {
nix.settings = { nix.settings = {
substituters = [ substituters = [
# high priority since it's almost always used # high priority since it's almost always used

View file

@ -1,5 +1,9 @@
# patchelf --replace-needed libbinaryninjacore.so.1 ${symlinkJoin} $out/opt/binaryninja # patchelf --replace-needed libbinaryninjacore.so.1 ${symlinkJoin} $out/opt/binaryninja
{ {
self,
super,
root,
}: {
pkgs, pkgs,
self, self,
... ...

View file

@ -1,9 +1,13 @@
{ {
imports = [ self,
./fonts.nix super,
./home-manager.nix root,
./qt.nix }: {
./adb.nix imports = with super; [
fonts
home-manager
qt
adb
]; ];
programs = { programs = {

View file

@ -1,4 +1,8 @@
{pkgs, ...}: { {
self,
super,
root,
}: {pkgs, ...}: {
fonts = { fonts = {
packages = with pkgs; [ packages = with pkgs; [
powerline-fonts powerline-fonts

View file

@ -1,4 +1,4 @@
{inputs, ...}: { {...}: {inputs, ...}: {
imports = [ imports = [
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
]; ];

View file

@ -1,4 +1,4 @@
{ {...}: {
pkgs, pkgs,
config, config,
... ...

View file

@ -1,4 +1,27 @@
{config, ...}: { {
self,
super,
root,
}: {config, ...}: let
devices = {
"nixdesk" = {
id = "XXABQZC-CO6OM2E-EMB3QIJ-NF5I3WU-CCQPPRY-7BX4ZSS-WIU4WW2-WXFWVQR";
autoAcceptFolders = true;
};
"redmi-note-10-pro" = {
id = "WJPE56U-56LPOYB-IAENGSW-IFQ4A6J-66JX73I-ONXX4PY-QXJK6IF-UZHVWA7";
autoAcceptFolders = true;
};
"hopper" = {
id = "DK3RPET-ACMULD2-TLQS6YM-XWUMS3N-JRNDNME-YTM3H4X-P7QVUKB-N3PL5QF";
autoAcceptFolders = true;
};
"school-probook" = {
id = "ZYNRRWE-SIJLPMQ-5LJDWCY-BF5VMRM-FQRFEW4-L7PKA23-HVJADTV-FZYRSQM";
autoAcceptFolders = true;
};
};
in {
services.syncthing = { services.syncthing = {
enable = true; enable = true;
openDefaultPorts = true; openDefaultPorts = true;
@ -9,27 +32,10 @@
overrideDevices = true; overrideDevices = true;
settings = { settings = {
devices = { inherit devices;
"nixdesk" = {
id = "XXABQZC-CO6OM2E-EMB3QIJ-NF5I3WU-CCQPPRY-7BX4ZSS-WIU4WW2-WXFWVQR";
autoAcceptFolders = true;
};
"redmi-note-10-pro" = {
id = "WJPE56U-56LPOYB-IAENGSW-IFQ4A6J-66JX73I-ONXX4PY-QXJK6IF-UZHVWA7";
autoAcceptFolders = true;
};
"hopper" = {
id = "DK3RPET-ACMULD2-TLQS6YM-XWUMS3N-JRNDNME-YTM3H4X-P7QVUKB-N3PL5QF";
autoAcceptFolders = true;
};
"school-probook" = {
id = "ZYNRRWE-SIJLPMQ-5LJDWCY-BF5VMRM-FQRFEW4-L7PKA23-HVJADTV-FZYRSQM";
autoAcceptFolders = true;
};
};
folders = { folders = {
"~/secrets" = { "~/secrets" = {
devices = builtins.attrNames config.services.syncthing.settings.devices; devices = builtins.attrNames devices;
versioning = { versioning = {
type = "trashcan"; type = "trashcan";
params.cleanoutDays = "180"; params.cleanoutDays = "180";
@ -37,7 +43,7 @@
id = "sfw9y-yusup"; id = "sfw9y-yusup";
}; };
"~/docs/xun-megavault" = { "~/docs/xun-megavault" = {
devices = builtins.attrNames config.services.syncthing.settings.devices; devices = builtins.attrNames devices;
id = "1zkf-wf5r"; id = "1zkf-wf5r";
versioning = { versioning = {
type = "simple"; type = "simple";

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { {...}: {pkgs, ...}: {
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = with pkgs; [ extraPortals = with pkgs; [