Compare commits

...

8 commits

Author SHA1 Message Date
a6efbc9ea1
only run nixos-generate-config in upd when a flag is given
this prevents the system from breaking on reboot when a docker container
or other storage mount is provided in the hardware configuration but is
not accessible anymore when booting
2025-01-14 12:18:47 -06:00
e70e06fdc0
update eclipse hostfile 2025-01-14 12:18:07 -06:00
fecb385fe7
add pam ulimit config 2025-01-13 15:45:07 -06:00
9caba70a4e
remove ulimit call from xonsh shell 2025-01-13 15:44:23 -06:00
75d319a32c
remove toybox & busybox, add mktemp 2025-01-13 15:43:47 -06:00
1d6bdf6187
move create-devenv alias to an exec alias 2025-01-13 15:43:30 -06:00
375441b5d2
vscode formatting change 2025-01-13 15:43:15 -06:00
94968c44a8
update eclipse hostfile 2025-01-13 15:43:05 -06:00
6 changed files with 35 additions and 24 deletions

View file

@ -55,6 +55,8 @@ def _upd(args: list):
"Visual Studio Code user settings": ".config/Code/User/settings.json.bak",
"fontconfig": ".config/fontconfig/conf.d/10-hm-fonts.conf.bak"
}
if "--rewrite-hardware-configuration" in args:
args.remove("--rewrite-hardware-configuration")
print(f"{c.BLUE}Updating {c.YELLOW}NixOS{c.BLUE} hardware configuration file for {c.YELLOW}{gethostname()}{c.BLUE}{c.END}")
run(["sudo", "nixos-generate-config", "--dir", ".",], cwd=path / "hosts")
print(f"{c.BLUE}Deleting redundant {c.YELLOW}NixOS{c.BLUE} configuration file{c.END}")
@ -96,6 +98,15 @@ def _edit(args):
return ["$EDITOR", *args]
return ["$VISUAL", *args]
@aliases.register
def _create_devenv(args):
if not args:
template = "simple"
else:
template = args[0]
run(["nix", "flake", "init", "--template", f"github:cswimr/dev-flakes#{template}"], cwd=Path.cwd(), exit_on_error=False)
run(["direnv", "allow"], cwd=Path.cwd())
alias_dictionary = {
"ff": "fastfetch",
@ -118,7 +129,6 @@ alias_dictionary = {
"lsa": "eza -lah --time-style=long-iso --icons=auto --hyperlink",
"tree": "eza --tree --git-ignore --time-style=long-iso --icons=auto --hyperlink",
"create-devenv": "nix flake init --template github:cachix/devenv and direnv allow",
"nixpkgs-update": "nix run --option extra-substituters 'https://nix-community.cachix.org/' --option extra-trusted-public-keys 'nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' github:ryantm/nixpkgs-update --",
"nixrc": "edit /etc/nixos",

View file

@ -297,7 +297,9 @@ rec {
};
};
"ruff.path" = [ "${pkgs.ruff}/bin/ruff" ];
"luau-lsp.serverPath" = "${pkgs.callPackage ../packages/luau-lsp.nix { inherit pkgs; }}/bin/luau-lsp";
"luau-lsp.server.path" = "${
pkgs.callPackage ../packages/luau-lsp.nix { inherit pkgs; }
}/bin/luau-lsp";
"python.terminal.activateEnvironment" = false;
"python.terminal.activateEnvInCurrentTerminal" = false;
"[csharp]" = {

View file

@ -29,11 +29,6 @@
fsType = "ext4";
};
fileSystems."/var/lib/docker/overlay2/c2bebdf07c5448d2a8739f6ef5186806e77b482f0e40e0cf320fc2cea8ae3de2/merged" =
{ device = "overlay";
fsType = "overlay";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/4eab8c8f-85c5-4a04-a03c-e111ada06ec0"; }
];
@ -43,13 +38,7 @@
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.br-3ac9b4dbe8bd.useDHCP = lib.mkDefault true;
# networking.interfaces.br-a1d891ddb0a1.useDHCP = lib.mkDefault true;
# networking.interfaces.br-bc06691dbb57.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
# networking.interfaces.veth3563f93.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View file

@ -129,6 +129,16 @@
enableSSHSupport = true;
};
# PAM modules
security.pam = {
loginLimits = [{
domain = "*";
type = "soft";
item = "nofile";
value = 8192;
}];
};
# List services that you want to enable:
# Enable the OpenSSH daemon.

View file

@ -55,8 +55,9 @@ let
croc
sops
ssh-to-age
toybox
busybox
#toybox
#busybox
mktemp
nix-search
gh
cloc

View file

@ -33,7 +33,6 @@
tmpfile = $(mktemp)
gh copilot alias -- bash > @(tmpfile)
source-bash @(tmpfile)
ulimit -n 4096 # This is so that Gauntlet is able to be built
execx($(${pkgs.any-nix-shell}/bin/any-nix-shell xonsh --info-right))
'';
package = pkgs.xonsh.override {