mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-24 17:53:51 -08:00
refactor: move home-manager configuration to users dir
This commit is contained in:
parent
d7373ba537
commit
ee4c922eb2
12 changed files with 66 additions and 33 deletions
14
flake.nix
14
flake.nix
|
@ -37,7 +37,8 @@
|
||||||
outputs = { self, nixpkgs, home-manager, catppuccin, lanzaboote, stablepkgs
|
outputs = { self, nixpkgs, home-manager, catppuccin, lanzaboote, stablepkgs
|
||||||
, bleedingpkgs, lix-module, nix-darwin, nix-homebrew, ... }@inputs: rec {
|
, bleedingpkgs, lix-module, nix-darwin, nix-homebrew, ... }@inputs: rec {
|
||||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt;
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt;
|
||||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
nixosConfigurations = {
|
||||||
|
nixos = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
|
@ -63,17 +64,18 @@
|
||||||
home-manager.backupFileExtension = "backup";
|
home-manager.backupFileExtension = "backup";
|
||||||
home-manager.users.youwen = {
|
home-manager.users.youwen = {
|
||||||
imports = [
|
imports = [
|
||||||
./modules/home-manager/linux/linux-home.nix
|
./users/youwen/home-manager/linux/linux-home.nix
|
||||||
./modules/home-manager/linux/desktop.nix
|
./users/youwen/home-manager/linux/desktop.nix
|
||||||
./modules/home-manager/linux/programs.nix
|
./users/youwen/home-manager/linux/programs.nix
|
||||||
./modules/home-manager/common/core.nix
|
./users/youwen/home-manager/common/core.nix
|
||||||
./modules/home-manager/linux/catppuccin.nix
|
./users/youwen/home-manager/linux/catppuccin.nix
|
||||||
inputs.catppuccin.homeManagerModules.catppuccin
|
inputs.catppuccin.homeManagerModules.catppuccin
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.nixfmt;
|
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.nixfmt;
|
||||||
# Build darwin flake using:
|
# Build darwin flake using:
|
||||||
# $ darwin-rebuild build --flake .#Youwens-MacBook-Pro
|
# $ darwin-rebuild build --flake .#Youwens-MacBook-Pro
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
libvorbis
|
libvorbis
|
||||||
stdenv.cc.cc.lib
|
stdenv.cc.cc.lib
|
||||||
libkrb5
|
libkrb5
|
||||||
|
(writeShellScriptBin "launch-gamescope" ''
|
||||||
|
(sleep 1; pgrep gamescope| xargs renice -n -11 -p)&
|
||||||
|
exec gamescope "$@"
|
||||||
|
'')
|
||||||
keyutils
|
keyutils
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -87,14 +87,41 @@
|
||||||
users.users.youwen = {
|
users.users.youwen = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Youwen Wu";
|
description = "Youwen Wu";
|
||||||
extraGroups = [ "networkmanager" "wheel" "nixos" ];
|
extraGroups = [ "networkmanager" "wheel" "nixos" "realtime" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.groups.realtime = { };
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = [ "root" "youwen" ];
|
trusted-users = [ "root" "youwen" ];
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||||
|
'';
|
||||||
|
|
||||||
|
security.pam.loginLimits = [
|
||||||
|
{
|
||||||
|
domain = "@realtime";
|
||||||
|
type = "-";
|
||||||
|
item = "rtprio";
|
||||||
|
value = 98;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
domain = "@realtime";
|
||||||
|
type = "-";
|
||||||
|
item = "memlock";
|
||||||
|
value = "unlimited";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
domain = "@realtime";
|
||||||
|
type = "-";
|
||||||
|
item = "nice";
|
||||||
|
value = -11;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue