Compare commits
4 Commits
d6c9f9a2a2
...
750fb580e1
Author | SHA1 | Date | |
---|---|---|---|
750fb580e1 | |||
dd1ef4cf6c | |||
09da72a0bf | |||
20465229ed |
32
flake.nix
32
flake.nix
@ -11,7 +11,6 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# TODO once i have a better way to manage multiarch packages
|
||||
# 33.0.3p2 as suggested by https://xdaforums.com/t/guide-january-3-2024-root-pixel-7-pro-unlock-bootloader-pass-safetynet-both-slots-bootable-more.4505353/
|
||||
# android tools versions [ 34.0.0, 34.0.5 ) causes bootloops somehow and 34.0.5 isn't in nixpkgs yet
|
||||
pkg-android-tools.url = "github:NixOS/nixpkgs/55070e598e0e03d1d116c49b9eff322ef07c6ac6";
|
||||
@ -48,7 +47,19 @@
|
||||
# This function produces a module that adds the home-manager module to the
|
||||
# system and configures the given module to the user's Home Manager
|
||||
# configuration
|
||||
homeManagerInit = {system, username ? _username , module}: { config, lib, pkgs, ... }: {
|
||||
homeManagerInit = {system, username ? _username , module ? _ : {}, userModules ? { ${username} = [ module ] ;}, stateVersion }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
mapUserModules = lib.attrsets.mapAttrs (user: modules: {...}:
|
||||
{
|
||||
imports = modules;
|
||||
config = {
|
||||
home = { inherit stateVersion; };
|
||||
};
|
||||
});
|
||||
users = mapUserModules userModules;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
@ -56,7 +67,7 @@
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.${username} = module;
|
||||
inherit users;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs vars;
|
||||
extraPkgs = mkExtraPkgs system;
|
||||
@ -66,14 +77,23 @@
|
||||
|
||||
# This function produces a nixosSystem which imports configuration.nix and
|
||||
# a Home Manager home.nix for the given user from ./hosts/${hostname}/
|
||||
mkSystem = {system, hostname, username ? _username}:
|
||||
mkSystem = {system, hostname, username ? _username, stateVersion}:
|
||||
lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
({pkgs, config, lib, ...}@args:
|
||||
{
|
||||
# Values for every single system that would not conceivably need
|
||||
# to be made modular
|
||||
system.stateVersion = stateVersion;
|
||||
# not having the freedom to install unfree programs is unfree
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix.settings.experimental-features = ["nix-command" "flakes" ];
|
||||
})
|
||||
./hosts/${hostname}/configuration.nix
|
||||
(homeManagerInit {
|
||||
module = import ./hosts/${hostname}/home.nix;
|
||||
inherit username system;
|
||||
inherit username system stateVersion;
|
||||
})
|
||||
];
|
||||
specialArgs = {
|
||||
@ -110,6 +130,7 @@
|
||||
(homeManagerInit {
|
||||
module = import ./hosts/slab/home.nix;
|
||||
inherit system;
|
||||
stateVersion = "23.11";
|
||||
})
|
||||
];
|
||||
specialArgs = {
|
||||
@ -128,6 +149,7 @@
|
||||
(homeManagerInit {
|
||||
module = import ./hosts/nullbox/home.nix;
|
||||
inherit system;
|
||||
stateVersion = "23.11";
|
||||
})
|
||||
];
|
||||
};
|
||||
|
2
home/root.nix
Normal file
2
home/root.nix
Normal file
@ -0,0 +1,2 @@
|
||||
{ config, lib, pkgs, ... }@args:
|
||||
{ }
|
@ -1,5 +1,8 @@
|
||||
{ config, lib, pkgs, ...}:
|
||||
|
||||
let
|
||||
sleep = "${pkgs.coreutils}/bin/sleep";
|
||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./desktop-common.nix
|
||||
@ -10,6 +13,26 @@
|
||||
services.xserver.displayManager.defaultSession = "plasmawayland";
|
||||
programs.kdeconnect.enable = true;
|
||||
|
||||
# systemd.user.targets.plasma-core.unitConfig.Upholds = [ "restart-xdg-desktop-portal.service" ];
|
||||
systemd.user.targets.graphical-session.unitConfig.Wants = [ "restart-xdg-desktop-portal-kde.service" ];
|
||||
systemd.user = {
|
||||
services.restart-xdg-desktop-portal-kde = {
|
||||
enable = true;
|
||||
description = "hack to fix xdg-desktop-portal on kde";
|
||||
# wantedBy = [ "plasma-core.target" ];
|
||||
after = [ "plasma-core.target" "xdg-desktop-portal.service" ];
|
||||
requisite = [ "plasma-core.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = [
|
||||
"${sleep} 5"
|
||||
"${systemctl} --user restart xdg-desktop-portal.service"
|
||||
];
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# this fixes tiny file dialogs for Minecraft
|
||||
libsForQt5.kdialog
|
||||
|
Loading…
x
Reference in New Issue
Block a user