1
0
Fork 0
forked from foxora/nix

Compare commits

..

No commits in common. "a477f18fa6f6bb9ad07f6b4f99fe02ed85ac6de8" and "1d39d156b8ff237f8daf5812a7788146f62ae060" have entirely different histories.

10 changed files with 34 additions and 136 deletions

17
flake.lock generated
View file

@ -1291,22 +1291,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-master": {
"locked": {
"lastModified": 1771439456,
"narHash": "sha256-HtQgNJrjYvZdpqpPJddF+TxGCazNyxvA8umbDcjrxT8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f84d6f6cd5f17d594439710f40349ba7d0706f4b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-staging": { "nixpkgs-staging": {
"locked": { "locked": {
"lastModified": 1771384451, "lastModified": 1771384451,
@ -1558,7 +1542,6 @@
"nixcats": "nixcats", "nixcats": "nixcats",
"nixcord": "nixcord", "nixcord": "nixcord",
"nixpkgs": "nixpkgs_9", "nixpkgs": "nixpkgs_9",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-staging": "nixpkgs-staging", "nixpkgs-staging": "nixpkgs-staging",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"sddm-silent": "sddm-silent", "sddm-silent": "sddm-silent",

View file

@ -7,7 +7,6 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-staging.url = "github:NixOS/nixpkgs/staging-next"; nixpkgs-staging.url = "github:NixOS/nixpkgs/staging-next";
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";

View file

@ -1,7 +1,6 @@
{ {
inputs, inputs,
spkgs, spkgs,
mpkgs,
... ...
}: let }: let
inherit inherit
@ -65,7 +64,7 @@ in {
]; ];
rust = with pkgs; [ rust = with pkgs; [
cargo cargo
mpkgs.rust-analyzer rust-analyzer
]; ];
zig = with pkgs; [ zig = with pkgs; [
spkgs.zls # FIX: using spkgs version as zls is broken rn ;-; spkgs.zls # FIX: using spkgs version as zls is broken rn ;-;

View file

@ -104,7 +104,7 @@
}; };
silentTyping = { silentTyping = {
enable = true; enable = true;
enabledGlobally = true; enabledGlobally = false;
}; };
startupTimings.enable = true; startupTimings.enable = true;
typingIndicator.enable = true; typingIndicator.enable = true;
@ -160,7 +160,6 @@
"1436965652861685891" "1436965652861685891"
"1436968495190642722" "1436968495190642722"
"1465424321919975454" "1465424321919975454"
"1468324280445046824"
]; ];
} }
{ {
@ -185,8 +184,6 @@
"1461885176534794427" "1461885176534794427"
"1462155159470866443" "1462155159470866443"
"1468735915076878407" "1468735915076878407"
"1461929299727749145"
"1470963392121536657"
]; ];
} }
{ {
@ -226,10 +223,12 @@
"1449513783893692589" "1449513783893692589"
"1463737720961634461" "1463737720961634461"
"1463000874392748249" "1463000874392748249"
"1461929299727749145"
"1436984534712451105" "1436984534712451105"
"1436983282582683813" "1436983282582683813"
"1437283420312047659" "1437283420312047659"
"1437089201651847315" "1437089201651847315"
"1468324280445046824"
"1467307140443148288" "1467307140443148288"
]; ];
} }

View file

@ -25,7 +25,7 @@
# applications # applications
"$terminal" = "kitty"; "$terminal" = "kitty";
"$explorer" = "kitty -e yazi"; "$explorer" = "kitty -e yazi";
"$browser" = "zen-twilight"; "$browser" = "zen";
# menu # menu
"$menu" = "rofi"; "$menu" = "rofi";

View file

@ -34,17 +34,14 @@
}; };
}; };
systemd.services.systemd-networkd.environment = {
SYSTEMD_LOG_LEVEL = "debug";
};
systemd.network = { systemd.network = {
enable = true; enable = true;
netdevs."10-bond0" = { netdevs = {
"10-bond0" = {
netdevConfig = { netdevConfig = {
Name = "bond0";
Kind = "bond"; Kind = "bond";
Name = "bond0";
}; };
bondConfig = { bondConfig = {
Mode = "802.3ad"; Mode = "802.3ad";
@ -53,6 +50,8 @@
MIIMonitorSec = "100ms"; MIIMonitorSec = "100ms";
}; };
}; };
};
networks = { networks = {
"30-eno1" = { "30-eno1" = {
matchConfig.Name = "eno1"; matchConfig.Name = "eno1";
@ -64,36 +63,12 @@
}; };
"40-bond0" = { "40-bond0" = {
matchConfig.Name = "bond0"; matchConfig.Name = "bond0";
networkConfig = { linkConfig = {
Bridge = "br0"; RequiredForOnline = "carrier";
LinkLocalAddressing = "no";
}; };
linkConfig.RequiredForOnline = "carrier"; networkConfig.LinkLocalAddressing = "no";
}; networkConfig.DHCP = "yes";
}; vlan = [ "vlan1" ];
netdevs."20-br0" = {
netdevConfig = {
Name = "br0";
Kind = "bridge";
};
};
networks = {
"50-vms" = {
matchConfig.Name = ["bond0" "vm-*"];
networkConfig = {
Bridge = "br0";
};
};
"50-vms-bridge" = {
matchConfig.Name = "br0";
networkConfig = {
Address = ["10.16.1.163/24"];
Gateway = "10.16.1.1";
DNS = ["10.16.1.1"];
LinkLocalAddressing = "no";
};
linkConfig.RequiredForOnline = "routable";
}; };
}; };
}; };

