Compare commits

..

No commits in common. "a6efbc9ea1879c212092ff2609ff16f8339867de" and "3856e961ff33ee06ba3dce51875a03ff2e6a12c3" have entirely different histories.

6 changed files with 24 additions and 35 deletions

View file

@ -55,16 +55,14 @@ def _upd(args: list):
"Visual Studio Code user settings": ".config/Code/User/settings.json.bak", "Visual Studio Code user settings": ".config/Code/User/settings.json.bak",
"fontconfig": ".config/fontconfig/conf.d/10-hm-fonts.conf.bak" "fontconfig": ".config/fontconfig/conf.d/10-hm-fonts.conf.bak"
} }
if "--rewrite-hardware-configuration" in args: print(f"{c.BLUE}Updating {c.YELLOW}NixOS{c.BLUE} hardware configuration file for {c.YELLOW}{gethostname()}{c.BLUE}{c.END}")
args.remove("--rewrite-hardware-configuration") run(["sudo", "nixos-generate-config", "--dir", ".",], cwd=path / "hosts")
print(f"{c.BLUE}Updating {c.YELLOW}NixOS{c.BLUE} hardware configuration file for {c.YELLOW}{gethostname()}{c.BLUE}{c.END}") print(f"{c.BLUE}Deleting redundant {c.YELLOW}NixOS{c.BLUE} configuration file{c.END}")
run(["sudo", "nixos-generate-config", "--dir", ".",], cwd=path / "hosts") run(["sudo", "rm", "configuration.nix"], cwd=path / "hosts")
print(f"{c.BLUE}Deleting redundant {c.YELLOW}NixOS{c.BLUE} configuration file{c.END}") print(f"{c.BLUE}Moving {c.YELLOW}NixOS{c.BLUE} hardware configuration file{c.END}")
run(["sudo", "rm", "configuration.nix"], cwd=path / "hosts") run(["sudo", "mv", "hardware-configuration.nix", "{hostname}.nix".format(hostname=gethostname())], cwd=path / "hosts")
print(f"{c.BLUE}Moving {c.YELLOW}NixOS{c.BLUE} hardware configuration file{c.END}") print(f"{c.BLUE}Adding {c.YELLOW}NixOS{c.BLUE} hardware configuration file for {c.YELLOW}{gethostname()}{c.BLUE} to git{c.END}")
run(["sudo", "mv", "hardware-configuration.nix", "{hostname}.nix".format(hostname=gethostname())], cwd=path / "hosts") run(["git", "add", "hosts/{hostname}.nix".format(hostname=gethostname())], cwd=path)
print(f"{c.BLUE}Adding {c.YELLOW}NixOS{c.BLUE} hardware configuration file for {c.YELLOW}{gethostname()}{c.BLUE} to git{c.END}")
run(["git", "add", "hosts/{hostname}.nix".format(hostname=gethostname())], cwd=path)
for file_description, file_path in files_to_delete.items(): for file_description, file_path in files_to_delete.items():
print(f"{c.BLUE}Deleting {c.YELLOW}{file_description}{c.BLUE} backup file{c.END}") print(f"{c.BLUE}Deleting {c.YELLOW}{file_description}{c.BLUE} backup file{c.END}")
run(["rm", file_path], exit_on_error=False, cwd="/home/cswimr") run(["rm", file_path], exit_on_error=False, cwd="/home/cswimr")
@ -98,15 +96,6 @@ def _edit(args):
return ["$EDITOR", *args] return ["$EDITOR", *args]
return ["$VISUAL", *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 = { alias_dictionary = {
"ff": "fastfetch", "ff": "fastfetch",
@ -129,6 +118,7 @@ alias_dictionary = {
"lsa": "eza -lah --time-style=long-iso --icons=auto --hyperlink", "lsa": "eza -lah --time-style=long-iso --icons=auto --hyperlink",
"tree": "eza --tree --git-ignore --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 --", "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", "nixrc": "edit /etc/nixos",

View file

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

View file

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

View file

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

View file

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

View file

@ -33,6 +33,7 @@
tmpfile = $(mktemp) tmpfile = $(mktemp)
gh copilot alias -- bash > @(tmpfile) gh copilot alias -- bash > @(tmpfile)
source-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)) execx($(${pkgs.any-nix-shell}/bin/any-nix-shell xonsh --info-right))
''; '';
package = pkgs.xonsh.override { package = pkgs.xonsh.override {