mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 10:05:13 -05:00
refactor: cleaned up nixos and home dirs
This commit is contained in:
parent
824a91d405
commit
e596e1c1b3
582 changed files with 2 additions and 22 deletions
3
modules/nixos/core/accounts/default.nix
Executable file
3
modules/nixos/core/accounts/default.nix
Executable file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.accounts-daemon.enable = true;
|
||||
}
|
10
modules/nixos/core/default.nix
Executable file
10
modules/nixos/core/default.nix
Executable file
|
@ -0,0 +1,10 @@
|
|||
let
|
||||
content = builtins.readDir ./.;
|
||||
|
||||
dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content);
|
||||
|
||||
importList = map (name: ./. + "/${name}") dirContent;
|
||||
in
|
||||
{
|
||||
imports = importList;
|
||||
}
|
44
modules/nixos/core/doas/default.nix
Executable file
44
modules/nixos/core/doas/default.nix
Executable file
|
@ -0,0 +1,44 @@
|
|||
{ flake, config, ... }:
|
||||
let
|
||||
inherit (flake.config.people)
|
||||
user0
|
||||
user1
|
||||
user2
|
||||
;
|
||||
inherit (flake.config.machines)
|
||||
devices
|
||||
;
|
||||
hostname = config.networking.hostName;
|
||||
desktop = devices.desktop.name;
|
||||
server = devices.server.name;
|
||||
fallaryn = devices.fallaryn.name;
|
||||
bartholomew = devices.bartholomew.name;
|
||||
in
|
||||
{
|
||||
security = {
|
||||
doas = {
|
||||
enable = true;
|
||||
extraRules = [
|
||||
{
|
||||
keepEnv = true;
|
||||
noPass = true;
|
||||
users = [
|
||||
(
|
||||
if hostname == desktop then
|
||||
user0
|
||||
else if hostname == server then
|
||||
user0
|
||||
else if hostname == bartholomew then
|
||||
user1
|
||||
else if hostname == fallaryn then
|
||||
user2
|
||||
else
|
||||
""
|
||||
)
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
# sudo.enable = false;
|
||||
};
|
||||
}
|
30
modules/nixos/core/environment/default.nix
Executable file
30
modules/nixos/core/environment/default.nix
Executable file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
environment = {
|
||||
enableAllTerminfo = true;
|
||||
systemPackages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
git
|
||||
grim
|
||||
pijul
|
||||
sshfs
|
||||
tomb
|
||||
just
|
||||
virt-manager
|
||||
;
|
||||
};
|
||||
variables = {
|
||||
VIDEO_PLAYER = "mpv";
|
||||
EDITOR = "hx";
|
||||
TERM = "ghostty";
|
||||
NIXPKGS_ALLOW_INSECURE = "1";
|
||||
NIXPKGS_ALLOW_UNFREE = "1";
|
||||
GTK_THEME = "catppuccin-macchiato-mauve-compact";
|
||||
# ANTHROPIC_API_KEY = config.sops.secrets.claude-api-key.path;
|
||||
};
|
||||
};
|
||||
}
|
3
modules/nixos/core/flatpak/default.nix
Executable file
3
modules/nixos/core/flatpak/default.nix
Executable file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.flatpak.enable = true;
|
||||
}
|
107
modules/nixos/core/fonts/default.nix
Executable file
107
modules/nixos/core/fonts/default.nix
Executable file
|
@ -0,0 +1,107 @@
|
|||
{
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.aesthetics.themes)
|
||||
fonts
|
||||
;
|
||||
in
|
||||
{
|
||||
fonts = {
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
serif = [
|
||||
fonts.names.name0
|
||||
];
|
||||
monospace = [
|
||||
fonts.names.name0
|
||||
];
|
||||
sansSerif = [
|
||||
fonts.names.name0
|
||||
];
|
||||
emoji = [
|
||||
"Noto Fonts Color Emoji"
|
||||
];
|
||||
};
|
||||
antialias = true;
|
||||
};
|
||||
packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
noto-fonts-color-emoji
|
||||
dosis
|
||||
iosevka
|
||||
;
|
||||
inherit (pkgs.nerd-fonts)
|
||||
_0xproto
|
||||
_3270
|
||||
agave
|
||||
anonymice
|
||||
arimo
|
||||
aurulent-sans-mono
|
||||
bigblue-terminal
|
||||
bitstream-vera-sans-mono
|
||||
blex-mono
|
||||
caskaydia-cove
|
||||
caskaydia-mono
|
||||
code-new-roman
|
||||
comic-shanns-mono
|
||||
commit-mono
|
||||
cousine
|
||||
d2coding
|
||||
daddy-time-mono
|
||||
dejavu-sans-mono
|
||||
departure-mono
|
||||
droid-sans-mono
|
||||
envy-code-r
|
||||
fantasque-sans-mono
|
||||
fira-code
|
||||
fira-mono
|
||||
geist-mono
|
||||
go-mono
|
||||
gohufont
|
||||
hack
|
||||
hasklug
|
||||
heavy-data
|
||||
hurmit
|
||||
im-writing
|
||||
inconsolata
|
||||
inconsolata-go
|
||||
inconsolata-lgc
|
||||
intone-mono
|
||||
iosevka-term
|
||||
iosevka-term-slab
|
||||
jetbrains-mono
|
||||
lekton
|
||||
liberation
|
||||
lilex
|
||||
martian-mono
|
||||
monaspace
|
||||
monofur
|
||||
monoid
|
||||
mononoki
|
||||
mplus
|
||||
noto
|
||||
open-dyslexic
|
||||
overpass
|
||||
profont
|
||||
proggy-clean-tt
|
||||
recursive-mono
|
||||
roboto-mono
|
||||
sauce-code-pro
|
||||
shure-tech-mono
|
||||
space-mono
|
||||
symbols-only
|
||||
terminess-ttf
|
||||
tinos
|
||||
ubuntu
|
||||
ubuntu-mono
|
||||
ubuntu-sans
|
||||
victor-mono
|
||||
zed-mono
|
||||
;
|
||||
};
|
||||
};
|
||||
}
|
13
modules/nixos/core/homeManager/default.nix
Executable file
13
modules/nixos/core/homeManager/default.nix
Executable file
|
@ -0,0 +1,13 @@
|
|||
{ flake, ... }:
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = {
|
||||
inherit
|
||||
flake
|
||||
;
|
||||
};
|
||||
};
|
||||
}
|
30
modules/nixos/core/locale/default.nix
Executable file
30
modules/nixos/core/locale/default.nix
Executable file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
time.timeZone = "America/Winnipeg";
|
||||
|
||||
i18n =
|
||||
let
|
||||
locale = "en_CA.UTF-8";
|
||||
in
|
||||
{
|
||||
defaultLocale = locale;
|
||||
|
||||
extraLocaleSettings = builtins.listToAttrs (
|
||||
map
|
||||
(option: {
|
||||
name = option;
|
||||
value = locale;
|
||||
})
|
||||
[
|
||||
"LC_ADDRESS"
|
||||
"LC_IDENTIFICATION"
|
||||
"LC_MEASUREMENT"
|
||||
"LC_MONETARY"
|
||||
"LC_NAME"
|
||||
"LC_NUMERIC"
|
||||
"LC_PAPER"
|
||||
"LC_TELEPHONE"
|
||||
"LC_TIME"
|
||||
]
|
||||
);
|
||||
};
|
||||
}
|
5
modules/nixos/core/nh/default.nix
Executable file
5
modules/nixos/core/nh/default.nix
Executable file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
47
modules/nixos/core/nix/default.nix
Executable file
47
modules/nixos/core/nix/default.nix
Executable file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"electron-unwrapped-33.0.2"
|
||||
"electron-31.7.7"
|
||||
"electron-27.3.11"
|
||||
"olm-3.2.16"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
'';
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 10d";
|
||||
};
|
||||
settings = {
|
||||
substituters = [
|
||||
];
|
||||
trusted-public-keys = [
|
||||
];
|
||||
};
|
||||
};
|
||||
# Print package list
|
||||
environment.etc."current-system-packages".text =
|
||||
let
|
||||
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
|
||||
|
||||
sortedUnique = builtins.sort builtins.lessThan (lib.unique packages);
|
||||
|
||||
formatted = builtins.concatStringsSep "\n" sortedUnique;
|
||||
in
|
||||
formatted;
|
||||
}
|
3
modules/nixos/core/rsync/default.nix
Executable file
3
modules/nixos/core/rsync/default.nix
Executable file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.rsyncd.enable = true;
|
||||
}
|
44
modules/nixos/core/ssh/default.nix
Executable file
44
modules/nixos/core/ssh/default.nix
Executable file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.people)
|
||||
user0
|
||||
user1
|
||||
user2
|
||||
;
|
||||
inherit (flake.config.people.users.${userLogic})
|
||||
sshKeys
|
||||
;
|
||||
inherit (flake.config.machines)
|
||||
devices
|
||||
;
|
||||
hostname = config.networking.hostName;
|
||||
desktop = devices.desktop.name;
|
||||
server = devices.server.name;
|
||||
fallaryn = devices.fallaryn.name;
|
||||
bartholomew = devices.bartholomew.name;
|
||||
|
||||
userLogic =
|
||||
if hostname == desktop then
|
||||
user0
|
||||
else if hostname == server then
|
||||
user0
|
||||
else if hostname == fallaryn then
|
||||
user2
|
||||
else
|
||||
"";
|
||||
in
|
||||
{
|
||||
users.users =
|
||||
if hostname == bartholomew then
|
||||
{ }
|
||||
else
|
||||
{
|
||||
${userLogic} = {
|
||||
openssh.authorizedKeys.keys = sshKeys;
|
||||
};
|
||||
};
|
||||
}
|
5
modules/nixos/core/sysStat/default.nix
Executable file
5
modules/nixos/core/sysStat/default.nix
Executable file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
services.sysstat = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
1
modules/nixos/core/system/default.nix
Executable file
1
modules/nixos/core/system/default.nix
Executable file
|
@ -0,0 +1 @@
|
|||
_: { }
|
Loading…
Add table
Add a link
Reference in a new issue