View file

@ -19,9 +19,8 @@
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
kernelPackages = upkgs.cachyosKernels.linuxPackages-cachyos-latest-lto-x86_64-v4; # kernelPackages = upkgs.cachyosKernels.linuxPackages-cachyos-latest-lto-x86_64-v4;
# TODO: idk make this a toggle or smth idfk kernelPackages = upkgs.linuxPackages_latest;
# kernelPackages = upkgs.linuxPackages_latest;
kernelModules = ["v4l2loopback"]; kernelModules = ["v4l2loopback"];
extraModulePackages = with kernelPackages; [v4l2loopback]; extraModulePackages = with kernelPackages; [v4l2loopback];

View file

@ -35,14 +35,5 @@
]; ];
config.allowUnfree = true; config.allowUnfree = true;
}; };
# nixpkgs-master
mpkgs = {
source = inputs.nixpkgs-master;
overlays = [
(import ./overlays.nix args)
];
config.allowUnfree = true;
};
}; };
} }

View file

@ -47,19 +47,9 @@ cerulean.mkNexus ./. (self: {
networking.hostName = "home-assistant"; networking.hostName = "home-assistant";
boot.kernelParams = ["console=ttyS0" "console=ttyS1" "8250.nr_uarts=2"];
systemd.services."serial-getty@ttyS1".enable = true;
microvm = { microvm = {
hypervisor = "qemu"; hypervisor = "qemu";
# needed to get interface working
qemu.extraArgs = [
"-monitor" "unix:/var/lib/microvms/home-assistant/monitor.sock,server,nowait"
"-chardev" "socket,id=serial1,path=/var/lib/microvms/home-assistant/serial.sock,server=on,wait=off"
"-serial" "chardev:serial1"
];
# memory cannot be 2GB so i doubled it and used 4GB: # memory cannot be 2GB so i doubled it and used 4GB:
# https://github.com/microvm-nix/microvm.nix/issues/171 # https://github.com/microvm-nix/microvm.nix/issues/171
# TODO: can be fixed by turning off acpi in qemu # TODO: can be fixed by turning off acpi in qemu
@ -83,15 +73,15 @@ cerulean.mkNexus ./. (self: {
]; ];
}; };
systemd.network.enable = true; networking = {
systemd.network.networks."20-lan" = { interfaces.eth0 = {
matchConfig.Type = "ether"; useDHCP = false;
networkConfig = { ipv4.addresses = [
Address = ["10.16.1.127/24"]; {
Gateway = "10.16.1.1"; address = "10.16.1.127";
DNS = ["10.16.1.1"]; prefixLength = 24;
IPv6AcceptRA = true; }
DHCP = "yes"; ];
}; };
}; };
}; };

View file

@ -3,46 +3,9 @@
services.home-assistant = { services.home-assistant = {
enable = true; enable = true;
configDir = "/var/lib/hass"; configDir = "/var/lib/hass";
# disables config generation, i don't wanna configure home assistant # disables config generation, i don't wanna configure home assistant
# through nix at the moment # through nix at the moment
config = null; config = null;
extraComponents = [
"esphome"
"met"
"radio_browser"
];
extraPackages = python3Packages: with python3Packages; [
getmac
];
};
systemd.tmpfiles.rules = [
# configures the config directory to be mounted
# correclty with the right permissions
"z /var/lib/hass 0755 hass hass -"
"z /var/lib/hass/lost+found 0755 hass hass -"
];
networking = {
nftables.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [
8123
];
};
};
users.users.nixos = {
isNormalUser = true;
uid = 1000;
extraGroups = ["wheel"];
hashedPassword = "$2b$05$94fPE/15g7ix7glKOaN0AeVMpitMivtQtcFL.aZIouQngOJ6nGMSC";
}; };
system.stateVersion = "25.11"; system.stateVersion = "25.11";