Compare commits

..

No commits in common. "5612a343b1cbe5ec18e0c6ac4046ed1ba4d7df0b" and "c40c62dff2227ac707fee032015716884fe3fd77" have entirely different histories.

33 changed files with 92 additions and 721 deletions

View File

@ -365,11 +365,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713166971, "lastModified": 1713077896,
"narHash": "sha256-t0P/rKlsE5l1O3O2LYtAelLzp7PeoPCSzsIietQ1hSM=", "narHash": "sha256-Noot8H0EZEAFRQWyGxh9ryvhK96xpIqKbh78X447JWs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1c43dcfac48a2d622797f7ab741670fdbcf8f609", "rev": "630a0992b3627c64e34f179fab68e3d48c6991c0",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -23,7 +23,7 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1QZO6fF2RLcmjMKdG1eZi0RLw3joa+VBXaKvfmA7Tg odie" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1QZO6fF2RLcmjMKdG1eZi0RLw3joa+VBXaKvfmA7Tg odie"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINs89u4Kvwlmq67eV+H/n+x9M8gsKDxQU+dCPSEb2vJe odie" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINs89u4Kvwlmq67eV+H/n+x9M8gsKDxQU+dCPSEb2vJe odie"
]; ];
domain = "odie.home.arpa"; domain = "odie.intranet";
}; };
overlays = [ overlays = [
inputs.nixvim.overlays.default inputs.nixvim.overlays.default
@ -37,9 +37,9 @@
overlays = { overlays = {
kodi = final: prev: { kodi = final: prev: {
kodi-standalone = kodi-standalone =
final.kodi-wayland.withPackages final.kodi-wayland.passthru.withPackages
(kodiPkgs: (kodiPkgs:
with kodiPkgs; [ with final.kodiPackages; [
youtube youtube
pvr-iptvsimple pvr-iptvsimple
keymap keymap
@ -89,7 +89,6 @@
games = import ./modules/home-manager/games; games = import ./modules/home-manager/games;
mediacenter = import ./modules/home-manager/mediacenter; mediacenter = import ./modules/home-manager/mediacenter;
user = import ./modules/home-manager/user; user = import ./modules/home-manager/user;
binary-cache = import ./modules/home-manager/binary-cache;
}; };
homeConfigurations = homeConfigurations =
flakeLib.mkHomeConfiguration { flakeLib.mkHomeConfiguration {

View File

@ -7,4 +7,19 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
home-manager home-manager
]; ];
nix = {
package = pkgs.nix;
settings = {
substituters = [
"http://nixcache.odie.intranet"
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
];
trusted-public-keys = [
"nixcache.odie.intranet:2j5qAVmtBUSZMPWlIRS8Gn0Il9tbotJ9c2y43N0RLKU="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
};
} }

View File

@ -1,12 +0,0 @@
_: {
nix = {
# package = pkgs.nix;
settings = {
substituters = [
"http://nixcache.odie.intranet"
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
];
};
};
}

View File

@ -24,9 +24,8 @@ lib.mkIf config.desktop.awesome.enable {
}; };
}; };
services.gnome-keyring.enable = true;
xsession = { xsession = {
enable = true;
windowManager.awesome = { windowManager.awesome = {
enable = true; enable = true;
luaModules = with pkgs.luaPackages; [ luaModules = with pkgs.luaPackages; [

View File

@ -1,8 +1,4 @@
{ { lib, ... }: {
lib,
config,
...
}: {
options = { options = {
desktop = { desktop = {
awesome = { awesome = {
@ -22,5 +18,5 @@
}; };
}; };
}; };
imports = [./awesomewm.nix ../xserver]; imports = [ ./awesomewm.nix ];
} }

View File

@ -1,18 +0,0 @@
{
lib,
config,
...
}: {
config = lib.mkIf config.desktop.enable {
services.darkman = {
enable = true;
settings = {
lat = 50.81;
lng = 7.03;
usegeoclue = true;
dbusserver = true;
portal = true;
};
};
};
}

View File

@ -1,5 +1,4 @@
{ {
pkgs,
lib, lib,
config, config,
nix-colors, nix-colors,
@ -16,7 +15,7 @@
fileManager = lib.mkOption { fileManager = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "the default file_manager to use"; description = "the default file_manager to use";
default = "pcmanfm"; default = "thunar";
}; };
browser = lib.mkOption { browser = lib.mkOption {
type = lib.types.str; type = lib.types.str;
@ -43,17 +42,9 @@
./rofi ./rofi
./network-manager-applet ./network-manager-applet
./alacritty ./alacritty
./darkman
./pcmanfm
./thunar
]; ];
config = lib.mkIf config.desktop.enable { config = lib.mkIf config.desktop.enable {
desktop = { desktop.awesome.enable = lib.mkDefault true;
xserver.enable = lib.mkDefault true;
awesome.enable = lib.mkDefault true;
pcmanfm.enable = lib.mkDefault true;
network-manager.enable = lib.mkDefault true;
};
programs = { programs = {
keepassxc.enable = lib.mkDefault true; keepassxc.enable = lib.mkDefault true;
firefox.enable = lib.mkDefault true; firefox.enable = lib.mkDefault true;
@ -61,44 +52,11 @@
}; };
services = { services = {
nextcloud-client.enable = lib.mkDefault true; nextcloud-client.enable = lib.mkDefault true;
udiskie = { udiskie.enable = lib.mkDefault true;
enable = lib.mkDefault true;
settings = {
program_options = {
udisks_version = 2;
tray = true;
};
};
};
picom.enable = lib.mkDefault true; picom.enable = lib.mkDefault true;
}; };
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
colorScheme = nix-colors.colorSchemes.catppuccin-mocha; colorScheme = nix-colors.colorSchemes.catppuccin-mocha;
xdg = { desktop.network-manager.enable = lib.mkDefault true;
enable = lib.mkDefault true;
portal = {
enable = lib.mkDefault true;
config = {
common = {
default = [
"gtk"
];
};
awesome = {
default = [
"pantheon"
"gtk"
];
"org.freedesktop.impl.portal.Secret" = [
"gnome-keyring"
];
};
};
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
};
userDirs.enable = true;
};
}; };
} }

View File

@ -1,4 +1,5 @@
{ {
pkgs,
config, config,
lib, lib,
... ...

View File

@ -1,16 +0,0 @@
{
pkgs,
lib,
config,
...
}: let
cfg = config.desktop.pcmanfm;
in
with lib; {
options = {
desktop.pcmanfm.enable = mkEnableOption "pcmanfm";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [pcmanfm];
};
}

View File

@ -1,14 +0,0 @@
{
pkgs,
config,
lib,
...
}:
with lib; {
options = {
desktop.thunar.enable = mkEnableOption "Thunar";
};
config = mkIf config.desktop.thunar.enable {
home.packages = with pkgs; [xfce.thunar];
};
}

View File

@ -1,10 +0,0 @@
{lib, ...}:
with lib; {
imports = [
./xresources.nix
./xsession.nix
];
options = {
desktop.xserver.enable = mkEnableOption "xserver";
};
}

View File

@ -1,47 +0,0 @@
{
config,
lib,
...
}: let
cfg = config.desktop.xserver;
in
with lib;
mkIf cfg.enable {
xresources.properties = {
"*background" = "#1E1E2E";
"*foreground" = "#CDD6F4";
"*cursorColor" = "#F5E0DC";
"*color0" = "#45475A";
"*color8" = "#585B70";
"*color1" = "#F38BA8";
"*color9" = "#F38BA8";
"*color2" = "#A6E3A1";
"*color10" = "#A6E3A1";
"*color3" = "#F9E2AF";
"*color11" = "#F9E2AF";
"*color4" = "#89B4FA";
"*color12" = "#89B4FA";
"*color5" = "#F5C2E7";
"*color13" = "#F5C2E7";
"*color6" = "#94E2D5";
"*color14" = "#94E2D5";
"*color7" = "#BAC2DE";
"*color15" = "#A6ADC8";
"URxvt.letterSpace" = "-1";
"URxvt.lineSpace" = "0";
"URxvt.saveline" = "10480";
"URxvt.scrollBar" = "false";
"URxvt.urgentOnBell" = "true";
"URxvt.font" = "xft:FiraCode Nerd Font Mono:size=9";
"URxvt.fontBold" = "xft:FiraCode Nerd Font Mono:bold:size=9";
"URxvt.depth" = "32";
"URxvt.background" = "[95]#1E1E2E";
"Xft.autohint" = "0";
"Xft.lcdfilter" = "lcddefault";
"Xft.hintstyle" = "hintslight";
"Xft.hinting" = "1";
"Xft.antialias" = "1";
"Xft.rgba" = "rgb";
"XTerm*faceName" = "FiraCode Nerd Font Mono:bold:size=9";
};
}

View File

@ -1,15 +0,0 @@
{
pkgs,
config,
lib,
...
}:
lib.mkIf config.desktop.xserver.enable {
xsession = {
enable = true;
profileExtra = ''
${pkgs.mate.mate-polkit}/usr/lib/mate-polkit/polkit-mate-authentication-agent-1 &
${pkgs.darkman}/bin/darkman set dark
'';
};
}

View File

@ -1,6 +1,5 @@
{lib, ...}: with lib; { {
imports = [ imports = [
./kodi ./kodi
]; ];
mediacenter.kodi.enable = mkDefault true;
} }

View File

@ -1,74 +0,0 @@
{
vars,
mysql,
media,
...
}: let
inherit (vars) timeZone hostName domain;
datadirs = "smb://${media.host}/kodi/userdata";
in {
addons = {
unknownsources = "true";
};
services = {
devicename = "${hostName}.${domain}";
webserver = "true";
webserverauthentication = "false";
webserverusername = "kodi";
webserverpassword = "kodi";
webserverport = "8000";
webserverssl = "false";
zeroconf = "true";
wsdiscovery = "true";
upnp = "true";
upnpserver = "true";
airplay = "true";
airplayvideosupport = "true";
};
locale = {
language = "resource.language.de_de";
country = "Deutschland";
timezone = timeZone;
};
lookandfeed = {
enablerssfeeds = "false";
};
videodatabase = {
inherit (mysql) user pass host;
type = "mysql";
port = builtins.toString mysql.port;
};
musicdatabase = {
inherit (mysql) user pass host;
type = "mysql";
port = builtins.toString mysql.port;
};
videolibrary = {
importwatchedstate = "true";
importresumepoint = "true";
};
pathsubstitution = {
substitute = [
{
from = "special://profile/playlists/";
to = "${datadirs}/playlists/";
}
{
from = "special://profile/sources.xml";
to = "${datadirs}/sources.xml";
}
{
from = "special://profile/mediasources.xml";
to = "${datadirs}/mediasources.xml";
}
{
from = "special://profile/RssFeeds.xml";
to = "${datadirs}/RssFeeds.xml";
}
{
from = "special://profile/favourites.xml";
to = "${datadirs}/favourites.xml";
}
];
};
}

View File

@ -1,64 +1,20 @@
{ {
vars,
pkgs, pkgs,
config, config,
lib, lib,
... ...
}: let }: let
cfg = config.mediacenter.kodi; cfg = config.mediacenter.kodi;
inherit (lib) types; in with lib; {
in options = {
with lib; { mediacenter.kodi = {
options.mediacenter.kodi = { enable = mkEnableOption "kodi";
# enable = mkEnableOption "kodi";
media = {
host = mkOption {
type = types.str;
default = "media";
};
user = mkOption {
type = types.str;
default = "kodi";
};
pass = mkOption {
type = types.str;
default = "kodi";
};
};
mysql = {
host = mkOption {
type = types.str;
default = "localhost";
};
port = mkOption {
type = types.int;
default = 3306;
};
user = mkOption {
type = types.str;
default = "kodi";
};
pass = mkOption {
type = types.str;
default = "kodi";
};
}; };
}; };
imports = [./kodi.nix]; # import overridden kodi module config = mkIf cfg.enable {
config = mkIf cfg.enable { programs.kodi = {
#programs.kodi = { enable = true;
mediacenter.kodi = { package = pkgs.kodi-standalone;
# enable = true;
package = pkgs.kodi-standalone;
settings = import ./advancedsettings.nix {inherit vars; inherit (cfg) mysql media;};
};
home.file = {
"kodi-passwords.xml" = {
target = ".kodi/userdata/passwords.xml";
text = import ./passwords.nix {
inherit (cfg) media;
};
};
};
}; };
} };
}

View File

@ -1,262 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
stylesheetCommonHeader = ''
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:strip-space elements="*"/>
'';
stylesheetCommonFooter = "</xsl:stylesheet>";
stylesheetNestedTags = ''
<xsl:template match="attr[attrs]">
<xsl:variable name="elementName" select="@name"/>
<xsl:element name="{$elementName}">
<xsl:apply-templates select="attrs" />
</xsl:element>
</xsl:template>
<xsl:template match="attr[list[attrs]]">
<xsl:variable name="elementName" select="@name"/>
<xsl:for-each select="list/attrs">
<xsl:element name="{$elementName}">
<xsl:apply-templates select="." />
</xsl:element>
</xsl:for-each>
</xsl:template>
<xsl:template match="attr[not(attrs|list)]">
<xsl:variable name="elementName" select="@name"/>
<xsl:element name="{$elementName}">
<xsl:if test="$elementName='path'">
<!-- needed in sources.xml but will be used for all "path" tags -->
<xsl:attribute name="pathversion">1</xsl:attribute>
</xsl:if>
<xsl:value-of select="*/@value" />
</xsl:element>
</xsl:template>
'';
stylesheetTagsAsSettingWithId = ''
<xsl:template match='attr'>
<setting>
<xsl:attribute name="id">
<xsl:value-of select="@name" />
</xsl:attribute>
<xsl:value-of select="*/@value" />
</setting>
</xsl:template>
'';
stylesheetAdvancedSettingsRootTag = ''
<xsl:template match='/'>
<xsl:comment> Generated by Home Manager. </xsl:comment>
<advancedsettings version="1.0">
<xsl:apply-templates/>
</advancedsettings>
</xsl:template>
'';
stylesheetSourcesRootTag = ''
<xsl:template match='/'>
<xsl:comment> Generated by Home Manager. </xsl:comment>
<sources>
<xsl:apply-templates/>
</sources>
</xsl:template>
'';
stylesheetAddonSettingsRootTag = ''
<xsl:template match='/'>
<xsl:comment> Generated by Home Manager. </xsl:comment>
<settings version="2">
<xsl:apply-templates/>
</settings>
</xsl:template>
'';
attrsetToXml = attrs: name: stylesheet:
pkgs.runCommand name {
# Package splicing for libxslt does not work correctly leading to errors
# when cross-compiling. Use the version from buildPackages explicitly to
# fix this.
nativeBuildInputs = [pkgs.buildPackages.libxslt.bin];
xml = builtins.toXML attrs;
passAsFile = ["xml"];
} ''
xsltproc ${stylesheet} - < "$xmlPath" > "$out"
'';
attrsetToAdvancedSettingsXml = attrs: name: let
stylesheet = builtins.toFile "stylesheet.xsl" ''
${stylesheetCommonHeader}
${stylesheetAdvancedSettingsRootTag}
${stylesheetNestedTags}
${stylesheetCommonFooter}
'';
in
attrsetToXml attrs name stylesheet;
attrsetToSourcesXml = attrs: name: let
stylesheet = builtins.toFile "stylesheet.xsl" ''
${stylesheetCommonHeader}
${stylesheetSourcesRootTag}
${stylesheetNestedTags}
${stylesheetCommonFooter}
'';
in
attrsetToXml attrs name stylesheet;
attrsetToAddonSettingsXml = attrs: name: let
stylesheet = builtins.toFile "stylesheet.xsl" ''
${stylesheetCommonHeader}
${stylesheetAddonSettingsRootTag}
${stylesheetTagsAsSettingWithId}
${stylesheetCommonFooter}
'';
in
attrsetToXml attrs name stylesheet;
in {
meta.maintainers = [hm.maintainers.dwagenk];
options.mediacenter.kodi = {
enable = mkEnableOption "Kodi";
package = mkOption {
type = types.package;
default = pkgs.kodi;
defaultText = literalExpression "pkgs.kodi";
example =
literalExpression
"pkgs.kodi.withPackages (exts: [ exts.pvr-iptvsimple ])";
description = ''
The `kodi` package to use.
Can be used to specify extensions.
'';
};
datadir = mkOption {
type = types.path;
default = "${config.home.homeDirectory}/.kodi";
defaultText =
literalExpression ''"''${config.home.homeDirectory}/.kodi"'';
example = literalExpression ''"''${config.xdg.dataHome}/kodi"'';
description = "Directory to store configuration and metadata.";
};
settings = mkOption {
type = with types; let
valueType =
oneOf [str (attrsOf valueType) (listOf valueType)]
// {
description = "attribute sets or lists of strings";
};
in
nullOr valueType;
default = null;
example = literalExpression ''
{ videolibrary.showemptytvshows = "true"; }
'';
description = ''
Configuration to write to the `advancedsettings.xml`
file in kodis userdata directory. Settings specified here will be
immutable from inside kodi and be hidden from the GUI settings dialog.
See <https://kodi.wiki/view/Advancedsettings.xml> as
reference for how settings need to be specified.
The innermost attributes must be of type str.
'';
};
sources = mkOption {
type = with types; let
valueType =
oneOf [str (attrsOf valueType) (listOf valueType)]
// {
description = "attribute sets or lists of strings";
};
in
nullOr valueType;
default = null;
example = literalExpression ''
{
video = {
default = "movies";
source = [
{ name = "videos"; path = "/path/to/videos"; allowsharing = "true"; }
{ name = "movies"; path = "/path/to/movies"; allowsharing = "true"; }
];
};
}
'';
description = ''
Contents to populate the file `sources.xml` in kodis
userdata directory.
See <https://kodi.wiki/view/Sources.xml> as
reference for how sources need to be specified.
Kodi will still show the dialogs to modify sources in the GUI and they
appear to be mutable. This however is not the case and the sources will
stay as specified via Home Manager.
The innermost attributes must be of type str.
'';
};
addonSettings = mkOption {
type = with types; nullOr (attrsOf (attrsOf str));
default = null;
example = literalExpression ''
{ "service.xbmc.versioncheck".versioncheck_enable = "false"; }
'';
description = ''
Attribute set with the plugin namespace as toplevel key and the plugins
settings as lower level key/value pairs.
Kodi will still show the settings of plugins configured via this
mechanism in the GUI and they appear to be mutable. This however is
not the case and the settings will stay as specified via Home Manager.
'';
};
};
config = let
cfg = config.mediacenter.kodi;
in
mkIf cfg.enable (mkMerge [
{
assertions = [
(lib.hm.assertions.assertPlatform "programs.kodi" pkgs
lib.platforms.linux)
];
home.packages = [cfg.package];
home.sessionVariables = {KODI_DATA = cfg.datadir;};
}
(mkIf (cfg.settings != null) {
home.file."${cfg.datadir}/userdata/advancedsettings.xml".source =
attrsetToAdvancedSettingsXml cfg.settings "kodi-advancedsettings.xml";
})
(mkIf (cfg.sources != null) {
home.file."${cfg.datadir}/userdata/sources.xml".source =
attrsetToSourcesXml cfg.sources "kodi-sources.xml";
})
(mkIf (cfg.addonSettings != null) {
home.file = mapAttrs' (k: v:
attrsets.nameValuePair
"${cfg.datadir}/userdata/addon_data/${k}/settings.xml" {
source = attrsetToAddonSettingsXml v "kodi-addon-${k}-settings.xml";
})
cfg.addonSettings;
})
]);
}

View File

@ -1,8 +0,0 @@
{media,...}: ''
<passwords>
<path>
<from>smb://${media.host}</from>
<to>smb://${media.user}:${media.pass}@${media.host}</to>
</path>
</passwords>
''

View File

@ -1,7 +1,6 @@
{ {
lib, lib,
config, config,
vars,
... ...
}: }:
let let
@ -14,7 +13,7 @@ lib.mkIf config.services.borgmatic.enable {
home = { home = {
location = { location = {
patterns = [ patterns = [
"R /home/${vars.username}" "R /home/odie"
] ++ commonExcludes; ] ++ commonExcludes;
repositories = [ repositories = [
{ {

View File

@ -5,6 +5,7 @@
substituters = [ substituters = [
"http://nixcache.odie.intranet" "http://nixcache.odie.intranet"
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://cache.nixos.org/"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"nixcache.odie.intranet:2j5qAVmtBUSZMPWlIRS8Gn0Il9tbotJ9c2y43N0RLKU=" "nixcache.odie.intranet:2j5qAVmtBUSZMPWlIRS8Gn0Il9tbotJ9c2y43N0RLKU="

View File

@ -15,6 +15,5 @@
hardware.enableRedistributableFirmware = lib.mkDefault true; hardware.enableRedistributableFirmware = lib.mkDefault true;
services.openssh.enable = lib.mkDefault true; services.openssh.enable = lib.mkDefault true;
boot.loader.systemd-boot.enable = lib.mkDefault true; boot.loader.systemd-boot.enable = lib.mkDefault true;
services.udisks2.enable = lib.mkDefault true;
}; };
} }

View File

@ -1,15 +1,10 @@
{ config, lib, pkgs, vars, ... }:
let
inherit (vars) hostName;
in
{ {
vars,
...
}: let
inherit (vars) hostName domain;
in {
networking = { networking = {
inherit hostName domain; inherit hostName;
search = [
domain
"fritz.box"
];
firewall.enable = true; firewall.enable = true;
}; };
} }

View File

@ -1,48 +1,39 @@
{ { config, lib, pkgs, vars, ... }:
config, let
lib,
pkgs,
vars,
...
}: let
inherit (vars) username name locale hostname sshKeys; inherit (vars) username name locale hostname sshKeys;
baseGroups = [ baseGroups = [
"users" "users"
"wheel" "wheel"
"audio"
"video"
"disk"
"power"
"adm"
"plugdev"
]; ];
rpiGroups = rpiGroups =
if config.hardware.raspberry-pi.enable if config.hardware.raspberry-pi.enable then [
then [ "audio"
"video"
"plugdev"
"adm"
"disk"
"i2c" "i2c"
"spi" "spi"
] "power"
else []; ] else [ ];
extraGroups = baseGroups ++ rpiGroups; extraGroups = baseGroups ++ rpiGroups;
basePackages = with pkgs; [home-manager]; basePackages = with pkgs; [ home-manager ];
wslPackages = wslPackages =
if config.wsl.enable if config.wsl.enable then with pkgs; [
then wslu
with pkgs; [ wsl-open
wslu ] else [ ];
wsl-open
]
else [];
packages = basePackages ++ wslPackages; packages = basePackages ++ wslPackages;
in { in
{
options = { options = {
hardware.raspberry-pi.enable = lib.mkEnableOption "raspberry pi features"; hardware.raspberry-pi.enable = lib.mkEnableOption "raspberry pi features";
}; };
config = { config = {
users = { users = {
groups.${username} = {}; groups.${username} = { };
users = { users = {
${username} = { ${username} = {
inherit packages extraGroups; inherit packages extraGroups;
@ -59,3 +50,4 @@ in {
}; };
}; };
} }

View File

@ -1,4 +1,4 @@
{lib, ...}: { { lib, ... }: {
imports = [ imports = [
./fonts ./fonts
./sound ./sound
@ -14,10 +14,5 @@
programs.dconf.enable = lib.mkDefault true; programs.dconf.enable = lib.mkDefault true;
hardware.opengl.enable = lib.mkDefault true; hardware.opengl.enable = lib.mkDefault true;
desktop.enable = lib.mkDefault true; desktop.enable = lib.mkDefault true;
security.polkit.enable = lib.mkDefault true;
services = {
upower.enable = lib.mkDefault true;
gvfs.enable = lib.mkDefault true;
};
}; };
} }

View File

@ -21,7 +21,6 @@
}; };
xserver = { xserver = {
enable = true; enable = true;
updateDbusEnvironment = true;
windowManager.awesome = { windowManager.awesome = {
enable = true; enable = true;
luaModules = with pkgs.luaPackages; [ luaModules = with pkgs.luaPackages; [

View File

@ -14,35 +14,12 @@ in
}; };
config = let config = let
user = "kodi"; user = "kodi";
starter = pkgs.callPackage (
{pkgs, kodi-standalone, ...}:
pkgs.writeShellApplication {
name = "kodi-launcher";
runtimeInputs = [kodi-standalone];
text = ''
#!/usr/bin/env bash
while true
do
ping -c1 svartalbenheim.odie.intranet && break
sleep 5
done
while true
do
sleep 1
kodi-standalone
done
'';
}
) {};
in in
lib.mkIf cfg.enable { lib.mkIf cfg.enable {
services.cage = { services.cage = {
inherit user; inherit user;
enable = true; enable = true;
program = "${starter}/bin/kodi-launcher"; program = "${pkgs.kodi-standalone}/bin/kodi-standalone";
}; };
users.users.kodi = { users.users.kodi = {

View File

@ -8,5 +8,5 @@ with lib;
services.nginx = { services.nginx = {
recommendedProxySettings = true; recommendedProxySettings = true;
}; };
networking.firewall.allowedTCPPorts = [80 443]; networking.firewall.allowedTCPPorts = [80];
} }

View File

@ -16,17 +16,7 @@ in {
language.base = vars.locale; language.base = vars.locale;
stateVersion = "23.05"; stateVersion = "23.05";
}; };
mediacenter.kodi = { mediacenter.kodi.enable = true;
enable = true;
media = {
host = "svartalbenheim.odie.intranet";
pass = "Bx5sTkw1Qeg69I9!";
};
mysql = {
host = "svartalbenheim.odie.intranet";
pass = "Bx5sTkw1Qeg69I9!";
};
};
} }
]; ];
} }

View File

@ -18,10 +18,6 @@
awesome = { awesome = {
enable = false; enable = false;
}; };
network-manager.enable = false;
xserver.enable = false;
pcmanfm.enable = false;
thunar.enable = false;
}; };
programs = { programs = {
firefox.enable = false; firefox.enable = false;
@ -37,6 +33,7 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
nix-serve nix-serve
]; ];
desktop.network-manager.enable = false;
} }
]; ];
} }

View File

@ -1,30 +1,13 @@
{outputs, ...}: { { outputs, ... }: {
imports = [ imports = [
outputs.homeManagerModules.base outputs.homeManagerModules.base
outputs.homeManagerModules.shell outputs.homeManagerModules.shell
outputs.homeManagerModules.user outputs.homeManagerModules.user
outputs.homeManagerModules.desktop # outputs.homeManagerModules.desktop
outputs.homeManagerModules.development outputs.homeManagerModules.development
outputs.homeManagerModules.games outputs.homeManagerModules.games
outputs.homeManagerModules.binary-cache {
services.picom.enable = false;
}
]; ];
desktop = {
enable = false;
awesome.enable = false;
pcmanfm.enable = false;
thunar.enable = false;
network-manager.enable = false;
};
programs = {
kitty.enable = true;
keepassxc.enable = false;
firefox.enable = false;
};
services = {
nextcloud-client.enable = false;
udiskie.enable = false;
picom.enable = false;
};
theme.cursor.enable = false;
theme.gtk.enable = false;
} }

View File

@ -11,21 +11,17 @@
outputs.homeManagerModules.development outputs.homeManagerModules.development
outputs.homeManagerModules.games outputs.homeManagerModules.games
outputs.homeManagerModules.user outputs.homeManagerModules.user
outputs.homeManagerModules.binary-cache ];
]; home.stateVersion = "23.11";
home.stateVersion = "23.11"; desktop = {
desktop = { enable = true;
enable = true; awesome = {
awesome = { enable = true;
enable = true; wifi_device = "'wlp3s0'";
wifi_device = "'wlp3s0'"; battery_device = "'BAT0'";
battery_device = "'BAT0'"; };
}; terminal = "alacritty";
terminal = "alacritty"; };
}; services.picom.enable = false;
services.picom.enable = false; programs.rofi.enable = true;
programs = {
rofi.enable = true;
kitty.enable = true;
};
} }

View File

@ -17,6 +17,9 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
services.nginx.enable = true;
services.nix-serve.enable = true;
home-manager.users = home-manager.users =
flakeLib.mkNixosHomeConfiguration { flakeLib.mkNixosHomeConfiguration {
inherit vars system; inherit vars system;
@ -26,7 +29,5 @@
vars = vars // {username = "kodi";}; vars = vars // {username = "kodi";};
}; };
services.nginx.enable = true;
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }