Merge branch 'main' of github.com:ooks-io/nix
This commit is contained in:
commit
1688264d04
21 changed files with 317 additions and 184 deletions
90
flake.lock
generated
90
flake.lock
generated
|
|
@ -454,6 +454,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lowdown-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1598695561,
|
||||
"narHash": "sha256-gyH/5j+h/nWw0W8AcR2WKvNBUsiQ7QuxqSJNXAwV+8E=",
|
||||
"owner": "kristapsdz",
|
||||
"repo": "lowdown",
|
||||
"rev": "1705b4a26fbf065d9574dce47a94e8c7c79e052f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kristapsdz",
|
||||
"repo": "lowdown",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nh": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -474,6 +490,24 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix": {
|
||||
"inputs": {
|
||||
"lowdown-src": "lowdown-src",
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1609520816,
|
||||
"narHash": "sha256-IGO7tfJXsv9u2wpW76VCzOsHYapRZqH9pHGVsoffPrI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nix",
|
||||
"rev": "8a2ce0f455da32bc20978e68c0aad9efb4560abc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nix",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nix-colors": {
|
||||
"inputs": {
|
||||
"base16-schemes": "base16-schemes",
|
||||
|
|
@ -647,6 +681,21 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1602702596,
|
||||
"narHash": "sha256-fqJ4UgOb4ZUnCDIapDb4gCrtAah5Rnr2/At3IzMitig=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ad0d20345219790533ebe06571f82ed6b034db31",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-20.09-small",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1706925685,
|
||||
"narHash": "sha256-hVInjWMmgH4yZgA4ZtbgJM1qEAel72SYhP5nOWX4UIM=",
|
||||
|
|
@ -730,6 +779,7 @@
|
|||
"nixpkgs": "nixpkgs_4",
|
||||
"nixvim": "nixvim",
|
||||
"sops-nix": "sops-nix",
|
||||
"ssbm-nix": "ssbm-nix",
|
||||
"zjstatus": "zjstatus"
|
||||
}
|
||||
},
|
||||
|
|
@ -783,6 +833,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"slippi-desktop": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1607036060,
|
||||
"narHash": "sha256-TUYsiVvKAws3N3roZYDwkLB0obyl6zwvh8CAk2RwHrY=",
|
||||
"owner": "project-slippi",
|
||||
"repo": "slippi-desktop-app",
|
||||
"rev": "3ca39ba6bbd02157515b12a79aa01e5d669ad1b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "project-slippi",
|
||||
"repo": "slippi-desktop-app",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -804,6 +870,28 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ssbm-nix": {
|
||||
"inputs": {
|
||||
"nix": "nix",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"slippi-desktop": "slippi-desktop"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696638790,
|
||||
"narHash": "sha256-fmpFkchuAyQfaSOWqEMnw4wRxWFkD7LqBwjKcVog8xQ=",
|
||||
"owner": "djanatyn",
|
||||
"repo": "ssbm-nix",
|
||||
"rev": "cfeb1874b437e5883272c522234d1d15cb3d3ebd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "djanatyn",
|
||||
"repo": "ssbm-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
|
|
@ -917,7 +1005,7 @@
|
|||
"inputs": {
|
||||
"crane": "crane_2",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
|
|
|
|||
16
flake.nix
16
flake.nix
|
|
@ -54,6 +54,11 @@
|
|||
|
||||
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||
|
||||
ssbm-nix = {
|
||||
url = "github:djanatyn/ssbm-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
zjstatus.url = "github:dj95/zjstatus";
|
||||
|
||||
};
|
||||
|
|
@ -92,6 +97,11 @@
|
|||
modules = [ ./system/hosts/ooksdesk ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
# GPD Micro-PC
|
||||
ooksmicro = lib.nixosSystem {
|
||||
modules = [ ./system/hosts/ooksmicro ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
};
|
||||
homeConfigurations = {
|
||||
# T480s
|
||||
|
|
@ -106,6 +116,12 @@
|
|||
pkgs = pkgsFor.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
# Main Desktop
|
||||
"ooks@ooksmicro" = lib.homeManagerConfiguration {
|
||||
modules = [ ./home/user/ooks/ooksmicro ];
|
||||
pkgs = pkgsFor.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
./nixIndex
|
||||
./git
|
||||
./tools
|
||||
./ssh
|
||||
];
|
||||
|
||||
options.homeModules.console.utility = {
|
||||
|
|
@ -13,6 +14,9 @@
|
|||
git = {
|
||||
enable = lib.mkEnableOption "Enable git + tools";
|
||||
};
|
||||
ssh = {
|
||||
enable = lib.mkEnableOption "Enable various console ssh";
|
||||
};
|
||||
tools = {
|
||||
enable = lib.mkEnableOption "Enable various console tools";
|
||||
};
|
||||
|
|
|
|||
20
home/modules/console/utility/ssh/default.nix
Normal file
20
home/modules/console/utility/ssh/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.console.utility.ssh;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = /* config */''
|
||||
Host *
|
||||
IdentitiesOnly=yes
|
||||
IdentityAgent "~/.1password/agent.sock"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1 +1,15 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
./slippi
|
||||
];
|
||||
|
||||
options.homeModules.desktop.gaming = {
|
||||
slippi = {
|
||||
enable = lib.mkEnableOption "Enable Slippi home module";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
18
home/modules/desktop/gaming/slippi/default.nix
Normal file
18
home/modules/desktop/gaming/slippi/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ inputs, config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.desktop.gaming.slippi;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
inputs.ssbm-nix.homeManagerModule
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
ssbm = {
|
||||
slippi-launcher.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -26,6 +26,9 @@ in
|
|||
hyprland = {
|
||||
enable = lib.mkEnableOption "Enable the hyprland profile";
|
||||
};
|
||||
gaming = {
|
||||
enable = lib.mkEnableOption "Enable the gaming profile";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.profiles.gaming;
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
../../modules
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
homeModules.desktop = {
|
||||
gaming = {
|
||||
slippi.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
23
home/user/ooks/ooksmicro/default.nix
Normal file
23
home/user/ooks/ooksmicro/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ inputs, outputs, config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../profile
|
||||
];
|
||||
|
||||
activeProfiles = ["base" "hyprland"];
|
||||
|
||||
home.sessionVariables.HN = "ooksmicro";
|
||||
|
||||
monitors = [{
|
||||
name = "DSI-1";
|
||||
width = 720;
|
||||
height = 1280;
|
||||
workspace = "1";
|
||||
primary = true;
|
||||
transform = 3;
|
||||
}];
|
||||
|
||||
colorscheme = inputs.nix-colors.colorSchemes.gruvbox-material-dark-soft;
|
||||
}
|
||||
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
|
||||
|
||||
|
||||
|
||||
{ config, inputs, pkgs, ... }:
|
||||
|
||||
# Imports
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.hardware.nixosModules.gpd-micropc
|
||||
|
||||
./hardware-configuration.nix
|
||||
|
||||
../common/user/ooks
|
||||
../common/base
|
||||
../common/features/bluetooth.nix
|
||||
../common/features/vm.nix
|
||||
../common/features/greetd.nix
|
||||
|
||||
];
|
||||
|
||||
# Hostname and networking
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
networking = {
|
||||
hostName = "ooksmicro";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
|
||||
# Printing
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
# Kernel
|
||||
# ------------------------------------------------------------------------------------------------
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
|
||||
kernelParams = [ "fbcon=rotate:1" ];
|
||||
};
|
||||
|
||||
|
||||
# Laptop Programs
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
powerManagement.powertop.enable = true;
|
||||
|
||||
programs = {
|
||||
light.enable = true;
|
||||
dconf.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
};
|
||||
|
||||
# XDG Portal
|
||||
# ------------------------------------------------------------------------------------------------
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
};
|
||||
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# gnupg
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# Services
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
services = {
|
||||
thermald = {
|
||||
enable = true;
|
||||
};
|
||||
logind = {
|
||||
lidSwitch = "suspend";
|
||||
};
|
||||
dbus = {
|
||||
enable = true;
|
||||
packages = [ pkgs.gcr ];
|
||||
};
|
||||
auto-cpufreq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
battery = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
};
|
||||
charger = {
|
||||
governor = "performance";
|
||||
turbo = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# System Version
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
system = {
|
||||
stateVersion = "22.05";
|
||||
};
|
||||
}
|
||||
|
|
@ -18,6 +18,6 @@
|
|||
# useDHCP = true;
|
||||
};
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
|
||||
kernelPackages = pkgs.linuxPackages_xanmod_latest;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
26
system/hosts/ooksmicro/default.nix
Normal file
26
system/hosts/ooksmicro/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ config, inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.hardware.nixosModules.gpd-micropc
|
||||
./hardware-configuration.nix
|
||||
../../profiles
|
||||
];
|
||||
|
||||
activeProfiles = ["base" "laptop"];
|
||||
|
||||
systemModules.user = {
|
||||
ooks.enable = true;
|
||||
shell.fish.enable = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "ooksmicro";
|
||||
};
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
|
||||
kernelParams = [ "fbcon=rotate:1" ];
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -2,16 +2,12 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./jellyfin
|
||||
./deluge
|
||||
./mediaServer
|
||||
];
|
||||
|
||||
options.systemModules.services = {
|
||||
jellyfin = {
|
||||
enable = lib.mkEnableOption "Enable jellyfin service module";
|
||||
};
|
||||
deluge = {
|
||||
enable = lib.mkEnableOption "Enable deluge service module";
|
||||
mediaServer = {
|
||||
enable = lib.mkEnableOption "Enable mediaserver service module";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.systemModules.services.deluge;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.deluge = {
|
||||
user = "deluge";
|
||||
group = "deluge";
|
||||
enable = true;
|
||||
web.enable = true;
|
||||
};
|
||||
|
||||
# fileSystems."/media/Downloads" = {
|
||||
# device = "/dev/disk/by-label/torrents";
|
||||
# fsType = "ext4";
|
||||
# options = [ "rw" "uid=1000" "gid=991" "umask=002" ];
|
||||
# };
|
||||
};
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.systemModules.services.jellyfin;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
jellyfin
|
||||
jellyfin-web
|
||||
jellyfin-ffmpeg
|
||||
];
|
||||
services.jellyfin = {
|
||||
user = "jellyfin";
|
||||
group = "media";
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
users.users.jellyfin = {
|
||||
isSystemUser = true;
|
||||
group = "media";
|
||||
};
|
||||
users.groups.media = {};
|
||||
|
||||
# fileSystems."/media" = {
|
||||
# device = "/dev/disk/by-label/ooksmedia";
|
||||
# fsType = "ntfs";
|
||||
# options = [ "rw" "uid=1000" "gid=991" "umask=002" ];
|
||||
# };
|
||||
};
|
||||
}
|
||||
49
system/modules/services/mediaServer/default.nix
Normal file
49
system/modules/services/mediaServer/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.systemModules.services.mediaServer;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
users.groups.media = { };
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
jellyfin
|
||||
jellyfin-web
|
||||
jellyfin-ffmpeg
|
||||
];
|
||||
|
||||
services = {
|
||||
jellyfin = {
|
||||
group = "media";
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
deluge = {
|
||||
group = "media";
|
||||
enable = true;
|
||||
web.enable = true;
|
||||
};
|
||||
radarr = {
|
||||
group = "media";
|
||||
enable = true;
|
||||
};
|
||||
sonarr = {
|
||||
group = "media";
|
||||
enable = true;
|
||||
};
|
||||
prowlarr.enable = true;
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /jellyfin 0770 - media - -"
|
||||
];
|
||||
|
||||
fileSystems."/jellyfin" = {
|
||||
device = "/dev/disk/by-label/jellyfin";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -2,6 +2,24 @@
|
|||
|
||||
let
|
||||
cfg = config.systemProfile.gaming;
|
||||
steamFix = pkgs.steam.override {
|
||||
extraPkgs = pkgs: with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
mangohud
|
||||
winetricks
|
||||
inputs.nix-gaming.packages.${pkgs.system}.wine-ge
|
||||
protontricks
|
||||
];
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
|
|
@ -12,7 +30,10 @@ in
|
|||
config = lib.mkIf cfg.enable {
|
||||
hardware.opengl.extraPackages = [ pkgs.gamescope ];
|
||||
programs = {
|
||||
steam.enable = true;
|
||||
steam = {
|
||||
enable = true;
|
||||
package = steamFix;
|
||||
};
|
||||
gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
|
|
@ -32,5 +53,13 @@ in
|
|||
};
|
||||
};
|
||||
services.pipewire.lowLatency.enable = true;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(_: prev: {
|
||||
steam = prev.steam.override {
|
||||
extraProfile = "export STEAM_EXTRA_COMPAT_TOOLS_PATHS='${inputs.nix-gaming.packages.${pkgs.system}.proton-ge}'";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ in
|
|||
config = lib.mkIf cfg.enable {
|
||||
systemModules = {
|
||||
services = {
|
||||
jellyfin.enable = true;
|
||||
deluge.enable = true;
|
||||
mediaServer.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue