refactor
This commit is contained in:
parent
a992a7b701
commit
b61bb970a5
30 changed files with 69 additions and 34 deletions
16
flake.nix
16
flake.nix
|
|
@ -25,10 +25,9 @@
|
||||||
let
|
let
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
lib' = import ./lib.nix { inherit lib; };
|
lib' = import ./lib.nix { inherit lib; };
|
||||||
mod = lib'.walk-dir ./mod;
|
|
||||||
|
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs lib' mod;
|
inherit inputs lib';
|
||||||
var = (lib'.walk-dir ./var).map_import_with_lib;
|
var = (lib'.walk-dir ./var).map_import_with_lib;
|
||||||
};
|
};
|
||||||
overlays = _: {
|
overlays = _: {
|
||||||
|
|
@ -44,9 +43,8 @@
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./host/solo
|
./host/solo
|
||||||
mod.common.to_mod
|
./host
|
||||||
mod.pc-common.to_mod
|
./mod
|
||||||
nixos-config-hidden.nixosModules.pc
|
|
||||||
overlays
|
overlays
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
@ -58,9 +56,8 @@
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./host/c2
|
./host/c2
|
||||||
mod.common.to_mod
|
./host
|
||||||
mod.pc-common.to_mod
|
./mod
|
||||||
nixos-config-hidden.nixosModules.pc
|
|
||||||
overlays
|
overlays
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
@ -80,7 +77,8 @@
|
||||||
};
|
};
|
||||||
imports = [
|
imports = [
|
||||||
./host/roam
|
./host/roam
|
||||||
mod.common.to_mod
|
./host
|
||||||
|
./mod
|
||||||
overlays
|
overlays
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
common-cpu-intel
|
common-cpu-intel
|
||||||
common-pc-laptop
|
common-pc-laptop
|
||||||
common-pc-laptop-ssd
|
common-pc-laptop-ssd
|
||||||
|
../../pc
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
|
|
|
||||||
10
host/default.nix
Normal file
10
host/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./boot.nix
|
||||||
|
./locale.nix
|
||||||
|
./nix.nix
|
||||||
|
./shell.nix
|
||||||
|
./users.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
{ lib', ... }:
|
{ lib', ... }:
|
||||||
let
|
|
||||||
submodules = lib'.walk-dir ./.;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
networking.hostName = "roam";
|
networking.hostName = "roam";
|
||||||
|
|
||||||
imports = [ submodules.to_mod_without_default ];
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./networking.nix
|
||||||
|
./secruity.nix
|
||||||
|
./services.nix
|
||||||
|
./wireguard.nix
|
||||||
|
];
|
||||||
|
|
||||||
# ====== DON'T CHANGE ======
|
# ====== DON'T CHANGE ======
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
{ lib', ... }:
|
{ ... }:
|
||||||
let
|
|
||||||
submodules = lib'.walk-dir ./.;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
networking.hostName = "solo";
|
networking.hostName = "solo";
|
||||||
|
|
||||||
imports = [ submodules.to_mod_without_default ];
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./keyboard.nix
|
||||||
|
./nvidia-gpu.nix
|
||||||
|
../../pc
|
||||||
|
];
|
||||||
|
|
||||||
powerManagement = {
|
powerManagement = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
1
mod/default.nix
Normal file
1
mod/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{ ... }: { }
|
||||||
21
pc/default.nix
Normal file
21
pc/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./audio.nix
|
||||||
|
./fonts.nix
|
||||||
|
./gpg.nix
|
||||||
|
./home-manager.nix
|
||||||
|
./network.nix
|
||||||
|
./nix.nix
|
||||||
|
./security.nix
|
||||||
|
./services.nix
|
||||||
|
./software
|
||||||
|
./sync.nix
|
||||||
|
inputs.nixos-config-hidden.nixosModules.pc
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,12 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
options.home = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
default = { };
|
||||||
|
description = "home-manager configuration.";
|
||||||
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
|
|
@ -20,11 +26,4 @@
|
||||||
config = {
|
config = {
|
||||||
home.home.stateVersion = config.system.stateVersion;
|
home.home.stateVersion = config.system.stateVersion;
|
||||||
};
|
};
|
||||||
|
|
||||||
options = {
|
|
||||||
home = lib.mkOption {
|
|
||||||
type = lib.types.attrs;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
@ -9,10 +9,6 @@
|
||||||
systemd.network.wait-online.enable = false;
|
systemd.network.wait-online.enable = false;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
tailscale = {
|
|
||||||
enable = true;
|
|
||||||
useRoutingFeatures = "client";
|
|
||||||
};
|
|
||||||
mullvad-vpn.enable = true;
|
mullvad-vpn.enable = true;
|
||||||
blueman.enable = true;
|
blueman.enable = true;
|
||||||
resolved = {
|
resolved = {
|
||||||
|
|
@ -41,10 +37,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
firewall = {
|
|
||||||
allowedUDPPorts = [ 51820 ];
|
|
||||||
};
|
|
||||||
|
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wifi.macAddress = "random";
|
wifi.macAddress = "random";
|
||||||
9
pc/software/default.nix
Normal file
9
pc/software/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./development.nix
|
||||||
|
./editors.nix
|
||||||
|
./programs.nix
|
||||||
|
./window-manager.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
{
|
{
|
||||||
home.services.unison = {
|
home.services.unison = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.unison;
|
|
||||||
pairs = {
|
pairs = {
|
||||||
"docs".roots = [
|
"docs".roots = [
|
||||||
"/home/hd/Documents"
|
"/home/hd/Documents"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue