Compare commits
12 Commits
nix-openwr
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| aa3db27c77 | |||
| 44210e6bbb | |||
| 984d587d00 | |||
| 79be24d581 | |||
| 1518cd7db6 | |||
| ac7117c13d | |||
| 38d13f2fa7 | |||
| 8b1ae80c54 | |||
| 1f867808d2 | |||
| d8b20caf22 | |||
| fc2da628e8 | |||
| d4826d803e |
30
flake.lock
generated
30
flake.lock
generated
@@ -207,11 +207,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772173633,
|
"lastModified": 1774794121,
|
||||||
"narHash": "sha256-MOH58F4AIbCkh6qlQcwMycyk5SWvsqnS/TCfnqDlpj4=",
|
"narHash": "sha256-gih24b728CK8twDNU7VX9vVYK2tLEXvy9gm/GKq2VeE=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c0f3d81a7ddbc2b1332be0d8481a672b4f6004d6",
|
"rev": "c397ef6af68c018462d786e1b65384abc472a907",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -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"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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 = {
|
||||||
|
|||||||
@@ -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";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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 = {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"installedAt": 1765343708
|
"installedAt": 1765343708
|
||||||
},
|
},
|
||||||
"rana": {
|
"rana": {
|
||||||
"installedAt": 1768294839
|
"installedAt": 1773134236
|
||||||
},
|
},
|
||||||
"petra": {
|
"petra": {
|
||||||
"installedAt": 1769064458
|
"installedAt": 1769064458
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ self, ... }:
|
{ self, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
self.nixosModules.common
|
self.nixosModules.common
|
||||||
@@ -9,4 +9,12 @@
|
|||||||
};
|
};
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
clan.core.sops.defaultGroups = [ "admins" ];
|
clan.core.sops.defaultGroups = [ "admins" ];
|
||||||
|
|
||||||
|
boot.kernelParams = [
|
||||||
|
"amdgpu.dcdebugmask=0x10"
|
||||||
|
"amdgpu.cwsr_enable=0"
|
||||||
|
"amdgpu.gpu_recovery=1"
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_12;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -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 { };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
127
modules/clan/home-profiles/home-user/emmie.nix
Normal file
127
modules/clan/home-profiles/home-user/emmie.nix
Normal file
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -22,11 +22,27 @@ let
|
|||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
environment.systemPackages = [ pkgs.simple-scan ];
|
||||||
|
nixpkgs.config.allowUnfreePredicate =
|
||||||
|
pkg:
|
||||||
|
builtins.elem (lib.getName pkg) [
|
||||||
|
"brgenml1lpr"
|
||||||
|
"cups-brother-dcpt310"
|
||||||
|
"cups-brother-dcpt720dw"
|
||||||
|
"cups-brother-dcpt725dw"
|
||||||
|
];
|
||||||
|
# nixpkgs.config.allowUnfree = true;
|
||||||
|
services.ipp-usb.enable = true;
|
||||||
services.printing = {
|
services.printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
drivers = [
|
drivers = [
|
||||||
pkgs.brlaser
|
pkgs.brlaser
|
||||||
pkgs.gutenprint
|
pkgs.gutenprint
|
||||||
|
pkgs.brgenml1lpr
|
||||||
|
pkgs.brgenml1cupswrapper
|
||||||
|
pkgs.cups-brother-dcpt310
|
||||||
|
pkgs.cups-brother-dcpt720dw
|
||||||
|
pkgs.cups-brother-dcpt725dw
|
||||||
];
|
];
|
||||||
|
|
||||||
extraFilesConf = ''
|
extraFilesConf = ''
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user