probably broken
237
flake.nix
@@ -11,12 +11,6 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-on-droid = {
|
||||
url = "github:nix-community/nix-on-droid";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -41,154 +35,151 @@
|
||||
|
||||
#nixvim.url = "git+https://gitea.esotericbytes.com/Blunkall-Technologies/Moirai";
|
||||
nixvim.url = "git+ssh://gitea@gitea.esotericbytes.com/Blunkall-Technologies/Moirai";
|
||||
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... } @ inputs: {
|
||||
|
||||
profiles = let
|
||||
dir = builtins.readDir ./system/profiles;
|
||||
filtered = builtins.filter (x: dir.${x} == "directory") (builtins.attrNames dir);
|
||||
in (builtins.listToAttrs
|
||||
(builtins.map
|
||||
(name: ({
|
||||
inherit name;
|
||||
|
||||
nixosConfigurations = {
|
||||
|
||||
homebox = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan = import ./home-manager/users/nathan;
|
||||
home-manager-config = import ./home-manager;
|
||||
inherit self;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/homebox
|
||||
./system-config
|
||||
value = { ... }: {
|
||||
imports = [
|
||||
./system
|
||||
./system/profiles/${name}
|
||||
];
|
||||
};
|
||||
})) filtered)
|
||||
);
|
||||
|
||||
laptop = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan = import ./home-manager/users/nathan;
|
||||
home-manager-config = import ./home-manager;
|
||||
inherit self;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/laptop
|
||||
./system-config
|
||||
homes = let
|
||||
dir = builtins.readDir ./system/users;
|
||||
filtered = builtins.filter (x: dir.${x} == "directory") (builtins.attrNames dir);
|
||||
in (builtins.listToAttrs
|
||||
(builtins.map
|
||||
(name: ({
|
||||
inherit name;
|
||||
|
||||
value = { ... }: {
|
||||
imports = [
|
||||
./system/users/${name}/home-manager
|
||||
];
|
||||
};
|
||||
})) filtered)
|
||||
);
|
||||
|
||||
jesstop = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/jesstop
|
||||
./system-config
|
||||
];
|
||||
};
|
||||
|
||||
pi4 = {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan = import ./home-manager/users/nathan;
|
||||
home-manager-config = import ./home-manager;
|
||||
inherit self;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/pi4
|
||||
./system-config
|
||||
];
|
||||
};
|
||||
|
||||
live = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan = import ./home-manager/users/nathan;
|
||||
home-manager-config = import ./home-manager;
|
||||
inherit self;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/live
|
||||
./system-config
|
||||
];
|
||||
};
|
||||
|
||||
container = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan = import ./home-manager/users/nathan;
|
||||
home-manager-config = import ./home-manager;
|
||||
inherit self;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/containers/nathan
|
||||
./system-config
|
||||
];
|
||||
};
|
||||
|
||||
iso = nixpkgs.lib.nixosSystem {
|
||||
iso = (nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan = import ./home-manager/users/nathan;
|
||||
home-manager-config = import ./home-manager;
|
||||
nathan = self.homes.nathan;
|
||||
inherit self;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./system-config/configuration/iso
|
||||
./system-config
|
||||
self.profiles.iso
|
||||
];
|
||||
};
|
||||
}).config.system.build.isoImage;
|
||||
|
||||
templates = {
|
||||
nixos = {
|
||||
welcomeText = ''
|
||||
#Welcome to Olympus!
|
||||
Have Fun!
|
||||
'';
|
||||
|
||||
description = ''
|
||||
Generate this where you want your config.
|
||||
'';
|
||||
|
||||
source = ./templates/nixos;
|
||||
|
||||
};
|
||||
|
||||
nixOnDroidConfigurations.default = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = "aarch64-linux";
|
||||
overlays = [ inputs.nix-on-droid.overlays.default ];
|
||||
home-manager = {
|
||||
welcomeText = ''
|
||||
#Welcome to Olympus!
|
||||
Have Fun!
|
||||
'';
|
||||
|
||||
description = ''
|
||||
Generate this where you want your config.
|
||||
'';
|
||||
|
||||
source = ./templates/home-manager;
|
||||
|
||||
};
|
||||
|
||||
modules = [
|
||||
./system-config/configuration/android
|
||||
];
|
||||
nix-on-droid = {
|
||||
welcomeText = ''
|
||||
#Welcome to Olympus!
|
||||
Have Fun!
|
||||
'';
|
||||
|
||||
description = ''
|
||||
Generate this where you want your config.
|
||||
'';
|
||||
|
||||
source = ./templates/nix-on-droid;
|
||||
|
||||
extraSpecialArgs = {
|
||||
inputs = inputs // {
|
||||
nathan = import ./home-manager/users/nathan;
|
||||
home-manager-config = import ./home-manager;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
machines = let
|
||||
dir = builtins.readDir ./machines;
|
||||
filtered = builtins.filter (x: dir.${x} == "directory") (builtins.attrNames dir);
|
||||
in (builtins.listToAttrs
|
||||
(builtins.map
|
||||
(name: ({
|
||||
inherit name;
|
||||
|
||||
homeConfigurations = {
|
||||
nathan = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = builtins.currentSystem;
|
||||
value = {
|
||||
welcomeText = ''
|
||||
#Welcome to Olympus!
|
||||
|
||||
##Warning:
|
||||
This is a config for ${name}, an established machine!
|
||||
It may require significant alterations to be usable!
|
||||
'';
|
||||
|
||||
description = ''
|
||||
Generate this where you want your config.
|
||||
'';
|
||||
|
||||
source = ./machines/${name};
|
||||
};
|
||||
|
||||
modules = [
|
||||
./home-manager
|
||||
{
|
||||
homeconfig = {
|
||||
username = "nathan";
|
||||
graphical = false;
|
||||
minimal = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
})) filtered)
|
||||
);
|
||||
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
homes = let
|
||||
dir = builtins.readDir ./homes;
|
||||
filtered = builtins.filter (x: dir.${x} == "directory") (builtins.attrNames dir);
|
||||
in (builtins.listToAttrs
|
||||
(builtins.map
|
||||
(name: ({
|
||||
inherit name;
|
||||
|
||||
value = {
|
||||
welcomeText = ''
|
||||
#Welcome home, ${name}!
|
||||
Your config is right here.
|
||||
'';
|
||||
|
||||
description = ''
|
||||
Generate this where you want your config.
|
||||
'';
|
||||
|
||||
source = ./homes/${name};
|
||||
};
|
||||
|
||||
iso = self.nixosConfigurations.iso.config.system.build.isoImage;
|
||||
})) filtered)
|
||||
);
|
||||
|
||||
default = self.templates.nixos;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
imports = [
|
||||
];
|
||||
|
||||
options.homeconfig = with lib; {
|
||||
host = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
graphical = mkOption {
|
||||
type = with types; bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
standalone.enable = mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
home.username = lib.mkDefault config.homeconfig.name;
|
||||
|
||||
home.homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||
|
||||
programs.home-manager.enable = config.homeconfig.standalone.enable;
|
||||
};
|
||||
}
|
||||
40
homes/nathan/flake.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
|
||||
description = "Home-Manager Configuration";
|
||||
|
||||
inputs = {
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
olympus = {
|
||||
url = "git+ssh://gitea@esotericbytes.com/Blunkall-Technologies/Olympus";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, olympus, ... } @ inputs: {
|
||||
|
||||
homeConfigurations = {
|
||||
nathan = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = builtins.currentSystem;
|
||||
};
|
||||
|
||||
modules = [
|
||||
olympus.homes.nathan
|
||||
./home.nix
|
||||
];
|
||||
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
11
homes/nathan/home.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
|
||||
config = {
|
||||
homeconfig = {
|
||||
graphical = false;
|
||||
minimal = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
33
machines/android/.sops.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
keys:
|
||||
- &homebox age1640eg0pnmkruc89m5xguz0m8fek44fl4tzez6qwuzlz6kmapqewsp8esxd
|
||||
- &laptop age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q
|
||||
- &android age12pnf36uqesjmy3e0lythfnpwam3zg5mv8m936fc4jphy4ces2fdqwn0s74
|
||||
creation_rules:
|
||||
- path_regex: homebox/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *homebox
|
||||
- path_regex: laptop/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
- path_regex: pi4/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
- path_regex: live/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
- path_regex: nathan/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
- *homebox
|
||||
- *android
|
||||
- path_regex: system-config/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
- *homebox
|
||||
- *android
|
||||
@@ -19,7 +19,7 @@
|
||||
];
|
||||
config = { config, lib, pkgs, ... }: {
|
||||
imports = [
|
||||
inputs.nathan
|
||||
inputs.olympus.homes.nathan
|
||||
];
|
||||
config = {
|
||||
homeconfig = {
|
||||
47
machines/android/flake.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
|
||||
description = "System Configuration";
|
||||
|
||||
inputs = {
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-on-droid = {
|
||||
url = "github:nix-community/nix-on-droid";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
|
||||
olympus = {
|
||||
url = "git+ssh://gitea@esotericbytes.com/Blunkall-Technologies/Olympus";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, olympus, ... } @ inputs: let
|
||||
host = "laptop";
|
||||
|
||||
in {
|
||||
|
||||
nixOnDroidConfigurations.default = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = "aarch64-linux";
|
||||
overlays = [ inputs.nix-on-droid.overlays.default ];
|
||||
};
|
||||
|
||||
modules = [
|
||||
./configuration.nix
|
||||
];
|
||||
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
33
machines/laptop/.sops.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
keys:
|
||||
- &homebox age1640eg0pnmkruc89m5xguz0m8fek44fl4tzez6qwuzlz6kmapqewsp8esxd
|
||||
- &laptop age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q
|
||||
- &android age12pnf36uqesjmy3e0lythfnpwam3zg5mv8m936fc4jphy4ces2fdqwn0s74
|
||||
creation_rules:
|
||||
- path_regex: homebox/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *homebox
|
||||
- path_regex: laptop/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
- path_regex: pi4/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
- path_regex: live/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
- path_regex: nathan/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
- *homebox
|
||||
- *android
|
||||
- path_regex: system-config/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *laptop
|
||||
- *homebox
|
||||
- *android
|
||||
99
machines/laptop/configuration.nix
Normal file
@@ -0,0 +1,99 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = true;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
prime = {
|
||||
# Make sure to use the correct Bus ID values for your system!
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
# WARNING: sync and offload are mutually exclusive.
|
||||
# You can only pick one!!
|
||||
#sync.enable = true;
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
secrets = {
|
||||
"nathan/pass" = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sysconfig = {
|
||||
users = {
|
||||
nathan = {
|
||||
isSuperuser = true;
|
||||
extraGroups = [ "networkmanager" ];
|
||||
hashedPasswordFile = config.sops.secrets."nathan/pass".path;
|
||||
shell = pkgs.zsh;
|
||||
home-manager = {
|
||||
enable = true;
|
||||
standalone = false;
|
||||
extraModules = [
|
||||
{
|
||||
homeconfig = {
|
||||
minimal = false;
|
||||
hyprland.enable = true;
|
||||
hyprlock.enable = true;
|
||||
wal.enable = true;
|
||||
mpd.enable = true;
|
||||
hyprpanel.enable = true;
|
||||
calcurse.enable = true;
|
||||
rofi.enable = true;
|
||||
firefox.enable = true;
|
||||
git.enable = true;
|
||||
nh.enable = true;
|
||||
};
|
||||
|
||||
#monitor=eDP-1, addreserved, 40,0,0,0
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
monitor=eDP-1,1920x1080@60,0x0,1
|
||||
'';
|
||||
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
};
|
||||
|
||||
}
|
||||
38
machines/laptop/flake.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
|
||||
description = "System Configuration";
|
||||
|
||||
inputs = {
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
olympus = {
|
||||
url = "git+ssh://gitea@esotericbytes.com/Blunkall-Technologies/Olympus";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, olympus, ... }: let
|
||||
host = "laptop";
|
||||
|
||||
in {
|
||||
|
||||
nixosConfigurations."${host}" = nixpkgs.lib.nixosSystem {
|
||||
|
||||
specialArgs = {
|
||||
};
|
||||
|
||||
modules = [
|
||||
{ sysconfig.host = host; }
|
||||
./configuration.nix
|
||||
olympus.laptop
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ ... }: { config = {}; }
|
||||
@@ -1,41 +0,0 @@
|
||||
nathan:
|
||||
pass: ENC[AES256_GCM,data:hAqmFg==,iv:iw85yox2jdlpvF+a4c0wsXlN6rFd75Yf32nuove91hA=,tag:eoFowxaNogmwElnBs5vYGA==,type:str]
|
||||
authentik:
|
||||
pass: ENC[AES256_GCM,data:pTjpwRgdUVU5543T199P7Zoy,iv:93WpIK6qq+A1LhaQdBvMQ4jzuAOmMUt575y/p8m8Ugk=,tag:jTg/JED3vpdOVHF8LdIyLg==,type:str]
|
||||
secret_key: ENC[AES256_GCM,data:tIWDGtB/z7Ysizz9FPQJe2EeSTAxDPkeHJnaDfytDvbqvRaiCgg7qGpEF6hAQFdZ,iv:gloup5aI0qY+SYJt8V6lvUdE+18IWH09BXtz8dRi6JE=,tag:vFwF9h1Rsa/X1bjvdSRSfQ==,type:str]
|
||||
pihole:
|
||||
pass: ENC[AES256_GCM,data:hintZA==,iv:HA5K8mHYlLtf5s8iaLI/QRolYgcKwG8DWCH+LXnWI4k=,tag:DlnXxG0n9dBVpk2kILlPKg==,type:str]
|
||||
gitea:
|
||||
dbpass: ENC[AES256_GCM,data:hVRLXACRECNSnXRn8BEP0ZFT,iv:zuIvzStek6OEu+P4Nh8Wsq9eRVt/zP8KGVXYZWjSvW0=,tag:m4t8vKNGhz8NqkDWbCRgnA==,type:str]
|
||||
keycloak:
|
||||
dbpass: ENC[AES256_GCM,data:tc4wIAqzY7nonBhz8s+YdAux,iv:Wg0b0/xnl6cANLTOJWBsX+gw1iF8Q/GvO/iKyKwqJrM=,tag:LORKRmo4RjcrVbPNhk2A9Q==,type:str]
|
||||
netbird:
|
||||
coturnPass: ENC[AES256_GCM,data:zB6P9RyTTKkXEOIhOyeJuF4Y,iv:8SWVfcdmMnXQJxezu3uanrlmFhR+hxXEJ3T7KA+YZqE=,tag:1H21K3kbZOuLOdN2zufWJw==,type:str]
|
||||
gitlab:
|
||||
db_pass: ENC[AES256_GCM,data:N3KvXkXql/PDjxZSpGo/Apr/,iv:OOzhR4BEmV3T01PA50vqdJMg7D2OGKHn/8hiqKEaOd4=,tag:jzdonXH/D/5kZ5Cld2W//w==,type:str]
|
||||
root_pass: ENC[AES256_GCM,data:bALaUkoJw3N0ugZP/4MCnEsD,iv:LJdJpXlyzA6o00UVlK+l5WCCFIL/sT/fQNjI8wA5LAg=,tag:BYk1o/rjubyEpeHbgYA1Sg==,type:str]
|
||||
secrets:
|
||||
secret: ENC[AES256_GCM,data:3/26giCD58RErtEDxQ90KxRl3aa8oH4co2Urw21r7hHCKaoSti1VpYoBtlvHdr5j,iv:SwliwLWSFfTZoc31JSm9YKBDGKiPQE7ujkiGaZmCQUc=,tag:2KT5BpJukixvhb6tnZb6lw==,type:str]
|
||||
otp: ENC[AES256_GCM,data:RWOkQVPRsrJgPVtx49hiWRMAxVOszKxaDl40XQDL+QoDuoZi03wSxHiu4Ix9X2BR,iv:uO+CTR5S4r1q7n1ycQw0hYdu8JflSrvkgLiBbCmT8mk=,tag:gqCwNOqD78lFtgxUPyUw3A==,type:str]
|
||||
db: ENC[AES256_GCM,data:rF4IIp1uFSGa67LVm8fy4/qFOmZLInRcG2IAfnuZG3+xtS9Z2RXpNcTZNFBDdOaD,iv:/KYwf3ZH6w48L49rY/FmaGQOt3jGdOUTZ9vFhmLZG60=,tag:f38iYIgpgdjWF34qD1fz2w==,type:str]
|
||||
jws: ENC[AES256_GCM,data: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,iv:cxdargXx2a7pET7BjCSZ/yXL7AnxNqncyDQ7CR3E3AA=,tag:2xKXfhBjynDqlvH377lpSA==,type:str]
|
||||
oidc:
|
||||
id: ENC[AES256_GCM,data:b6o2cCCSXJ5bIhA47InfhqwjO5Tjr0Mls+7VT5cunFfEHkdOInxplw==,iv:txren/8jnAUvCI/k9cxN29ZkSgCuPEAo0IpyREf2E9A=,tag:BFOZrM18zUJMEACpLz7KRw==,type:str]
|
||||
secret: ENC[AES256_GCM,data:4HPPbVBOeDjdL81d402Rz6Luk1DZbk8InHfO+Sx/OJIvUf/shkCRyp3hStIDC03bA8HV66GeejvWFte+vQ2b5X3Fl2GXfHQi7brMFVEYfYdR2XRdra0aOeSrHtW5uUn0MpVCRwYDb1JahIWhLyqcYyOpV91xjNiIVg8S3MHr+mo=,iv:c3Q4qPMxZJuoO5XRzUDZh5XJOtff9eiMTlOx+MDMSaE=,tag:07fIkN9YXXJMEV59QEFIag==,type:str]
|
||||
nextcloud:
|
||||
pass: ENC[AES256_GCM,data:U/VI/uHDT1a5O4iAHUVwsz/h,iv:W0hAXBddFKhXmDWHpCB2JhjPPTEGer7721WtIRxg4Zo=,tag:OE4wzibNaaXsbfFuk0dwTA==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1640eg0pnmkruc89m5xguz0m8fek44fl4tzez6qwuzlz6kmapqewsp8esxd
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBDVFhtcWkreVV6UmJkcW1P
|
||||
WUluUTlOcjYzME1yVVNpVWJldXVsWG1vN3dNCmlvYURNV285anlIa3FrbXRVTERB
|
||||
dXZDWHhEbFp3YWw5d2w4Y09vbUVCNHcKLS0tIEF4ZU5ZdWI5MVBtN0FOUUZDQUR4
|
||||
S0NMRGJSeks0Q0UrVnZmUVdyU2NqVm8KLu2kQpD1fJdU0fTdR9A2cTQzRp+waJ6M
|
||||
8vA+E8xYb2U4d7m0YnwKkGzw0CBPb0BvdEgvWvqpFViftoDwRv5KGA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-07-29T21:54:33Z"
|
||||
mac: ENC[AES256_GCM,data:FdEOqSuTYZzl2T9QOJ3G+MlgZIvlLi3YhL9aOP3bws1N6MLfQcSgkQbhS4Nz4dQBpebOQ2OdT0QinFgXC7QyveiFefh1K1IxVAyRkwMd1xeCwbf2J/ERunCdJ7QsNh6pGJtTcv0h/gvviEVQ2S4FTmpFOjrLSUJI7kz92FI3vd4=,iv:1lOKQzHtG0kYcFLtn522uYrXE96Vq1a6qTj3/SkLSyI=,tag:69spH8TETUv3KYzH9eQcMA==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
||||
@@ -1,192 +0,0 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
inputs.home-manager.nixosModules.default
|
||||
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_6_16;
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = null;
|
||||
};
|
||||
kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
|
||||
};
|
||||
|
||||
systemd.extraConfig = "DefaultLimitNOFILE=2048";
|
||||
|
||||
/*specialisation = {
|
||||
docked.configuration = {
|
||||
home-manager.users.nathan.wayland.windowManager.hyprland.extraConfig = ''
|
||||
monitor=eDP-1,1920x1080@300,0x0,1
|
||||
'';
|
||||
};
|
||||
};*/
|
||||
|
||||
home-manager.users.nathan.wayland.windowManager.hyprland.extraConfig = /*lib.mkIf (config.specialisation != {})*/ ''
|
||||
monitor=eDP-1,1920x1080@60,0x0,1
|
||||
'';
|
||||
#monitor=eDP-1, addreserved, 40,0,0,0
|
||||
|
||||
hardware = {
|
||||
graphics.enable = true;
|
||||
|
||||
firmware = with pkgs; [
|
||||
sof-firmware
|
||||
];
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = true;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
prime = {
|
||||
# Make sure to use the correct Bus ID values for your system!
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
# WARNING: sync and offload are mutually exclusive.
|
||||
# You can only pick one!!
|
||||
#sync.enable = true;
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
#enable bluetooth
|
||||
bluetooth.enable = true;
|
||||
|
||||
};
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
alsa-utils
|
||||
];
|
||||
|
||||
sysconfig = {
|
||||
remoteBuildClient = true;
|
||||
host = "laptop";
|
||||
graphical = true;
|
||||
users = {
|
||||
nathan = {
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
hashedPasswordFile = config.sops.secrets."nathan/pass".path;
|
||||
shell = pkgs.zsh;
|
||||
home-manager = {
|
||||
enable = true;
|
||||
standalone = false;
|
||||
extraModules = [
|
||||
{
|
||||
homeconfig = {
|
||||
minimal = false;
|
||||
hyprland.enable = true;
|
||||
hyprlock.enable = true;
|
||||
wal.enable = true;
|
||||
mpd.enable = true;
|
||||
hyprpanel.enable = true;
|
||||
calcurse.enable = true;
|
||||
rofi.enable = true;
|
||||
firefox.enable = true;
|
||||
git.enable = true;
|
||||
nh.enable = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
sddm.enable = true;
|
||||
openssh.enable = false;
|
||||
pipewire.enable = true;
|
||||
netbird.enable = true;
|
||||
ollama.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
steam.enable = true;
|
||||
hyprpanel.enable = true;
|
||||
hyprland.enable = true;
|
||||
};
|
||||
|
||||
|
||||
virtualization = {
|
||||
|
||||
wyoming = {
|
||||
enable = false;
|
||||
};
|
||||
|
||||
homeassistant = {
|
||||
enable = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
videoDrivers = ["nvidia"];
|
||||
};
|
||||
|
||||
services.displayManager.enable = true;
|
||||
|
||||
services.avahi = {
|
||||
|
||||
enable = true;
|
||||
ipv4 = true;
|
||||
ipv6 = true;
|
||||
openFirewall = true;
|
||||
nssmdns4 = true;
|
||||
wideArea = true;
|
||||
|
||||
};
|
||||
|
||||
|
||||
environment.shells = with pkgs; [ zsh bashInteractive ];
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
programs.adb.enable = true;
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
|
||||
networking = {
|
||||
nameservers = [ "1.1.1.1" "1.0.0.1" ];
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/var/lib/sops/age/keys.txt";
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
secrets."nathan/pass".neededForUsers = true;
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [ nerd-fonts.fira-code ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@@ -105,11 +105,16 @@
|
||||
};
|
||||
|
||||
programs.ssh.extraConfig = ''
|
||||
Host blunkall.us
|
||||
HostName blunkall.us
|
||||
Host esotericbytes.com
|
||||
HostName esotericbytes.com
|
||||
Port 2222
|
||||
'';
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/var/lib/sops/age/keys.txt";
|
||||
defaultSopsFormat = "yaml";
|
||||
};
|
||||
|
||||
time.timeZone = lib.mkDefault "America/Chicago";
|
||||
|
||||
i18n = lib.mkDefault {
|
||||
117
system/profiles/laptop/default.nix
Normal file
@@ -0,0 +1,117 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_6_16;
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = null;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.extraConfig = "DefaultLimitNOFILE=2048";
|
||||
|
||||
hardware = {
|
||||
graphics.enable = true;
|
||||
|
||||
firmware = with pkgs; [
|
||||
sof-firmware
|
||||
];
|
||||
|
||||
#enable bluetooth
|
||||
bluetooth.enable = true;
|
||||
|
||||
};
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
alsa-utils
|
||||
];
|
||||
|
||||
sysconfig = with lib; {
|
||||
remoteBuildClient = mkDefault true;
|
||||
graphical = mkDefault true;
|
||||
|
||||
services = {
|
||||
sddm.enable = mkDefault true;
|
||||
openssh.enable = mkDefault false;
|
||||
pipewire.enable = mkDefault true;
|
||||
netbird.enable = mkDefault true;
|
||||
ollama.enable = mkDefault true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
steam.enable = mkDefault true;
|
||||
hyprpanel.enable = mkDefault true;
|
||||
hyprland.enable = mkDefault true;
|
||||
};
|
||||
|
||||
|
||||
virtualization = {
|
||||
|
||||
wyoming = {
|
||||
enable = mkDefault false;
|
||||
};
|
||||
|
||||
homeassistant = {
|
||||
enable = mkDefault false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.displayManager.enable = true;
|
||||
|
||||
services.avahi = {
|
||||
|
||||
enable = true;
|
||||
ipv4 = true;
|
||||
ipv6 = true;
|
||||
openFirewall = true;
|
||||
nssmdns4 = true;
|
||||
wideArea = true;
|
||||
|
||||
};
|
||||
|
||||
|
||||
environment.shells = with pkgs; [ zsh bashInteractive ];
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
programs.adb.enable = true;
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
networking = {
|
||||
nameservers = [ "1.1.1.1" "1.0.0.1" ];
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
|
||||
fonts.packages = with pkgs; [ nerd-fonts.fira-code ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
18
system/profiles/laptop/secrets.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
nathan:
|
||||
pass: ENC[AES256_GCM,data:H/duNPyclGoCF/Z90TQcqaUymowHOLRDmcfDxSubNGdmijknsCq+UH5PaWUmXGZ7uZqcpYWBcsVbYfQO/98OHH/kbwAFD/Hgkw==,iv:74M2PQqVzAgMXA8Z4RVLJKawt0Lzh94IKbn8YCTx3tY=,tag:B/xgA4mrhWEccaXQ+qvjCA==,type:str]
|
||||
remoteBuildKey: ENC[AES256_GCM,data:CN7AyOCV4iYzYrwVh2Af5YB0nwR4raXfj5FbbeIZg5Bfha0sUPnLAG+oqVUyzVQA3yftFhfwPGaALOyb6VlT13pTifG+uEoyiq1dQP6dimlmk/p/6kVtg4aiETJ/61EUeQF/HTVTZ3F7akgQRsKNFQYbF2srcurPQSY0Q2gjlkkFA3A3aLoN2LrkFPJvtnNP6SJzXDFHVOTPmbc/DvF9UbMiYu0viIlfiPqeBs26lAqcOWhrYlOxKqEL2IoP3kADDncedxT42c1rCPB/2kGvKg+mXSlaIH3a0Hb8hrnjVUB0edyqYnNCurVhPF8mg2yoqrtyaxRkZKvUsa5LBZwS+iL9bYQdU/4hxT9c7wRC+ZtWkwF4l/gy8Ggc+VuB+YT9JUCJY96o8f2wKFup0BS+oiYLGJKpcOLMFrPJLEtOMrqPN/Z6+gZ9LVbhlSliIV/yUTJAa26el0w6tP9Ebs6tHiFakpkMahsBbRxmHBmqkHW5zfa5YpvD5Ii/EC+F8Vb/Efn6LkBZBwSB6K33NSOy,iv:4i0bGQe7wiDSvmygY2VNSEhuYfYIi9YY1g7qLgDTcMo=,tag:MJqOovOcZ97COsVjxZus8w==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2MEIyRjR0a25UU3hnR2Zw
|
||||
WXFaaXJYNWFSMmZsR1FsYVB1WlBkZWptSHhzCkRGRitnNkc3MEtjV05KRXlXT3RR
|
||||
TVhnVlpUdzFiSEwxbHNOT3dyQ0dzbG8KLS0tIElMc3g4SHRxZTVnOCtVcktRb25D
|
||||
Y2ZpR25VNGVoMi9ibW8wbW5rYTQ3R00Ka6/KLXSSRP9WJDV0RBHHS5nALfd/3xDu
|
||||
y+QS+Ueh56kQT2zbYpYBRIPDgI3LZgwlTifQCDJ9ZPq0LGgu4XbEqQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-08-23T03:46:50Z"
|
||||
mac: ENC[AES256_GCM,data:QJLMqnmkrgtTqqmLN9NCfV8PPm5N/F0gtGw/XlX+nnfbesGVeYubSjtHmYWmY7ha41jEvLYu8rmIXaxDepfogyOf4wzuRPLkJxO7Wu0UVdr5uZlHNrcxZh4Ex6YGgg8Lbcjs0iVCev66lWfuhuxuvPOKsGLZvoNTq0V1hLpo/Fw=,iv:VFrL0L6tC1JvWM3BOJP4Dh+q1xSMBecCtPnNcY/loAU=,tag:p5VmBaGPTxyTmm1Ha9Le3Q==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
||||
@@ -1,6 +1,19 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
imports = let
|
||||
dir = builtins.readDir ./.;
|
||||
in (builtins.filter
|
||||
(file: (dir.${file} == "directory"))
|
||||
(builtins.attrNames dir)
|
||||
);
|
||||
|
||||
options.sysconfig = with lib; {
|
||||
|
||||
sshHostKeys = lib.mkOption {
|
||||
type = with lib.types; attrsOf str;
|
||||
default = {};
|
||||
};
|
||||
|
||||
users = let
|
||||
|
||||
userType = types.submodule ({ name, ... }: {
|
||||
@@ -18,7 +31,7 @@
|
||||
|
||||
standalone = mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
default = true;
|
||||
description = "is this home-manager standalone?";
|
||||
};
|
||||
|
||||
@@ -28,11 +41,33 @@
|
||||
};
|
||||
};
|
||||
|
||||
sshKeys = mkOption {
|
||||
isSuperuser = mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
description = "sudo?";
|
||||
};
|
||||
|
||||
usePresets = mkOption {
|
||||
type = with types; bool;
|
||||
default = true;
|
||||
description = "search for predefined settings?";
|
||||
};
|
||||
|
||||
ssh = {
|
||||
keys = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
description = "public keys used to login as this user";
|
||||
};
|
||||
|
||||
hosts = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
description = "user@host's used to login as this user";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
uid = mkOption {
|
||||
type = with types; nullOr int;
|
||||
default = null;
|
||||
@@ -56,7 +91,7 @@
|
||||
});
|
||||
|
||||
in lib.mkOption {
|
||||
type = lib.types.attrsOf userType;
|
||||
type = with lib.types; attrsOf userType;
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
@@ -71,8 +106,8 @@
|
||||
uid = cfg.uid;
|
||||
hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile;
|
||||
shell = cfg.shell;
|
||||
extraGroups = cfg.extraGroups;
|
||||
openssh.authorizedKeys.keys = lib.mkIf config.sysconfig.services.openssh.enable cfg.sshKeys;
|
||||
extraGroups = cfg.extraGroups ++ (if cfg.isSuperuser then [ "wheel" ] else []);
|
||||
openssh.authorizedKeys.keys = lib.mkIf config.sysconfig.services.openssh.enable (cfg.ssh.keys ++ (map (z: config.sysconfig.sshHostKeys.${z}) cfg.ssh.hosts));
|
||||
packages = with pkgs; lib.mkIf (cfg.home-manager.enable && cfg.home-manager.standalone) [ home-manager ];
|
||||
}) config.sysconfig.users;
|
||||
|
||||
@@ -84,26 +119,26 @@
|
||||
useUserPackages = true;
|
||||
sharedModules = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.home-manager-config
|
||||
];
|
||||
users = builtins.listToAttrs (builtins.map
|
||||
(x: {
|
||||
name = x;
|
||||
value = (lib.mkMerge ([
|
||||
{
|
||||
homeconfig = {
|
||||
host = config.sysconfig.host;
|
||||
name = x;
|
||||
graphical = lib.mkDefault config.sysconfig.graphical;
|
||||
};
|
||||
}
|
||||
] ++ (if inputs ? ${x} then [ (inputs.${x} /*{ config = config.home-manager.users.${x}; inherit lib pkgs inputs; }*/) ] else [])
|
||||
++ config.sysconfig.users.${x}.home-manager.extraModules));
|
||||
|
||||
(if let
|
||||
dir = builtins.readDir ./.;
|
||||
in dir ? ${x} && dir.${x} == "directory" then
|
||||
import ./${x}/home-manager
|
||||
else {})
|
||||
|
||||
(if inputs ? ${x} then inputs.${x} else {})
|
||||
|
||||
] ++ config.sysconfig.users.${x}.home-manager.extraModules));
|
||||
})
|
||||
(builtins.partition
|
||||
(builtins.filter
|
||||
(y: (config.sysconfig.users.${y}.home-manager.enable && !config.sysconfig.users.${y}.home-manager.standalone))
|
||||
(builtins.attrNames config.sysconfig.users)
|
||||
).right
|
||||
)
|
||||
);
|
||||
|
||||
};
|
||||
5
system/users/nathan/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./system
|
||||
];
|
||||
}
|
||||
@@ -7,15 +7,50 @@
|
||||
./dotfiles
|
||||
];
|
||||
|
||||
options.homeconfig = with lib; {
|
||||
|
||||
name = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
graphical = mkOption {
|
||||
type = with types; bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
standalone = mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
config = {
|
||||
|
||||
homeconfig = {
|
||||
name = "nathan";
|
||||
|
||||
mpd.enable = lib.mkDefault true;
|
||||
calcurse.enable = lib.mkDefault true;
|
||||
git.enable = lib.mkDefault true;
|
||||
nh.enable = lib.mkDefault true;
|
||||
|
||||
minimal = lib.mkDefault false;
|
||||
hyprland.enable = lib.mkDefault config.homeconfig.graphical && !config.homeconfig.standalone;
|
||||
hyprlock.enable = lib.mkDefault config.homeconfig.hyprland.enable;
|
||||
wal.enable = lib.mkDefault config.homeconfig.graphical;
|
||||
hyprpanel.enable = lib.mkDefault config.homeconfig.hyprland.enable;
|
||||
rofi.enable = lib.mkDefault config.homeconfig.hyprland.enable;
|
||||
firefox.enable = lib.mkDefault config.homeconfig.graphical;
|
||||
};
|
||||
|
||||
home.username = lib.mkDefault config.homeconfig.name;
|
||||
|
||||
home.homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||
|
||||
programs.home-manager.enable = config.homeconfig.standalone;
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
home.pointerCursor = lib.mkIf config.homeconfig.graphical {
|
||||
@@ -39,7 +74,7 @@
|
||||
defaultSopsFormat = "yaml";
|
||||
};
|
||||
|
||||
nix = lib.mkIf config.homeconfig.standalone.enable {
|
||||
nix = lib.mkIf config.homeconfig.standalone {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1007 KiB After Width: | Height: | Size: 1007 KiB |
|
Before Width: | Height: | Size: 110 MiB After Width: | Height: | Size: 110 MiB |
|
Before Width: | Height: | Size: 191 KiB After Width: | Height: | Size: 191 KiB |
|
Before Width: | Height: | Size: 874 KiB After Width: | Height: | Size: 874 KiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 48 MiB After Width: | Height: | Size: 48 MiB |
|
Before Width: | Height: | Size: 203 MiB After Width: | Height: | Size: 203 MiB |
|
Before Width: | Height: | Size: 670 KiB After Width: | Height: | Size: 670 KiB |
|
Before Width: | Height: | Size: 273 KiB After Width: | Height: | Size: 273 KiB |
|
Before Width: | Height: | Size: 140 MiB After Width: | Height: | Size: 140 MiB |
|
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 3.1 MiB |
|
Before Width: | Height: | Size: 2.8 MiB After Width: | Height: | Size: 2.8 MiB |
|
Before Width: | Height: | Size: 36 MiB After Width: | Height: | Size: 36 MiB |