Skip to content

Commit

Permalink
changes for iso and such
Browse files Browse the repository at this point in the history
  • Loading branch information
anna328p committed Sep 18, 2024
1 parent dc61244 commit 402b864
Show file tree
Hide file tree
Showing 11 changed files with 135 additions and 47 deletions.
8 changes: 4 additions & 4 deletions common/base/hardware.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:

{
boot = {
tmp.useTmpfs = true;
initrd.systemd.enable = true;
tmp.useTmpfs = lib.mkDefault true;
initrd.systemd.enable = lib.mkDefault true;
};

system.etc.overlay = {
enable = true;
enable = lib.mkDefault true;

# mutable = false;
# TODO: broken by nixpkgs#328926
Expand Down
2 changes: 1 addition & 1 deletion common/base/users.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
};

users.root = {
initialHashedPassword = passwdHash;
initialHashedPassword = lib.mkDefault passwdHash;
openssh.authorizedKeys.keys = [ sshPubKey ];
};
};
Expand Down
1 change: 1 addition & 0 deletions common/impermanent/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
".config/discord"
".config/easyeffects"
".config/keepassxc"
".config/github-copilot"

".config/Logseq"
".logseq"
Expand Down
61 changes: 44 additions & 17 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 33 additions & 21 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@

# android

nix-on-droid = {
url = github:nix-community/nix-on-droid;
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
nix-on-droid.url = github:nix-community/nix-on-droid;
nix-on-droid.inputs = {
nixpkgs.follows = "nixpkgs";
nixpkgs-docs.follows = "nixpkgs";
home-manager.follows = "home-manager";
};

# modules
Expand All @@ -38,6 +39,12 @@
impermanence.url = github:nix-community/impermanence;
intransience.url = github:anna328p/intransience;

nixos-generators.url = github:nix-community/nixos-generators;
nixos-generators.inputs = {
nixpkgs.follows = "nixpkgs";
nixlib.follows = "nixpkgs";
};

nix-colors.url = github:misterio77/nix-colors;
nix-colors.inputs.nixpkgs-lib.follows = "nixpkgs";

Expand All @@ -46,25 +53,20 @@

qbot.url = github:arch-community/qbot;

snm = {
url = gitlab:simple-nixos-mailserver/nixos-mailserver;
inputs = {
nixpkgs.follows = "nixpkgs";
nixpkgs-24_05.follows = "nixpkgs";
flake-compat.follows = "flake-compat";
};
snm.url = gitlab:simple-nixos-mailserver/nixos-mailserver;
snm.inputs = {
nixpkgs.follows = "nixpkgs";
nixpkgs-24_05.follows = "nixpkgs";
flake-compat.follows = "flake-compat";
};

# packages

neovim-nightly-overlay = {
url = github:nix-community/neovim-nightly-overlay;

inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
flake-compat.follows = "flake-compat";
};
neovim-nightly-overlay.url = github:nix-community/neovim-nightly-overlay;
neovim-nightly-overlay.inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
flake-compat.follows = "flake-compat";
};

nil.url = github:oxalica/nil;
Expand All @@ -85,6 +87,9 @@
nvim-treesitter.url = github:nvim-treesitter/nvim-treesitter;
nvim-treesitter.flake = false;

copilot-lualine.url = github:AndreM222/copilot-lualine;
copilot-lualine.flake = false;

easyeffects-presets.url = github:digitalone1/easyeffects-presets;
easyeffects-presets.flake = false;

Expand Down Expand Up @@ -112,9 +117,10 @@
, nil
, nix-prelude
, nix-on-droid
, nixos-generators
, ...
}@flakes: let
localPkgs = import ./pkgs flakes;
localPkgs = import ./pkgs { inherit flakes; };

##
# Module paths
Expand Down Expand Up @@ -150,6 +156,8 @@
angelia = systems/angelia;
heracles = systems/heracles;
iris = systems/iris;

iso = systems/iso;
};
};

Expand Down Expand Up @@ -260,7 +268,11 @@
overlays = [ self.overlays.default ];
};
in
localPkgs.mkPackageSet pkgs
(localPkgs.mkPackageSet pkgs)
// {
iso-x86_64 = import ./images/iso-x86_64
{ inherit pkgs flakes specialArgs; };
}
);
};
}
15 changes: 12 additions & 3 deletions home/workstation/editor.nix
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,15 @@
(CallFrom (Require "gitsigns") "setup" { })
]) { })

v.copilot-lualine

(luaPlugin v.lualine-nvim (Code [
(CallFrom (Require "lualine") "setup" {
options = {
icons_enabled = false;
theme = "base16";

sections.lualine_y = [ "copilot" "progress" ];
};
})
]) { })
Expand Down Expand Up @@ -268,9 +272,9 @@
gemCmd = exe: test: args: [
"bash"
"-c"
("bundle exec steep --version"
+ " && exec bundle exec steep langserver"
+ " || exec steep langserver")
("bundle exec ${exe} ${test}"
+ " && exec bundle exec ${exe} ${args}"
+ " || exec ${exe} ${args}")
];

rubyLS = name: cmd: extra:
Expand Down Expand Up @@ -314,6 +318,7 @@
single_file_support = true;
})

# make nil-ls a semanticTokensProvider
(Call <vim.api.nvim_create_autocmd> [ "LspAttach" {
callback = Function ({ args }: [
(SetLocal <cid>
Expand All @@ -328,6 +333,10 @@
"semanticTokensProvider" ])
null) ])]);
} ])

# code action keybind to alt+enter
(Call <vim.keymap.set> [ "n" "<M-CR>"
<vim.lsp.buf.code_action> ])
]) { })

(let
Expand Down
13 changes: 13 additions & 0 deletions images/iso-x86_64/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ flakes, specialArgs, ... }:

flakes.nixos-generators.nixosGenerate {
system = "x86_64-linux";

modules = [
../../systems/iso
];

inherit specialArgs;

format = "install-iso";
}
2 changes: 2 additions & 0 deletions pkgs/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ in {
keydb = callPackage' ./keydb { };

neovim-ruby-env = callPackage' ./neovim-ruby-env { };

iso-x86_64 = callPackage' ./iso-x86_64 { };
}
4 changes: 3 additions & 1 deletion pkgs/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ nixpkgs, ... }@flakes:
{ flakes }:

let
inherit (flakes) nixpkgs;

truncateRev = builtins.substring 0 7;

mkFlakeVer = flake: prefix:
Expand Down
1 change: 1 addition & 0 deletions pkgs/overlays/vim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ in {
} // buildPluginsFrom flakes [
"vim-slim"
"rainbow-delimiters-nvim"
"copilot-lualine"
]);
}
21 changes: 21 additions & 0 deletions systems/iso/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ localModules, ... }:

{
imports = let
inherit (localModules) common;
in [
common.base
common.physical
];

networking.hostName = "nixos-iso";

services.openssh.enable = true;

misc.uuid = "b210a256-c9d0-4c44-a658-28ce6fe204b7";

boot.initrd.systemd.enable = false;
system.etc.overlay.enable = false;

time.timeZone = "Etc/UTC";
}

0 comments on commit 402b864

Please sign in to comment.