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"
|
"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": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739736696,
|
"lastModified": 1739736696,
|
||||||
|
|
@ -150,6 +170,7 @@
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"ghostty": "ghostty",
|
"ghostty": "ghostty",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nix-index-database": "nix-index-database",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"zen-browser": "zen-browser"
|
"zen-browser": "zen-browser"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
||||||
zen-browser.inputs.nixpkgs.follows = "nixpkgs";
|
zen-browser.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
ghostty.url = "github:ghostty-org/ghostty";
|
ghostty.url = "github:ghostty-org/ghostty";
|
||||||
|
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||||
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|
@ -42,8 +44,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
commonArgs = createCommonArgs system;
|
commonArgs = createCommonArgs system;
|
||||||
in {
|
in import ./hosts commonArgs // {
|
||||||
nixosConfigurations = import ./hosts commonArgs;
|
|
||||||
# nixosConfigurations = {
|
# nixosConfigurations = {
|
||||||
# pickwick = nixpkgs.lib.nixosSystem {
|
# pickwick = nixpkgs.lib.nixosSystem {
|
||||||
# specialArgs = {inherit inputs outputs system dots user;};
|
# specialArgs = {inherit inputs outputs system dots user;};
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
./ssh
|
./ssh
|
||||||
./git.nix
|
./git.nix
|
||||||
./gui.nix
|
./gui.nix
|
||||||
|
./latex.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.neovim.enable = true;
|
programs.neovim.enable = true;
|
||||||
|
|
@ -23,7 +24,6 @@
|
||||||
tree
|
tree
|
||||||
gnumake
|
gnumake
|
||||||
texinfo
|
texinfo
|
||||||
texlive.combined.scheme-full
|
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
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} = {
|
users.${user} = {
|
||||||
imports = [
|
imports = [
|
||||||
# inputs.nix-index-database.hmModules.nix-index
|
inputs.nix-index-database.hmModules.nix-index
|
||||||
./${host}/home.nix
|
./${host}/home.nix
|
||||||
../home
|
../home
|
||||||
];
|
];
|
||||||
|
|
@ -59,5 +59,7 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
pickwick = mkNixosConfiguration "pickwick" { };
|
nixosConfigurations = {
|
||||||
|
pickwick = mkNixosConfiguration "pickwick" { };
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,31 +20,19 @@
|
||||||
keyd.enable = true;
|
keyd.enable = true;
|
||||||
displaymanager.enable = true;
|
displaymanager.enable = true;
|
||||||
_1password.enable = true;
|
_1password.enable = true;
|
||||||
|
audio.enable = true;
|
||||||
|
bluetooth.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = "pickwick";
|
networking.hostName = "pickwick";
|
||||||
time.timeZone = "America/Chicago";
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
users.users = {
|
users.users = {
|
||||||
rayandrew = {
|
${user} = {
|
||||||
initialPassword = "abc123";
|
initialPassword = "abc123";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
openssh.authorizedKeys.keys = [];
|
openssh.authorizedKeys.keys = [];
|
||||||
extraGroups = ["wheel" "video" "audio" "networkmanager"];
|
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 = {
|
custom = {
|
||||||
|
latex.enable = true;
|
||||||
gui = {
|
gui = {
|
||||||
default.enable = true;
|
default.enable = true;
|
||||||
i3.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 = [
|
imports = [
|
||||||
./1password.nix
|
./1password.nix
|
||||||
|
./audio.nix
|
||||||
|
./bluetooth.nix
|
||||||
./displaymanager.nix
|
./displaymanager.nix
|
||||||
./keyd.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
|
nix = let
|
||||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||||
in {
|
in {
|
||||||
|
|
@ -56,7 +38,7 @@
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
services.pulseaudio.enable = false;
|
|
||||||
services.libinput = {
|
services.libinput = {
|
||||||
enable = true;
|
enable = true;
|
||||||
touchpad = {
|
touchpad = {
|
||||||
|
|
@ -65,48 +47,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# bluetooth
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
powerOnBoot = true;
|
|
||||||
};
|
|
||||||
services.blueman.enable = true;
|
|
||||||
|
|
||||||
# pipewire
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
security.polkit.enable = true;
|
||||||
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"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -122,6 +64,7 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
htop
|
htop
|
||||||
pwvucontrol
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,5 @@
|
||||||
xserver.xkb.layout = "us";
|
xserver.xkb.layout = "us";
|
||||||
gnome.gnome-keyring.enable = true;
|
gnome.gnome-keyring.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
security.polkit.enable = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue