NixOS modules moved to flake root

This commit is contained in:
Daniel Flanagan 2024-06-28 11:50:18 -05:00
parent 985c365ed4
commit 8ebd884eb4
5 changed files with 1032 additions and 246 deletions

View file

@ -79,7 +79,7 @@
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"pre-commit-hooks", "pre-commit",
"nixpkgs" "nixpkgs"
] ]
}, },
@ -332,11 +332,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1710695816, "lastModified": 1718811006,
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "narHash": "sha256-0Y8IrGhRmBmT7HHXlxxepg2t8j1X90++qRN3lukGaIk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "614b4613980a522ba49f0d194531beddbb7220d3", "rev": "03d771e513ce90147b65fe922d87d3a0356fc125",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -346,22 +346,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1719082008,
"narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9693852a2070b398ee123a329e68f0dab5526681",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1718318537, "lastModified": 1718318537,
@ -410,7 +394,7 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit-hooks": { "pre-commit": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"gitignore": "gitignore", "gitignore": "gitignore",
@ -420,11 +404,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1717664902, "lastModified": 1719259945,
"narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -441,8 +425,7 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable", "pre-commit": "pre-commit",
"pre-commit-hooks": "pre-commit-hooks",
"slippi": "slippi", "slippi": "slippi",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
} }

1049
flake.nix

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,6 @@
}: let }: let
base = base =
{ {
# aliases?
text = fg; text = fg;
primary = blue; primary = blue;
urgent = red; urgent = red;
@ -50,10 +49,10 @@
} }
// scheme; // scheme;
in in
{ base
// {
withHashPrefix = lib.mapAttrs (_: value: "#${value}") base; withHashPrefix = lib.mapAttrs (_: value: "#${value}") base;
} };
// base;
in { in {
donokai = mkColorScheme { donokai = mkColorScheme {
scheme-name = "donokai"; scheme-name = "donokai";

View file

@ -12,93 +12,6 @@
}: let }: let
inherit (pkgs) system; inherit (pkgs) system;
in { in {
networking.hostName = lib.mkDefault "nixoslyte";
imports =
[
# (modulesPath + "/installer/scan/not-detected.nix")
# sops-nix.nixosModules.sops
# disko.nixosModules.disko
# home-manager.nixosModules.home-manager
]
++ [
# ./avahi.nix
# ./daniel.nix
];
hardware.enableRedistributableFirmware = true;
services.journald.extraConfig = "SystemMaxUse=1G";
home-manager.useGlobalPkgs = true;
home-manager.backupFileExtension = "hm-backup";
# home-manager.useUserPkgs = true; # wut is this?
environment = {
variables = {
EDITOR = "hx";
SYSTEMD_EDITOR = "hx";
VISUAL = "hx";
PAGER = "less";
MANPAGER = "less";
};
systemPackages = with pkgs; [
atuin
# age
# bat
# bc
# bind
# bottom
# btrfs-progs
# cue
curl
# dogdns
dua
eza
fd
file
fzf
gnumake
gnupg
# gron
# hexyl
iputils
# jq
killall
less
mosh
# nmap
nettools
nodePackages.bash-language-server
openssl
# pciutils
# pv
# rclone
# restic
ripgrep
rsync
# rtx
sd
shellcheck
shfmt
# sops
smartmontools
# sqlite
# skim
# sysstat
unzip
# usbutils
# watchexec
wget
# xh
zellij
# zstd
inputs.home-manager.packages.${system}.home-manager
inputs.helix.packages.${system}.helix
];
};
users.groups.valerie = {}; users.groups.valerie = {};
users.groups.daniel = {}; users.groups.daniel = {};
@ -126,100 +39,6 @@ in {
extraGroups = ["users" "video"]; extraGroups = ["users" "video"];
packages = []; packages = [];
}; };
root = {
openssh.authorizedKeys.keys = config.users.users.daniel.openssh.authorizedKeys.keys;
};
};
i18n = {
defaultLocale = "en_US.UTF-8";
};
programs.mosh = {
enable = true;
openFirewall = true;
};
services = {
xserver.xkb = {
layout = "us";
options = "ctrl:nocaps";
};
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "prohibit-password";
};
openFirewall = lib.mkDefault true;
# listenAddresses = [
# { addr = "0.0.0.0"; port = 22; }
# ];
};
tailscale = {
enable = true;
useRoutingFeatures = lib.mkDefault "client";
};
fwupd.enable = true;
smartd.enable = true;
};
console = {
# font = "Lat2-Terminus16";
useXkbConfig = true;
earlySetup = true;
colors = with colors; [
bg
red
green
orange
blue
purple
yellow
fg3
fgdim
red
green
orange
blue
purple
yellow
fg
];
};
networking = {
useDHCP = lib.mkDefault true;
firewall = {
enable = lib.mkDefault true;
allowPing = lib.mkDefault true;
allowedTCPPorts = lib.mkDefault [22];
allowedUDPPortRanges = [
{
# mosh
from = 60000;
to = 60010;
}
];
};
extraHosts = ''
::1 host.docker.internal
127.0.0.1 host.docker.internal
::1 host.containers.internal
127.0.0.1 host.containers.internal
'';
}; };
programs = { programs = {

View file

@ -1,6 +1,6 @@
{pkgs, ...}: rec { {callPackage, ...}: rec {
iosevkaLyteTerm = pkgs.callPackage ./iosevkaLyteTerm.nix {}; iosevkaLyteTerm = callPackage ./iosevkaLyteTerm.nix {};
iosevkaLyteTermSubset = pkgs.callPackage ./iosevkaLyteTermSubset.nix { iosevkaLyteTermSubset = callPackage ./iosevkaLyteTermSubset.nix {
inherit iosevkaLyteTerm; inherit iosevkaLyteTerm;
}; };
} }