restructure system configuration
This commit is contained in:
parent
8f58a79fe2
commit
e65c6bc159
27 changed files with 143 additions and 44 deletions
|
|
@ -36,6 +36,12 @@
|
|||
url = "github:helix-editor/helix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nh = {
|
||||
url = "github:viperML/nh";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -64,7 +70,7 @@
|
|||
nixosConfigurations = {
|
||||
# T480s
|
||||
ookst480s = lib.nixosSystem {
|
||||
modules = [ ./hosts/ookst480s/ookst480s.nix ];
|
||||
modules = [ ./hosts/ookst480s ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# services.blueman.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
galaxy-buds-client
|
||||
live-buds-cli
|
||||
bluetuith
|
||||
];
|
||||
}
|
||||
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
networking = {
|
||||
hostName = "ookst480s";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -11,17 +11,6 @@
|
|||
];
|
||||
|
||||
home-manager.extraSpecialArgs = { inherit inputs outputs; };
|
||||
|
||||
nixpkgs = {
|
||||
overlays = builtins.attrValues outputs.overlays;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"openssl-1.1.1u"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#hardware.enableRedistibutableFirmware = true;
|
||||
environment.enableAllTerminfo = true;
|
||||
|
|
@ -6,4 +6,5 @@
|
|||
];
|
||||
};
|
||||
time.timeZone = lib.mkDefault "Pacific/Auckland";
|
||||
services.geoclue2.enable = true;
|
||||
}
|
||||
|
|
@ -28,6 +28,7 @@
|
|||
polkit = {
|
||||
enable = true;
|
||||
};
|
||||
pam.services = { swaylock = { }; };
|
||||
sudo = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
9
system/modules/default.nix
Normal file
9
system/modules/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware
|
||||
./networking
|
||||
./nix
|
||||
./programs
|
||||
./user
|
||||
];
|
||||
}
|
||||
0
system/modules/displayManager/greetd/default.nix
Normal file
0
system/modules/displayManager/greetd/default.nix
Normal file
14
system/modules/hardware/backlight.nix
Normal file
14
system/modules/hardware/backlight.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
hardware.brillo.enable = true;
|
||||
services.clight = {
|
||||
enable = true;
|
||||
settings = {
|
||||
verbose = true;
|
||||
backlight.disabled = true;
|
||||
dpms.timeouts = [900 300];
|
||||
dimmer.timeouts = [870 270];
|
||||
gamma.long_transition = true;
|
||||
screen.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
17
system/modules/hardware/bluetooth/default.nix
Normal file
17
system/modules/hardware/bluetooth/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
package = pkgs.bluez5-experimental;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
galaxy-buds-client
|
||||
live-buds-cli
|
||||
bluetuith
|
||||
];
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/114222
|
||||
systemd.user.services.telephony_client.enable = false;
|
||||
}
|
||||
18
system/modules/networking/default.nix
Normal file
18
system/modules/networking/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
dns = "systemd-resolved";
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [57621];
|
||||
|
||||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings.UseDns = true;
|
||||
};
|
||||
resolved.enable = true;
|
||||
};
|
||||
|
||||
systemd.services.NetworkManager-wait-online.enable = lib.mkForce false;
|
||||
}
|
||||
8
system/modules/nix/default.nix
Normal file
8
system/modules/nix/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./nh.nix
|
||||
./nix.nix
|
||||
./nixpkgs
|
||||
./subs.nix
|
||||
];
|
||||
}
|
||||
16
system/modules/nix/nh.nix
Normal file
16
system/modules/nix/nh.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ inputs, ... }: {
|
||||
|
||||
imports = [
|
||||
inputs.nh.nixosModules.default
|
||||
];
|
||||
|
||||
environment.variables.FLAKE = "/home/ooks/Coding/nix/ooks-io/nix";
|
||||
|
||||
nh = {
|
||||
enable = true;
|
||||
clean = {
|
||||
enable = true;
|
||||
extraArgs = "--keep-since 30d";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
{ inputs, lib, ... }:
|
||||
{
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
|
|
@ -9,18 +9,7 @@
|
|||
system-features = [ "kvm" "big-parallel" "nixos-test" ];
|
||||
flake-registry = "";
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 2d";
|
||||
};
|
||||
|
||||
# Add each flake input as a registry
|
||||
# To make nix3 commands consistent with the flake
|
||||
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
|
||||
|
||||
# Add nixpkgs input to NIX_PATH
|
||||
# This lets nix2 commands still use <nixpkgs>
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
13
system/modules/nix/nixpkgs.nix
Normal file
13
system/modules/nix/nixpkgs.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ outputs, ... }: {
|
||||
|
||||
nixpkgs = {
|
||||
overlays = builtins.attrValues outputs.overlays;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"openssl-1.1.1u"
|
||||
"electron-25.9.0"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
18
system/modules/nix/subs.nix
Normal file
18
system/modules/nix/subs.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://cache.nixos.org?priority=10"
|
||||
"https://fufexan.cachix.org"
|
||||
"https://helix.cachix.org"
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
}
|
||||
18
system/profiles/laptop/default.nix
Normal file
18
system/profiles/laptop/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.system.profile.laptop;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../modules
|
||||
];
|
||||
config = cfg.enable {
|
||||
system = {
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
powerSettings.enable = true
|
||||
backlight.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -20,8 +20,4 @@ in
|
|||
};
|
||||
|
||||
home-manager.users.ooks = import ../../../../home/user/ooks/${config.networking.hostName};
|
||||
|
||||
services.geoclue2.enable = true;
|
||||
security.pam.services = { swaylock = { }; };
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue