modularized
This commit is contained in:
parent
b39e453d49
commit
6dfd55b17f
11 changed files with 136 additions and 85 deletions
21
flake.lock
21
flake.lock
|
|
@ -97,6 +97,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-index-database": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1740886574,
|
||||
"narHash": "sha256-jN6kJ41B6jUVDTebIWeebTvrKP6YiLd1/wMej4uq4Sk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "26a0f969549cf4d56f6e9046b9e0418b3f3b94a5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1739736696,
|
||||
|
|
@ -150,6 +170,7 @@
|
|||
"disko": "disko",
|
||||
"ghostty": "ghostty",
|
||||
"home-manager": "home-manager",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"zen-browser": "zen-browser"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
||||
zen-browser.inputs.nixpkgs.follows = "nixpkgs";
|
||||
ghostty.url = "github:ghostty-org/ghostty";
|
||||
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
|
@ -42,8 +44,8 @@
|
|||
};
|
||||
};
|
||||
commonArgs = createCommonArgs system;
|
||||
in {
|
||||
nixosConfigurations = import ./hosts commonArgs;
|
||||
in import ./hosts commonArgs // {
|
||||
|
||||
# nixosConfigurations = {
|
||||
# pickwick = nixpkgs.lib.nixosSystem {
|
||||
# specialArgs = {inherit inputs outputs system dots user;};
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
./ssh
|
||||
./git.nix
|
||||
./gui.nix
|
||||
./latex.nix
|
||||
];
|
||||
|
||||
programs.neovim.enable = true;
|
||||
|
|
@ -23,7 +24,6 @@
|
|||
tree
|
||||
gnumake
|
||||
texinfo
|
||||
texlive.combined.scheme-full
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
|
|
|||
21
home/latex.nix
Normal file
21
home/latex.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.custom = with lib; {
|
||||
latex = {
|
||||
enable = mkEnableOption "Enable LaTeX";
|
||||
package = mkPackageOption pkgs [ "texlive" "combined" "scheme-full" ] { };
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.custom.latex.enable {
|
||||
home.packages = with pkgs; [
|
||||
config.custom.latex.package
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ let
|
|||
|
||||
users.${user} = {
|
||||
imports = [
|
||||
# inputs.nix-index-database.hmModules.nix-index
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
./${host}/home.nix
|
||||
../home
|
||||
];
|
||||
|
|
@ -59,5 +59,7 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
pickwick = mkNixosConfiguration "pickwick" { };
|
||||
nixosConfigurations = {
|
||||
pickwick = mkNixosConfiguration "pickwick" { };
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,31 +20,19 @@
|
|||
keyd.enable = true;
|
||||
displaymanager.enable = true;
|
||||
_1password.enable = true;
|
||||
audio.enable = true;
|
||||
bluetooth.enable = true;
|
||||
};
|
||||
|
||||
networking.hostName = "pickwick";
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
users.users = {
|
||||
rayandrew = {
|
||||
${user} = {
|
||||
initialPassword = "abc123";
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [];
|
||||
extraGroups = ["wheel" "video" "audio" "networkmanager"];
|
||||
};
|
||||
};
|
||||
|
||||
# home-manager = {
|
||||
# useGlobalPkgs = true;
|
||||
# useUserPackages = true;
|
||||
# extraSpecialArgs = { inherit inputs system dots user hm; };
|
||||
# users.rayandrew = {
|
||||
# imports = [
|
||||
# ./home;
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
}:
|
||||
{
|
||||
custom = {
|
||||
latex.enable = true;
|
||||
gui = {
|
||||
default.enable = true;
|
||||
i3.enable = true;
|
||||
|
|
|
|||
54
nixos/audio.nix
Normal file
54
nixos/audio.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.custom = with lib; {
|
||||
audio = {
|
||||
enable = mkEnableOption "Enable audio";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.custom.audio.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
pwvucontrol
|
||||
];
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
|
||||
# disable camera to save battery
|
||||
# https://reddit.com/r/linux/comments/1em8biv/psa_pipewire_has_been_halving_your_battery_life/
|
||||
wireplumber = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
"10-disable-camera" = {
|
||||
"wireplumber.profiles" = {
|
||||
main."monitor.libcamera" = "disabled";
|
||||
};
|
||||
};
|
||||
"10-bluez" = {
|
||||
"monitor.bluez.properties" = {
|
||||
"bluez5.enable-sbc-xq" = true;
|
||||
"bluez5.enable-msbc" = true;
|
||||
"bluez5.enable-hw-volume" = true;
|
||||
"bluez5.roles" = [
|
||||
"hsp_hs"
|
||||
"hsp_ag"
|
||||
"hfp_hf"
|
||||
"hfp_ag"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
21
nixos/bluetooth.nix
Normal file
21
nixos/bluetooth.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.custom = with lib; {
|
||||
bluetooth = {
|
||||
enable = mkEnableOption "Enable bluetooth";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.custom.bluetooth.enable {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -8,30 +8,12 @@
|
|||
}: {
|
||||
imports = [
|
||||
./1password.nix
|
||||
./audio.nix
|
||||
./bluetooth.nix
|
||||
./displaymanager.nix
|
||||
./keyd.nix
|
||||
];
|
||||
|
||||
# nixpkgs = {
|
||||
# # You can add overlays here
|
||||
# overlays = [
|
||||
# # If you want to use overlays exported from other flakes:
|
||||
# # neovim-nightly-overlay.overlays.default
|
||||
#
|
||||
# # Or define it inline, for example:
|
||||
# # (final: prev: {
|
||||
# # hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# # patches = [ ./change-hello-to-hi.patch ];
|
||||
# # });
|
||||
# # })
|
||||
# ];
|
||||
# # Configure your nixpkgs instance
|
||||
# config = {
|
||||
# # Disable if you don't want unfree packages
|
||||
# allowUnfree = true;
|
||||
# };
|
||||
# };
|
||||
|
||||
nix = let
|
||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||
in {
|
||||
|
|
@ -56,7 +38,7 @@
|
|||
networking.networkmanager.enable = true;
|
||||
|
||||
programs.dconf.enable = true;
|
||||
services.pulseaudio.enable = false;
|
||||
|
||||
services.libinput = {
|
||||
enable = true;
|
||||
touchpad = {
|
||||
|
|
@ -65,48 +47,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
# bluetooth
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
|
||||
# pipewire
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
|
||||
# disable camera to save battery
|
||||
# https://reddit.com/r/linux/comments/1em8biv/psa_pipewire_has_been_halving_your_battery_life/
|
||||
wireplumber = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
"10-disable-camera" = {
|
||||
"wireplumber.profiles" = {
|
||||
main."monitor.libcamera" = "disabled";
|
||||
};
|
||||
};
|
||||
"10-bluez" = {
|
||||
"monitor.bluez.properties" = {
|
||||
"bluez5.enable-sbc-xq" = true;
|
||||
"bluez5.enable-msbc" = true;
|
||||
"bluez5.enable-hw-volume" = true;
|
||||
"bluez5.roles" = [
|
||||
"hsp_hs"
|
||||
"hsp_ag"
|
||||
"hfp_hf"
|
||||
"hfp_ag"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
security.polkit.enable = true;
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
|
|
@ -122,6 +64,7 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
htop
|
||||
pwvucontrol
|
||||
];
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,5 @@
|
|||
xserver.xkb.layout = "us";
|
||||
gnome.gnome-keyring.enable = true;
|
||||
};
|
||||
|
||||
security.polkit.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue