WIP move to template

This commit is contained in:
Daniel Flanagan 2023-10-03 11:52:44 -05:00
parent 3d62eaafd7
commit 4a2fd7718f
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
108 changed files with 578 additions and 432 deletions

View file

@ -1,5 +1,5 @@
{ {
standard = { disks ? [ "/dev/vda" ], ... }: { standard = {disks ? ["/dev/vda"], ...}: {
# this is my standard partitioning scheme for my machines: an LUKS-encrypted # this is my standard partitioning scheme for my machines: an LUKS-encrypted
# btrfs volume # btrfs volume
disko.devices = { disko.devices = {
@ -29,7 +29,7 @@
content = { content = {
type = "luks"; type = "luks";
name = "crypted"; name = "crypted";
extraOpenArgs = [ "--allow-discards" ]; extraOpenArgs = ["--allow-discards"];
# if you want to use the key for interactive login be sure there is no trailing newline # if you want to use the key for interactive login be sure there is no trailing newline
# for example use `echo -n "password" > /tmp/secret.key` # for example use `echo -n "password" > /tmp/secret.key`
keyFile = "/tmp/secret.key"; # Interactive keyFile = "/tmp/secret.key"; # Interactive
@ -37,19 +37,19 @@
# additionalKeyFiles = ["/tmp/additionalSecret.key"]; # additionalKeyFiles = ["/tmp/additionalSecret.key"];
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = [ "-f" ]; extraArgs = ["-f"];
subvolumes = { subvolumes = {
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
"/home" = { "/home" = {
mountpoint = "/home"; mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
"/nix" = { "/nix" = {
mountpoint = "/nix"; mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
}; };
}; };
@ -62,7 +62,7 @@
}; };
}; };
# TODO: figure out what I can't have an optiona/default 'name' attribute here so I can DRY with "standard" # TODO: figure out what I can't have an optiona/default 'name' attribute here so I can DRY with "standard"
thinker = { disks ? [ "/dev/vda" ], ... }: { thinker = {disks ? ["/dev/vda"], ...}: {
# this is my standard partitioning scheme for my machines: an LUKS-encrypted # this is my standard partitioning scheme for my machines: an LUKS-encrypted
# btrfs volume # btrfs volume
disko.devices = { disko.devices = {
@ -92,7 +92,7 @@
content = { content = {
type = "luks"; type = "luks";
name = "crypted"; name = "crypted";
extraOpenArgs = [ "--allow-discards" ]; extraOpenArgs = ["--allow-discards"];
# if you want to use the key for interactive login be sure there is no trailing newline # if you want to use the key for interactive login be sure there is no trailing newline
# for example use `echo -n "password" > /tmp/secret.key` # for example use `echo -n "password" > /tmp/secret.key`
keyFile = "/tmp/secret.key"; # Interactive keyFile = "/tmp/secret.key"; # Interactive
@ -100,19 +100,19 @@
# additionalKeyFiles = ["/tmp/additionalSecret.key"]; # additionalKeyFiles = ["/tmp/additionalSecret.key"];
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = [ "-f" ]; extraArgs = ["-f"];
subvolumes = { subvolumes = {
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
"/home" = { "/home" = {
mountpoint = "/home"; mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
"/nix" = { "/nix" = {
mountpoint = "/nix"; mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
}; };
}; };
@ -124,7 +124,7 @@
}; };
}; };
}; };
unencrypted = { disks ? [ "/dev/vda" ], ... }: { unencrypted = {disks ? ["/dev/vda"], ...}: {
disko.devices = { disko.devices = {
disk = { disk = {
primary = { primary = {
@ -151,19 +151,19 @@
size = "100%"; size = "100%";
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = [ "-f" ]; extraArgs = ["-f"];
subvolumes = { subvolumes = {
"/root" = { "/root" = {
mountpoint = "/"; mountpoint = "/";
mountOptions = [ ]; mountOptions = [];
}; };
"/home" = { "/home" = {
mountpoint = "/home"; mountpoint = "/home";
mountOptions = [ "compress=zstd" ]; mountOptions = ["compress=zstd"];
}; };
"/nix" = { "/nix" = {
mountpoint = "/nix"; mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ]; mountOptions = ["compress=zstd" "noatime"];
}; };
}; };
}; };

View file

@ -120,21 +120,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"helix": { "helix": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
@ -164,15 +149,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1696145345, "lastModified": 1695108154,
"narHash": "sha256-3dM7I/d4751SLPJah0to1WBlWiyzIiuCEUwJqwBdmr4=", "narHash": "sha256-gSg7UTVtls2yO9lKtP0yb66XBHT1Fx5qZSZbGMpSn2c=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "6f9b5b83ad1f470b3d11b8a9fe1d5ef68c7d0e30", "rev": "07682fff75d41f18327a871088d20af2710d4744",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -209,6 +195,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1696019113,
"narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1696125185, "lastModified": 1696125185,
@ -243,15 +245,16 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1696275311, "lastModified": 1696039360,
"narHash": "sha256-Z8aJvoUyMv/+0G7iqYIqecxRDFbz05RK2e3/irbWq9M=", "narHash": "sha256-g7nIUV4uq1TOVeVIDEZLb005suTWCUjSY0zYOlSBsyE=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "828ba8482b64704adad28786355ed8a45d59eb0a", "rev": "32dcb45f66c0487e92db8303a798ebc548cadedc",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"ref": "nixos-23.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -279,8 +282,8 @@
"helix": "helix", "helix": "helix",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_4",
"sops-nix": "sops-nix", "nixpkgs-unstable": "nixpkgs-unstable",
"utils": "utils" "sops-nix": "sops-nix"
} }
}, },
"rust-overlay": { "rust-overlay": {
@ -356,24 +359,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"utils": {
"inputs": {
"flake-utils": "flake-utils_3"
},
"locked": {
"lastModified": 1696272629,
"narHash": "sha256-KprLE/cqg5PFNT1PKQRjE/bJpr4AlgedoUPO/4jee+8=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "2893fcad90dcc2ac2265c227b5444a7cd7ef21f0",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -1,26 +1,92 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs"; nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-channels/nixos-unstable";
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git"; home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager = { home-manager.inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; helix.url = "github:helix-editor/helix/75c0a5ceb32d8a503915a93ccc1b64c8ad1cba8b";
# inputs.utils.follows = "utils";
};
disko.url = "github:nix-community/disko/master"; disko.url = "github:nix-community/disko/master";
sops-nix.url = "github:Mic92/sops-nix"; sops-nix.url = "github:Mic92/sops-nix";
helix.url = "github:helix-editor/helix/75c0a5ceb32d8a503915a93ccc1b64c8ad1cba8b";
# TODO: do I really need this in the root of my flake if _only_ beefcake uses it?
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git";
# TODO: hardware.url = "github:nixos/nixos-hardware"; # might be useful for laptops
# TODO: hyprland.url = "github:hyprwm/Hyprland"; # TODO: hyprland.url = "github:hyprwm/Hyprland";
# TODO: nix-colors.url = "github:misterio77/nix-colors";
}; };
outputs = inputs @ { self, ... }: { outputs = {
diskoConfigurations = import ./disko.nix; self,
homeConfigurations = import ./home.nix inputs; nixpkgs,
nixosConfigurations = import ./nixos.nix inputs; home-manager,
...
} @ inputs: let
inherit (self) outputs;
systems = [
"aarch64-linux"
# "i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
# Your custom packages
# Acessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
# Formatter for your nix files, available through 'nix fmt'
# Other options beside 'alejandra' include 'nixpkgs-fmt'
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
# Your custom packages and modifications, exported as overlays
overlays = import ./overlays {inherit inputs;};
# Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos;
# Reusable home-manager modules you might want to export
# These are usually stuff you would upstream into home-manager
homeManagerModules = import ./modules/home-manager;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
dragon = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./nixos/dragon
];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"daniel@lyte.dev" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [./home-manager/home.nix];
};
"daniel.flanagan@hq.bill.com" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
extraSpecialArgs = {inherit inputs outputs;};
modules = [./home-manager/home.nix];
};
};
# TODO: darwin for work? # TODO: darwin for work?
# TODO: nixos ISO? # TODO: nixos ISO?
# Disk partition schemes and functions
diskoConfigurations = import ./disko.nix;
}; };
} }

View file

@ -1,25 +0,0 @@
inputs:
let
mkHome = system: modules:
let
overlay = final: prev: {
helix = prev.helix // inputs.helix.packages.${system}.helix;
};
pkgs = import inputs.nixpkgs { inherit system; overlays = [ overlay ]; };
in
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ] ++ modules;
};
in
{
daniel = mkHome "x86_64-linux" [
./home/user.nix
./home/linux.nix
];
daniel-work = mkHome "aarch64-darwin" [
./home/user.nix
./home/work.nix
];
}

25
home/default.nix Normal file
View file

@ -0,0 +1,25 @@
inputs: let
mkHome = system: modules: let
overlay = final: prev: {
helix = prev.helix // inputs.helix.packages.${system}.helix;
};
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [overlay];
};
in
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [] ++ modules;
};
in {
daniel = mkHome "x86_64-linux" [
./home/user.nix
./home/linux.nix
];
daniel-work = mkHome "aarch64-darwin" [
./home/user.nix
./home/work.nix
];
}

View file

@ -1,9 +1,11 @@
{ pkgs, lib, ... }: {
let pkgs,
lib,
...
}: let
email = "daniel@lyte.dev"; email = "daniel@lyte.dev";
name = "Daniel Flanagan"; name = "Daniel Flanagan";
in in {
{
# TODO: email access? # TODO: email access?
# accounts.email.accounts = { # accounts.email.accounts = {
# google = { # google = {
@ -36,7 +38,10 @@ in
pkgs.nixpkgs-fmt pkgs.nixpkgs-fmt
# TODO: os-specific scripts? macOS versus Linux (arch or nixos? do I need to distinguish at that point?) # TODO: os-specific scripts? macOS versus Linux (arch or nixos? do I need to distinguish at that point?)
(pkgs.buildEnv { name = "my-scripts-common"; paths = [ ../scripts/common ]; }) (pkgs.buildEnv {
name = "my-scripts-common";
paths = [../scripts/common];
})
]; ];
file = { file = {
@ -79,7 +84,7 @@ in
programs = { programs = {
password-store = { password-store = {
enable = true; enable = true;
package = (pkgs.pass.withExtensions (exts: [ exts.pass-otp ])); package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
}; };
git = { git = {
@ -90,7 +95,7 @@ in
delta = { delta = {
enable = true; enable = true;
options = { }; options = {};
}; };
lfs = { lfs = {
@ -161,25 +166,29 @@ in
language-server = { language-server = {
lexical = { lexical = {
command = "lexical"; command = "lexical";
args = [ "start" ]; args = ["start"];
}; };
next-ls = { next-ls = {
command = "next-ls"; command = "next-ls";
args = [ "--stdout" ]; args = ["--stdout"];
}; };
deno = { deno = {
command = "deno"; command = "deno";
args = [ "lsp" ]; args = ["lsp"];
config = { enable = true; lint = true; unstable = true; }; config = {
enable = true;
lint = true;
unstable = true;
};
}; };
}; };
language = [ language = [
{ {
name = "elixir"; name = "elixir";
language-servers = [ "elixir-ls" ]; # "lexical" "next-ls" language-servers = ["elixir-ls"]; # "lexical" "next-ls"
auto-format = true; auto-format = true;
} }
{ {
@ -191,7 +200,7 @@ in
auto-format = true; auto-format = true;
formatter = { formatter = {
command = "nixpkgs-fmt"; command = "nixpkgs-fmt";
args = [ ]; args = [];
}; };
} }
{ {
@ -209,13 +218,13 @@ in
grammar = "javascript"; grammar = "javascript";
scope = "source.js"; scope = "source.js";
injection-regex = "^(js|javascript)$"; injection-regex = "^(js|javascript)$";
file-types = [ "js" "mjs" ]; file-types = ["js" "mjs"];
shebangs = [ "deno" ]; shebangs = ["deno"];
language-servers = [ "deno" ]; language-servers = ["deno"];
roots = [ "deno.jsonc" "deno.json" ]; roots = ["deno.jsonc" "deno.json"];
formatter = { formatter = {
command = "deno"; command = "deno";
args = [ "fmt" ]; args = ["fmt"];
}; };
auto-format = true; auto-format = true;
comment-token = "//"; comment-token = "//";
@ -231,13 +240,13 @@ in
grammar = "typescript"; grammar = "typescript";
scope = "source.ts"; scope = "source.ts";
injection-regex = "^(ts|typescript)$"; injection-regex = "^(ts|typescript)$";
file-types = [ "ts" ]; file-types = ["ts"];
shebangs = [ "deno" ]; shebangs = ["deno"];
language-servers = [ "deno" ]; language-servers = ["deno"];
roots = [ "deno.jsonc" "deno.json" ]; roots = ["deno.jsonc" "deno.json"];
formatter = { formatter = {
command = "deno"; command = "deno";
args = [ "fmt" ]; args = ["fmt"];
}; };
auto-format = true; auto-format = true;
comment-token = "//"; comment-token = "//";
@ -253,10 +262,13 @@ in
grammar = "jsonc"; grammar = "jsonc";
scope = "source.jsonc"; scope = "source.jsonc";
injection-regex = "^(jsonc)$"; injection-regex = "^(jsonc)$";
roots = [ "deno.jsonc" "deno.json" ]; roots = ["deno.jsonc" "deno.json"];
file-types = [ "jsonc" ]; file-types = ["jsonc"];
language-servers = [ "deno" ]; language-servers = ["deno"];
indent = { tab-width = 2; unit = " "; }; indent = {
tab-width = 2;
unit = " ";
};
auto-format = true; auto-format = true;
} }
@ -311,7 +323,7 @@ in
color-modes = false; color-modes = false;
bufferline = "multiple"; bufferline = "multiple";
scrolloff = 8; scrolloff = 8;
rulers = [ 80 120 ]; rulers = [80 120];
cursorline = true; cursorline = true;
cursor-shape = { cursor-shape = {
@ -331,16 +343,19 @@ in
display-inlay-hints = true; display-inlay-hints = true;
}; };
statusline = { statusline = {
left = [ "mode" "spinner" "selections" "primary-selection-length" "position" "position-percentage" "diagnostics" "workspace-diagnostics" ]; left = ["mode" "spinner" "selections" "primary-selection-length" "position" "position-percentage" "diagnostics" "workspace-diagnostics"];
center = [ "file-name" ]; center = ["file-name"];
right = [ "version-control" "total-line-numbers" "file-encoding" ]; right = ["version-control" "total-line-numbers" "file-encoding"];
}; };
}; };
keys = { keys = {
insert = { insert = {
j = { k = "normal_mode"; j = "normal_mode"; K = "normal_mode"; J = "normal_mode"; }; j = {
k = "normal_mode";
j = "normal_mode";
K = "normal_mode";
J = "normal_mode";
};
}; };
normal = { normal = {
@ -362,9 +377,11 @@ in
}; };
}; };
select = { select = {
space = { q = ":reflow 80"; Q = ":reflow 120"; }; space = {
q = ":reflow 80";
Q = ":reflow 120";
};
"L" = "repeat_last_motion"; "L" = "repeat_last_motion";
}; };
}; };
@ -406,13 +423,14 @@ in
repo = "bat"; repo = "bat";
rev = "477622171ec0529505b0ca3cada68fc9433648c6"; rev = "477622171ec0529505b0ca3cada68fc9433648c6";
sha256 = "6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw="; sha256 = "6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
} + "/Catppuccin-mocha.tmTheme"); }
+ "/Catppuccin-mocha.tmTheme");
}; };
}; };
kitty = { kitty = {
enable = true; enable = true;
darwinLaunchOptions = [ "--single-instance" ]; darwinLaunchOptions = ["--single-instance"];
shellIntegration = { shellIntegration = {
enableFishIntegration = true; enableFishIntegration = true;
}; };
@ -689,7 +707,11 @@ in
}; };
verbs = [ verbs = [
{ invocation = "edit"; shortcut = "e"; execution = "$EDITOR {file}"; } {
invocation = "edit";
shortcut = "e";
execution = "$EDITOR {file}";
}
]; ];
}; };
}; };
@ -747,7 +769,7 @@ in
has_command = "command --quiet --search $argv[1]"; has_command = "command --quiet --search $argv[1]";
}; };
shellAbbrs = { }; shellAbbrs = {};
shellAliases = { shellAliases = {
l = "br"; l = "br";
ls = "eza --group-directories-first --classify"; ls = "eza --group-directories-first --classify";

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
home.pointerCursor = { home.pointerCursor = {
name = "Bibata-Modern-Classic"; name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
@ -16,16 +20,39 @@
enable = true; enable = true;
events = [ events = [
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock"; } {
event = "before-sleep";
command = "${pkgs.swaylock}/bin/swaylock";
}
]; ];
timeouts = [ timeouts = [
{ timeout = 330; command = "notify-send \"Idling in 300 seconds\""; resumeCommand = "notify-send \"Idling cancelled.\""; } {
{ timeout = 540; command = "notify-send \"Idling in 90 seconds\""; } timeout = 330;
{ timeout = 570; command = "notify-send \"Idling in 60 seconds\""; } command = "notify-send \"Idling in 300 seconds\"";
{ timeout = 600; command = "notify-send \"Idling in 30 seconds...\""; } resumeCommand = "notify-send \"Idling cancelled.\"";
{ timeout = 630; command = "swaylock -f"; } }
{ timeout = 660; command = "swaymsg \"output * dpms off\""; resumeCommand = "swaymsg \"output * dpms on\" & maybe-good-morning &"; } {
timeout = 540;
command = "notify-send \"Idling in 90 seconds\"";
}
{
timeout = 570;
command = "notify-send \"Idling in 60 seconds\"";
}
{
timeout = 600;
command = "notify-send \"Idling in 30 seconds...\"";
}
{
timeout = 630;
command = "swaylock -f";
}
{
timeout = 660;
command = "swaymsg \"output * dpms off\"";
resumeCommand = "swaymsg \"output * dpms on\" & maybe-good-morning &";
}
]; ];
}; };
}; };
@ -38,16 +65,16 @@
# set $tilers "(wezterm.*|kitty.*|firefox.*|slack.*|Slack.*|thunar.*|Alacritty.*|alacritty.*|Discord.*|discord.*)" # set $tilers "(wezterm.*|kitty.*|firefox.*|slack.*|Slack.*|thunar.*|Alacritty.*|alacritty.*|Discord.*|discord.*)"
# for_window [title=".*"] floating enable # for_window [title=".*"] floating enable
# for_window [app_id=$tilers] floating disable # for_window [app_id=$tilers] floating disable
# #
# # for_window [title=".*"] opacity $opacity # # for_window [title=".*"] opacity $opacity
# #
# client.focused #74c7ec #74c7ec #74c7ec #74c7ec #74c7ec # client.focused #74c7ec #74c7ec #74c7ec #74c7ec #74c7ec
# client.focused_inactive #100814 #100814 #9b9ebf #100814 #100814 # client.focused_inactive #100814 #100814 #9b9ebf #100814 #100814
# client.unfocused #100814 #100814 #9b9ebf #100814 #100814 # client.unfocused #100814 #100814 #9b9ebf #100814 #100814
# #
# # TODO: I forget why I needed this - could google it I expect? # # TODO: I forget why I needed this - could google it I expect?
# exec /usr/lib/polkit-kde-authentication-agent-1 # exec /usr/lib/polkit-kde-authentication-agent-1
# #
# # prevent all windows from stealing focus # # prevent all windows from stealing focus
# no_focus [class=".*"] # no_focus [class=".*"]
@ -88,10 +115,16 @@
}; };
startup = [ startup = [
{ command = "systemctl --user restart waybar"; always = true; } {
{ command = "systemctl --user restart swayidle"; always = true; } command = "systemctl --user restart waybar";
{ command = "firefox"; } always = true;
{ command = "kitty --single-instance"; } }
{
command = "systemctl --user restart swayidle";
always = true;
}
{command = "firefox";}
{command = "kitty --single-instance";}
]; ];
modes = { modes = {
@ -128,11 +161,12 @@
tap = "enabled"; tap = "enabled";
natural_scroll = "enabled"; natural_scroll = "enabled";
middle_emulation = "enabled"; middle_emulation = "enabled";
# pointer_accel # pointer_accel
}; };
}; };
keybindings = let mod = config.wayland.windowManager.sway.config.modifier; in { keybindings = let
mod = config.wayland.windowManager.sway.config.modifier;
in {
# bindsym $mod+shift+space exec wofi --show drun # bindsym $mod+shift+space exec wofi --show drun
"${mod}+control+space" = "exec makoctl dismiss"; "${mod}+control+space" = "exec makoctl dismiss";
"${mod}+shift+space" = "exec makoctl invoke"; "${mod}+shift+space" = "exec makoctl invoke";
@ -237,9 +271,9 @@
"${mod}+shift+alt+f" = "for_window [class=$tilers] floating toggle"; "${mod}+shift+alt+f" = "for_window [class=$tilers] floating toggle";
}; };
assigns = { }; assigns = {};
bars = [ ]; bars = [];
colors = { }; colors = {};
}; };
}; };
@ -248,16 +282,19 @@
theme = { theme = {
name = "Catppuccin-Mocha-Compact-Sapphire-dark"; name = "Catppuccin-Mocha-Compact-Sapphire-dark";
package = pkgs.catppuccin-gtk.override { package = pkgs.catppuccin-gtk.override {
accents = [ "sapphire" ]; accents = ["sapphire"];
size = "compact"; size = "compact";
tweaks = [ "rimless" "black" ]; tweaks = ["rimless" "black"];
variant = "mocha"; variant = "mocha";
}; };
}; };
}; };
home.packages = [ home.packages = [
(pkgs.buildEnv { name = "my-linux-scripts"; paths = [ ../scripts/linux ]; }) (pkgs.buildEnv {
name = "my-linux-scripts";
paths = [../scripts/linux];
})
]; ];
programs = { programs = {
@ -267,10 +304,10 @@
mainBar = { mainBar = {
"layer" = "top"; "layer" = "top";
"position" = "bottom"; "position" = "bottom";
"output" = [ "eDP-1" "DP-3" ]; "output" = ["eDP-1" "DP-3"];
"height" = 32; "height" = 32;
"modules-left" = [ "clock" "sway/window" ]; "modules-left" = ["clock" "sway/window"];
"modules-center" = [ "sway/workspaces" ]; "modules-center" = ["sway/workspaces"];
"modules-right" = [ "modules-right" = [
"mpris" "mpris"
"idle_inhibitor" "idle_inhibitor"
@ -303,15 +340,15 @@
"sway/workspaces" = { "sway/workspaces" = {
"disable-scroll" = false; "disable-scroll" = false;
"persistent_workspaces" = { "persistent_workspaces" = {
"1" = [ ]; "1" = [];
"2" = [ ]; "2" = [];
"3" = [ ]; "3" = [];
"4" = [ ]; "4" = [];
"5" = [ ]; "5" = [];
"6" = [ ]; "6" = [];
"7" = [ ]; "7" = [];
"8" = [ ]; "8" = [];
"9" = [ ]; "9" = [];
# "10" = [; # "10" = [;
}; };
"all-outputs" = true; "all-outputs" = true;
@ -346,12 +383,12 @@
"critical-threshold" = 80; "critical-threshold" = 80;
# "format-critical" = "{temperatureC}°C {icon}"; # "format-critical" = "{temperatureC}°C {icon}";
"format" = "{temperatureC}°C {icon}"; "format" = "{temperatureC}°C {icon}";
"format-icons" = [ "" "" "" ]; "format-icons" = ["" "" ""];
}; };
"backlight" = { "backlight" = {
# "device" = "acpi_video1"; # "device" = "acpi_video1";
"format" = "{percent}% {icon}"; "format" = "{percent}% {icon}";
"format-icons" = [ "" "" ]; "format-icons" = ["" ""];
}; };
"battery" = { "battery" = {
"states" = { "states" = {
@ -365,7 +402,7 @@
"format-alt" = "{time} {icon}"; "format-alt" = "{time} {icon}";
"format-good" = ""; # An empty format will hide the modul; "format-good" = ""; # An empty format will hide the modul;
"format-full" = "󰁹"; "format-full" = "󰁹";
"format-icons" = [ "󰂎" "󰁻" "󰁽" "󰁿" "󰂂" ]; "format-icons" = ["󰂎" "󰁻" "󰁽" "󰁿" "󰂂"];
}; };
"network" = { "network" = {
"format-wifi" = "{essid} ({signalStrength}%) "; "format-wifi" = "{essid} ({signalStrength}%) ";
@ -394,7 +431,7 @@
"phone" = ""; "phone" = "";
"portable" = ""; "portable" = "";
"car" = ""; "car" = "";
"default" = [ "" "" "" ]; "default" = ["" "" ""];
}; };
# TODO: toggle mute? # TODO: toggle mute?
"on-click" = "pavucontrol"; "on-click" = "pavucontrol";
@ -638,7 +675,6 @@
systemd = { systemd = {
enable = true; enable = true;
}; };
}; };
firefox = { firefox = {
@ -647,7 +683,7 @@
enable = true; enable = true;
# TODO: uses nixpkgs.pass so pass otp doesn't work # TODO: uses nixpkgs.pass so pass otp doesn't work
package = (pkgs.firefox.override { extraNativeMessagingHosts = [ pkgs.passff-host ]; }); package = pkgs.firefox.override {extraNativeMessagingHosts = [pkgs.passff-host];};
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [ # extensions = with pkgs.nur.repos.rycee.firefox-addons; [
# ublock-origin # ublock-origin
@ -726,5 +762,3 @@
}; };
}; };
} }

View file

@ -1,8 +1,6 @@
{ lib, ... }: {lib, ...}: let
let
username = "daniel.flanagan@divvypay.com"; username = "daniel.flanagan@divvypay.com";
in in {
{
home.username = username; home.username = username;
home.homeDirectory = "/Users/${username}"; home.homeDirectory = "/Users/${username}";
} }

View file

@ -0,0 +1,6 @@
# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations.
{
# List your module files here
# my-module = import ./my-module.nix;
}

View file

@ -1,3 +1,7 @@
{ config, lib, ... }: { {
config,
lib,
...
}: {
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

14
modules/nixos/default.nix Normal file
View file

@ -0,0 +1,14 @@
# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations.
{
amd = import ./amd.nix;
default = import ./default.nix;
desktop-usage = import ./desktop-usage.nix;
intel = import ./intel.nix;
pipewire = import ./pipewire.nix;
podman = import ./podman.nix;
postgres = import ./postgres.nix;
sway = import ./sway.nix;
user-installed-applications = import ./user-installed-applications.nix;
wifi = import ./wifi.nix;
}

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
# TODO: add a DE and include either plasma or gnome as a fallback? # TODO: add a DE and include either plasma or gnome as a fallback?
imports = [ imports = [
./sway.nix ./sway.nix
@ -6,7 +6,7 @@
]; ];
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }) (nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
(iosevka.override { (iosevka.override {
set = "lyteterm"; set = "lyteterm";
privateBuildPlan = '' privateBuildPlan = ''
@ -147,4 +147,3 @@
magicOrExtension = ''\x7fELF....AI\x02''; magicOrExtension = ''\x7fELF....AI\x02'';
}; };
} }

View file

@ -1,8 +1,12 @@
{ lib, config, pkgs, ... }: { {
lib,
config,
pkgs,
...
}: {
nixpkgs.config = { nixpkgs.config = {
packageOverrides = pkgs: { packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
}; };
}; };

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
services.pipewire = { services.pipewire = {
enable = true; enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
environment = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [
podman-compose podman-compose

View file

@ -1,8 +1,8 @@
{ pkgs, ... }: { {pkgs, ...}: {
# this is really just for development usage # this is really just for development usage
services.postgresql = { services.postgresql = {
enable = true; enable = true;
ensureDatabases = [ "daniel" ]; ensureDatabases = ["daniel"];
ensureUsers = [ ensureUsers = [
{ {
name = "daniel"; name = "daniel";

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: let
let
# this is unused because it's referenced by my sway config # this is unused because it's referenced by my sway config
dbus-sway-environment = pkgs.writeTextFile { dbus-sway-environment = pkgs.writeTextFile {
name = "dbus-sway-environment"; name = "dbus-sway-environment";
@ -7,10 +6,10 @@ let
executable = true; executable = true;
text = '' text = ''
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
systemctl --user stop wireplumber xdg-desktop-portal xdg-desktop-portal-wlr systemctl --user stop wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
systemctl --user start wireplumber xdg-desktop-portal xdg-desktop-portal-wlr systemctl --user start wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
''; '';
}; };
# this is unused because it's referenced by my sway config # this is unused because it's referenced by my sway config
@ -18,20 +17,17 @@ let
name = "configure-gtk"; name = "configure-gtk";
destination = "/bin/configure-gtk"; destination = "/bin/configure-gtk";
executable = true; executable = true;
text = text = let
let schema = pkgs.gsettings-desktop-schemas;
schema = pkgs.gsettings-desktop-schemas; datadir = "${schema}/share/gsettings-schemas/${schema.name}";
datadir = "${schema}/share/gsettings-schemas/${schema.name}"; in ''
in export XDG_DATA_DIRS="${datadir}:$XDG_DATA_DIRS
'' gnome_schema = org.gnome.desktop.interface
export XDG_DATA_DIRS="${datadir}:$XDG_DATA_DIRS gsettings set $gnome_schema gtk-theme 'Catppuccin-Mocha'
gnome_schema = org.gnome.desktop.interface '';
gsettings set $gnome_schema gtk-theme 'Catppuccin-Mocha'
'';
}; };
in in {
{ imports = [./pipewire.nix];
imports = [ ./pipewire.nix ];
# services.xserver.libinput.enable = true; # services.xserver.libinput.enable = true;
@ -61,7 +57,7 @@ in
programs.thunar = { programs.thunar = {
enable = true; enable = true;
plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ]; plugins = with pkgs.xfce; [thunar-archive-plugin thunar-volman];
}; };
services.gvfs = { services.gvfs = {

View file

@ -1,3 +1,3 @@
{ ... }: { {...}: {
services.flatpak.enable = true; services.flatpak.enable = true;
} }

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
# iwd? # iwd?

View file

@ -1,40 +1,41 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running 'nixos-help'). # and in the NixOS manual (accessible by running 'nixos-help').
{
{ modulesPath, config, pkgs, ... }: { modulesPath,
config,
pkgs,
...
}: {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
../modules/intel.nix ../modules/intel.nix
]; ];
boot.initrd.availableKernelModules = [ "ehci_pci" "megaraid_sas" "usbhid" "uas" "sd_mod" ]; boot.initrd.availableKernelModules = ["ehci_pci" "megaraid_sas" "usbhid" "uas" "sd_mod"];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = ["kvm-intel"];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/0747dcba-f590-42e6-89c8-6cb2f9114d64";
device = "/dev/disk/by-uuid/0747dcba-f590-42e6-89c8-6cb2f9114d64"; fsType = "ext4";
fsType = "ext4"; options = [
options = [ "usrquota"
"usrquota" ];
]; };
};
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/7E3C-9018";
device = "/dev/disk/by-uuid/7E3C-9018"; fsType = "vfat";
fsType = "vfat"; };
};
fileSystems."/storage" = fileSystems."/storage" = {
{ device = "/dev/disk/by-uuid/ea8258d7-54d1-430e-93b3-e15d33231063";
device = "/dev/disk/by-uuid/ea8258d7-54d1-430e-93b3-e15d33231063"; fsType = "btrfs";
fsType = "btrfs"; options = [
options = [ "compress=zstd:5"
"compress=zstd:5" "space_cache=v2"
"space_cache=v2" ];
]; };
};
services.nix-serve = { services.nix-serve = {
enable = true; enable = true;
@ -55,7 +56,7 @@
sops = { sops = {
defaultSopsFile = ../secrets/beefcake/secrets.yml; defaultSopsFile = ../secrets/beefcake/secrets.yml;
age = { age = {
sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
keyFile = "/var/lib/sops-nix/key.txt"; keyFile = "/var/lib/sops-nix/key.txt";
generateKey = true; generateKey = true;
}; };
@ -140,11 +141,11 @@
networking.hostName = "beefcake"; networking.hostName = "beefcake";
users.extraGroups = { users.extraGroups = {
"plausible" = { }; "plausible" = {};
"lytedev" = { }; "lytedev" = {};
}; };
users.groups.daniel.members = [ "daniel" ]; users.groups.daniel.members = ["daniel"];
users.groups.nixadmin.members = [ "daniel" ]; users.groups.nixadmin.members = ["daniel"];
users.users.daniel = { users.users.daniel = {
extraGroups = [ extraGroups = [
@ -165,7 +166,7 @@
users.users.ben = { users.users.ben = {
isNormalUser = true; isNormalUser = true;
packages = [ pkgs.vim ]; packages = [pkgs.vim];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKUfLZ+IX85p9355Po2zP1H2tAxiE0rE6IYb8Sf+eF9T ben@benhany.com" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKUfLZ+IX85p9355Po2zP1H2tAxiE0rE6IYb8Sf+eF9T ben@benhany.com"
]; ];
@ -173,7 +174,7 @@
users.users.alan = { users.users.alan = {
isNormalUser = true; isNormalUser = true;
packages = [ pkgs.vim ]; packages = [pkgs.vim];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"" ""
]; ];
@ -182,9 +183,11 @@
users.users.restic = { users.users.restic = {
# used for other machines to backup to # used for other machines to backup to
isNormalUser = true; isNormalUser = true;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJbPqzKB09U+i4Kqu136yOjflLZ/J7pYsNulTAd4x903 root@chromebox.h.lyte.dev" [
] ++ config.users.users.daniel.openssh.authorizedKeys.keys; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJbPqzKB09U+i4Kqu136yOjflLZ/J7pYsNulTAd4x903 root@chromebox.h.lyte.dev"
]
++ config.users.users.daniel.openssh.authorizedKeys.keys;
}; };
users.users.guest = { users.users.guest = {
@ -201,13 +204,13 @@
group = "plausible"; group = "plausible";
}; };
environment.systemPackages = [ pkgs.linuxquota ]; environment.systemPackages = [pkgs.linuxquota];
# TODO: make the client declarative? right now I think it's manually git # TODO: make the client declarative? right now I think it's manually git
# clone'd to /root # clone'd to /root
systemd.services.deno-netlify-ddns-client = { systemd.services.deno-netlify-ddns-client = {
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
path = with pkgs; [ curl bash ]; path = with pkgs; [curl bash];
environment = { environment = {
NETLIFY_DDNS_RC_FILE = "/root/deno-netlify-ddns-client/.env"; NETLIFY_DDNS_RC_FILE = "/root/deno-netlify-ddns-client/.env";
}; };
@ -216,8 +219,8 @@
''; '';
}; };
systemd.timers.deno-netlify-ddns-client = { systemd.timers.deno-netlify-ddns-client = {
wantedBy = [ "timers.target" ]; wantedBy = ["timers.target"];
partOf = [ "deno-netlify-ddns-client.service" ]; partOf = ["deno-netlify-ddns-client.service"];
timerConfig = { timerConfig = {
OnBootSec = "10sec"; OnBootSec = "10sec";
OnUnitActiveSec = "5min"; OnUnitActiveSec = "5min";
@ -277,7 +280,7 @@
nix.h.lyte.dev { nix.h.lyte.dev {
reverse_proxy :${toString config.services.nix-serve.port} reverse_proxy :${toString config.services.nix-serve.port}
} }
# proxy everything else to chromebox # proxy everything else to chromebox
:80 { :80 {
reverse_proxy 10.0.0.5:80 reverse_proxy 10.0.0.5:80
@ -369,7 +372,7 @@
services.postgresql = { services.postgresql = {
enable = true; enable = true;
ensureDatabases = [ "daniel" "plausible" ]; ensureDatabases = ["daniel" "plausible"];
ensureUsers = [ ensureUsers = [
{ {
name = "daniel"; name = "daniel";
@ -391,9 +394,9 @@
authentication = pkgs.lib.mkOverride 10 '' authentication = pkgs.lib.mkOverride 10 ''
#type database DBuser auth-method #type database DBuser auth-method
local all postgres peer map=superuser_map local all postgres peer map=superuser_map
local all daniel peer map=superuser_map local all daniel peer map=superuser_map
local sameuser all peer map=superuser_map local sameuser all peer map=superuser_map
local plausible plausible peer map=superuser_map local plausible plausible peer map=superuser_map
# lan ipv4 # lan ipv4
@ -452,8 +455,14 @@
services.openssh = { services.openssh = {
listenAddresses = [ listenAddresses = [
{ addr = "0.0.0.0"; port = 64022; } {
{ addr = "0.0.0.0"; port = 22; } addr = "0.0.0.0";
port = 64022;
}
{
addr = "0.0.0.0";
port = 22;
}
]; ];
}; };
@ -575,7 +584,7 @@
"/storage/postgres-backups" "/storage/postgres-backups"
]; ];
exclude = [ ]; exclude = [];
repository = "/storage/backups/local"; repository = "/storage/backups/local";
}; };
rascal = { rascal = {

View file

@ -1,8 +1,12 @@
{ config, lib, inputs, system, ... }:
let
pkgs = inputs.nixpkgs.legacyPackages.${system};
in
{ {
config,
lib,
inputs,
system,
...
}: let
pkgs = inputs.nixpkgs.legacyPackages.${system};
in {
services.journald.extraConfig = "SystemMaxUse=1G"; services.journald.extraConfig = "SystemMaxUse=1G";
environment = { environment = {
@ -68,8 +72,8 @@ in
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
]; ];
group = "daniel"; group = "daniel";
extraGroups = [ "users" "wheel" "video" ]; extraGroups = ["users" "wheel" "video"];
packages = [ ]; packages = [];
}; };
root = { root = {
@ -142,15 +146,15 @@ in
firewall = { firewall = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
allowPing = lib.mkDefault true; allowPing = lib.mkDefault true;
allowedTCPPorts = lib.mkDefault [ 22 ]; allowedTCPPorts = lib.mkDefault [22];
allowedUDPPorts = lib.mkDefault [ ]; allowedUDPPorts = lib.mkDefault [];
}; };
}; };
nix = { nix = {
settings = { settings = {
trusted-users = [ "root" "daniel" ]; trusted-users = ["root" "daniel"];
experimental-features = lib.mkDefault [ "nix-command" "flakes" ]; experimental-features = lib.mkDefault ["nix-command" "flakes"];
substituters = [ substituters = [
"https://cache.nixos.org/" "https://cache.nixos.org/"
"https://helix.cachix.org" "https://helix.cachix.org"

View file

@ -1,28 +1,29 @@
inputs @ { self, ... }: inputs @ {self, ...}: let
let
daniel = system: { daniel = system: {
home-manager.users.daniel = { home-manager.users.daniel = {
imports = [ ./home/user.nix ./home/linux.nix ]; imports = [./home/user.nix ./home/linux.nix];
}; };
}; };
hms = system: [ hms = system: [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
(daniel system) (daniel system)
]; ];
disko = args @ { scheme, ... }: [ disko = args @ {scheme, ...}: [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
self.diskoConfigurations.${scheme} self.diskoConfigurations.${scheme}
{ _module.args = args; } {_module.args = args;}
]; ];
nixosSystem = system: modules: (inputs.nixpkgs.lib.nixosSystem { nixosSystem = system: modules: (inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs system; }; specialArgs = {inherit inputs system;};
modules = [ modules =
inputs.sops-nix.nixosModules.sops [
./nixos/common.nix inputs.sops-nix.nixosModules.sops
] ++ modules ++ hms system; ./nixos/common.nix
]
++ modules
++ hms system;
}); });
in in {
{
# TODO: disko-fy rascal and beefcake? # TODO: disko-fy rascal and beefcake?
beefcake = nixosSystem "x86_64-linux" [ beefcake = nixosSystem "x86_64-linux" [
@ -30,23 +31,26 @@ in
inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev
]; ];
rascal = nixosSystem "x86_64-linux" [ ./nixos/rascal.nix ]; rascal = nixosSystem "x86_64-linux" [./nixos/rascal.nix];
musicbox = nixosSystem "x86_64-linux" (disko musicbox = nixosSystem "x86_64-linux" (disko
{ {
scheme = "unencrypted"; scheme = "unencrypted";
disks = [ "/dev/sda" ]; disks = ["/dev/sda"];
} ++ [ ./nixos/musicbox.nix ]); }
++ [./nixos/musicbox.nix]);
thinker = nixosSystem "x86_64-linux" (disko thinker = nixosSystem "x86_64-linux" (disko
{ {
scheme = "thinker"; scheme = "thinker";
disks = [ "/dev/nvme0n1" ]; disks = ["/dev/nvme0n1"];
} ++ [ ./nixos/thinker.nix ]); }
++ [./nixos/thinker.nix]);
dragon = nixosSystem "x86_64-linux" (disko dragon = nixosSystem "x86_64-linux" (disko
{ {
scheme = "standard"; scheme = "standard";
disks = [ "/dev/nvme0n1" ]; disks = ["/dev/nvme0n1"];
} ++ [ ./nixos/dragon.nix ]); }
++ [./nixos/dragon.nix]);
} }

View file

@ -1,43 +0,0 @@
{ modulesPath, lib, pkgs, ... }: {
imports =
[
../modules/amd.nix
../modules/desktop-usage.nix
../modules/podman.nix
../modules/wifi.nix
(modulesPath + "/installer/scan/not-detected.nix")
];
# TODO: fonts? right now, I'm just installing to ~/.local/share/fonts
# hardware
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
networking.hostName = "dragon";
hardware.bluetooth.enable = true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
services.printing.enable = true;
environment = {
systemPackages = with pkgs; [
radeontop
];
};
networking = {
firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = [ 22 ];
allowedUDPPorts = [ ];
};
};
system.stateVersion = "23.11";
}

Some files were not shown because too many files have changed in this diff Show more