refactoring, add packages
This commit is contained in:
parent
b1b38cef35
commit
55052eb960
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ vars, inputs, ... }:
|
||||||
|
let
|
||||||
|
inherit (vars) username;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../modules
|
||||||
|
../../modules/wsl
|
||||||
|
../../modules/home-manager
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.${username} = ./home.nix;
|
||||||
|
|
||||||
|
system.stateVersion = "23.11";
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ inputs, ... }: {
|
||||||
|
imports = [
|
||||||
|
inputs.neovim-flake.homeModules.default
|
||||||
|
inputs.home-manager-flake.homeModules.base
|
||||||
|
inputs.home-manager-flake.homeModules.shell
|
||||||
|
inputs.home-manager-flake.homeModules.dev
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
_: {
|
||||||
|
imports = [
|
||||||
|
./user
|
||||||
|
./network
|
||||||
|
./i18n
|
||||||
|
./nixos
|
||||||
|
./programs
|
||||||
|
./ssh
|
||||||
|
./power-management
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -3,5 +3,7 @@ let
|
||||||
inherit (vars) hostName;
|
inherit (vars) hostName;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking.hostName = hostName;
|
networking = {
|
||||||
|
inherit hostName;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ lib, config, ... }: {
|
||||||
|
options = {
|
||||||
|
services.power-management.enable = lib.mkEnableOption "power-management";
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.services.power-management.enable {
|
||||||
|
services = {
|
||||||
|
power-profiles-daemon.enable = true;
|
||||||
|
upower.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.power = { };
|
||||||
|
|
||||||
|
security.polkit = {
|
||||||
|
extraConfig = ''
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if (action.id == "org.freedesktop.systemd1.manage-units" ||
|
||||||
|
action.id == "org.freedesktop.systemd1.manage-unit-files") {
|
||||||
|
if (action.lookup("unit") == "poweroff.target") {
|
||||||
|
if (subject.isInGroup("power")) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
} else {
|
||||||
|
return polkit.Result.AUTH_ADMIN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ config, lib, pkgs, vars, ... }:
|
||||||
|
{
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
vim
|
||||||
|
git
|
||||||
|
openssh
|
||||||
|
file
|
||||||
|
w3m
|
||||||
|
btop
|
||||||
|
iftop
|
||||||
|
iotop
|
||||||
|
ncdu
|
||||||
|
];
|
||||||
|
etc = {
|
||||||
|
"ncdu.conf".text = ''
|
||||||
|
--color dark
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
zsh.enable = true;
|
||||||
|
command-not-found.enable = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ lib, config, ... }: lib.mkIf config.services.openssh.enable {
|
||||||
|
services.openssh = {
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "prohibit-password";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
};
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
users = {
|
users = {
|
||||||
defaultUserShell = pkgs.zsh;
|
# defaultUserShell = pkgs.zsh;
|
||||||
groups.odie = { };
|
groups.odie = { };
|
||||||
users = {
|
users = {
|
||||||
${username} = {
|
${username} = {
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
_: {
|
_: {
|
||||||
imports = [
|
imports = [
|
||||||
./user
|
./base
|
||||||
./network
|
|
||||||
./i18n
|
|
||||||
./nixos
|
|
||||||
./programs
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
fonts = {
|
||||||
|
enableDefaultPackages = true;
|
||||||
|
packages = with pkgs; [
|
||||||
|
roboto
|
||||||
|
roboto-slab
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-emoji
|
||||||
|
sarasa-gothic
|
||||||
|
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
|
||||||
|
];
|
||||||
|
fontconfig = {
|
||||||
|
antialias = true;
|
||||||
|
allowType1 = false;
|
||||||
|
allowBitmaps = false;
|
||||||
|
hinting = {
|
||||||
|
enable = true;
|
||||||
|
style = "slight";
|
||||||
|
autohint = false;
|
||||||
|
};
|
||||||
|
subpixel = {
|
||||||
|
rgba = "rgb";
|
||||||
|
lcdfilter = "default";
|
||||||
|
};
|
||||||
|
defaultFonts = {
|
||||||
|
emoji = [ "Noto Color Emoji" ];
|
||||||
|
serif = [ "Roboto Slab" "Noto Serif" "Sarasa Gothic CL" "Symbols Nerd Font" ];
|
||||||
|
sansSerif = [ "Roboto" "Noto Sans" "Sarasa Gothic CL" "Symbols Nerd Font" ];
|
||||||
|
monospace = [ "JetBrains Mono" "Sarasa Mono CL" "Symbols Nerd Font Mono" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
alsa-utils
|
||||||
|
];
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
wireplumber.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
sound.enable = true;
|
||||||
|
}
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
{ config, lib, pkgs, vars, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
vim
|
|
||||||
git
|
|
||||||
openssh
|
|
||||||
];
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
zsh.enable = true;
|
|
||||||
command-not-found.enable = false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue