refactor *started*
This commit is contained in:
parent
d0413cb830
commit
db2103a37d
103 changed files with 1008 additions and 786 deletions
81
hosts/default.nix
Normal file
81
hosts/default.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
type = config.device.type;
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
device = {
|
||||
type = lib.mkOption {
|
||||
default = "desktop";
|
||||
description = "device preset: desktop, laptop, server";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
apps = {
|
||||
audio = {
|
||||
base.enable = (lib.mkIf (type == "desktop")) true;
|
||||
media.enable = true;
|
||||
editing.enable = true;
|
||||
};
|
||||
video = {
|
||||
base.enable = true;
|
||||
media.enable = true;
|
||||
editing.enable = true;
|
||||
};
|
||||
image = {
|
||||
base.enable = true;
|
||||
editing.enable = true;
|
||||
};
|
||||
gaming = {
|
||||
steam.enable = true;
|
||||
};
|
||||
terminal = {
|
||||
kitty = {
|
||||
enable = true;
|
||||
};
|
||||
default = "kitty";
|
||||
toys = true;
|
||||
};
|
||||
};
|
||||
desktop = {
|
||||
window-managers = {
|
||||
hyprland = {
|
||||
enable = true;
|
||||
};
|
||||
niri = {
|
||||
enable = true;
|
||||
};
|
||||
sway = {
|
||||
enable = false;
|
||||
};
|
||||
};
|
||||
shell = {
|
||||
noctalia = {
|
||||
enable = true;
|
||||
};
|
||||
swww = {
|
||||
enable = false;
|
||||
};
|
||||
walker = {
|
||||
enable = true;
|
||||
};
|
||||
waybar = {
|
||||
enable = false;
|
||||
};
|
||||
};
|
||||
utilities = {
|
||||
grimblast = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
27
hosts/marty-pc/custom.nix
Normal file
27
hosts/marty-pc/custom.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services.flatpak.enable = true;
|
||||
virtualisation.docker.enable = true;
|
||||
security.polkit = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (
|
||||
subject.isInGroup("users")
|
||||
&& (
|
||||
action.id == "org.freedesktop.login1.suspend"
|
||||
)
|
||||
)
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -8,9 +8,13 @@
|
|||
...
|
||||
}:
|
||||
|
||||
let
|
||||
hostname = "marty-pc";
|
||||
in
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = "marty-pc";
|
||||
hostName = hostname;
|
||||
interfaces = {
|
||||
enp42s0 = {
|
||||
wakeOnLan = {
|
||||
|
|
@ -20,7 +24,6 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
useGlobalPkgs = true;
|
||||
|
|
@ -29,60 +32,9 @@
|
|||
marty = import ./home.nix;
|
||||
};
|
||||
};
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
gamescopeSession.enable = true;
|
||||
protontricks.enable = true;
|
||||
extraCompatPackages = with pkgs; [
|
||||
proton-ge-bin
|
||||
];
|
||||
extraPackages = with pkgs; [
|
||||
gamescope
|
||||
];
|
||||
};
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
services.flatpak.enable = true;
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
imports = [ ./hardware.nix ];
|
||||
security.polkit = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (
|
||||
subject.isInGroup("users")
|
||||
&& (
|
||||
action.id == "org.freedesktop.login1.suspend"
|
||||
)
|
||||
)
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
'';
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
qmk
|
||||
qmk-udev-rules
|
||||
qmk_hid
|
||||
via
|
||||
vial
|
||||
imports = [
|
||||
./hardware.nix
|
||||
./custom.nix
|
||||
];
|
||||
|
||||
services.udev = {
|
||||
packages = with pkgs; [
|
||||
qmk
|
||||
qmk-udev-rules
|
||||
qmk_hid
|
||||
via
|
||||
vial
|
||||
];
|
||||
};
|
||||
system.stateVersion = "25.05"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,81 +3,15 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "marty";
|
||||
home.homeDirectory = "/home/marty";
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "25.11"; # Please read the comment before changing.
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
|
||||
programs.fish.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||
# # "Hello, world!" when run.
|
||||
# hello
|
||||
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||
# # fonts?
|
||||
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
];
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = {
|
||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||
# shell provided by Home Manager. If you don't want to manage your shell
|
||||
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
||||
# located at either
|
||||
#
|
||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /etc/profiles/per-user/marty/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
|
||||
device.type.desktop = true;
|
||||
home.username = osConfig.user.userName;
|
||||
home.homeDirectory = "/home/${osConfig.user.userName}";
|
||||
home.stateVersion = "25.11";
|
||||
|
||||
desktop = {
|
||||
hyprland = {
|
||||
|
|
@ -104,18 +38,9 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
gaming = {
|
||||
steam.enable = true;
|
||||
minecraft.enable = true;
|
||||
modding.enable = true;
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.walker.homeManagerModules.default
|
||||
inputs.noctalia.homeModules.default
|
||||
./../../modules
|
||||
|
||||
];
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue