6 Commits

9 changed files with 181 additions and 8 deletions
Generated
+24
View File
@@ -221,6 +221,29 @@
"type": "github" "type": "github"
} }
}, },
"plasma-manager": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1772361940,
"narHash": "sha256-B1Cz+ydL1iaOnGlwOFld/C8lBECPtzhiy/pP93/CuyY=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "a4b33606111c9c5dcd10009042bb710307174f51",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "plasma-manager",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"clan-core": "clan-core", "clan-core": "clan-core",
@@ -230,6 +253,7 @@
"import-tree": "import-tree", "import-tree": "import-tree",
"liminix": "liminix", "liminix": "liminix",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"plasma-manager": "plasma-manager",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
} }
}, },
+5
View File
@@ -19,6 +19,11 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
}; };
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
import-tree.url = "github:vic/import-tree"; import-tree.url = "github:vic/import-tree";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
treefmt-nix = { treefmt-nix = {
+18
View File
@@ -1,3 +1,8 @@
{ config, ... }:
let
username = "emmie";
userhome = "/home/${username}";
in
{ {
clan.inventory = { clan.inventory = {
tags = { tags = {
@@ -12,6 +17,11 @@
}; };
roles.peer.tags.emmie = { }; roles.peer.tags.emmie = { };
roles.peer.settings = { roles.peer.settings = {
folders = {
Syncthing = {
path = "${userhome}/Share/Syncthing";
};
};
extraDevices = { extraDevices = {
pixel7a = { pixel7a = {
id = "CEUJMEG-SOHXIJF-G2FT5QB-6MZW3EN-PONI3QN-HPEIOSU-IMSLGW7-XUU6BQK"; id = "CEUJMEG-SOHXIJF-G2FT5QB-6MZW3EN-PONI3QN-HPEIOSU-IMSLGW7-XUU6BQK";
@@ -20,6 +30,14 @@
}; };
}; };
}; };
roles.peer.extraModules = [
{
config.services.syncthing = {
user = username;
dataDir = "${userhome}/Share";
};
}
];
}; };
}; };
}; };
+1 -6
View File
@@ -14,14 +14,9 @@
instances = { instances = {
emmie-home = { emmie-home = {
module = { module = {
name = "home-user"; name = "emmie-home";
input = "self"; input = "self";
}; };
roles.default.settings = {
username = "emmie";
kbLayout = "us,th";
kbOptions = "grp:win_space_toggle,grp:alt_shift_toggle";
};
roles.default.machines."rana" = { }; roles.default.machines."rana" = { };
}; };
chocolate-home = { chocolate-home = {
+1 -1
View File
@@ -22,7 +22,7 @@
"installedAt": 1765343708 "installedAt": 1765343708
}, },
"rana": { "rana": {
"installedAt": 1768294839 "installedAt": 1773134236
}, },
"petra": { "petra": {
"installedAt": 1769064458 "installedAt": 1769064458
+3
View File
@@ -53,6 +53,9 @@ in
zroot = { zroot = {
type = "zpool"; type = "zpool";
rootFsOptions = { rootFsOptions = {
encryption = "aes-256-gcm";
keyformat = "passphrase";
keylocation = "file:///tmp/secret.key";
mountpoint = "none"; mountpoint = "none";
compression = "lz4"; compression = "lz4";
acltype = "posixacl"; acltype = "posixacl";
@@ -2,5 +2,6 @@
{ {
clan.modules = { clan.modules = {
home-user = lib.modules.importApply ./home-user { }; home-user = lib.modules.importApply ./home-user { };
emmie-home = lib.modules.importApply ./home-user/emmie.nix { };
}; };
} }
@@ -0,0 +1,127 @@
{ ... }:
{
_class = "clan.service";
manifest.name = "emmie-home-manager";
manifest.description = "Emmie's home-manager profile generator";
manifest.readme = "Emmie's home-manager profile generator";
manifest.categories = [ "System" ];
roles.default = {
description = "a default role for the user";
perInstance =
{ ... }:
{
nixosModule =
{ inputs, pkgs, ... }:
let
username = "emmie";
in
{
imports = [ inputs.home-manager.nixosModules.home-manager ];
users.users.${username} = {
initialPassword = "";
isNormalUser = true;
extraGroups = [
"audio"
"video"
"networkmanager"
];
};
services.xserver = {
enable = true;
xkb.layout = "us,th";
xkb.options = "grp:win_space_toggle,grp:alt_shift_toggle";
};
programs.chromium = {
enable = true;
extraOpts = {
"BlockThirdPartyCookies" = true;
"ClearBrowsingDataOnExitList" = [
"download_history"
"cookies_and_other_site_data"
"cached_images_and_files"
"password_signin"
"autofill"
"site_settings"
"hosted_app_data"
];
"BraveRewardsDisabled" = true;
"BraveWalletDisabled" = true;
"BraveAIChatEnabled" = false;
"BraveNewsDisabled" = true;
"BraveSpeedreaderEnabled" = false;
"BraveWaybackMachineEnabled" = false;
"BraveStatsPingEnabled" = false;
"BraveWebDiscoveryEnabled" = false;
"BravePlaylistEnabled" = false;
"BraveVPNDisabled" = true;
"TorDisabled" = true;
"BraveP3AEnabled" = false;
"BraveTalkDisabled" = true;
"SyncDisabled" = false;
"PasswordManagerEnabled" = false;
"AutofillAddressEnabled" = false;
"AutofillCreditCardEnabled" = false;
"TranslateEnabled" = false;
"DnsOverHttpsMode" = "secure";
"DnsOverHttpsTemplates" = "https://dns.adguard-dns.com/dns-query";
};
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} =
{
osConfig,
pkgs,
lib,
inputs,
...
}:
{
imports = [ inputs.plasma-manager.homeModules.plasma-manager ];
home = {
homeDirectory = lib.mkForce "/home/${username}";
stateVersion = osConfig.system.stateVersion;
packages = with pkgs; [
libreoffice-fresh
element-desktop
signal-desktop
brave
keepassxc
vlc
thunderbird
wasabiwallet
protonmail-desktop
];
};
programs.chromium.package = pkgs.brave;
programs.home-manager.enable = true;
services.syncthing.tray.enable = osConfig.services.syncthing.enable;
programs.plasma.enable = true;
programs.plasma.powerdevil = {
AC = {
autoSuspend.action = "shutDown";
autoSuspend.idleTimeout = 1800;
};
battery = {
autoSuspend.action = "shutDown";
autoSuspend.idleTimeout = 1800;
};
lowBattery = {
autoSuspend.action = "shutDown";
autoSuspend.idleTimeout = 1800;
};
};
};
home-manager.extraSpecialArgs = {
inherit inputs;
};
};
};
};
}
+1 -1
View File
@@ -4,7 +4,7 @@
security.polkit.extraConfig = '' security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) { polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.accounts.change-own-password")) { if ((action.id == "org.freedesktop.accounts.change-own-password")) {
return polkit.Result.AUTH_SELF; return polkit.Result.YES;
} }
}); });
''; '';